Interface UndoManagerFactory
-
public interface UndoManagerFactory
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <C> UndoManager<java.util.List<C>>createMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply)Creates anUndoManagerthat tracks lists of changes emitted fromchangeStream.default <C> UndoManager<java.util.List<C>>createMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge)Creates anUndoManagerthat tracks and optionally merges lists of changes emitted fromchangeStream.default <C> UndoManager<java.util.List<C>>createMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)Creates anUndoManagerthat tracks and optionally merges lists of changes emitted fromchangeStream.<C> UndoManager<java.util.List<C>>createMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)Creates anUndoManagerthat tracks and optionally merges lists of changes emitted fromchangeStream.default <C> UndoManager<C>createSingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply)Creates anUndoManagerthat tracks changes emitted fromchangeStream.default <C> UndoManager<C>createSingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge)Creates anUndoManagerthat tracks and optionally merges changes emitted fromchangeStream.default <C> UndoManager<C>createSingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)Creates anUndoManagerthat tracks and optionally merges changes emitted fromchangeStream.<C> UndoManager<C>createSingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)Creates anUndoManagerthat tracks and optionally merges changes emitted fromchangeStream.static UndoManagerFactoryfixedSizeHistoryFactory(int capacity)Creates a factory forUndoManagers with bounded history.static <C> UndoManager<java.util.List<C>>fixedSizeHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, int capacity)Creates anUndoManagerwith bounded history.static <C> UndoManager<java.util.List<C>>fixedSizeHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, int capacity)Creates anUndoManagerwith bounded history.static <C> UndoManager<java.util.List<C>>fixedSizeHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay, int capacity)Creates anUndoManagerwith bounded history.static <C> UndoManager<C>fixedSizeHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, int capacity)Creates anUndoManagerwith bounded history.static <C> UndoManager<C>fixedSizeHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, int capacity)Creates anUndoManagerwith bounded history.static <C> UndoManager<C>fixedSizeHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay, int capacity)Creates anUndoManagerwith bounded history.static UndoManagerFactoryunlimitedHistoryFactory()Creates a factory forUndoManagers with unlimited history.static <C> UndoManager<java.util.List<C>>unlimitedHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply)Creates anUndoManagerwith unlimited history.static <C> UndoManager<java.util.List<C>>unlimitedHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge)Creates anUndoManagerwith unlimited history.static <C> UndoManager<java.util.List<C>>unlimitedHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)Creates anUndoManagerwith unlimited history.static <C> UndoManager<java.util.List<C>>unlimitedHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)Creates anUndoManagerwith unlimited history.static <C> UndoManager<C>unlimitedHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply)Creates anUndoManagerwith unlimited history.static <C> UndoManager<C>unlimitedHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge)Creates anUndoManagerwith unlimited history.static <C> UndoManager<C>unlimitedHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)Creates anUndoManagerwith unlimited history.static <C> UndoManager<C>unlimitedHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)Creates anUndoManagerwith unlimited history.static UndoManagerFactoryzeroHistoryFactory()Creates a factory forUndoManagers with no history.static <C> UndoManager<java.util.List<C>>zeroHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream)Creates anUndoManagerwith no history: all changes emitted fromchangeStreamwill be immediately forgotten.static <C> UndoManager<C>zeroHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream)Creates anUndoManagerwith no history: all changes emitted fromchangeStreamwill be immediately forgotten.
-
-
-
Method Detail
-
createSingleChangeUM
default <C> UndoManager<C> createSingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply)
Creates anUndoManagerthat tracks changes emitted fromchangeStream.- Type Parameters:
C- representation of a change- Parameters:
invert- Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).apply- Used to apply a change. From the point of view ofapply,Cdescribes an action to be performed. Callingapply.accept(c)must causecto be emitted fromchangeStream.
-
createSingleChangeUM
default <C> UndoManager<C> createSingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge)
Creates anUndoManagerthat tracks and optionally merges changes emitted fromchangeStream.- Type Parameters:
C- representation of a change- Parameters:
invert- Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).apply- Used to apply a change. From the point of view ofapply,Cdescribes an action to be performed. Callingapply.accept(c)must causecto be emitted fromchangeStream.merge- Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged.
-
createSingleChangeUM
default <C> UndoManager<C> createSingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)
Creates anUndoManagerthat tracks and optionally merges changes emitted fromchangeStream.- Type Parameters:
C- representation of a change- Parameters:
invert- Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).apply- Used to apply a change. From the point of view ofapply,Cdescribes an action to be performed. Callingapply.accept(c)must causecto be emitted fromchangeStream.merge- Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged. If two changes "annihilate" (i.e.merge.apply(c1, c2).isPresen()andisIdentity.test(merge.apply(c1, c2).get())are bothtrue), it should be the case that one is inverse of the other (invert.apply(c1).equals(c2)).isIdentity- returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function.identity()) on the underlying model.
-
createSingleChangeUM
<C> UndoManager<C> createSingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)
Creates anUndoManagerthat tracks and optionally merges changes emitted fromchangeStream.- Type Parameters:
C- representation of a change- Parameters:
invert- Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).apply- Used to apply a change. From the point of view ofapply,Cdescribes an action to be performed. Callingapply.accept(c)must causecto be emitted fromchangeStream.merge- Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged. If two changes "annihilate" (i.e.merge.apply(c1, c2).isPresen()andisIdentity.test(merge.apply(c1, c2).get())are bothtrue), it should be the case that one is inverse of the other (invert.apply(c1).equals(c2)).isIdentity- returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function.identity()) on the underlying model.preventMergeDelay- the amount by which to wait before callingUndoManager.preventMerge(). Helpful when one wants to prevent merges after a period of inactivity (thechangeStreamdoesn't emit an event after the given duration). Passing in a negative or zero duration will never callUndoManager.preventMerge().
-
unlimitedHistorySingleChangeUM
static <C> UndoManager<C> unlimitedHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply)
Creates anUndoManagerwith unlimited history. For description of parameters, seecreateSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
-
unlimitedHistorySingleChangeUM
static <C> UndoManager<C> unlimitedHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge)
Creates anUndoManagerwith unlimited history. For description of parameters, seecreateSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
-
unlimitedHistorySingleChangeUM
static <C> UndoManager<C> unlimitedHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)
Creates anUndoManagerwith unlimited history. For description of parameters, seecreateSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
-
unlimitedHistorySingleChangeUM
static <C> UndoManager<C> unlimitedHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)
Creates anUndoManagerwith unlimited history. For description of parameters, seecreateSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
-
fixedSizeHistorySingleChangeUM
static <C> UndoManager<C> fixedSizeHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, int capacity)
Creates anUndoManagerwith bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.For description of the remaining parameters, see
createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).- Parameters:
capacity- maximum number of changes the returned UndoManager can store
-
fixedSizeHistorySingleChangeUM
static <C> UndoManager<C> fixedSizeHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, int capacity)
Creates anUndoManagerwith bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.For description of the remaining parameters, see
createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).- Parameters:
capacity- maximum number of changes the returned UndoManager can store
-
fixedSizeHistorySingleChangeUM
static <C> UndoManager<C> fixedSizeHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<C> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay, int capacity)
Creates anUndoManagerwith bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.For description of the remaining parameters, see
createSingleChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).- Parameters:
capacity- maximum number of changes the returned UndoManager can store
-
zeroHistorySingleChangeUM
static <C> UndoManager<C> zeroHistorySingleChangeUM(org.reactfx.EventStream<C> changeStream)
Creates anUndoManagerwith no history: all changes emitted fromchangeStreamwill be immediately forgotten. Therefore, the returned UndoManager will never be able to undo/redo any change emitted fromchangeStream. However, the (imaginary) current position will keep advancing, so that one can still useUndoManager.atMarkedPositionProperty()to determine whether any change has occurred since the lastUndoManager.mark()(e.g. since the last save).
-
createMultiChangeUM
default <C> UndoManager<java.util.List<C>> createMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply)
Creates anUndoManagerthat tracks lists of changes emitted fromchangeStream.- Type Parameters:
C- representation of a change- Parameters:
invert- Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).apply- Used to apply a list of changes.listdescribes a list of actions to be performed. Callingapply.accept(list)must causelistto be emitted from thechangeStream.
-
createMultiChangeUM
default <C> UndoManager<java.util.List<C>> createMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge)
Creates anUndoManagerthat tracks and optionally merges lists of changes emitted fromchangeStream.- Type Parameters:
C- representation of a change- Parameters:
invert- Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).apply- Used to apply a list of changes.listdescribes a list of actions to be performed. Callingapply.accept(list)must causelistto be emitted from thechangeStream.merge- Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged.
-
createMultiChangeUM
default <C> UndoManager<java.util.List<C>> createMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)
Creates anUndoManagerthat tracks and optionally merges lists of changes emitted fromchangeStream.- Type Parameters:
C- representation of a change- Parameters:
invert- Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).apply- Used to apply a list of changes.listdescribes a list of actions to be performed. Callingapply.accept(list)must causelistto be emitted from thechangeStream.merge- Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged. If two changes "annihilate" (i.e.merge.apply(c1, c2).isPresen()andisIdentity.test(merge.apply(c1, c2).get())are bothtrue), it should be the case that one is inverse of the other (invert.apply(c1).equals(c2)).isIdentity- returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function.identity()) on the underlying model.
-
createMultiChangeUM
<C> UndoManager<java.util.List<C>> createMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)
Creates anUndoManagerthat tracks and optionally merges lists of changes emitted fromchangeStream.- Type Parameters:
C- representation of a change- Parameters:
invert- Inverts a change, so that applying the inverted change (apply.accept(invert.apply(c))) has the effect of undoing the original change (c). Inverting a change twice should result in the original change (invert.apply(invert.apply(c)).equals(c)).apply- Used to apply a list of changes.listdescribes a list of actions to be performed. Callingapply.accept(list)must causelistto be emitted from thechangeStream.merge- Used to merge two subsequent changes into one. Returns an empty Optional when the changes cannot or should not be merged. If two changes "annihilate" (i.e.merge.apply(c1, c2).isPresen()andisIdentity.test(merge.apply(c1, c2).get())are bothtrue), it should be the case that one is inverse of the other (invert.apply(c1).equals(c2)).isIdentity- returns true for changes whose application would have no effect, thereby equivalent to an identity function (Function.identity()) on the underlying model.preventMergeDelay- the amount by which to wait before callingUndoManager.preventMerge(). Helpful when one wants to prevent merges after a period of inactivity (thechangeStreamdoesn't emit an event after the given duration). Passing in a negative or zero duration will never callUndoManager.preventMerge().
-
unlimitedHistoryMultiChangeUM
static <C> UndoManager<java.util.List<C>> unlimitedHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply)
Creates anUndoManagerwith unlimited history. For description of parameters, seecreateMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
-
unlimitedHistoryMultiChangeUM
static <C> UndoManager<java.util.List<C>> unlimitedHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge)
Creates anUndoManagerwith unlimited history. For description of parameters, seecreateMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
-
unlimitedHistoryMultiChangeUM
static <C> UndoManager<java.util.List<C>> unlimitedHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity)
Creates anUndoManagerwith unlimited history. For description of parameters, seecreateMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
-
unlimitedHistoryMultiChangeUM
static <C> UndoManager<java.util.List<C>> unlimitedHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay)
Creates anUndoManagerwith unlimited history. For description of parameters, seecreateMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).
-
fixedSizeHistoryMultiChangeUM
static <C> UndoManager<java.util.List<C>> fixedSizeHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, int capacity)
Creates anUndoManagerwith bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.For description of the remaining parameters, see
createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).- Parameters:
capacity- maximum number of changes the returned UndoManager can store
-
fixedSizeHistoryMultiChangeUM
static <C> UndoManager<java.util.List<C>> fixedSizeHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, int capacity)
Creates anUndoManagerwith bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.For description of the remaining parameters, see
createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).- Parameters:
capacity- maximum number of changes the returned UndoManager can store
-
fixedSizeHistoryMultiChangeUM
static <C> UndoManager<java.util.List<C>> fixedSizeHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream, java.util.function.Function<? super C,? extends C> invert, java.util.function.Consumer<java.util.List<C>> apply, java.util.function.BiFunction<C,C,java.util.Optional<C>> merge, java.util.function.Predicate<C> isIdentity, java.time.Duration preventMergeDelay, int capacity)
Creates anUndoManagerwith bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.For description of the remaining parameters, see
createMultiChangeUM(EventStream, Function, Consumer, BiFunction, Predicate, Duration).- Parameters:
capacity- maximum number of changes the returned UndoManager can store
-
zeroHistoryMultiChangeUM
static <C> UndoManager<java.util.List<C>> zeroHistoryMultiChangeUM(org.reactfx.EventStream<java.util.List<C>> changeStream)
Creates anUndoManagerwith no history: all changes emitted fromchangeStreamwill be immediately forgotten. Therefore, the returned UndoManager will never be able to undo/redo any change emitted fromchangeStream. However, the (imaginary) current position will keep advancing, so that one can still useUndoManager.atMarkedPositionProperty()to determine whether any change has occurred since the lastUndoManager.mark()(e.g. since the last save).
-
unlimitedHistoryFactory
static UndoManagerFactory unlimitedHistoryFactory()
Creates a factory forUndoManagers with unlimited history.
-
fixedSizeHistoryFactory
static UndoManagerFactory fixedSizeHistoryFactory(int capacity)
Creates a factory forUndoManagers with bounded history. When at full capacity, a new change will cause the oldest change to be forgotten.
-
zeroHistoryFactory
static UndoManagerFactory zeroHistoryFactory()
Creates a factory forUndoManagers with no history.
-
-