|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmvp.View
scheduler.file.file_ui.FileMenu
public class FileMenu
Class FileMenu is the pulldown menu view of the model class. The FileMenu widget is a Java
JMenu. Anonymous instances of JMenuItem are defined for each item in the
menu.
| Field Summary | |
|---|---|
(package private) File |
file
Local reference to super.model for convenience to avoid casting everywhere; i.e., file is set equal to (File)super.model once in the constructor. |
(package private) javax.swing.JMenu |
menu
Local reference to (JMenu)super.widget for convenience to avoid casting; i.e., menu is set equal to (File)super.widget once in the constructor. |
| Fields inherited from class mvp.View |
|---|
closeAdapter, editable, model, screen, shown, widget, window |
| Constructor Summary | |
|---|---|
FileMenu(mvp.Screen screen,
File file,
FileUI fileUI)
Construct this with the given File model. |
|
| Method Summary | |
|---|---|
protected void |
addCloseAllItem()
Add the 'Close All menu item. |
protected void |
addCloseItem()
Add the 'Close' menu item. |
protected void |
addExitItem()
Add the 'Exit' menu item. |
protected void |
addNewItem()
Add the 'New' menu item. |
protected void |
addOpenItem()
Add the 'Open ...' menu item. |
protected void |
addPrintItem()
Add the 'Print ...' menu item. |
protected void |
addSaveAllItem()
Add the 'Save All' menu item. |
protected void |
addSaveAsItem()
Add the 'Save As ...' menu item. |
protected void |
addSaveConfigItem()
Add the 'Save Config' menu item. |
protected void |
addSaveItem()
Add the 'Save' menu item. |
java.awt.Component |
compose()
Compose this by inserting each of its nine menu items into the pulldown menu. |
| Methods inherited from class mvp.View |
|---|
getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setExitOnClose, setModel, show, show, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
File file
javax.swing.JMenu menu
| Constructor Detail |
|---|
public FileMenu(mvp.Screen screen,
File file,
FileUI fileUI)
| Method Detail |
|---|
public java.awt.Component compose()
compose in class mvp.Viewprotected void addNewItem()
JMenu.add(new JMenuItem("Item name")).addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
Model.method()
protected void addOpenItem()
protected void addCloseItem()
protected void addCloseAllItem()
protected void addSaveItem()
protected void addSaveAsItem()
protected void addSaveAllItem()
protected void addSaveConfigItem()
protected void addPrintItem()
protected void addExitItem()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||