Class ColorPropEditor

    • Constructor Detail

      • ColorPropEditor

        public ColorPropEditor()
        Default constructor called before createControls.
    • Method Detail

      • getLastColor

        public static GColor getLastColor()
        Gets a last-color.
      • setLastColor

        public static void setLastColor​(GColor color)
        Sets the last color.
      • setColors

        protected void setColors​(org.eclipse.swt.widgets.Control... additional)
        Sets the colors for the controls depending on error, focus and define state.
        Overrides:
        setColors in class BaseEditor<ColorProp,​GColor>
      • onDispose

        protected void onDispose()
        Called when the editor is disposed of. Override to implement required code. By default, this method does nothing.
        Overrides:
        onDispose in class BaseEditor<ColorProp,​GColor>
      • onMore

        public void onMore()
        Called when the "more..." button is pressed. Override to display drop-down menu.
        Overrides:
        onMore in class BaseEditor<ColorProp,​GColor>
      • hexFormat

        public static java.lang.String hexFormat​(int color,
                                                 int shift)
        Format to 2 digit hex.
      • getToolTipText

        protected java.lang.String getToolTipText()
        Gets the tooltip text to display in the entry fields (not the one for property errors or validator).
        Specified by:
        getToolTipText in class BaseEditor<ColorProp,​GColor>
      • getValue

        protected GColor getValue​(java.lang.String input)
                           throws java.lang.Exception
        Gets the property value for a user input.
        Specified by:
        getValue in class BaseEditor<ColorProp,​GColor>
        Parameters:
        input - The current user input.
        Returns:
        The property value for the input, or null to un-define the property.
        Throws:
        java.lang.Exception - For validation errors.
      • mouseDoubleClick

        public void mouseDoubleClick​(org.eclipse.swt.events.MouseEvent e)
        Double-click on preview or text displays color chooser.
        Specified by:
        mouseDoubleClick in interface org.eclipse.swt.events.MouseListener
        Parameters:
        e -
      • mouseDown

        public void mouseDown​(org.eclipse.swt.events.MouseEvent e)
        Mouse down.
        Specified by:
        mouseDown in interface org.eclipse.swt.events.MouseListener
      • mouseUp

        public void mouseUp​(org.eclipse.swt.events.MouseEvent e)
        Mouse up, not processed.
        Specified by:
        mouseUp in interface org.eclipse.swt.events.MouseListener