public class UIUtil extends Object
Constructor and Description |
---|
UIUtil() |
Modifier and Type | Method and Description |
---|---|
private static void |
addAlphabetized(JMenuItem jmi,
JMenu jm,
boolean foldersFirst)
Add a menu item to it's proper alphabetized position
in the menu.
|
static void |
parseRecursiveMenuAdd(String[] labels,
String command,
JMenu m,
ActionListener l)
Add a menu item to a menu tree, along with sub-menu nodes if needed
|
public static void parseRecursiveMenuAdd(String[] labels, String command, JMenu m, ActionListener l)
labels
- An array of menu labels where the last String represents
the menu item and all other Strings represent
the sub-menu tree in which the item should be placedcommand
- The command string to send to the menu listener
when this item is selectedm
- The top menu tree to start withl
- The ActionListener
to add to the menu itemprivate static void addAlphabetized(JMenuItem jmi, JMenu jm, boolean foldersFirst)
jmi
- The menu item to addjm
- The menu to which the item should be addedfoldersFirst
- If true
, add folders before
other items; if false
, add folders after other items.Copyright © 2023. All rights reserved.