Class DefinedButton

All Implemented Interfaces:
Drawable

public class DefinedButton extends Composite
The clear-button.
Author:
Christopher Mindus
  • Constructor Details

  • Method Details

    • getNode

      public PropertyEditor.Node getNode()
      Gets the node.
    • setLabelBackground

      public void setLabelBackground(Color c)
      Sets the label background.
    • setListener

      public void setListener(IPropertyDefined l)
      Sets a listener, can only be done once.
    • registerPropLabel

      public void registerPropLabel(IPropertyEditorController controller, PropLabel label, PropertyEditor.Node node)
      Registers a property and label. The property is tracked for definition, and updates the label color accordingly.
    • getLabel

      public PropLabel getLabel()
      Gets the label attached, perhaps null.
    • refreshExtended

      public void refreshExtended()
      Refreshes the extended state.
    • isExtended

      public boolean isExtended()
      Checks if extended.
    • setUndefined

      public void setUndefined(int errorLevel)
      Sets the state of the button: undefined with potential severity.
      Parameters:
      errorLevel - The error level, -1 or 0 for OK, 1=warning, 2=error.
    • setDefinedOK

      public void setDefinedOK()
      Sets the state of the button: defined and no error.
    • setDefinedError

      public void setDefinedError()
      Sets the state of the button: defined and error.
    • setDefined

      public void setDefined(int errorLevel)
      Sets the state of the button: defined and error level.
      Parameters:
      errorLevel - 0=OK, 1=warning, 2=error.
    • isDefined

      public boolean isDefined()
      Gets the defined state.
    • getErrorLevel

      public int getErrorLevel()
      Gets the error level.
    • computeSize

      public Point computeSize(int wHint, int hHint, boolean changed)
      Size is always 18x16 for others.
      Overrides:
      computeSize in class Composite
    • isMainMultiPropExpanded

      public boolean isMainMultiPropExpanded()
      Checks if the main multi-prop item is expanded.
    • onExpand

      public void onExpand(boolean isExpanded)
      Called when main multi-prop item is expanded or collapsed.