Package docking.action
Class MenuData
- java.lang.Object
-
- docking.action.MenuData
-
- Direct Known Subclasses:
MenuBarData
,PopupMenuData
public class MenuData extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
NO_MNEMONIC
static java.lang.String
NO_SUBGROUP
-
Constructor Summary
Constructors Constructor Description MenuData(MenuData menuData)
MenuData(java.lang.String[] menuPath)
MenuData(java.lang.String[] menuPath, java.lang.String group)
MenuData(java.lang.String[] menuPath, javax.swing.Icon icon)
MenuData(java.lang.String[] menuPath, javax.swing.Icon icon, java.lang.String menuGroup)
MenuData(java.lang.String[] menuPath, javax.swing.Icon icon, java.lang.String menuGroup, int mnemonic, java.lang.String menuSubGroup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MenuData
cloneData()
protected void
firePropertyChanged(MenuData oldData)
java.lang.String
getMenuGroup()
Returns the group for the menu item created by this data.javax.swing.Icon
getMenuIcon()
Returns the icon assigned to this action's menu.java.lang.String
getMenuItemName()
java.lang.String[]
getMenuPath()
Returns the menu path.java.lang.String
getMenuPathAsString()
java.lang.String
getMenuSubGroup()
Returns the subgroup string.int
getMnemonic()
java.lang.String
getParentMenuGroup()
Returns the group for the parent menu of the menu item created by this data.void
setIcon(javax.swing.Icon newIcon)
void
setMenuGroup(java.lang.String newGroup)
void
setMenuItemName(java.lang.String newMenuItemName)
void
setMenuPath(java.lang.String[] newPath)
void
setMenuSubGroup(java.lang.String newSubGroup)
void
setMnemonic(java.lang.Character newMnemonic)
void
setParentMenuGroup(java.lang.String newParentMenuGroup)
See the description ingetParentMenuGroup()
-
-
-
Field Detail
-
NO_MNEMONIC
public static final int NO_MNEMONIC
- See Also:
- Constant Field Values
-
NO_SUBGROUP
public static final java.lang.String NO_SUBGROUP
-
-
Constructor Detail
-
MenuData
public MenuData(java.lang.String[] menuPath)
-
MenuData
public MenuData(java.lang.String[] menuPath, java.lang.String group)
-
MenuData
public MenuData(java.lang.String[] menuPath, javax.swing.Icon icon)
-
MenuData
public MenuData(java.lang.String[] menuPath, javax.swing.Icon icon, java.lang.String menuGroup)
-
MenuData
public MenuData(java.lang.String[] menuPath, javax.swing.Icon icon, java.lang.String menuGroup, int mnemonic, java.lang.String menuSubGroup)
-
MenuData
public MenuData(MenuData menuData)
-
-
Method Detail
-
cloneData
public MenuData cloneData()
-
firePropertyChanged
protected void firePropertyChanged(MenuData oldData)
-
getMenuPath
public java.lang.String[] getMenuPath()
Returns the menu path.- Returns:
- an array of strings where each string is an element of a higher level menu.
-
getMenuPathAsString
public java.lang.String getMenuPathAsString()
-
getMnemonic
public int getMnemonic()
-
getMenuIcon
public javax.swing.Icon getMenuIcon()
Returns the icon assigned to this action's menu. Null indicates that this action does not have a menu icon- Returns:
- the icon
-
getMenuGroup
public java.lang.String getMenuGroup()
Returns the group for the menu item created by this data. This value determines which section inside of the tool's popup menu the menu item will be placed. If you need to control the ordering within a section, then provide a value forsetMenuSubGroup(String)
.- Returns:
- the group
-
getMenuSubGroup
public java.lang.String getMenuSubGroup()
Returns the subgroup string. This string is used to sort items within atoolbar group
. This value is not required. If not specified, then the value will effectively place this item at the end of its specified group.- Returns:
- the sub-group
-
getParentMenuGroup
public java.lang.String getParentMenuGroup()
Returns the group for the parent menu of the menu item created by this data. That is, this value is effectively the same asgetMenuGroup()
, but for the parent menu item of this data's item. Setting this value is only valid if thegetMenuPath()
has a length greater than 1.- Returns:
- the parent group
-
setIcon
public void setIcon(javax.swing.Icon newIcon)
-
setMenuGroup
public void setMenuGroup(java.lang.String newGroup)
-
setMenuSubGroup
public void setMenuSubGroup(java.lang.String newSubGroup)
-
setParentMenuGroup
public void setParentMenuGroup(java.lang.String newParentMenuGroup)
See the description ingetParentMenuGroup()
- Parameters:
newParentMenuGroup
- the parent group
-
setMenuPath
public void setMenuPath(java.lang.String[] newPath)
-
setMnemonic
public void setMnemonic(java.lang.Character newMnemonic)
-
setMenuItemName
public void setMenuItemName(java.lang.String newMenuItemName)
-
getMenuItemName
public java.lang.String getMenuItemName()
-
-