Class ColorChooseAction

All Implemented Interfaces:
ActionListener, Serializable, Cloneable, Comparable, EventListener, Action

@OpenApi public class ColorChooseAction extends NMAction
Action for choosing a color.
See Also:
  • Constructor Details

    • ColorChooseAction

      @OpenApi public ColorChooseAction(String moreLabel, String noFillLabel, boolean noFillAvailable, Color[] recentColors)
      Constructs new color action.
      Parameters:
      moreLabel - the text of more label.
      noFillLabel - the text of no fill label.
      noFillAvailable - no fill available or not?
  • Method Details

    • actionPerformed

      @OpenApi public void actionPerformed(ActionEvent e)
      Shows ColorPallet in JPopupMenu when this action is performed. For showing popup event source parent is used.
      Specified by:
      actionPerformed in interface ActionListener
      Specified by:
      actionPerformed in class NMAction
      Parameters:
      e - an event caused invocation
    • getColor

      @OpenApi public Color getColor()
      Returns color selected by this action.
      Returns:
      the selected color.