public abstract class AbstractDocument extends Object implements Document
| Constructor and Description |
|---|
AbstractDocument(Application a)
Construct a document that is owned by the given application
|
| 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.
|
abstract void |
open()
Open the document from its current file or URL.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this document.
|
abstract void |
save()
Save the document to its current file or URL.
|
abstract void |
saveAs(File file)
Save the document to the given file.
|
abstract void |
saveAs(URL url)
Save the document to the given file.
|
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.
|
public AbstractDocument(Application a)
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface Documentpublic UndoableEditSupport getEditSupport()
getEditSupport in interface Documentpublic UndoManager getUndoManager()
getUndoManager in interface Documentpublic void close()
throws Exception
public Application getApplication()
getApplication in interface Documentpublic File getFile()
public String getShortTitle()
getShortTitle in interface Documentpublic String getTitle()
public URL getURL()
public boolean isDirty()
public boolean isEditable()
isEditable in interface Documentpublic boolean isWritable()
isWritable in interface Documentpublic abstract void open()
throws Exception
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface Documentpublic abstract void save()
throws Exception
public abstract void saveAs(File file) throws Exception
public abstract void saveAs(URL url) throws Exception
public void setFile(File file)
public void setURL(URL url)
public void setEditable(boolean flag)
setEditable in interface Documentpublic void setDirty(boolean flag)
public void setWritable(boolean flag)
setWritable in interface DocumentCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.