|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.util.AbstractDocument
public abstract class AbstractDocument
Provides implementations of methods required by documents.
Constructor Summary | |
---|---|
AbstractDocument()
Construct this object with the given parameter. |
|
AbstractDocument(Object owner)
Construct this object with the given parameter. |
Method Summary | |
---|---|
void |
addDirtyListener(PropertyChangeListener listener)
Add a PropertyChangeListener for the dirty property to the
listener list. |
void |
addFileListener(PropertyChangeListener listener)
Add a PropertyChangeListener for the file property to the
listener list. |
IDocument |
getDocument()
Return the document. |
DocumentSupport |
getDocumentSupport()
Return the document support object. |
File |
getFile()
Return the file associated with this document. |
boolean |
isDirty()
Return the flag indicating if this document has changed since the last save. |
boolean |
isFileAssociated()
Return true if this document has an associated File . |
boolean |
isSaveable()
Return true if this document needs to be saved. |
void |
open()
Open the associated file, thereby populating the document. |
void |
removeDirtyListener(PropertyChangeListener listener)
Remove a PropertyChangeListener for the dirty property from
the listener list. |
void |
removeFileListener(PropertyChangeListener listener)
Remove a PropertyChangeListener for the file property from
the listener list. |
void |
reset()
Reset this document. |
void |
save()
Save the document. |
void |
saveAs(File file)
Save the document to the given file. |
void |
setDirty(boolean isDirty)
Set the dirty flag. |
void |
setDocument(IDocument document)
Set the document. |
void |
setFile(File file)
Set the associated file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDocument()
public AbstractDocument(Object owner)
Method Detail |
---|
public void setDirty(boolean isDirty)
setDirty
in interface IDocument
public boolean isDirty()
isDirty
in interface IDocument
public void setDocument(IDocument document)
public IDocument getDocument()
public DocumentSupport getDocumentSupport()
public void setFile(File file)
setFile
in interface IDocument
public File getFile()
getFile
in interface IDocument
public boolean isFileAssociated()
File
.
isFileAssociated
in interface IDocument
public boolean isSaveable()
isSaveable
in interface IDocument
public void addDirtyListener(PropertyChangeListener listener)
PropertyChangeListener
for the dirty property to the
listener list.
addDirtyListener
in interface IDocument
listener
- The PropertyChangeListener
to be added.public void addFileListener(PropertyChangeListener listener)
PropertyChangeListener
for the file property to the
listener list.
addFileListener
in interface IDocument
listener
- The PropertyChangeListener
to add.public void open() throws FileNotFoundException, IOException, ClassNotFoundException
open
in interface IDocument
FileNotFoundException
IOException
ClassNotFoundException
public void removeDirtyListener(PropertyChangeListener listener)
PropertyChangeListener
for the dirty property from
the listener list.
removeDirtyListener
in interface IDocument
listener
- The PropertyChangeListener
to remove.public void removeFileListener(PropertyChangeListener listener)
PropertyChangeListener
for the file property from
the listener list.
removeFileListener
in interface IDocument
listener
- The PropertyChangeListener
to remove.public void reset()
reset
in interface IDocument
public void save() throws FileNotFoundException, IOException
save
in interface IDocument
FileNotFoundException
IOException
public void saveAs(File file) throws FileNotFoundException, IOException
saveAs
in interface IDocument
FileNotFoundException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |