public class MenuUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MenuUtils.MenuEntry
The userObject type for createMenuEntryTree().
|
Constructor and Description |
---|
MenuUtils() |
Modifier and Type | Method and Description |
---|---|
static javax.swing.tree.DefaultMutableTreeNode |
createAcceleratebleMenuEntryTree(java.lang.String menuRootKey,
org.freeplane.core.ui.MenuBuilder menuBuilder)
Same as
#createMenuEntryTree(String, Controller) but all MenuEntries without associated accelerator
and (then) empty submenus are removed from the result. |
static javax.swing.tree.DefaultMutableTreeNode |
createMenuEntryTree(java.lang.String menuRootKey,
org.freeplane.core.ui.MenuBuilder menuBuilder)
returns a tree of all
JMenuItem nodes the menu contains (omitting Strings and Separators). |
static void |
executeMenuItems(java.util.List<java.lang.String> menuItemKeys) |
static org.freeplane.core.ui.IndexedTree.Node |
findAssignedMenuItemNodeRecursively(javax.swing.tree.DefaultMutableTreeNode menubarNode,
javax.swing.KeyStroke keystroke) |
static java.lang.String |
formatKeyStroke(javax.swing.KeyStroke keyStroke) |
static javax.swing.Icon |
getMenuItemIcon(java.lang.String menuItemKey) |
static void |
insertAsNodeModelRecursively(org.freeplane.features.map.NodeModel nodeModel,
java.util.Enumeration children,
org.freeplane.features.map.MapController mapController) |
static java.lang.String |
makeAcceleratorKey(java.lang.String menuItemKey) |
public static javax.swing.tree.DefaultMutableTreeNode createMenuEntryTree(java.lang.String menuRootKey, org.freeplane.core.ui.MenuBuilder menuBuilder)
JMenuItem
nodes the menu contains (omitting Strings and Separators).
The tree is build from DefaultMutableTreeNode
nodes having MenuEntry
objects as
their userObjects.
Note that the root node may have null as userObject if the menu item at menuRootKey
doesn't
contain a JMenuItem
!menuRootKey
- the key of the node that should form the root of the output.menuBuilder
- access point for the menu(s).public static javax.swing.tree.DefaultMutableTreeNode createAcceleratebleMenuEntryTree(java.lang.String menuRootKey, org.freeplane.core.ui.MenuBuilder menuBuilder)
#createMenuEntryTree(String, Controller)
but all MenuEntries without associated accelerator
and (then) empty submenus are removed from the result.public static void insertAsNodeModelRecursively(org.freeplane.features.map.NodeModel nodeModel, java.util.Enumeration children, org.freeplane.features.map.MapController mapController)
public static java.lang.String formatKeyStroke(javax.swing.KeyStroke keyStroke)
public static org.freeplane.core.ui.IndexedTree.Node findAssignedMenuItemNodeRecursively(javax.swing.tree.DefaultMutableTreeNode menubarNode, javax.swing.KeyStroke keystroke)
public static java.lang.String makeAcceleratorKey(java.lang.String menuItemKey)
public static void executeMenuItems(java.util.List<java.lang.String> menuItemKeys)
public static javax.swing.Icon getMenuItemIcon(java.lang.String menuItemKey)