public interface Document
Modifier and Type | Method and Description |
---|---|
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.
|
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
void close() throws java.lang.Exception
java.lang.Exception
- If the close operation fails.Application getApplication()
javax.swing.undo.UndoableEditSupport getEditSupport()
javax.swing.undo.UndoManager getUndoManager()
java.io.File getFile()
getURL()
java.lang.String getTitle()
java.lang.String getShortTitle()
java.net.URL getURL()
getFile()
boolean isDirty()
boolean isEditable()
boolean isWritable()
void open() throws java.lang.Exception
java.lang.Exception
- If the close operation fails.void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
void save() throws java.lang.Exception
java.lang.Exception
- If the save operation fails.void saveAs(java.io.File file) throws java.lang.Exception
java.lang.Exception
- If the save-as operation fails.save()
void saveAs(java.net.URL url) throws java.lang.Exception
java.lang.Exception
- If the save-as operation fails.save()
void setEditable(boolean flag)
void setFile(java.io.File file)
void setDirty(boolean flag)
void setURL(java.net.URL url)
void setWritable(boolean flag)