Package org.gvsig.app.project.documents
Class AbstractDocumentManager
java.lang.Object
org.gvsig.app.project.documents.AbstractDocumentManager
- All Implemented Interfaces:
DocumentManager,org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport,org.gvsig.tools.extensionpoint.ExtensionBuilder,org.gvsig.tools.observer.Observable,org.gvsig.tools.observer.Observer,org.gvsig.tools.observer.WeakReferencingObservable,org.gvsig.tools.persistence.PersistenceFactory
- Direct Known Subclasses:
ViewManager
public abstract class AbstractDocumentManager
extends Object
implements DocumentManager, org.gvsig.tools.observer.Observer
Factory of ProjectDocument.
-
Field Summary
Fields inherited from interface org.gvsig.app.project.documents.DocumentManager
NOTIFY_AFTER_CREATEDOCUMENT, NOTIFY_AFTER_CREATEMAINWINDOW, NOTIFY_AFTER_CREATEPROPERTIESWINDOW, NOTIFY_AFTER_GETMAINWINDOW, NOTIFY_AFTER_GETPROPERTIESWINDOW -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObserver(org.gvsig.tools.observer.Observer o) create()Uses a gui to be able from the characteristics that we want a ProjectDocumentUses a gui to be able from the characteristics that we want a ProjectDocumentcreateDocumentsByUser(org.gvsig.tools.util.Invocable whenDocumentsLoaded) protected IDocumentWindowcreateDocumentWindow(Document document) createFromState(org.gvsig.tools.persistence.PersistentState state) voiddeleteObserver(org.gvsig.tools.observer.Observer o) voidbooleanReturn true if the name exists to another document.List<org.gvsig.tools.dynobject.DynStruct> protected abstract ClassReturn the class or interface for the documents managed by this factory.getIcon()Returns the icon for the type of document.Returns the icon for the type of document when is selectedgetMainComponent(Document doc) Devuelbe el JComponent que se corresponde con el documento indicado.getMainComponent(DocumentsContainer container, Document doc) Create a new JComponent for the document or if already exists in the specified container, return this.org.gvsig.andami.ui.mdiManager.IWindowgetMainWindow(Document doc) Return the main window asociated to the passed document.org.gvsig.andami.ui.mdiManager.IWindowgetMainWindow(Document doc, WindowLayout layout) Return the main window asociated to the document.getManagedClass(Object object) getManagedClass(String name) getManagedClass(org.gvsig.tools.persistence.PersistentState state) getManagedClassName(Object object) intReturns the type of document priority.org.gvsig.andami.ui.mdiManager.IWindowReturn the windows properties asociated to the document.getProperty(Object key) getTitle()Returns the title of type of document.booleanhasMainWindow(Document doc) voidloadFromState(org.gvsig.tools.persistence.PersistentState state, Object object) booleanbooleanmanages(org.gvsig.tools.persistence.PersistentState state) protected org.gvsig.tools.observer.NotificationnotifyObservers(String type, org.gvsig.andami.ui.mdiManager.IWindow doc) protected org.gvsig.tools.observer.NotificationnotifyObservers(String type, Document doc) voidregisterMainComponent(DocumentsContainer container, Document doc, JComponent component) voidsaveToState(org.gvsig.tools.persistence.PersistentState state, Object obj) voidsetProperty(Object key, Object obj) voidunregisterMainComponent(DocumentsContainer container, Document doc) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gvsig.app.project.documents.DocumentManager
createDocument, getMainWindowClass, getTypeNameMethods inherited from interface org.gvsig.tools.persistence.PersistenceFactory
getDefinition, manages
-
Constructor Details
-
AbstractDocumentManager
protected AbstractDocumentManager()
-
-
Method Details
-
getPriority
public int getPriority()Returns the type of document priority. This priority is used when order document factories in UI.- Specified by:
getPriorityin interfaceDocumentManager- Returns:
- Priority.
-
getIcon
Returns the icon for the type of document.- Specified by:
getIconin interfaceDocumentManager- Returns:
- Image.
-
getIconSelected
Returns the icon for the type of document when is selected- Specified by:
getIconSelectedin interfaceDocumentManager- Returns:
- Image.
-
getTitle
Returns the title of type of document.- Specified by:
getTitlein interfaceDocumentManager- Returns:
- String title for type of document
-
createDocumentByUser
Description copied from interface:DocumentManagerUses a gui to be able from the characteristics that we want a ProjectDocument- Specified by:
createDocumentByUserin interfaceDocumentManager- Returns:
- a new Document
-
createDocumentsByUser
Description copied from interface:DocumentManagerUses a gui to be able from the characteristics that we want a ProjectDocument- Specified by:
createDocumentsByUserin interfaceDocumentManager- Returns:
- the created documents
-
createDocumentsByUser
public Iterator<? extends Document> createDocumentsByUser(org.gvsig.tools.util.Invocable whenDocumentsLoaded) - Specified by:
createDocumentsByUserin interfaceDocumentManager
-
create
- Specified by:
createin interfaceorg.gvsig.tools.extensionpoint.ExtensionBuilder- See Also:
-
create
- Specified by:
createin interfaceorg.gvsig.tools.extensionpoint.ExtensionBuilder- See Also:
-
create
- Specified by:
createin interfaceorg.gvsig.tools.extensionpoint.ExtensionBuilder- See Also:
-
getMainWindow
Description copied from interface:DocumentManagerReturn the main window asociated to the passed document. If the window alreade exists return it. If not, a new window is created.- Specified by:
getMainWindowin interfaceDocumentManager- Parameters:
doc-- Returns:
- Window asociated to document
-
getMainWindow
Description copied from interface:DocumentManagerReturn the main window asociated to the document.- Specified by:
getMainWindowin interfaceDocumentManager- Parameters:
doc- , layoutlayout-- Returns:
- Window asociated to document
-
hasMainWindow
- Specified by:
hasMainWindowin interfaceDocumentManager
-
getPropertiesWindow
Description copied from interface:DocumentManagerReturn the windows properties asociated to the document.- Specified by:
getPropertiesWindowin interfaceDocumentManager- Parameters:
doc-- Returns:
-
getMainComponent
Description copied from interface:DocumentManagerDevuelbe el JComponent que se corresponde con el documento indicado. Si la ventana activa se corresponde con este documento, devuelbe el JComponent asociado a esa ventana. Si no se corresponde con la ventana activa, pero esta es un contenedor de documentos le pide a este el componente asociado al documento requerido y si lo encuentra lo devuelve. En otro caso develbe null.- Specified by:
getMainComponentin interfaceDocumentManager- Parameters:
doc-- Returns:
- el JComponent asociado a doc
-
getMainComponent
Description copied from interface:DocumentManagerCreate a new JComponent for the document or if already exists in the specified container, return this.- Specified by:
getMainComponentin interfaceDocumentManager- Parameters:
container-doc-- Returns:
-
unregisterMainComponent
- Specified by:
unregisterMainComponentin interfaceDocumentManager
-
registerMainComponent
- Specified by:
registerMainComponentin interfaceDocumentManager
-
existName
Return true if the name exists to another document.- Specified by:
existNamein interfaceDocumentManager- Parameters:
project-documentName-- Returns:
- True if the name exists.
-
getDocumentClass
Return the class or interface for the documents managed by this factory.- Returns:
- The document class;
-
getClassOfDocument
- Specified by:
getClassOfDocumentin interfaceDocumentManager
-
createFromState
public Object createFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
createFromStatein interfaceorg.gvsig.tools.persistence.PersistenceFactory- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
loadFromState
public void loadFromState(org.gvsig.tools.persistence.PersistentState state, Object object) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
loadFromStatein interfaceorg.gvsig.tools.persistence.PersistenceFactory- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
saveToState
public void saveToState(org.gvsig.tools.persistence.PersistentState state, Object obj) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
saveToStatein interfaceorg.gvsig.tools.persistence.PersistenceFactory- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
manages
- Specified by:
managesin interfaceorg.gvsig.tools.persistence.PersistenceFactory
-
manages
public boolean manages(org.gvsig.tools.persistence.PersistentState state) - Specified by:
managesin interfaceorg.gvsig.tools.persistence.PersistenceFactory
-
getDefinitions
- Specified by:
getDefinitionsin interfaceorg.gvsig.tools.persistence.PersistenceFactory
-
getDomainName
- Specified by:
getDomainNamein interfaceorg.gvsig.tools.persistence.PersistenceFactory
-
getDomainURL
- Specified by:
getDomainURLin interfaceorg.gvsig.tools.persistence.PersistenceFactory
-
getManagedClasses
- Specified by:
getManagedClassesin interfaceorg.gvsig.tools.persistence.PersistenceFactory
-
getManagedClass
- Specified by:
getManagedClassin interfaceorg.gvsig.tools.persistence.PersistenceFactory
-
getManagedClass
- Specified by:
getManagedClassin interfaceorg.gvsig.tools.persistence.PersistenceFactory
-
getManagedClass
- Specified by:
getManagedClassin interfaceorg.gvsig.tools.persistence.PersistenceFactory
-
getManagedClassName
- Specified by:
getManagedClassNamein interfaceorg.gvsig.tools.persistence.PersistenceFactory
-
createDocumentWindow
-
update
- Specified by:
updatein interfaceorg.gvsig.tools.observer.Observer
-
addObserver
public void addObserver(org.gvsig.tools.observer.Observer o) - Specified by:
addObserverin interfaceorg.gvsig.tools.observer.Observable
-
deleteObserver
public void deleteObserver(org.gvsig.tools.observer.Observer o) - Specified by:
deleteObserverin interfaceorg.gvsig.tools.observer.Observable
-
deleteObservers
public void deleteObservers()- Specified by:
deleteObserversin interfaceorg.gvsig.tools.observer.Observable
-
notifyObservers
-
notifyObservers
protected org.gvsig.tools.observer.Notification notifyObservers(String type, org.gvsig.andami.ui.mdiManager.IWindow doc) -
getProperty
- Specified by:
getPropertyin interfaceorg.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport
-
setProperty
- Specified by:
setPropertyin interfaceorg.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport
-
getExtendedProperties
- Specified by:
getExtendedPropertiesin interfaceorg.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport
-