|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlapis.swing.FileAction
Nested Class Summary | |
static class |
FileAction.Close
Action that closes a browser window. |
static class |
FileAction.Exit
Action that exits LAPIS. |
static class |
FileAction.New
Action that creates a blank text document. |
static class |
FileAction.NewBrowser
Action that creates a new Browser window by cloning the current window. |
static class |
FileAction.Open
Action that pops up a file-open dialog to open a file into the browser. |
static class |
FileAction.Save
Action invoked by File/Save command. |
static class |
FileAction.SaveAs
Action invoked by File/Save As command. |
Constructor Summary | |
FileAction()
|
Method Summary | |
static File |
getFile(Document doc)
Get local filename corresponding to a document. |
static boolean |
isDirty(Document doc)
Get a document's dirty flag. |
static boolean |
isReadOnly(Document doc)
Test whether a document is marked read-only. |
static JFileChooser |
makeFileChooser(Browser browser,
File filename)
Make a JFileChooser for a browser. |
static boolean |
okToClear(Browser browser,
Enumeration docs)
Check dirty flags on a set of documents and asks the user if the dirty ones should be saved. |
static boolean |
save(Browser browser,
Document doc)
|
static boolean |
save(Browser browser,
File f,
Document doc)
Save browser contents to a local file. |
static boolean |
saveAs(Browser browser,
Document doc)
Pop up a save-as dialog box to save a document. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileAction()
Method Detail |
public static JFileChooser makeFileChooser(Browser browser, File filename)
browser
- Browser to use for current directoryfilename
- Default selected file, or null if no default
should be selected
public static boolean save(Browser browser, Document doc)
public static boolean saveAs(Browser browser, Document doc)
browser
- Browser to use for feedbackdoc
- Document to savepublic static boolean save(Browser browser, File f, Document doc)
browser
- Browser to use for feedbackf
- Filename for saved documentdoc
- Document to savepublic static File getFile(Document doc)
doc
- Document
public static boolean okToClear(Browser browser, Enumeration docs)
browser
- Browser to use for popping up dialog boxesdocs
- Enumeration of Documents that should be checkedpublic static boolean isDirty(Document doc)
doc
- Document to test
public static boolean isReadOnly(Document doc)
doc
- Document to test
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |