public class RibbonApplicationMenuEntrySecondary extends Object
RibbonApplicationMenu
. The secondary menu entries at runtime are
represented by command menu buttons placed in the right panel of the
application menu.Modifier and Type | Field | Description |
---|---|---|
protected String |
actionKeyTip |
Optional key tip for the action area of the command button that
represents this menu entry.
|
protected RichTooltip |
actionRichTooltip |
Optional tooltip for the action area of the command button that
represents this menu entry.
|
protected String |
descriptionText |
Extra description text for this secondary menu entry.
|
protected ResizableIcon |
disabledIcon |
The menu icon for disabled state.
|
protected JCommandButton.CommandButtonKind |
entryKind |
The kind of the command button that represents this menu entry.
|
protected ResizableIcon |
icon |
The menu icon.
|
protected boolean |
isEnabled |
Enabled state of this menu.
|
protected ActionListener |
mainActionListener |
The main action listener for this menu entry.
|
protected PopupPanelCallback |
popupCallback |
Popup callback for this menu entry.
|
protected String |
popupKeyTip |
Optional key tip for the popup area of the command button that represents
this menu entry.
|
protected RichTooltip |
popupRichTooltip |
Optional tooltip for the popup area of the command button that represents
this menu entry.
|
protected String |
text |
The menu text.
|
Constructor | Description |
---|---|
RibbonApplicationMenuEntrySecondary(ResizableIcon icon,
String text,
ActionListener mainActionListener,
JCommandButton.CommandButtonKind entryKind) |
Creates the metadata description of a
RibbonApplicationMenu
secondary menu entry. |
Modifier and Type | Method | Description |
---|---|---|
String |
getActionKeyTip() |
Returns the key tip for the action area of the command button that
represents this menu entry.
|
RichTooltip |
getActionRichTooltip() |
Returns the rich tooltip for the action area of the command
button that represents this menu entry.
|
String |
getDescriptionText() |
Returns the description text of this secondary menu entry.
|
ResizableIcon |
getDisabledIcon() |
Returns the disabled icon for the command button that represents this
menu entry.
|
JCommandButton.CommandButtonKind |
getEntryKind() |
Returns the kind of the command button that represents this menu entry.
|
ResizableIcon |
getIcon() |
Returns the icon of this application menu entry.
|
ActionListener |
getMainActionListener() |
Returns the main action listener associated with this application menu
entry.
|
PopupPanelCallback |
getPopupCallback() |
Returns the current popup callback of this secondary menu entry.
|
String |
getPopupKeyTip() |
Returns the key tip for the popup area of the command button that
represents this menu entry.
|
RichTooltip |
getPopupRichTooltip() |
Returns the rich tooltip for the popup area of the command
button that represents this menu entry.
|
String |
getText() |
Returns the text of this application menu entry.
|
boolean |
isEnabled() |
Returns the enabled state of the command button that represents this menu
entry.
|
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.
|
void |
setActionRichTooltip(RichTooltip actionRichTooltip) |
Sets the rich tooltip for the action area of the command
button that represents this menu entry.
|
void |
setDescriptionText(String descriptionText) |
Sets the new description text for this secondary menu entry.
|
void |
setDisabledIcon(ResizableIcon disabledIcon) |
Sets the disabled icon for the command button that represents this menu
entry.
|
void |
setEnabled(boolean isEnabled) |
Sets the enabled state of the command button that represents this menu
entry.
|
void |
setPopupCallback(PopupPanelCallback popupCallback) |
Sets the popup callback for this secondary menu entry.
|
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.
|
void |
setPopupRichTooltip(RichTooltip popupRichTooltip) |
Sets the rich tooltip for the popup area of the command
button that represents this menu entry.
|
void |
setText(String text) |
Sets the new text for this application menu entry.
|
protected String descriptionText
getDescriptionText()
,
setDescriptionText(String)
protected PopupPanelCallback popupCallback
null
if the
menu entry kind has popup part.protected ResizableIcon icon
protected ResizableIcon disabledIcon
null
.protected String text
protected ActionListener mainActionListener
protected JCommandButton.CommandButtonKind entryKind
protected boolean isEnabled
protected String actionKeyTip
protected String popupKeyTip
protected RichTooltip actionRichTooltip
protected RichTooltip popupRichTooltip
public RibbonApplicationMenuEntrySecondary(ResizableIcon icon, String text, ActionListener mainActionListener, JCommandButton.CommandButtonKind entryKind)
RibbonApplicationMenu
secondary menu entry.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
.public String getDescriptionText()
setDescriptionText(String)
public void setDescriptionText(String descriptionText)
descriptionText
- The new description text for this secondary menu entry.getDescriptionText()
public void setPopupCallback(PopupPanelCallback popupCallback)
popupCallback
- The popup callback for this secondary menu entry.getPopupCallback()
public PopupPanelCallback getPopupCallback()
setPopupCallback(PopupPanelCallback)
public ResizableIcon getIcon()
public String getText()
setText(String)
public void setText(String text)
text
- The new text for this application menu entry.getText()
public ActionListener getMainActionListener()
public JCommandButton.CommandButtonKind getEntryKind()
public void setEnabled(boolean isEnabled)
isEnabled
- If true
, the command button that represents this
menu entry will be enabled, if false
, the command
button will be disabled.isEnabled
public boolean isEnabled()
true
if the command button that represents this menu
entry is enabled, false
otherwise.public String getActionKeyTip()
setActionKeyTip(String)
,
getPopupKeyTip()
public void setActionKeyTip(String actionKeyTip)
actionKeyTip
- The new value for the key tip for the action area of the
command button that represents this menu entry.getActionKeyTip()
,
setPopupKeyTip(String)
public String getPopupKeyTip()
setPopupKeyTip(String)
,
getActionKeyTip()
public void setPopupKeyTip(String popupKeyTip)
popupKeyTip
- The new value for the key tip for the popup area of the
command button that represents this menu entry.getPopupKeyTip()
,
setActionKeyTip(String)
public RichTooltip getActionRichTooltip()
#setPopupTooltip(RichTooltip)
,
getActionRichTooltip()
public void setActionRichTooltip(RichTooltip actionRichTooltip)
actionRichTooltip
- The rich tooltip for the action area of the command
button that represents this menu entry.getActionRichTooltip()
,
#setActionTooltip(RichTooltip)
public RichTooltip getPopupRichTooltip()
#setPopupTooltip(RichTooltip)
,
getActionRichTooltip()
public void setPopupRichTooltip(RichTooltip popupRichTooltip)
popupRichTooltip
- The rich tooltip for the popup area of the command
button that represents this menu entry.getPopupRichTooltip()
,
#setActionTooltip(RichTooltip)
public ResizableIcon getDisabledIcon()
setDisabledIcon(ResizableIcon)
public void setDisabledIcon(ResizableIcon disabledIcon)
disabledIcon
- The disabled icon for the command button that represents this
menu entry.getDisabledIcon()