|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JMenuBar jpicedt.ui.internal.PEMenuBar
public class PEMenuBar
The main menu bar. Several updateXXX()
methods are provided, which make it easy to keep the
GUI state synchronized with the current content of the desktop (in terms e.g. of saved/dirty boards,
…)
This menubar can listen to property-change events triggered e.g. from an activated
PEDrawingBoard
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JMenuBar |
---|
JMenuBar.AccessibleJMenuBar |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
PEMenuBar()
Creates the application main menu bar |
Method Summary | |
---|---|
static PEMenu |
createPEMenu(String name)
Creates a PEMenu from the given String, using JPicEdt 's default
ActionLocalizer to fetch the associated label (ie "name") and mnemonic ("name.mnemonic"). |
JMenuItem[] |
getMenuItems()
Return an array containing all the menu-items components attached to this menubar |
void |
propertyChange(PropertyChangeEvent e)
Implementation of PropertyChangeListener interface Allows
this menu-bar to get notified of change from the target EditorKit,
e.g. when a right-click switches the current EditorKit's mousetool back
to "select-tool", or when a new mousetool gets selected from the
"Tools" palette or from a BSH script. |
void |
updateAccelerators()
Update JMenuItem's accelerators from the key/value pairs stored in JPicEdt's preferences |
void |
updateFragmentsMenu()
Updates the "fragments" menu items |
void |
updateMenuBar()
Update the content (i.e. |
void |
updateRecentFilesSubmenu()
Updates the "recent files" sub-menu items after a frame was saved or opened. |
void |
updateScriptsMenu()
Updates the "script" menu items |
void |
updateUndoRedoMenus(String undoName,
String redoName)
update "undo" and "redo" text |
void |
updateWindowMenu()
Updates the Window menu as soon as an internal frame is opened or closed (this menu keeps tracks of every open internal frames so that the user can activate them quickly by use of a shortcut) |
Methods inherited from class javax.swing.JMenuBar |
---|
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getMenuCount, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isSelected, menuSelectionChanged, paintBorder, paramString, processKeyBinding, processKeyEvent, processMouseEvent, removeNotify, setBorderPainted, setHelpMenu, setMargin, setSelected, setSelectionModel, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PEMenuBar() throws MissingResourceException
MissingResourceException
Method Detail |
---|
public static PEMenu createPEMenu(String name) throws MissingResourceException
PEMenu
from the given String, using JPicEdt
's default
ActionLocalizer
to fetch the associated label (ie "name") and mnemonic ("name.mnemonic").
name
- the name of the menu, used to determine :
Example : createPEMenu("File") create a menu with label "File" and mnemonic = first char of "File.mnemonic"
MissingResourceException
public JMenuItem[] getMenuItems()
public void updateAccelerators()
public void updateMenuBar()
PEMenu
's) of the menu-bar
depending on the current state of the MDIManager
.
public void updateRecentFilesSubmenu()
public void updateScriptsMenu()
public void updateFragmentsMenu()
public void updateUndoRedoMenus(String undoName, String redoName)
public void updateWindowMenu() throws MissingResourceException
MissingResourceException
public void propertyChange(PropertyChangeEvent e)
PropertyChangeListener
interface Allows
this menu-bar to get notified of change from the target EditorKit,
e.g. when a right-click switches the current EditorKit's mousetool back
to "select-tool", or when a new mousetool gets selected from the
"Tools" palette or from a BSH script.
This DockablePanel gets registered as a PropertyChangeListener (with events sourced from EditorKit's) from inside MDIManager whenever a new Board is added.
propertyChange
in interface PropertyChangeListener
e
- the PropertyChangeEvent ; only the "getNewValue()" method is used here.
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |