Package org.gvsig.app.project.documents
Class AbstractDocument
java.lang.Object
org.gvsig.tools.dispose.impl.AbstractDisposable
org.gvsig.app.project.documents.AbstractDocument
- All Implemented Interfaces:
Serializable,Document,org.gvsig.tools.dispose.Disposable,org.gvsig.tools.persistence.Persistent,org.gvsig.tools.util.Contains,org.gvsig.tools.util.PropertiesSupport
- Direct Known Subclasses:
BaseViewDocument
public abstract class AbstractDocument
extends org.gvsig.tools.dispose.impl.AbstractDisposable
implements Serializable, org.gvsig.tools.persistence.Persistent, Document
Clase base de los elementos del proyecto (mapas, tablas y vistas)
- Author:
- 2006-2009 Jose Manuel Vivo, 2005- Vicente Caballero, 2009- Joaquin del Cerro
- See Also:
-
Field Summary
FieldsFields inherited from interface org.gvsig.app.project.documents.Document
ACCESS_DOCUMENT_AUTHORIZATION -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ProjectElement object.AbstractDocument(DocumentManager factory) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ProjectDocumentListener listener) Register a ProjectDocumentListener.voidAdd a listener to monitor the changes in the properties of the documentvoidafterAdd()voidprotected voidcallCreateWindow(org.gvsig.andami.ui.mdiManager.IWindow window) booleanprotected voidGets the comments asociateds to the documentGet the creation date of the document.Return the main JComponent associated to this document.org.gvsig.andami.ui.mdiManager.IWindowReturn the main window associated to this document.getName()return the name of the documentbooleangetOwner()Get the creator name of the document.org.gvsig.andami.ui.mdiManager.IWindowgetProperty(String name) Return the name of the type of documentsbooleanbooleanisLocked()Tells whether if this project's element is locked/protected or not.booleanbooleanvoidloadFromState(org.gvsig.tools.persistence.PersistentState state) voidlock()Locks this project element protecting it from deleting from the project.voidraiseEventCreateWindow(org.gvsig.andami.ui.mdiManager.IWindow window) Throw this event when a new window is createdvoidrefresh()static voidvoidsaveToState(org.gvsig.tools.persistence.PersistentState state) voidsetComment(String string) Gets the comments asociateds to the documentvoidsetCreationDate(String string) Set the creation date of the document.voidsetModified(boolean modified) voidSets the nane of the documentvoidSets the creator name of the documentvoidsetProject(Project project) voidsetProperty(String name, Object value) voidsetStateFromText(String text) voidsetWindowLayout(WindowLayout layout) toString()voidunlock()Unlocks this element.Methods inherited from class org.gvsig.tools.dispose.impl.AbstractDisposable
dispose, dispose
-
Field Details
-
PERSISTENCE_DEFINITION_NAME
- See Also:
-
change
-
-
Constructor Details
-
AbstractDocument
public AbstractDocument()Creates a new ProjectElement object. -
AbstractDocument
-
-
Method Details
-
toString
-
getName
return the name of the document -
getTypeName
Return the name of the type of documents- Specified by:
getTypeNamein interfaceDocument- Returns:
- name as String
-
setName
Sets the nane of the document -
getCreationDate
Get the creation date of the document.- Specified by:
getCreationDatein interfaceDocument- Returns:
- creation date as String
-
getOwner
Get the creator name of the document. -
setCreationDate
Set the creation date of the document.- Specified by:
setCreationDatein interfaceDocument- Parameters:
string-
-
setOwner
Sets the creator name of the document -
getComment
Gets the comments asociateds to the document- Specified by:
getCommentin interfaceDocument- Returns:
- comments as String
-
setComment
Gets the comments asociateds to the document- Specified by:
setCommentin interfaceDocument- Parameters:
string-
-
addPropertyChangeListener
Add a listener to monitor the changes in the properties of the document- Specified by:
addPropertyChangeListenerin interfaceDocument- Parameters:
listener-
-
addListener
Register a ProjectDocumentListener.- Specified by:
addListenerin interfaceDocument- Parameters:
listener- ProjectDocumentListener
-
getWindowLayout
- Specified by:
getWindowLayoutin interfaceDocument
-
setWindowLayout
- Specified by:
setWindowLayoutin interfaceDocument
-
loadFromState
public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
loadFromStatein interfaceorg.gvsig.tools.persistence.Persistent- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
saveToState
public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
saveToStatein interfaceorg.gvsig.tools.persistence.Persistent- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
registerPersistent
public static void registerPersistent() -
getProject
- Specified by:
getProjectin interfaceDocument
-
setProject
- Specified by:
setProjectin interfaceDocument
-
lock
public void lock()Locks this project element protecting it from deleting from the project. -
unlock
public void unlock()Unlocks this element. So, from now on, it can be removed from the project. -
isLocked
public boolean isLocked()Tells whether if this project's element is locked/protected or not. A protected element cannot be removed from the current project. -
getFactory
- Specified by:
getFactoryin interfaceDocument
-
isModified
public boolean isModified()- Specified by:
isModifiedin interfaceDocument
-
setModified
public void setModified(boolean modified) - Specified by:
setModifiedin interfaceDocument
-
raiseEventCreateWindow
public void raiseEventCreateWindow(org.gvsig.andami.ui.mdiManager.IWindow window) Throw this event when a new window is created- Parameters:
window- IWindow created
-
callCreateWindow
protected void callCreateWindow(org.gvsig.andami.ui.mdiManager.IWindow window) -
afterAdd
public void afterAdd() -
afterRemove
public void afterRemove()- Specified by:
afterRemovein interfaceDocument
-
exportDocumentAsText
-
setStateFromText
-
getPropertiesWindow
public org.gvsig.andami.ui.mdiManager.IWindow getPropertiesWindow()- Specified by:
getPropertiesWindowin interfaceDocument
-
getMainWindow
public org.gvsig.andami.ui.mdiManager.IWindow getMainWindow()Description copied from interface:DocumentReturn the main window associated to this document. Is a tutility method, is equivalent to:this.getFactory().getMainWindow(doc)- Specified by:
getMainWindowin interfaceDocument- Returns:
- the IWindow associated to this document
-
getMainComponent
Description copied from interface:DocumentReturn the main JComponent associated to this document. Is a tutility method, is equivalent to:this.getFactory().getMainComponent(doc)- Specified by:
getMainComponentin interfaceDocument- Returns:
- the JComponent associated to this document
-
isTemporary
public boolean isTemporary()- Specified by:
isTemporaryin interfaceDocument
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceDocument
-
getOpenWhenTheUserCreates
public boolean getOpenWhenTheUserCreates()- Specified by:
getOpenWhenTheUserCreatesin interfaceDocument
-
contains
- Specified by:
containsin interfaceorg.gvsig.tools.util.Contains
-
refresh
public void refresh() -
getProperty
- Specified by:
getPropertyin interfaceorg.gvsig.tools.util.PropertiesSupport
-
setProperty
- Specified by:
setPropertyin interfaceorg.gvsig.tools.util.PropertiesSupport
-
getProperties
- Specified by:
getPropertiesin interfaceorg.gvsig.tools.util.PropertiesSupport
-
doDispose
protected void doDispose() throws org.gvsig.tools.exception.BaseException- Specified by:
doDisposein classorg.gvsig.tools.dispose.impl.AbstractDisposable- Throws:
org.gvsig.tools.exception.BaseException
-