|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--mvp.View
|
+--jdraw.file_ui.FileMenu
Class FileMenu is the pulldown menu for the File model. The FileMenu widget is a JMenu. Anonymous instances of JMenuItem are defined for each menu item.
| Field Summary | |
protected File |
file
A local reference to the File model. |
protected javax.swing.JFileChooser |
fileChooser
A File Chooser for Opening, Saving files |
protected FileFilter |
fileFilter
A instance of FileFilter to filter file selection. |
| Fields inherited from class mvp.View |
editable, model, screen, shown, widget, window |
| Constructor Summary | |
FileMenu(mvp.Screen screen,
File file,
FileUI fileUI)
Construct the menu with the given File model. |
|
| Method Summary | |
protected void |
addClose()
Add the 'Close' menu item. |
protected void |
addExit()
Add the 'Exit' menu item. |
protected void |
addNew()
Add the 'New' menu item. |
protected void |
addOpen()
Add the 'Open' menu item. |
protected void |
addPrint()
Add the 'Print' menu item. |
protected void |
addRevert()
Add the 'Revert' menu item. |
protected void |
addSave()
Add the 'Save' menu item. |
protected void |
addSaveAs()
Add the 'Save As ...' menu item. |
java.awt.Component |
compose()
Compose the menu items into the pulldown. |
java.lang.String |
getFileInput()
|
| Methods inherited from class mvp.View |
getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setModel, show, show, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected File file
protected FileFilter fileFilter
protected javax.swing.JFileChooser fileChooser
| Constructor Detail |
public FileMenu(mvp.Screen screen,
File file,
FileUI fileUI)
screen - - The Screen object on which to add the menu.file - - The companion model object.fileUI - - The companion view object.| Method Detail |
public java.awt.Component compose()
compose in class mvp.Viewprotected void addNew()
protected void addRevert()
protected void addOpen()
protected void addSave()
public java.lang.String getFileInput()
protected void addSaveAs()
protected void addClose()
protected void addPrint()
protected void addExit()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||