|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.gui.AbstractDocument
public abstract class AbstractDocument
An abstract implementation of the Document interface. This class implements the common elements of the Document abstraction, and takes care of listener notification for properties.
Constructor Summary | |
---|---|
AbstractDocument(Application a)
Construct a document that is owned by the given application |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDocument(Application a)
Method Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface Document
public UndoableEditSupport getEditSupport()
getEditSupport
in interface Document
public UndoManager getUndoManager()
getUndoManager
in interface Document
public void close() throws Exception
close
in interface Document
Exception
- If the close operation fails.public Application getApplication()
getApplication
in interface Document
public File getFile()
getFile
in interface Document
getURL()
public String getShortTitle()
getShortTitle
in interface Document
public String getTitle()
getTitle
in interface Document
public URL getURL()
getURL
in interface Document
getFile()
public boolean isDirty()
isDirty
in interface Document
public boolean isEditable()
isEditable
in interface Document
public boolean isWritable()
isWritable
in interface Document
public abstract void open() throws Exception
open
in interface Document
Exception
- If the close operation fails.public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface Document
public abstract void save() throws Exception
save
in interface Document
Exception
- If the save operation fails.public abstract void saveAs(File file) throws Exception
saveAs
in interface Document
Exception
- If the save-as operation fails.save()
public abstract void saveAs(URL url) throws Exception
saveAs
in interface Document
Exception
- If the save-as operation fails.save()
public void setFile(File file)
setFile
in interface Document
public void setURL(URL url)
setURL
in interface Document
public void setEditable(boolean flag)
setEditable
in interface Document
public void setDirty(boolean flag)
setDirty
in interface Document
public void setWritable(boolean flag)
setWritable
in interface Document
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |