Class Menu
java.lang.Object
de.julianweinelt.datacat.dbx.api.ui.menubar.MenuComponent<JMenu>
de.julianweinelt.datacat.dbx.api.ui.menubar.Menu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchild(MenuComponent menuComponent) Adds a new child to the next row in the menu.protected JMenucreate()Constructs a menu componentpriority(int priority) Defines the display priority of the menu.Adds a separator child to the next row of the menu.
-
Constructor Details
-
Menu
Create a new menu for the menubar in the editor. To define a priority, you can either call the methodpriorityor call the constructor with priorityMenu(String, String, int)- Parameters:
name- AStringcontaining the name of the menucategoryName- The internal name of the menu. Only alphanumerical lower case letters and underscores are allowed.
-
Menu
Create a new menu for the menubar in the editor- Parameters:
name- AStringcontaining the name of the menucategoryName- The internal name of the menu. Only alphanumerical lower case letters and underscores are allowed.priority- The display priority. Must be below 900 to not conflict with the default menu.
-
-
Method Details
-
priority
Defines the display priority of the menu. All numbers greater than 899 are system-reserved.- Parameters:
priority- The priority as an integer- Returns:
- The creating
Menuobject
-
separator
Adds a separator child to the next row of the menu. It will be displayed as a horizontal line.- Returns:
- The creating
Menuobject
-
create
Description copied from class:MenuComponentConstructs a menu component- Specified by:
createin classMenuComponent<JMenu>- Returns:
- The
MenuComponentextending aJMenuItemobject
-