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, dispose
public 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.Object
Object.toString()
public java.lang.String getName()
public java.lang.String getTypeName()
getTypeName
in interface Document
public void setName(java.lang.String name)
public java.lang.String getCreationDate()
getCreationDate
in interface Document
public java.lang.String getOwner()
public void setCreationDate(java.lang.String string)
setCreationDate
in interface Document
string
- public void setOwner(java.lang.String string)
public java.lang.String getComment()
getComment
in interface Document
public void setComment(java.lang.String string)
setComment
in interface Document
string
- public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface Document
listener
- public void addListener(ProjectDocumentListener listener)
addListener
in interface Document
listener
- ProjectDocumentListenerpublic WindowLayout getWindowLayout()
getWindowLayout
in interface Document
public void setWindowLayout(WindowLayout layout)
setWindowLayout
in interface Document
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public static void registerPersistent()
public Project getProject()
getProject
in interface Document
public void setProject(Project project)
setProject
in interface Document
public void lock()
public void unlock()
public boolean isLocked()
public DocumentManager getFactory()
getFactory
in interface Document
public boolean isModified()
isModified
in interface Document
public void setModified(boolean modified)
setModified
in interface Document
public void raiseEventCreateWindow(IWindow window)
window
- IWindow createdprotected void callCreateWindow(IWindow window)
raiseEventCreateWindow(IWindow)
public void afterRemove()
afterRemove
in interface Document
public java.lang.String exportDocumentAsText()
public void setStateFromText(java.lang.String text)
public IWindow getPropertiesWindow()
getPropertiesWindow
in interface Document
public IWindow getMainWindow()
Document
this.getFactory().getMainWindow(doc)
getMainWindow
in interface Document
public javax.swing.JComponent getMainComponent()
Document
this.getFactory().getMainComponent(doc)
getMainComponent
in interface Document
public boolean isTemporary()
isTemporary
in interface Document
public boolean isAvailable()
isAvailable
in interface Document
public boolean getOpenWhenTheUserCreates()
getOpenWhenTheUserCreates
in interface Document
public boolean contains(java.lang.Object value)
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface PropertiesSupport
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface PropertiesSupport
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties
in interface PropertiesSupport
protected void doDispose() throws BaseException
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class AbstractDisposable
BaseException
AbstractDisposable.dispose()