Class EditorTextTable

All Implemented Interfaces:
IFilePropChangeListener, IPropDesigner, IPropUndoContext, EventListener, IGProp<GProp<?>[]>, IPropCnr, IReferenceOwner<TextTable>, IReferencingPropCnr, ITextTableReferenceOwner, Cloneable, IAdaptable

public class EditorTextTable extends TextTable implements IPropDesigner, IPropUndoContext, IFilePropChangeListener
This Selector property container for the Editor.
  • Field Details

    • EMPTY_ARRAY

      public static final EditorTextTable[] EMPTY_ARRAY
      An empty array.
  • Constructor Details

    • EditorTextTable

      public EditorTextTable()
      Creates the screen identification property container without a name. The name must be set in all cases using the setPropertyAtom call.
    • EditorTextTable

      public EditorTextTable(Atom propertyAtom)
      Creates the screen identification property container with the specified name. All system-reserved names for components begins with "$".
      Parameters:
      propertyAtom - the name of the component, unique within it's parent.
  • Method Details

    • getDesigner

      public TextTableDesignerProp getDesigner()
      Gets the Designer Extension for Properties.
      Specified by:
      getDesigner in interface IPropDesigner
      Returns:
      The instance of the Designer Extension.
    • getUndoContext

      public IUndoContext getUndoContext()
      Gets the undo context.
      Specified by:
      getUndoContext in interface IPropUndoContext
      Returns:
      The undo context for the Editor part(s) for this container.
    • clone

      public EditorTextTable clone()
      Clone must be overridden.
      Overrides:
      clone in class TextTable
    • getPersistentMemento

      public MementoPropCnr getPersistentMemento(boolean doCreate)
      Gets the memento used to save the editor in this property.
      Parameters:
      doCreate - Creation flag.
      Returns:
      A property container that implements IMemento, or null if this container is disposed of.
    • getDerives

      public EditorTextTable getDerives()
      Gets the text table that is derived.
      Overrides:
      getDerives in class TextTable
      Returns:
      The derived table, or null for none (or reference not found).
    • getBaseID

      public String getBaseID()
      Gets the base ID for externalized texts.
    • externalizeText

      public String externalizeText(String text, IComplexOperation op)
      Externalizes the specified text.
      Parameters:
      text - The text to externalize.
      op - The complex operation, or null for no undo support.
      Returns:
      The text ID for the externalized text.
    • externalizeText

      public String externalizeText(KString text, IComplexOperation op)
      Externalizes the specified text.
      Parameters:
      text - The text to externalize.
      op - The complex operation, or null for no undo support.
      Returns:
      The text ID for the externalized text.
    • externalizeTexts

      public int externalizeTexts(boolean doPerform, List<ITextExternalizableProp<?>> list, IComplexOperation op)
      Externalizes all the specified properties.
      Parameters:
      doPerform - The do perform operation flag, false to test.
      list - The list of externalizable properties.
      op - The complex operation, or null for no undo support.
      Returns:
      The count of changes.
    • onFileAboutToChange

      public Object onFileAboutToChange()
      Called prior to changes enabling data container to save what has changed.
      Specified by:
      onFileAboutToChange in interface IFilePropChangeListener
      Returns:
      An Object that is passed into the onFileChangesCompleted(Object), null for none.
    • onFileChangesCompleted

      public void onFileChangesCompleted(Object beforeChanges)
      Called when all the data container's properties have been removed and new ones added back into the data container.

      It is guaranteed that this method is called after changes, even if severe failures occurred.

      Specified by:
      onFileChangesCompleted in interface IFilePropChangeListener
      Parameters:
      beforeChanges - The Object that was returned from the call to onFileAboutToChange(), null for none.
    • onEventSelf

      public void onEventSelf(GEvent event)
      Checks for state change events and fires it to listeners.
      Specified by:
      onEventSelf in interface IGProp<GProp<?>[]>
      Overrides:
      onEventSelf in class GProp<GProp<?>[]>
      Parameters:
      event - The property event.
    • hasCircularReference

      public static boolean hasCircularReference(EditorTextTable textTable, GProp<?> anyProp, String ref)
      Circular reference validation for Text Tables.
      Parameters:
      textTable - The text table, perhaps not added into the tree yet.
      anyProp - Any property in the tree, for reference look-up's.
      ref - The reference to validate.
      Returns:
      true if circular references exist, false if OK.