|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utep.cs.jet.gui.FileActionFactory
public class FileActionFactory
A factory class to create various file manipulation actions. These
actions are used to create (file) menu items or tool bar items (
see the class MenuFactory).
| Field Summary | |
|---|---|
protected File |
compilationDirectory
The directory in which the last compilation was performed. |
protected static File |
currentFile
The current file being edited. |
protected Mainable |
et
The main program. |
protected JFrame |
frame
The main frame of this program. |
protected edu.utep.cs.jet.gui.ViewController |
viewController
The associated view controller. |
| Constructor Summary | |
|---|---|
FileActionFactory(Mainable et,
edu.utep.cs.jet.gui.ViewController vc)
Creates a new instance for the given tool et. |
|
| Method Summary | |
|---|---|
AbstractAction |
getClose()
Returns an action for the close menu item. |
AbstractAction |
getCloseAll(edu.utep.cs.jet.gui.WorkingPane workingPane)
Returns an action for the closeAll menu item. |
DropTarget |
getDropTarget()
Returns a drop target object that accepts dropping of files on the Java editor. |
static Mainable |
getET()
|
AbstractAction |
getExit()
Returns an action for the exit menu item. |
protected ImageIcon |
getIcon(String name)
Returns an image icon whose image is read from the file named name. |
AbstractAction |
getNew()
Returns an action for the new menu item. |
AbstractAction |
getOpen()
Returns an action for the open menu item. |
AbstractAction |
getPopDelete()
Returns an action for the popup delete menu item. |
AbstractAction |
getPopNew()
Returns an action for the popup new menu item. |
AbstractAction |
getPopOpen()
Returns the open action for the popup menu. |
AbstractAction |
getPopRefresh()
Returns an action for the popup refresh menu item. |
AbstractAction |
getPopRootDir()
Returns an action for the popup change root dir menu item. |
AbstractAction |
getPopTest()
Returns the test action. |
AbstractAction |
getPrint()
Returns an action for the print menu item. |
AbstractAction |
getPrinterSetup()
Returns an action for the printer setup menu item. |
AbstractAction |
getSave()
Returns an action for the save menu item. |
AbstractAction |
getSaveAs()
Returns an action for the save as menu item. |
boolean |
getTestOP()
|
File |
locateFile(String filename)
Given a relative path name, finds the file. |
protected boolean |
saveIfModified()
Saves the contents of the editor buffer only if there are unsaved changes. |
protected void |
setCurrentFile(File file)
Sets the given file to be the current file being edited. |
static void |
updatePopupActions(File file)
Enables or Disables the popup actions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected File compilationDirectory
protected final Mainable et
protected final JFrame frame
protected static File currentFile
protected edu.utep.cs.jet.gui.ViewController viewController
| Constructor Detail |
|---|
public FileActionFactory(Mainable et,
edu.utep.cs.jet.gui.ViewController vc)
et.
| Method Detail |
|---|
public AbstractAction getNew()
public AbstractAction getOpen()
public AbstractAction getSave()
public AbstractAction getSaveAs()
public AbstractAction getPrint()
public AbstractAction getPrinterSetup()
public AbstractAction getClose()
public AbstractAction getCloseAll(edu.utep.cs.jet.gui.WorkingPane workingPane)
public AbstractAction getExit()
exit menu item.
public AbstractAction getPopOpen()
public AbstractAction getPopTest()
public AbstractAction getPopDelete()
public AbstractAction getPopNew()
public AbstractAction getPopRefresh()
public AbstractAction getPopRootDir()
public DropTarget getDropTarget()
public static void updatePopupActions(File file)
protected ImageIcon getIcon(String name)
name. A null is returned if reading the file fails.
protected void setCurrentFile(File file)
protected boolean saveIfModified()
public File locateFile(String filename)
null is returned. The file name is
parsed from an error message and supposed to be relative to the
directory in which the last compilation was done.
public static Mainable getET()
public boolean getTestOP()
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||