public abstract class AbstractDocument extends AbstractDisposable implements java.io.Serializable, Persistent, Document
| Modifier and Type | Field and Description |
|---|---|
protected java.beans.PropertyChangeSupport |
change |
static java.lang.String |
PERSISTENCE_DEFINITION_NAME |
ACCESS_DOCUMENT_AUTHORIZATION| Constructor and Description |
|---|
AbstractDocument()
Creates a new ProjectElement object.
|
AbstractDocument(DocumentManager factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ProjectDocumentListener listener)
Register a ProjectDocumentListener.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a listener to monitor the changes in the properties of the document
|
void |
afterAdd() |
void |
afterRemove() |
protected void |
callCreateWindow(IWindow window)
Deprecated.
use {link
raiseEventCreateWindow(IWindow) |
boolean |
contains(java.lang.Object value) |
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
java.lang.String |
exportDocumentAsText() |
java.lang.String |
getComment()
Gets the comments asociateds to the document
|
java.lang.String |
getCreationDate()
Get the creation date of the document.
|
DocumentManager |
getFactory() |
javax.swing.JComponent |
getMainComponent()
Return the main JComponent associated to this document.
|
IWindow |
getMainWindow()
Return the main window associated to this document.
|
java.lang.String |
getName()
return the name of the document
|
boolean |
getOpenWhenTheUserCreates() |
java.lang.String |
getOwner()
Get the creator name of the document.
|
Project |
getProject() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
IWindow |
getPropertiesWindow() |
java.lang.Object |
getProperty(java.lang.String name) |
java.lang.String |
getTypeName()
Return the name of the type of documents
|
WindowLayout |
getWindowLayout() |
boolean |
isAvailable() |
boolean |
isLocked()
Tells whether if this project's element is locked/protected or not.
|
boolean |
isModified() |
boolean |
isTemporary() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
lock()
Locks this project element protecting it from deleting from the project.
|
void |
raiseEventCreateWindow(IWindow window)
Throw this event when a new window is created
|
void |
refresh() |
static void |
registerPersistent() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setComment(java.lang.String string)
Gets the comments asociateds to the document
|
void |
setCreationDate(java.lang.String string)
Set the creation date of the document.
|
void |
setModified(boolean modified) |
void |
setName(java.lang.String name)
Sets the nane of the document
|
void |
setOwner(java.lang.String string)
Sets the creator name of the document
|
void |
setProject(Project project) |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
void |
setStateFromText(java.lang.String text) |
void |
setWindowLayout(WindowLayout layout) |
java.lang.String |
toString() |
void |
unlock()
Unlocks this element.
|
dispose, disposepublic static final java.lang.String PERSISTENCE_DEFINITION_NAME
protected java.beans.PropertyChangeSupport change
public AbstractDocument()
public AbstractDocument(DocumentManager factory)
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.lang.String getName()
public java.lang.String getTypeName()
getTypeName in interface Documentpublic void setName(java.lang.String name)
public java.lang.String getCreationDate()
getCreationDate in interface Documentpublic java.lang.String getOwner()
public void setCreationDate(java.lang.String string)
setCreationDate in interface Documentstring - public void setOwner(java.lang.String string)
public java.lang.String getComment()
getComment in interface Documentpublic void setComment(java.lang.String string)
setComment in interface Documentstring - public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener in interface Documentlistener - public void addListener(ProjectDocumentListener listener)
addListener in interface Documentlistener - ProjectDocumentListenerpublic WindowLayout getWindowLayout()
getWindowLayout in interface Documentpublic void setWindowLayout(WindowLayout layout)
setWindowLayout in interface Documentpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic static void registerPersistent()
public Project getProject()
getProject in interface Documentpublic void setProject(Project project)
setProject in interface Documentpublic void lock()
public void unlock()
public boolean isLocked()
public DocumentManager getFactory()
getFactory in interface Documentpublic boolean isModified()
isModified in interface Documentpublic void setModified(boolean modified)
setModified in interface Documentpublic void raiseEventCreateWindow(IWindow window)
window - IWindow createdprotected void callCreateWindow(IWindow window)
raiseEventCreateWindow(IWindow)public void afterRemove()
afterRemove in interface Documentpublic java.lang.String exportDocumentAsText()
public void setStateFromText(java.lang.String text)
public IWindow getPropertiesWindow()
getPropertiesWindow in interface Documentpublic IWindow getMainWindow()
Documentthis.getFactory().getMainWindow(doc)getMainWindow in interface Documentpublic javax.swing.JComponent getMainComponent()
Documentthis.getFactory().getMainComponent(doc)getMainComponent in interface Documentpublic boolean isTemporary()
isTemporary in interface Documentpublic boolean isAvailable()
isAvailable in interface Documentpublic boolean getOpenWhenTheUserCreates()
getOpenWhenTheUserCreates in interface Documentpublic boolean contains(java.lang.Object value)
public java.lang.Object getProperty(java.lang.String name)
getProperty in interface PropertiesSupportpublic void setProperty(java.lang.String name,
java.lang.Object value)
setProperty in interface PropertiesSupportpublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties in interface PropertiesSupportprotected void doDispose()
throws BaseException
AbstractDisposableAbstractDisposable.dispose() method, to be
implemented by child classes.doDispose in class AbstractDisposableBaseExceptionAbstractDisposable.dispose()