|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vizzini.util.DocumentSupport
public class DocumentSupport
Provides implementations of methods required by documents.
| Field Summary | |
|---|---|
protected static String |
DIRTY_PROPERTY
Dirty property. |
protected static String |
FILE_PROPERTY
File property. |
| Constructor Summary | |
|---|---|
DocumentSupport()
Construct this object. |
|
| 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. |
File |
getFile()
Return the file associated with this document. |
Object |
getOwner()
Return the owner. |
protected PropertyChangeManager |
getPropertyChangeManager()
Return the property change manager. |
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. |
void |
setOwner(Object owner)
Set the owner. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String DIRTY_PROPERTY
protected static final String FILE_PROPERTY
| Constructor Detail |
|---|
public DocumentSupport()
| Method Detail |
|---|
public void addDirtyListener(PropertyChangeListener listener)
PropertyChangeListener for the dirty property to the
listener list.
addDirtyListener in interface IDocumentlistener - The PropertyChangeListener to be added.public void addFileListener(PropertyChangeListener listener)
PropertyChangeListener for the file property to the
listener list.
addFileListener in interface IDocumentlistener - The PropertyChangeListener to add.public IDocument getDocument()
public File getFile()
getFile in interface IDocumentpublic Object getOwner()
public boolean isDirty()
isDirty in interface IDocumentpublic boolean isFileAssociated()
File.
isFileAssociated in interface IDocumentpublic boolean isSaveable()
isSaveable in interface IDocument
public void open()
throws FileNotFoundException,
IOException,
ClassNotFoundException
open in interface IDocumentFileNotFoundException
IOException
ClassNotFoundExceptionpublic void removeDirtyListener(PropertyChangeListener listener)
PropertyChangeListener for the dirty property from
the listener list.
removeDirtyListener in interface IDocumentlistener - The PropertyChangeListener to remove.public void removeFileListener(PropertyChangeListener listener)
PropertyChangeListener for the file property from
the listener list.
removeFileListener in interface IDocumentlistener - The PropertyChangeListener to remove.public void reset()
reset in interface IDocument
public void save()
throws FileNotFoundException,
IOException
save in interface IDocumentFileNotFoundException
IOException
public void saveAs(File file)
throws FileNotFoundException,
IOException
saveAs in interface IDocumentFileNotFoundException
IOExceptionpublic void setDirty(boolean isDirty)
setDirty in interface IDocumentpublic void setDocument(IDocument document)
public void setFile(File file)
setFile in interface IDocumentpublic void setOwner(Object owner)
protected PropertyChangeManager getPropertyChangeManager()
|
||||||||||
| 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 |