|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.gui.AbstractStoragePolicy
diva.gui.DefaultStoragePolicy
public class DefaultStoragePolicy
A Default storage policy that is useful for most applications. This policy is somewhat intelligent about preventing the user from doing something stupid (like closing the document without saving).
Field Summary | |
---|---|
private javax.swing.JFileChooser |
_openFileChooser
The file chooser that is used to open files. |
private javax.swing.JFileChooser |
_saveFileChooser
The file chooser that is used to save files. |
Constructor Summary | |
---|---|
DefaultStoragePolicy()
|
Method Summary | |
---|---|
boolean |
close(Document d)
Close the document. |
javax.swing.JFileChooser |
getFileChooser()
Deprecated. Use getOpenFileChooser() or getSaveFileChooser() |
javax.swing.JFileChooser |
getOpenFileChooser()
Get the open file chooser used by this storage policy. |
javax.swing.JFileChooser |
getSaveFileChooser()
Get the save file chooser used by this storage policy. |
Document |
open(Application app)
Open a new document. |
Document |
open(java.io.File file,
Application app)
Open a file and create a new document. |
Document |
open(java.net.URL url,
Application app)
Open a URL and create a new document. |
boolean |
save(Document d)
Save the document. |
boolean |
saveAs(Document d)
Save the document to a user-specified location. |
Methods inherited from class diva.gui.AbstractStoragePolicy |
---|
getDirectory, setDirectory, setDirectory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private javax.swing.JFileChooser _openFileChooser
private javax.swing.JFileChooser _saveFileChooser
Constructor Detail |
---|
public DefaultStoragePolicy()
Method Detail |
---|
public boolean close(Document d)
public javax.swing.JFileChooser getOpenFileChooser()
public javax.swing.JFileChooser getFileChooser()
public javax.swing.JFileChooser getSaveFileChooser()
public Document open(Application app)
public Document open(java.io.File file, Application app)
public Document open(java.net.URL url, Application app)
public boolean save(Document d)
public boolean saveAs(Document d)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |