Module jfxtras.icalendaragenda
Class ReviserDisplayable<T,U extends VDisplayable<U>>
java.lang.Object
jfxtras.scene.control.agenda.icalendar.editors.revisors.ReviserDisplayable<T,U>
- Type Parameters:
T
- concrete implementation of this classU
- concreteVDisplayable
class
- All Implemented Interfaces:
Reviser
- Direct Known Subclasses:
ReviserLocatable
,ReviserVJournal
public abstract class ReviserDisplayable<T,U extends VDisplayable<U>>
extends Object
implements Reviser
Handles revising one or all recurrences of a
VDisplayable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enum
Enum that identifies the VComponent's recurrence rule status -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate javafx.util.Callback
<Map<ChangeDialogOption, javafx.util.Pair<Temporal, Temporal>>, ChangeDialogOption> private Temporal
private Temporal
private U
private U
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
adjustDateTime
(U vComponentEditedCopy) Adjust start date/time according to changes in selected recurrenceprivate List
<VDisplayable<?>> adjustRecurrenceChildren
(Temporal startRecurrence, Temporal startOriginalRecurrence) (package private) void
adjustStartAndEnd
(U vComponentEditedCopy, U vComponentOriginalCopy) (package private) void
becomeNonRecurring
(U vComponentEditedCopy) Make changes necessary for making a repeating component into a non-repeating componentReturned list ofVPropertyElement
values, that when changed, necessitate a user dialog to determine scope of change.(package private) void
ONE Edit one instance of a VEvent with a RRule.(package private) U
editThisAndFuture
(U vComponentEditedCopy, U vComponentOriginal) THIS AND FUTURE Handles changing this-and-future recurrences in a VComponent by ending the original VComponent with a UNTIL date or date/time, then starting a new VComponent from the selected recurrence.(package private) Collection
<VPropertyElement> findChangedProperties
(U vComponentEditedCopy, U vComponentOriginalCopy) Generates a list ofVPropertyElement
that have changed between the original and edited VComponents.javafx.util.Callback
<Map<ChangeDialogOption, javafx.util.Pair<Temporal, Temporal>>, ChangeDialogOption> Gets the value of the dialog callback to prompt the user to select revision optionGets the value of the start of the selected recurrence, before changesGets the value of the start of the selected recurrence, after changesGets the value of the editedVDisplayable
copy.Gets the value of the originalVDisplayable
(package private) boolean
isValid()
Tests the object state is valid and revision can proceed.revise()
Revise list of iTIP VCalendar components that represent the changes.void
setDialogCallback
(javafx.util.Callback<Map<ChangeDialogOption, javafx.util.Pair<Temporal, Temporal>>, ChangeDialogOption> dialogCallback) Sets the value of the dialog callback to prompt the user to select revision optionvoid
setStartOriginalRecurrence
(Temporal startOriginalRecurrence) Sets the value of the start of the selected recurrence, before changesvoid
setStartRecurrence
(Temporal startRecurrence) Sets the value of the start of the selected recurrence, after changesvoid
setVComponentCopyEdited
(U vComponentEdited) Sets the value of the editedVDisplayable
copy.void
setVComponentOriginal
(U vComponentOriginal) Sets the value of the originalVDisplayable
private void
thisAndFutureIgnoreRecurrences
(List<U> revisedVComponents, U vComponentEditedCopy) Deprecated.(package private) void
validateStartRecurrenceAndDTStart
(U vComponentEditedCopy, Temporal startRecurrence) If startRecurrence isn't valid due to a RRULE change, change startRecurrence and endRecurrence to closest valid valueswithDialogCallback
(javafx.util.Callback<Map<ChangeDialogOption, javafx.util.Pair<Temporal, Temporal>>, ChangeDialogOption> dialogCallback) Sets the value of the dialog callback to prompt the user to select revision optionwithStartOriginalRecurrence
(Temporal startOriginalRecurrence) Sets the value of the start of the selected recurrence, before changeswithStartRecurrence
(Temporal startRecurrence) Sets the value of the start of the selected recurrence, after changeswithVComponentCopyEdited
(U vComponentEdited) Sets the value of the editedVDisplayable
withVComponentOriginal
(U vComponentOriginal) Sets the value of the editedVDisplayable
-
Field Details
-
vComponentEditedCopy
-
vComponentOriginal
-
startOriginalRecurrence
-
startRecurrence
-
dialogCallback
private javafx.util.Callback<Map<ChangeDialogOption,javafx.util.Pair<Temporal, dialogCallbackTemporal>>, ChangeDialogOption>
-
-
Constructor Details
-
ReviserDisplayable
-
-
Method Details
-
getVComponentCopyEdited
Gets the value of the editedVDisplayable
copy. Note: don't pass original or the changes will be instantaneous and cancel is not possible. -
setVComponentCopyEdited
Sets the value of the editedVDisplayable
copy. Note: don't pass original or the changes will be instantenous and cancel is not possible. -
withVComponentCopyEdited
Sets the value of the editedVDisplayable
- Returns:
- - this class for chaining
- See Also:
-
getVComponentOriginal
Gets the value of the originalVDisplayable
-
setVComponentOriginal
Sets the value of the originalVDisplayable
-
withVComponentOriginal
Sets the value of the editedVDisplayable
- Returns:
- - this class for chaining
- See Also:
-
getStartOriginalRecurrence
Gets the value of the start of the selected recurrence, before changes -
setStartOriginalRecurrence
Sets the value of the start of the selected recurrence, before changes -
withStartOriginalRecurrence
Sets the value of the start of the selected recurrence, before changes- Returns:
- - this class for chaining
-
getStartRecurrence
Gets the value of the start of the selected recurrence, after changes -
setStartRecurrence
Sets the value of the start of the selected recurrence, after changes -
withStartRecurrence
Sets the value of the start of the selected recurrence, after changes- Returns:
- - this class for chaining
-
getDialogCallback
public javafx.util.Callback<Map<ChangeDialogOption,javafx.util.Pair<Temporal, getDialogCallback()Temporal>>, ChangeDialogOption> Gets the value of the dialog callback to prompt the user to select revision option -
setDialogCallback
public void setDialogCallback(javafx.util.Callback<Map<ChangeDialogOption, javafx.util.Pair<Temporal, Temporal>>, ChangeDialogOption> dialogCallback) Sets the value of the dialog callback to prompt the user to select revision option -
withDialogCallback
public T withDialogCallback(javafx.util.Callback<Map<ChangeDialogOption, javafx.util.Pair<Temporal, Temporal>>, ChangeDialogOption> dialogCallback) Sets the value of the dialog callback to prompt the user to select revision option- Returns:
- - this class for chaining
-
isValid
boolean isValid()Tests the object state is valid and revision can proceed. Returns true if valid, false otherwise -
revise
Description copied from interface:Reviser
Revise list of iTIP VCalendar components that represent the changes. -
adjustRecurrenceChildren
private List<VDisplayable<?>> adjustRecurrenceChildren(Temporal startRecurrence, Temporal startOriginalRecurrence) -
validateStartRecurrenceAndDTStart
If startRecurrence isn't valid due to a RRULE change, change startRecurrence and endRecurrence to closest valid values -
becomeNonRecurring
Make changes necessary for making a repeating component into a non-repeating component -
adjustDateTime
Adjust start date/time according to changes in selected recurrence -
findChangedProperties
Collection<VPropertyElement> findChangedProperties(U vComponentEditedCopy, U vComponentOriginalCopy) Generates a list ofVPropertyElement
that have changed between the original and edited VComponents.- Parameters:
vComponentEditedCopy
- edited VComponentvComponentOriginalCopy
- original VComponent- Returns:
- list of changed
VPropertyElement
-
dialogRequiredProperties
Returned list ofVPropertyElement
values, that when changed, necessitate a user dialog to determine scope of change. If changes do not contain ANYVPropertyElement
in the returned list then changes can proceed automatically without a user dialog.- Returns:
List<VPropertyElement>
that when any are changed require a user dialog to request scope of change (e.g. ONE, ALL or THIS_AND_FUTURE)
-
editOne
ONE Edit one instance of a VEvent with a RRule. The instance becomes a new VEvent without a RRule as with the same UID as the parent and a recurrence-id for the replaced date or date/time. -
editThisAndFuture
THIS AND FUTURE Handles changing this-and-future recurrences in a VComponent by ending the original VComponent with a UNTIL date or date/time, then starting a new VComponent from the selected recurrence. EXDATE, RDATE and RECURRENCES are split between both VComponents.- Parameters:
vComponentEditedCopy
- VComponent with changesvComponentOriginalCopy
- Unchanged VComponent, except for addition of the UNTIL element.
-
thisAndFutureIgnoreRecurrences
@Deprecated private void thisAndFutureIgnoreRecurrences(List<U> revisedVComponents, U vComponentEditedCopy) Deprecated.Handle changing theUniqueIdentifier
of recurrence children, if any exist, to match theUniqueIdentifier
of the revised VComponent -
adjustStartAndEnd
-