public abstract class AbstractDocument extends Object implements Serializable, Persistent, Document
| Modifier and Type | Field and Description |
|---|---|
protected PropertyChangeSupport |
change |
static 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(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) |
String |
exportDocumentAsText() |
String |
getComment()
Gets the comments asociateds to the document
|
String |
getCreationDate()
Get the creation date of the document.
|
DocumentManager |
getFactory() |
JComponent |
getMainComponent()
Return the main JComponent associated to this document.
|
IWindow |
getMainWindow()
Return the main window associated to this document.
|
String |
getName()
return the name of the document
|
String |
getOwner()
Get the creator name of the document.
|
Project |
getProject() |
IWindow |
getPropertiesWindow() |
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
|
static void |
registerPersistent() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setComment(String string)
Gets the comments asociateds to the document
|
void |
setCreationDate(String string)
Set the creation date of the document.
|
void |
setModified(boolean modified) |
void |
setName(String name)
Sets the nane of the document
|
void |
setOwner(String string)
Sets the creator name of the document
|
void |
setProject(Project project) |
void |
setStateFromText(String text) |
void |
setWindowLayout(WindowLayout layout) |
String |
toString() |
void |
unlock()
Unlocks this element.
|
public static final String PERSISTENCE_DEFINITION_NAME
protected PropertyChangeSupport change
public AbstractDocument()
public AbstractDocument(DocumentManager factory)
public String toString()
toString in class ObjectObject.toString()public String getName()
public String getTypeName()
getTypeName in interface Documentpublic void setName(String name)
public String getCreationDate()
getCreationDate in interface Documentpublic String getOwner()
public void setCreationDate(String string)
setCreationDate in interface Documentstring - public void setOwner(String string)
public String getComment()
getComment in interface Documentpublic void setComment(String string)
setComment in interface Documentstring - public void addPropertyChangeListener(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 String exportDocumentAsText()
public void setStateFromText(String text)
public IWindow getPropertiesWindow()
getPropertiesWindow in interface Documentpublic IWindow getMainWindow()
Documentthis.getFactory().getMainWindow(doc)getMainWindow in interface Documentpublic JComponent getMainComponent()
Documentthis.getFactory().getMainComponent(doc)getMainComponent in interface Documentpublic boolean isTemporary()
isTemporary in interface Documentpublic boolean isAvailable()
isAvailable in interface Document