|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Document is an interface that captures the notion of a document in a graphical application. Typically, documents are associated with files, although this is not necessarily so. Each application will typically create one or more implementations of this interface for the types of documents it can work with.
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this document. |
void |
close()
Close the document. |
Application |
getApplication()
Get the application that this document belongs to. |
javax.swing.undo.UndoableEditSupport |
getEditSupport()
Return the undoable edit support. |
java.io.File |
getFile()
Get the file object that this document is associated with. |
java.lang.String |
getShortTitle()
Get the short title of this document. |
java.lang.String |
getTitle()
Get the title of this document |
javax.swing.undo.UndoManager |
getUndoManager()
Return the undo manager of this document. |
java.net.URL |
getURL()
Get the URL that this document is associated with. |
boolean |
isDirty()
Test the "dirty" flag. |
boolean |
isEditable()
Test the "editable" flag. |
boolean |
isWritable()
Test the "writable" flag. |
void |
open()
Open the document from its current file or URL. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from this document. |
void |
save()
Save the document to its current file or URL. |
void |
saveAs(java.io.File file)
Save the document to the given file. |
void |
saveAs(java.net.URL url)
Save the document to the given URL. |
void |
setDirty(boolean flag)
Set the "dirty" flag. |
void |
setEditable(boolean flag)
Set the "editable" flag. |
void |
setFile(java.io.File file)
Set the file that this document saves itself to. |
void |
setURL(java.net.URL url)
Set the URL that this document saves itself to. |
void |
setWritable(boolean flag)
Set the "writable" flag. |
| Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void close()
throws java.lang.Exception
java.lang.Exception - If the close operation fails.public Application getApplication()
public javax.swing.undo.UndoableEditSupport getEditSupport()
public javax.swing.undo.UndoManager getUndoManager()
public java.io.File getFile()
getURL()public java.lang.String getTitle()
public java.lang.String getShortTitle()
public java.net.URL getURL()
getFile()public boolean isDirty()
public boolean isEditable()
public boolean isWritable()
public void open()
throws java.lang.Exception
java.lang.Exception - If the close operation fails.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void save()
throws java.lang.Exception
java.lang.Exception - If the save operation fails.
public void saveAs(java.io.File file)
throws java.lang.Exception
java.lang.Exception - If the save-as operation fails.save()
public void saveAs(java.net.URL url)
throws java.lang.Exception
java.lang.Exception - If the save-as operation fails.save()public void setEditable(boolean flag)
public void setFile(java.io.File file)
public void setDirty(boolean flag)
public void setURL(java.net.URL url)
public void setWritable(boolean flag)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||