public abstract class AbstractDocumentManager extends java.lang.Object implements DocumentManager, Observer
NOTIFY_AFTER_CREATEDOCUMENT, NOTIFY_AFTER_CREATEMAINWINDOW, NOTIFY_AFTER_CREATEPROPERTIESWINDOW, NOTIFY_AFTER_GETMAINWINDOW, NOTIFY_AFTER_GETPROPERTIESWINDOW| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDocumentManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(Observer o) |
java.lang.Object |
create()
Crea una instancia de la extension y la retorna.
|
java.lang.Object |
create(java.util.Map args) |
java.lang.Object |
create(java.lang.Object[] args)
Crea una instancia de la extension y la retorna.
|
AbstractDocument |
createDocumentByUser()
Uses a gui to be able from the characteristics that we want a
ProjectDocument
|
java.util.Iterator<? extends Document> |
createDocumentsByUser()
Uses a gui to be able from the characteristics that we want a
ProjectDocument
|
java.util.Iterator<? extends Document> |
createDocumentsByUser(Invocable whenDocumentsLoaded) |
protected IDocumentWindow |
createDocumentWindow(Document document) |
java.lang.Object |
createFromState(PersistentState state)
Create an instance of the object represented by the state.
|
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
boolean |
existName(Project project,
java.lang.String documentName)
Deprecated.
use instead project.getProjectDocument
|
java.lang.Class |
getClassOfDocument() |
java.util.List<DynStruct> |
getDefinitions()
Return a List of the definition managed by this factory where the key is
className and value is definition |
protected abstract java.lang.Class |
getDocumentClass()
Return the class or interface for the documents managed by this factory.
|
java.lang.String |
getDomainName()
Returns the domain name of the objects persisted by this factory.
|
java.lang.String |
getDomainURL()
Returns the domain URL to use for the schema.
|
java.util.Map |
getExtendedProperties()
Returns a hash map with all new properties associated to this layer.
|
javax.swing.ImageIcon |
getIcon()
Returns the icon for the type of document.
|
javax.swing.ImageIcon |
getIconSelected()
Returns the icon for the type of document when is selected
|
javax.swing.JComponent |
getMainComponent(Document doc)
Devuelbe el JComponent que se corresponde con el documento indicado.
|
javax.swing.JComponent |
getMainComponent(DocumentsContainer container,
Document doc)
Create a new JComponent for the document or if already exists
in the specified container, return this.
|
IWindow |
getMainWindow(Document doc)
Return the main window asociated to the passed document.
|
IWindow |
getMainWindow(Document doc,
WindowLayout layout)
Return the main window asociated to the document.
|
java.lang.Class |
getManagedClass(java.lang.Object object)
Return the class or interface the factory asociate to
the object.
|
java.lang.Class |
getManagedClass(PersistentState state)
Return the class or interface the factory asociate to
the object.
|
java.lang.Class |
getManagedClass(java.lang.String name)
Return the class or interface the factory asociate to
the java class name.
|
java.util.List |
getManagedClasses()
Return the list of classes or interfaces managed by this
factory.
|
java.lang.String |
getManagedClassName(java.lang.Object object)
Return the name class or interface the factory asociate to
the object.
|
int |
getPriority()
Returns the type of document priority.
|
IWindow |
getPropertiesWindow(Document doc)
Return the windows properties asociated to the document.
|
java.lang.Object |
getProperty(java.lang.Object key)
Returns a reference to an object (property) associated to this layer.
|
java.lang.String |
getTitle()
Returns the title of type of document.
|
boolean |
hasMainWindow(Document doc) |
void |
loadFromState(PersistentState state,
java.lang.Object object)
Load a instance of
classToUse from state data. |
boolean |
manages(java.lang.Class theClass)
Informs if
theClass is managed by this factory. |
boolean |
manages(PersistentState state)
Informs if this factory can recreate the object represented by
state. |
protected Notification |
notifyObservers(java.lang.String type,
Document doc) |
protected Notification |
notifyObservers(java.lang.String type,
IWindow doc) |
void |
registerMainComponent(DocumentsContainer container,
Document doc,
javax.swing.JComponent component) |
void |
saveToState(PersistentState state,
java.lang.Object obj)
Fill
state with data to persist of obj. |
void |
setProperty(java.lang.Object key,
java.lang.Object obj)
Inserts an object as a property to this layer.
|
void |
unregisterMainComponent(DocumentsContainer container,
Document doc) |
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateDocument, getMainWindowClass, getTypeNamegetDefinition, managespublic int getPriority()
getPriority in interface DocumentManagerpublic javax.swing.ImageIcon getIcon()
getIcon in interface DocumentManagerpublic javax.swing.ImageIcon getIconSelected()
getIconSelected in interface DocumentManagerpublic java.lang.String getTitle()
getTitle in interface DocumentManagerpublic AbstractDocument createDocumentByUser()
DocumentManagercreateDocumentByUser in interface DocumentManagerpublic java.util.Iterator<? extends Document> createDocumentsByUser()
DocumentManagercreateDocumentsByUser in interface DocumentManagerpublic java.util.Iterator<? extends Document> createDocumentsByUser(Invocable whenDocumentsLoaded)
createDocumentsByUser in interface DocumentManagerpublic java.lang.Object create()
ExtensionBuildercreate in interface ExtensionBuilderExtensionBuilderpublic java.lang.Object create(java.lang.Object[] args)
ExtensionBuildercreate in interface ExtensionBuilderExtensionBuilderpublic java.lang.Object create(java.util.Map args)
create in interface ExtensionBuilderExtensionBuilderpublic IWindow getMainWindow(Document doc)
DocumentManagergetMainWindow in interface DocumentManagerpublic IWindow getMainWindow(Document doc, WindowLayout layout)
DocumentManagergetMainWindow in interface DocumentManagerpublic boolean hasMainWindow(Document doc)
hasMainWindow in interface DocumentManagerpublic IWindow getPropertiesWindow(Document doc)
DocumentManagergetPropertiesWindow in interface DocumentManagerpublic javax.swing.JComponent getMainComponent(Document doc)
DocumentManagergetMainComponent in interface DocumentManagerpublic javax.swing.JComponent getMainComponent(DocumentsContainer container, Document doc)
DocumentManagergetMainComponent in interface DocumentManagerpublic void unregisterMainComponent(DocumentsContainer container, Document doc)
unregisterMainComponent in interface DocumentManagerpublic void registerMainComponent(DocumentsContainer container, Document doc, javax.swing.JComponent component)
registerMainComponent in interface DocumentManagerpublic boolean existName(Project project, java.lang.String documentName)
existName in interface DocumentManagerproject - documentName - protected abstract java.lang.Class getDocumentClass()
public java.lang.Class getClassOfDocument()
getClassOfDocument in interface DocumentManagerpublic java.lang.Object createFromState(PersistentState state) throws PersistenceException
PersistenceFactoryPersistenceFactory.loadFromState(PersistentState, Object) only create
the object.createFromState in interface PersistenceFactoryPersistenceExceptionpublic void loadFromState(PersistentState state, java.lang.Object object) throws PersistenceException
PersistenceFactoryclassToUse from state data.loadFromState in interface PersistenceFactoryPersistenceExceptionpublic void saveToState(PersistentState state, java.lang.Object obj) throws PersistenceException
PersistenceFactorystate with data to persist of obj.saveToState in interface PersistenceFactoryPersistenceExceptionpublic boolean manages(java.lang.Class theClass)
PersistenceFactorytheClass is managed by this factory.manages in interface PersistenceFactorypublic boolean manages(PersistentState state)
PersistenceFactorystate.manages in interface PersistenceFactorypublic java.util.List<DynStruct> getDefinitions()
PersistenceFactoryclassName and value is definitiongetDefinitions in interface PersistenceFactorypublic java.lang.String getDomainName()
PersistenceFactorygetDomainName in interface PersistenceFactorypublic java.lang.String getDomainURL()
PersistenceFactorygetDomainURL in interface PersistenceFactorypublic java.util.List getManagedClasses()
PersistenceFactorygetManagedClasses in interface PersistenceFactorypublic java.lang.Class getManagedClass(java.lang.Object object)
PersistenceFactorygetManagedClass in interface PersistenceFactorypublic java.lang.Class getManagedClass(PersistentState state)
PersistenceFactorygetManagedClass in interface PersistenceFactorypublic java.lang.Class getManagedClass(java.lang.String name)
PersistenceFactorygetManagedClass in interface PersistenceFactorypublic java.lang.String getManagedClassName(java.lang.Object object)
PersistenceFactorygetManagedClassName in interface PersistenceFactoryprotected IDocumentWindow createDocumentWindow(Document document)
public void update(Observable observable, java.lang.Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.
public void addObserver(Observer o)
addObserver in interface Observablepublic void deleteObserver(Observer o)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observableprotected Notification notifyObservers(java.lang.String type, Document doc)
protected Notification notifyObservers(java.lang.String type, IWindow doc)
public java.lang.Object getProperty(java.lang.Object key)
ExtendedPropertiesSupportReturns a reference to an object (property) associated to this layer.
For example, you can attach a network definition to key "network" and check if a layer has a network loaded using getAssociatedObject("network") and that it's not null.
getProperty in interface ExtendedPropertiesSupportkey - the key associated to the propertynull if key is not foundExtendedPropertiesSupport.getExtendedProperties(),
ExtendedPropertiesSupport.setProperty(Object, Object)public void setProperty(java.lang.Object key,
java.lang.Object obj)
ExtendedPropertiesSupportsetProperty in interface ExtendedPropertiesSupportkey - the key associated to the propertyobj - the propertyExtendedPropertiesSupport.getProperty(Object),
ExtendedPropertiesSupport.getExtendedProperties()public java.util.Map getExtendedProperties()
ExtendedPropertiesSupportgetExtendedProperties in interface ExtendedPropertiesSupportExtendedPropertiesSupport.getProperty(Object),
ExtendedPropertiesSupport.setProperty(Object, Object)