com.lowagie.rups.view
public class RupsMenuBar extends JMenuBar implements Observer
Field Summary | |
---|---|
static String | ABOUT Caption for "Help about". |
static String | CLOSE Caption for "Close file". |
protected FileChooserAction | fileChooserAction The action needed to open a file. |
static String | FILE_MENU Caption for the file menu. |
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". |
static long | serialVersionUID A Serial Version UID. |
static String | VERSIONS Caption for "Help versions". |
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) |
Parameters: observable the controller to which this menu bar is added
Parameters: menu the menu to which the item has to be added caption the caption of the item action the action corresponding with the caption
Parameters: caption the caption of the item that needs to be enabled/disabled enabled true for enabling; false for disabling
Parameters: enabled true for enabling; false for disabling
See Also: java.util.Observer#update(java.util.Observable, java.lang.Object)