Class EditorStyles

All Implemented Interfaces:
IExtendsSelection, IPropDesigner, IPropUndoContext, ITransferContainerProps, EventListener, IFontConsumer, IGProp<GProp<?>[]>, IPropCnr, Cloneable, IAdaptable

public class EditorStyles extends Styles implements IPropDesigner, IPropUndoContext, IExtendsSelection, ITransferContainerProps
This Styles property container for the Editor.
  • Field Details

    • PREDEFINED_NAME_DESCR

      public static String[] PREDEFINED_NAME_DESCR
      Predefined class names.

      The entries are stored in pairs of strings. The first string is the name of the style without the '*' where null indicates it's a group. The second string is the description.

  • Constructor Details

    • EditorStyles

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

      public EditorStyles(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 StylesDesignerProp 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

      Clone must be overridden.
      Overrides:
      clone in class PropCnr
      Throws:
      CloneNotSupportedException - If a subclass doesn't allow cloning, e.g. the client properties.
    • 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 Styles
      Returns:
      List of supported classes, or null for none.
    • getSelectPropDialogTitle

      public String getSelectPropDialogTitle()
      Gets the title for selection dialog.
      Specified by:
      getSelectPropDialogTitle in interface IExtendsSelection
    • getSelectPropViewerFilter

      public ViewerFilter getSelectPropViewerFilter()
      Gets the viewer filter for the tree in the dialog for selecting extends property name.
      Specified by:
      getSelectPropViewerFilter in interface IExtendsSelection
    • 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.
    • getStyles

      public ArrayList<CSSStyle> getStyles(boolean includeUndefined)
      Gets the styles as a list of CSS styles.
      Parameters:
      includeUndefined - Flag to include undefined styles.
      Returns:
      Array of styles.
    • onPropInvalidateCache

      protected void onPropInvalidateCache()
      Invalidates a potential cache in this property. This method is called during a synchronized state of the property. Subclasses override this method to provide a robust caching mechanism.
      Overrides:
      onPropInvalidateCache in class GProp<GProp<?>[]>
    • getFontInfo

      public FontInfo getFontInfo()
      Returns the font information for this styles instance.
      Returns:
      The cached font information.
    • getCNDescriptionType

      public String getCNDescriptionType()
      Provide a type description for the status bar view, if available.
      Specified by:
      getCNDescriptionType in interface ITransferContainerProps
      Returns:
      A type description for the status bar view, or null if not available.
    • getTransferProps

      public Object[] getTransferProps()
      Returns the list of properties that are transferable between layout managers.
      Specified by:
      getTransferProps in interface ITransferContainerProps
      Returns:
      The list of String's or Atom's that are transferable, null for none.
    • getMainStyles

      public EditorStyles getMainStyles()
      Returns the main (parent) styles.
      Overrides:
      getMainStyles in class Styles
      Returns:
      The main styles instance. This is the same instance in case it's not a state-styles instance.