Class JaxoColorEditPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class JaxoColorEditPanel extends JaxoEditPanel
A panel to change the color of an object.
Since:
2.0
See Also:
  • Constructor Details

    • JaxoColorEditPanel

      public JaxoColorEditPanel()
      Constructor: returns a color edit panel with default type TYPE_COLOR and default color black.
    • JaxoColorEditPanel

      public JaxoColorEditPanel(Color buttonColor)
      Constructor: returns a color edit panel with the given color.
      Parameters:
      buttonColor - The color of the button in this panel.
    • JaxoColorEditPanel

      public JaxoColorEditPanel(int type, boolean disabled, Color buttonColor)
      Constructor: returns a color edit panel of the given type with the given color.
      Parameters:
      type - The type of this edit panel. If this is not one of the three types defined by this class, it gets set to TYPE_COLOR.
      disabled - Disables the color button of this edit panel.
      buttonColor - The color of the button in this panel.
    • JaxoColorEditPanel

      public JaxoColorEditPanel(boolean disabled, Color buttonColor, boolean filled)
      Constructor: returns a fill color edit panel with the given color. of the three types defined by this class, it gets set to TYPE_COLOR.
      Parameters:
      disabled - Disables the color button of this edit panel.
      buttonColor - The color of the button in this panel.
      filled - If the panel is for an object that can be optionally filled.
  • Method Details

    • setColor

      public void setColor(Color color)
      Sets the color of the button icon.
      Parameters:
      color - The color to set.
    • getColor

      public Color getColor()
      the color of the button icon.
      Returns:
      The set color.
    • setEnabled

      public void setEnabled(boolean value)
      Set the button enabled.
      Overrides:
      setEnabled in class JComponent
      Parameters:
      value - true for enabled.
    • addEditPanelListener

      public void addEditPanelListener(JaxoEditPanelListener listener)
      Adds the given listener as an ActionListener to the color button of this panel. If listener is null, does nothing.
      Specified by:
      addEditPanelListener in class JaxoEditPanel
      Parameters:
      listener - The listener to add to this panel.