public interface Document
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(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.
|
UndoableEditSupport |
getEditSupport()
Return the undoable edit support.
|
File |
getFile()
Get the file object that this document is associated with.
|
String |
getShortTitle()
Get the short title of this document.
|
String |
getTitle()
Get the title of this document
|
UndoManager |
getUndoManager()
Return the undo manager of this document.
|
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(PropertyChangeListener listener)
Remove a property change listener from this document.
|
void |
save()
Save the document to its current file or URL.
|
void |
saveAs(File file)
Save the document to the given file.
|
void |
saveAs(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(File file)
Set the file that this document saves itself to.
|
void |
setURL(URL url)
Set the URL that this document saves itself to.
|
void |
setWritable(boolean flag)
Set the "writable" flag.
|
void addPropertyChangeListener(PropertyChangeListener listener)
void close() throws Exception
Exception
- If the close operation fails.Application getApplication()
UndoableEditSupport getEditSupport()
UndoManager getUndoManager()
File getFile()
getURL()
String getTitle()
String getShortTitle()
URL getURL()
getFile()
boolean isDirty()
boolean isEditable()
boolean isWritable()
void open() throws Exception
Exception
- If the close operation fails.void removePropertyChangeListener(PropertyChangeListener listener)
void save() throws Exception
Exception
- If the save operation fails.void saveAs(File file) throws Exception
void saveAs(URL url) throws Exception
void setEditable(boolean flag)
void setFile(File file)
void setDirty(boolean flag)
void setURL(URL url)
void setWritable(boolean flag)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.