Class EditorVSField

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

The Editor VirtualSpace Field property class.
Author:
Christopher Mindus
  • Constructor Details

    • EditorVSField

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

      public EditorVSField(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).
    • createFieldActors

      protected FieldActors createFieldActors()
      Creates a new instance of the field actors.
      Overrides:
      createFieldActors in class VSField
    • getActors

      public EditorFieldActors getActors()
      Gets the field actors container.
      Overrides:
      getActors in class VSField
      Returns:
      The field actors for this field if the field is located in the VirtualSpace or in a VirtualSpace group, otherwise the table column field actors if inside a table.
    • 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 EditorVSField clone()
      Clone must be overridden.
      Overrides:
      clone in class VSField
    • 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 VSField
      Parameters:
      event - The property event.
    • getTable

      public EditorVSTable getTable()
      Gets the table.
      Overrides:
      getTable in class VSField
      Returns:
      The table instance, or null if this field is not added to a table, i.e. directly in the VirtualSpace or a VirtualSpace group.
    • getColumn

      public EditorVSColumnHeader getColumn()
      Gets the column instance of this field when it is in a table.
      Overrides:
      getColumn in class VSField
      Returns:
      The column instance or null if not inside table or column is not found.
    • getRows

      public EditorVSRows getRows()
      Gets the rows container.
      Overrides:
      getRows in class VSField
      Returns:
      The rows instance, or null if field is not inside a table.
    • onListenerChanged

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

      public PropCnr getBaseJavaReference()
      Gets the base reference path for the Java reference, from the owner of this container, e.g. the VSField.
      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.
    • 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.
    • getMethodReferenceAnnotationTypes

      public AnnotationType[] getMethodReferenceAnnotationTypes()
      Returns the annotation types for the method reference(s).
      Specified by:
      getMethodReferenceAnnotationTypes in interface IJavaMethodLinkEnabler
      Returns:
      An array with the annotations supported.
    • getRelativeMethodAnnotationReference

      public String getRelativeMethodAnnotationReference()
      Gets the annotation relative reference to the element.
      Specified by:
      getRelativeMethodAnnotationReference in interface IJavaMethodLinkEnabler
      Returns:
      The relative reference in the method annotation of e.g. "OnUIFocus" for this component.
    • getJavaClassLinkEnabler

      public IJavaClassLinkEnabler getJavaClassLinkEnabler()
      Gets the instance that links to the class.
      Specified by:
      getJavaClassLinkEnabler in interface IJavaMethodLinkEnabler
      Returns:
      The class link enabler instance, never null.
    • isLinkCapable

      public IStatus isLinkCapable(LinkData data)
      Returns if this property container could potentially be link capable.

      This call is done many times during drag-drop and must be very fast and not cause too much garbage collection.

      Specified by:
      isLinkCapable in interface IJavaMethodLinkEnabler
      Specified by:
      isLinkCapable in interface ILinkCapable
      Specified by:
      isLinkCapable in interface IUICreationFromVS
      Parameters:
      data - The link data.
      Returns:
      The status of capability of the operation.
    • getLinkOperations

      public Collection<ILinkOperation> getLinkOperations(LinkData data)
      Called when the drag-drop is to be performed (link or paste-link menu item). The link-capable instance fills in only what it handles.
      Specified by:
      getLinkOperations in interface IJavaMethodLinkEnabler
      Specified by:
      getLinkOperations in interface ILinkCapable
      Specified by:
      getLinkOperations in interface IUICreationFromVS
      Parameters:
      data - The link data.
      Returns:
      The list of operations required.
    • 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.
    • getAllowNullSeverity

      public int getAllowNullSeverity()
      Returns whether allowNull has an error.
      Returns:
      The severity, or -1 for none.