|
![]() |
||||||||
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
com.lowagie.rups.view.RupsMenuBar
public class RupsMenuBar
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 | |
---|---|
static String |
ABOUT
Caption for "Help about". |
static String |
CLOSE
Caption for "Close file". |
static String |
FILE_MENU
Caption for the file menu. |
protected FileChooserAction |
fileChooserAction
The action needed to open a file. |
static String |
HELP_MENU
Caption for the help menu. |
protected HashMap<String,JMenuItem> |
items
The HashMap with all the actions. |
protected Observable |
observable
The Observable object. |
static String |
OPEN
Caption for "Open file". |
private static long |
serialVersionUID
A Serial Version UID. |
static String |
VERSION
Caption for "Help versions". |
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 | |
---|---|
RupsMenuBar(Observable observable)
Creates a JMenuBar. |
Method Summary | |
---|---|
protected void |
addItem(JMenu menu,
String caption,
ActionListener action)
Create an item with a certain caption and a certain action, then add the item to a menu. |
protected void |
enableItem(String caption,
boolean enabled)
Enables/disables a specific menu item |
protected void |
enableItems(boolean enabled)
Enables/Disables a series of menu items. |
void |
update(Observable observable,
Object obj)
|
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 |
Field Detail |
---|
public static final String FILE_MENU
public static final String OPEN
public static final String CLOSE
public static final String HELP_MENU
public static final String ABOUT
public static final String VERSION
protected Observable observable
protected FileChooserAction fileChooserAction
protected HashMap<String,JMenuItem> items
private static final long serialVersionUID
Constructor Detail |
---|
public RupsMenuBar(Observable observable)
observable
- the controller to which this menu bar is addedMethod Detail |
---|
public void update(Observable observable, Object obj)
update
in interface Observer
Observer.update(java.util.Observable, java.lang.Object)
protected void addItem(JMenu menu, String caption, ActionListener action)
menu
- the menu to which the item has to be addedcaption
- the caption of the itemaction
- the action corresponding with the captionprotected void enableItems(boolean enabled)
enabled
- true for enabling; false for disablingprotected void enableItem(String caption, boolean enabled)
caption
- the caption of the item that needs to be enabled/disabledenabled
- true for enabling; false for disabling
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |