Class NMActionJideButton

All Implemented Interfaces:
com.jidesoft.swing.Alignable, com.jidesoft.swing.AlignmentSupport, com.jidesoft.swing.ButtonStyle, com.jidesoft.swing.ComponentStateSupport, com.nomagic.awt.HelpInformationProvider, KeyListener, MouseListener, ImageObserver, ItemSelectable, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, SwingConstants

@OpenApi public class NMActionJideButton extends NMJideButton implements PropertyChangeListener
Button created from action. All properties for button(text, icon, tool tip...) are taken from action. Also action is added as button ActionListener. Button listens for changes in action and updates it state according the action state.
See Also:
  • Constructor Details

    • NMActionJideButton

      @OpenApi public NMActionJideButton(NMAction action)
      Constructs new button with given action.
      Parameters:
      action - action for the button.
  • Method Details

    • getToolTipText

      @OpenApi public static String getToolTipText(NMAction action)
      Creates tooltip text for button from given action. Tooltip will have action description or name and representation of first shortcut.
      Parameters:
      action - the given action.
    • getToolTipText

      @OpenApi public String getToolTipText()
      Creates tool tip text from button action. Tool tip will have action description or name and representation of first shortcut.
      Overrides:
      getToolTipText in class JComponent
    • getAction

      @OpenApi public Action getAction()
      Returns action of this button.
      Overrides:
      getAction in class AbstractButton
      Returns:
      action of this button.