public abstract class AbstractMenuItemDefinition extends Object implements Serializable, Comparable<AbstractMenuItemDefinition>
Modifier and Type | Field and Description |
---|---|
static String |
MENU_HELP
"Help", the last menu.
|
static String |
MENU_PROGRAM
"Program", the first menu.
|
static String |
MENU_TOOLS
"Tools" menu.
|
static String |
MENU_VISUALIZATION
"Visualization" menu.
|
Constructor and Description |
---|
AbstractMenuItemDefinition() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AbstractMenuItemDefinition o)
Comparison on the group and name.
|
boolean |
equals(Object o)
Checks equality using the name of the plugin.
|
JButton |
getButton()
Returns the shortcut button.
|
static List<String> |
getDefinitions()
Returns all the available menu items.
|
abstract String |
getGroup()
The name of the menu this item belongs to.
|
ImageIcon |
getIcon()
Returns the icon to use.
|
String |
getIconName()
The name of the menu icon.
|
JMenuItem |
getMenuItem()
Returns the menu item to insert
|
abstract String |
getName()
The name of the menu item.
|
boolean |
isShortcutButton()
Returns whether this menu item should also be listed as a shortcut button.
|
protected abstract void |
launch()
Called by the menu items action listener.
|
public static final String MENU_PROGRAM
public static final String MENU_VISUALIZATION
public static final String MENU_TOOLS
public static final String MENU_HELP
public abstract String getGroup()
public abstract String getName()
public String getIconName()
public ImageIcon getIcon()
protected abstract void launch()
public JMenuItem getMenuItem()
public boolean isShortcutButton()
public JButton getButton()
public int compareTo(AbstractMenuItemDefinition o)
compareTo
in interface Comparable<AbstractMenuItemDefinition>
o
- the other plugingetGroup()
,
getName()
public boolean equals(Object o)
equals
in class Object
o
- the other objectgetGroup()
,
getName()
Copyright © 2017. All Rights Reserved.