@ExtensionPoint public interface MenuAction extends ContextAction
MenuAction
s are used to create top-level menu items in the main
window.
Plugins can register menu items by creating classes that implement this
interface and registering them as OSGi services. To register a menu item for
for the menu "File" in thermostat client window, register a service that
returns {"File", getName()}
from getPath()
.
The following information is specific to the current release and may change in a future release.
The swing client uses MenuActions
s to implement top-level menus in
the main window only.
Modifier and Type | Interface and Description |
---|---|
static class |
MenuAction.Type |
Modifier and Type | Method and Description |
---|---|
void |
execute()
Invoked when the user selects this menu item
|
LocalizedString |
getDescription()
A user-visible description of what this
MenuAction does. |
LocalizedString |
getName()
The user-visible text displayed as the menu item.
|
LocalizedString[] |
getPath()
The path to the menu action.
|
MenuAction.Type |
getType()
The type of the menu (radio, check, standard)
|
LocalizedString getName()
getName
in interface ContextAction
LocalizedString getDescription()
MenuAction
does.getDescription
in interface ContextAction
void execute()
MenuAction.Type getType()
LocalizedString[] getPath()
Copyright © 2016. All rights reserved.