Class EditorVSTable

All Implemented Interfaces:
IShowJavaSource, ILinkCapable, IUICreationFromVS, IPropDesigner, IPropRenameable, IEVSComponent, IBackReferenceProvider, EventListener, IFocusComp, IMessageBox, ICustomDataProvider, IGProp<GProp<?>[]>, IPropCnr, IVSComponent, IVSComponentListener, IVSComponentState, IVSMessageComponent, Cloneable, IAdaptable

public class EditorVSTable extends VSTable implements IEVSComponent, IBackReferenceProvider, IUICreationFromVS
The Editor VirtualSpace Field property class.
Author:
Christopher Mindus
  • Constructor Details

    • EditorVSTable

      public EditorVSTable()
      Creates the VirtualSpace Field property container without a name. The name must be set in all cases using the setPropertyAtom call.
    • EditorVSTable

      public EditorVSTable(Atom propertyAtom)
      Creates the VirtualSpace Field 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

    • getVirtualSpace

      public EditorVirtualSpace getVirtualSpace()
      Gets the VirtualSpace instance.
      Specified by:
      getVirtualSpace in interface IUICreationFromVS
      Specified by:
      getVirtualSpace in interface IVSComponent
      Overrides:
      getVirtualSpace in class VSComponent
      Returns:
      The VirtualSpace instance (an ancestor of this property or itself), or null if not found (i.e. property is not yet attached to a VirtualSpace).
    • getDesigner

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

      public EditorVSTable clone()
      Clone must be overridden.
      Overrides:
      clone in class VSTable
    • createRows

      protected EditorVSRows createRows()
      Creates the headerBackground property container.
      Overrides:
      createRows in class VSTable
    • createHeader

      protected VSRow createHeader()
      Creates the headerBackground property container.
      Overrides:
      createHeader in class VSTable
    • createRow

      protected VSRow createRow(Atom a, VSField[] fields) throws PropException
      Creates a row property.
      Overrides:
      createRow in class VSTable
      Throws:
      PropException - For creation error.
    • createRow

      protected VSRow createRow(Atom a, VSColumnHeader[] columns) throws PropException
      Creates a row property.
      Overrides:
      createRow in class VSTable
      Throws:
      PropException - For creation error.
    • 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 VSTable
      Parameters:
      event - The property event.
    • onListenerChanged

      protected void onListenerChanged(IVSTableListener listener)
      Called when a listener is added or removed. This method is overridden by the Designer to update connections.
      Overrides:
      onListenerChanged in class VSTable
    • getBaseJavaReference

      public PropCnr getBaseJavaReference()
      Gets the base reference path for the Java reference, from the owner of this container, e.g. the VSTable.
      Specified by:
      getBaseJavaReference in interface IBackReferenceProvider
    • isBackReferenceValid

      public String isBackReferenceValid(AnnotationType annotationType, String name, boolean isRefOnly)
      Validates if the back-reference specified is referenced in the first place, i.e. is valid or not. /** Validates if the back-reference specified is referenced in the first place, i.e. is valid or not.
      Specified by:
      isBackReferenceValid in interface IBackReferenceProvider
      Parameters:
      annotationType - The annotation type.
      name - The class or method name.
      isRefOnly - Flag indicating the back reference is not required, but must be valid otherwise.
      Returns:
      null for valid, otherwise an error message.
    • getHeader

      public EditorVSRow getHeader()
      Gets the headerBackground.
      Overrides:
      getHeader in class VSTable
      Returns:
      The row of VSColumnHeader properties of the headerBackground.
    • getColumnHeaders

      public EditorVSColumnHeader[] getColumnHeaders()
      Gets the headers columns for the row.
      Overrides:
      getColumnHeaders in class VSTable
      Returns:
      The array of VSFields, empty array if it's a headerBackground row (VSRow.isColumnHeader() returns true).
    • getColumnHeader

      public EditorVSColumnHeader getColumnHeader(int columnIndex)
      Gets the headers columns for the row.
      Overrides:
      getColumnHeader in class VSTable
      Parameters:
      columnIndex - The index of the column.
      Returns:
      The column of requested index, null if it's not a headerBackground row (i.e. VSRow.isColumnHeader() returns false), or the column index is out of range.
    • getRowsContainer

      public EditorVSRows getRowsContainer()
      Gets the rows property container.
      Overrides:
      getRowsContainer in class VSTable
      Returns:
      The VSRows container.
    • getRow

      public EditorVSRow getRow(int row)
      Gets the row of a certain index.

      Note: a warning message is logged if the operation fails.

      Overrides:
      getRow in class VSTable
      Parameters:
      row - The row to get.
      Returns:
      The VSRowProp of VSFields, null if row is invalid.
    • getRows

      public EditorVSRow[] getRows()
      Gets the rows in this table.
      Overrides:
      getRows in class VSTable
      Returns:
      The array of rows.
    • getExtendsPossibleClasses

      public Class<?>[] getExtendsPossibleClasses()
      Gets the possible classes this container supports for the Extends Framework. The default implementation is to return null.
      Specified by:
      getExtendsPossibleClasses in interface IPropCnr
      Overrides:
      getExtendsPossibleClasses in class PropCnr
      Returns:
      List of supported classes, or null for none.
    • verify

      public boolean verify(PropVerification verification)
      Verifies this property container. The check performed is the extension of classes and that no circular reference is present.
      Specified by:
      verify in interface IGProp<GProp<?>[]>
      Overrides:
      verify in class PropCnr
      Parameters:
      verification - The property verification class.
      Returns:
      true if verification should proceed, false if disposed of and verification should not take place.
    • createTable

      public static EditorVSTable createTable(PropCnr parent, String suggestedName, CreateColumnData[] columns)
      Creates a table with the suggested name to be placed in a container.
      Parameters:
      parent - The parent.
      suggestedName - The suggested name.
      columns - The create column data.
      Throws:
      IllegalArgumentException - If parent is not EditorVirtualSpace or EditorVSGroup.