Class ContainerParticipant

java.lang.Object
com.iizigo.editor.complex.ContainerParticipant

public class ContainerParticipant extends Object
Container participant class in the ComplexOperation.

A participant records the children of a container before the operation (atomsBefore, at its creation) and after it (atomsAfter, recorded by the operation when it has executed and again after each redo). Before a redo the container must hold the children of before, before an undo those of after - otherwise something else changed the container since and the operation refuses, so the Undo or Redo menu entry is greyed instead of replaying into a container that no longer matches. The undo validation is off for a container the operation removes or moves (it is not there to validate), the redo validation for one the operation introduces itself (it is not there before the redo). The framework's own children (names beginning with $: $layout, $designer, $styles, $uiPreview, ..., which the Designer creates on demand) do not take part. A container that is not index based keeps no index for its children: its participant also restores the array order after an undo and a redo.

Author:
Christopher Mindus
  • Method Details

    • getPropCnr

      public PropCnr getPropCnr() throws PropException
      Gets the property container, will only work if valid, otherwise it may return null or throw ClassCastException.
      Throws:
      PropException
    • enablePostReordering

      public void enablePostReordering(boolean doRedoReordering, boolean doUndoReordering)
      Enables post reordering of container after operation.
    • toString

      public String toString()
      Formats to string.
      Overrides:
      toString in class Object