Class RibbonApplicationMenuEntrySecondary

java.lang.Object
org.pushingpixels.flamingo.api.ribbon.RibbonApplicationMenuEntrySecondary

public class RibbonApplicationMenuEntrySecondary extends Object
Metadata description for the secondary menu entries of the RibbonApplicationMenu. The secondary menu entries at runtime are represented by command menu buttons placed in the right panel of the application menu.
  • Field Details

    • descriptionText

      protected String descriptionText
      Extra description text for this secondary menu entry.
      See Also:
    • popupCallback

      protected PopupPanelCallback popupCallback
      Popup callback for this menu entry. Must be not null if the menu entry kind has popup part.
      See Also:
    • icon

      protected ResizableIcon icon
      The menu icon.
    • disabledIcon

      protected ResizableIcon disabledIcon
      The menu icon for disabled state. Optional, can be null.
    • text

      protected String text
      The menu text.
    • mainActionListener

      protected ActionListener mainActionListener
      The main action listener for this menu entry.
    • entryKind

      protected JCommandButton.CommandButtonKind entryKind
      The kind of the command button that represents this menu entry.
    • isEnabled

      protected boolean isEnabled
      Enabled state of this menu.
    • actionKeyTip

      protected String actionKeyTip
      Optional key tip for the action area of the command button that represents this menu entry.
    • popupKeyTip

      protected String popupKeyTip
      Optional key tip for the popup area of the command button that represents this menu entry.
    • actionRichTooltip

      protected RichTooltip actionRichTooltip
      Optional tooltip for the action area of the command button that represents this menu entry.
    • popupRichTooltip

      protected RichTooltip popupRichTooltip
      Optional tooltip for the popup area of the command button that represents this menu entry.
  • Constructor Details

    • RibbonApplicationMenuEntrySecondary

      public RibbonApplicationMenuEntrySecondary(ResizableIcon icon, String text, ActionListener mainActionListener, JCommandButton.CommandButtonKind entryKind)
      Creates the metadata description of a RibbonApplicationMenu secondary menu entry.
      Parameters:
      icon - The icon of this menu entry. Must be non-null.
      text - The text of this menu entry. Must be non-null.
      mainActionListener - The main action listener for this menu entry. If the entry kind is JCommandButton.CommandButtonKind.POPUP_ONLY, this listener will be ignored.
      entryKind - The kind of the command button that will represent this menu entry. Must be non- null.
  • Method Details

    • getDescriptionText

      public String getDescriptionText()
      Returns the description text of this secondary menu entry.
      Returns:
      The description text of this secondary menu entry.
      See Also:
    • setDescriptionText

      public void setDescriptionText(String descriptionText)
      Sets the new description text for this secondary menu entry.
      Parameters:
      descriptionText - The new description text for this secondary menu entry.
      See Also:
    • setPopupCallback

      public void setPopupCallback(PopupPanelCallback popupCallback)
      Sets the popup callback for this secondary menu entry.
      Parameters:
      popupCallback - The popup callback for this secondary menu entry.
      See Also:
    • getPopupCallback

      public PopupPanelCallback getPopupCallback()
      Returns the current popup callback of this secondary menu entry.
      Returns:
      The current popup callback of this secondary menu entry.
      See Also:
    • getIcon

      public ResizableIcon getIcon()
      Returns the icon of this application menu entry.
      Returns:
      The icon of this application menu entry.
    • getText

      public String getText()
      Returns the text of this application menu entry.
      Returns:
      The text of this application menu entry.
      See Also:
    • setText

      public void setText(String text)
      Sets the new text for this application menu entry.
      Parameters:
      text - The new text for this application menu entry.
      See Also:
    • getMainActionListener

      public ActionListener getMainActionListener()
      Returns the main action listener associated with this application menu entry.
      Returns:
      The main action listener associated with this application menu entry.
    • getEntryKind

      public JCommandButton.CommandButtonKind getEntryKind()
      Returns the kind of the command button that represents this menu entry.
      Returns:
      The kind of the command button that represents this menu entry.
    • setEnabled

      public void setEnabled(boolean isEnabled)
      Sets the enabled state of the command button that represents this menu entry.
      Parameters:
      isEnabled - If true, the command button that represents this menu entry will be enabled, if false, the command button will be disabled.
      See Also:
    • isEnabled

      public boolean isEnabled()
      Returns the enabled state of the command button that represents this menu entry.
      Returns:
      true if the command button that represents this menu entry is enabled, false otherwise.
    • getActionKeyTip

      public String getActionKeyTip()
      Returns the key tip for the action area of the command button that represents this menu entry.
      Returns:
      The key tip for the action area of the command button that represents this menu entry.
      See Also:
    • setActionKeyTip

      public void setActionKeyTip(String actionKeyTip)
      Sets the new value for the key tip for the action area of the command button that represents this menu entry.
      Parameters:
      actionKeyTip - The new value for the key tip for the action area of the command button that represents this menu entry.
      See Also:
    • getPopupKeyTip

      public String getPopupKeyTip()
      Returns the key tip for the popup area of the command button that represents this menu entry.
      Returns:
      The key tip for the popup area of the command button that represents this menu entry.
      See Also:
    • setPopupKeyTip

      public void setPopupKeyTip(String popupKeyTip)
      Sets the new value for the key tip for the popup area of the command button that represents this menu entry.
      Parameters:
      popupKeyTip - The new value for the key tip for the popup area of the command button that represents this menu entry.
      See Also:
    • getActionRichTooltip

      public RichTooltip getActionRichTooltip()
      Returns the rich tooltip for the action area of the command button that represents this menu entry.
      Returns:
      The rich tooltip for the action area of the command button that represents this menu entry.
      See Also:
    • setActionRichTooltip

      public void setActionRichTooltip(RichTooltip actionRichTooltip)
      Sets the rich tooltip for the action area of the command button that represents this menu entry.
      Parameters:
      actionRichTooltip - The rich tooltip for the action area of the command button that represents this menu entry.
      See Also:
    • getPopupRichTooltip

      public RichTooltip getPopupRichTooltip()
      Returns the rich tooltip for the popup area of the command button that represents this menu entry.
      Returns:
      The rich tooltip for the popup area of the command button that represents this menu entry.
      See Also:
    • setPopupRichTooltip

      public void setPopupRichTooltip(RichTooltip popupRichTooltip)
      Sets the rich tooltip for the popup area of the command button that represents this menu entry.
      Parameters:
      popupRichTooltip - The rich tooltip for the popup area of the command button that represents this menu entry.
      See Also:
    • getDisabledIcon

      public ResizableIcon getDisabledIcon()
      Returns the disabled icon for the command button that represents this menu entry.
      Returns:
      The disabled icon for the command button that represents this menu entry.
      See Also:
    • setDisabledIcon

      public void setDisabledIcon(ResizableIcon disabledIcon)
      Sets the disabled icon for the command button that represents this menu entry.
      Parameters:
      disabledIcon - The disabled icon for the command button that represents this menu entry.
      See Also: