public class MustMenuItem extends MustMenuNode
toolTipText, type, TYPE_MENU, TYPE_MENU_ITEM
Constructor and Description |
---|
MustMenuItem(java.lang.String label,
java.lang.Class<? extends Invokable> actionClass)
Constructs a new text menu item
|
MustMenuItem(java.lang.String label,
java.lang.Class<? extends Invokable> actionClass,
java.lang.String toolTipText)
Constructs a new text menu item.
|
MustMenuItem(java.lang.String label,
FreeAction freeAction)
Constructs a new menu item with the specified action.
|
MustMenuItem(java.lang.String label,
FreeAction freeAction,
java.lang.String toolTipText)
Constructs a new menu item with the specified action.
|
MustMenuItem(java.lang.String label,
Href href)
Constructs a new menu item with the specified hyper reference.
|
MustMenuItem(java.lang.String label,
Href href,
java.lang.String toolTipText)
Constructs a new menu item with the specified hyper reference.
|
MustMenuItem(java.lang.String label,
java.lang.String actionID)
Constructs a new menu item with the specified action.
|
MustMenuItem(java.lang.String label,
java.lang.String actionID,
java.lang.String toolTipText)
Constructs a new menu item with the specified action.
|
MustMenuItem(ToolBarIcon toolBarIcon,
java.lang.Class<? extends Invokable> actionClass)
Constructs a new icon menu item
|
MustMenuItem(ToolBarIcon toolBarIcon,
java.lang.Class<? extends Invokable> actionClass,
java.lang.String toolTipText)
Constructs a new icon menu item.
|
MustMenuItem(ToolBarIcon toolBarIcon,
java.lang.String actionID)
Constructs a new menu item with the specified action.
|
MustMenuItem(ToolBarIcon toolBarIcon,
java.lang.String actionID,
java.lang.String toolTipText)
Constructs a new menu item with the specified action.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends Invokable> |
getActionClass()
Return the item's action class.
|
java.lang.String |
getActionId()
Return the item's action ID.
|
java.lang.String |
getCreationTag(MustMenuBar menuBar,
int itemPointer,
java.lang.String actionForPost)
Returns the tag to markup the menu item.
|
java.lang.String |
getCreationTag(java.lang.String label,
java.lang.String actionID,
SessionData sessionData)
Returns the node's creation tag.
|
java.lang.String |
getLabel()
Return the item's label.
|
boolean |
isAllowed(SessionData sessionData)
Returns true if the item is allowed in the session's context.
|
getDescription, getToolTipText, getType, setDescription
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
public MustMenuItem(ToolBarIcon toolBarIcon, java.lang.Class<? extends Invokable> actionClass)
toolBarIcon
- the item's tool bar iconactionClass
- the assigned action classpublic MustMenuItem(ToolBarIcon toolBarIcon, java.lang.Class<? extends Invokable> actionClass, java.lang.String toolTipText)
toolBarIcon
- the item's tool bar iconactionClass
- the assigned action classtoolTipText
- the item's tool tip textpublic MustMenuItem(java.lang.String label, java.lang.Class<? extends Invokable> actionClass)
label
- the item's labelactionClass
- the assigned action classpublic MustMenuItem(java.lang.String label, java.lang.Class<? extends Invokable> actionClass, java.lang.String toolTipText)
label
- the item's labelactionClass
- the assigned action classtoolTipText
- the item's tool tip textpublic MustMenuItem(java.lang.String label, java.lang.String actionID)
label
- the item's labelactionId
- the ID of the action to be done - see constants NAME_FOR_???_ACTION in Dialogpublic MustMenuItem(java.lang.String label, java.lang.String actionID, java.lang.String toolTipText)
label
- the item's labelactionId
- the ID of the action to be done - see constants NAME_FOR_???_ACTION in DialogtoolTipText
- the item's tool tip textpublic MustMenuItem(ToolBarIcon toolBarIcon, java.lang.String actionID)
toolBarIcon
- the item's tool bar iconactionId
- the ID of the action to be done - see constants NAME_FOR_???_ACTION in Dialogpublic MustMenuItem(ToolBarIcon toolBarIcon, java.lang.String actionID, java.lang.String toolTipText)
toolBarIcon
- the item's tool bar iconactionId
- the ID of the action to be done - see constants NAME_FOR_???_ACTION in DialogtoolTipText
- the item's tool tip textpublic MustMenuItem(java.lang.String label, FreeAction freeAction)
label
- the item's labelfreeAction
- the free action to be donepublic MustMenuItem(java.lang.String label, FreeAction freeAction, java.lang.String toolTipText)
label
- the item's labelfreeAction
- the free action to be donetoolTipText
- the item's tool tip textpublic MustMenuItem(java.lang.String label, Href href)
label
- the item's labelhref
- the hyper referencepublic MustMenuItem(java.lang.String label, Href href, java.lang.String toolTipText)
label
- the item's labelhref
- the hyper referencetoolTipText
- the item's tool tip textpublic java.lang.String getLabel()
public java.lang.Class<? extends Invokable> getActionClass()
public java.lang.String getActionId()
public java.lang.String getCreationTag(java.lang.String label, java.lang.String actionID, SessionData sessionData)
getCreationTag
in class MustMenuNode
label
- the label to be displayedactionId
- the action IDsessionData
- the session's public datapublic java.lang.String getCreationTag(MustMenuBar menuBar, int itemPointer, java.lang.String actionForPost)
getCreationTag
in class MustMenuNode
menuBar
- the menu bar - needed for addressitemPointer
- the item pointer - needed for addressactionForPost
- the actio for postpublic boolean isAllowed(SessionData sessionData)
isAllowed
in class MustMenuNode
sessionData
- the session's public dataCopyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de