|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Provides a menu that will be shown in a pop-up menu for a specific object in the shell.
Snap-ins must implement this interface to provide a menu to be shown in a context menu of a specific object. If you write a pop-up menu snap-in that is not registered to a view, it will apply only to a single object selection. On the other hand, when your pop-up menu snap-in is registered to a view, then the pop-up menu will appear when no objects are selected, which makes it the default pop-up menu for the view. To get the pop-up menu to appear when more than one object is selected, you must register it to the NamespaceMultiSelectPopupMenuScope.
The top and first level of a pop-up menu can have an insertion point where all later menus that snap into that menu will come in. If the developer is creating a pop-up menu snap-in that will be in one of these locations and wants to define this insertion point, use a JMenuItem with the text equal to Shell.MENU_INSERTION_POINT. If this is not defined, all pop-up menu items snapped in later will come in at the bottom.
To provide menu items to be shown in the main menu of the shell you must implement the MenuSnapin interface.
MenuSnapin| Method Summary | |
javax.swing.JMenuItem[] |
getMenuItems()
Returns an array of JMenuItems. |
java.lang.String |
getMenuLocation()
Returns the location of the pop-up menu item in the menu hierarchy. |
| Methods inherited from interface com.novell.application.console.snapin.Snapin |
getSnapinDescription,
getSnapinName,
initSnapin,
shutdownSnapin |
| Method Detail |
public javax.swing.JMenuItem[] getMenuItems()
The JMenuItems will be displayed as a context menu of a class in the shell.
public java.lang.String getMenuLocation()
If the ancestors returned do not exist, they are created. If they do exist, the new menu item is inserted at the snap-in point of insertion.
Pop-up menus in ConsoleOne have locale-independant key names that are referred to in the getMenuLocation() method to define what menu to snap into. These keys are defined as the ‘action command’ of the menu. When defining pop-up menus that will be snapped into, set the action command of the menu, using the setActionCommand() method, to be the key that other developers can use to register against. For ConsoleOne, the console snapin's pop-up menus use the English menu name as the key.
MenuSnapin.getMenuLocation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||