public class PvControlMenu
extends java.awt.MenuBar
implements java.awt.event.ActionListener
Use method setEnabledMenu(int, boolean)
to switch
state of single menu items.
Identifiers of menu items are specified in jv.object.PsViewerIf
.
PvControl
,
PvViewer
,
PsViewerIf
,
Serialized FormConstructor and Description |
---|
PvControlMenu(PvViewer viewer,
java.awt.Frame frame)
Constructor of menu bar in control window.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Handle menu events related with panels, dialog events which are forwarded to viewer
and method events forwarded to the current geometry.
|
java.awt.Menu |
add(java.awt.Menu menu)
Override
add(Menu) to set of font of menu. |
java.awt.MenuItem |
add(java.awt.Menu menu,
java.awt.MenuItem item)
Use this method instead of
menu.add(MenuItem) to set of font of menu. |
boolean |
isMenuEnabled(int menuId)
Determine whether menu entry in menu bar of control window is enabled.
|
void |
setEnabledMenu(int menuId,
boolean cond)
Enable/disable menu entries in menu bar of control window.
|
addNotify, countMenus, deleteShortcut, getAccessibleContext, getHelpMenu, getMenu, getMenuCount, getShortcutMenuItem, remove, remove, removeNotify, setHelpMenu, shortcuts
dispatchEvent, getFont, getName, getParent, getPeer, postEvent, setFont, setName, toString
public PvControlMenu(PvViewer viewer, java.awt.Frame frame)
public java.awt.Menu add(java.awt.Menu menu)
add(Menu)
to set of font of menu.add
in class java.awt.MenuBar
public java.awt.MenuItem add(java.awt.Menu menu, java.awt.MenuItem item)
menu.add(MenuItem)
to set of font of menu.public void setEnabledMenu(int menuId, boolean cond)
menuId
- Id of menu to enable/disable, PsViewerIf
.cond
- true
enables this menu item, otherwise disables it.PsViewerIf
public boolean isMenuEnabled(int menuId)
menuId
- Id of menu to enable/disable, PsViewerIf
.true
if menu is enabled.PsViewerIf
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
"