|
org.openide.loaders 7.37 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JMenuBar
org.openide.awt.MenuBar
public class MenuBar
An extended version of swing's JMenuBar. This menubar can load its content from the folder where its "disk image" is stored.
Moreover, menu is Externalizable to restore its persistent
state with minimal storage expensiveness.
The MenuBar recognizes following objects in the folder:
Component - they're added directly
to the menubar.
Presenter.Toolbar - their toolbar presenter
is added to the menubar.
In subfolders the following objects are recognized and added to submenus:
Presenter.Menu
JMenuItem
JSeparator
Action
DataObjects
| 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 | |
|---|---|
MenuBar()
Don't call this constructor or this class will not get initialized properly. |
|
MenuBar(DataFolder folder)
Creates a new MenuBar from given folder. |
|
| Method Summary | |
|---|---|
void |
addImpl(Component c,
Object constraint,
int idx)
|
int |
getMenuCount()
|
boolean |
isOpaque()
|
protected boolean |
processKeyBinding(KeyStroke ks,
KeyEvent e,
int condition,
boolean pressed)
Overridden to handle mac conversion from Alt to Ctrl and vice versa so Alt can be used as the compose character on international keyboards. |
void |
readExternal(ObjectInput in)
Restores contents of this object from the specified stream. |
void |
updateUI()
|
void |
waitFinished()
Blocks until the menubar is completely created. |
void |
writeExternal(ObjectOutput out)
Saves the contents of this object to the specified stream. |
| Methods inherited from class javax.swing.JMenuBar |
|---|
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isSelected, menuSelectionChanged, paintBorder, paramString, processKeyEvent, processMouseEvent, removeNotify, setBorderPainted, setHelpMenu, setMargin, setSelected, setSelectionModel, setUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MenuBar()
public MenuBar(DataFolder folder)
MenuBar from given folder.
folder - The folder from which to create the content of the menubar.
If the parameter is null, default menu folder is obtained.| Method Detail |
|---|
public boolean isOpaque()
isOpaque in class JComponentpublic void updateUI()
updateUI in class JMenuBarpublic int getMenuCount()
getMenuCount in class JMenuBar
public void addImpl(Component c,
Object constraint,
int idx)
addImpl in class Container
protected boolean processKeyBinding(KeyStroke ks,
KeyEvent e,
int condition,
boolean pressed)
processKeyBinding in class JMenuBarpublic void waitFinished()
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException - Includes any I/O exceptions that may occur
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableClassNotFoundException - If the class for an object being
restored cannot be found.
IOException
|
org.openide.loaders 7.37 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||