public abstract class BaseViewDocument extends AbstractDocument implements ErrorListener, ViewDocument
| Modifier and Type | Field and Description |
|---|---|
protected MapContext |
mapContext |
protected MapContext |
mapOverViewContext |
static String |
PERSISTENCE_DEFINITION_NAME |
changeLAYER_PROPERTIES_PAGE_GROUP, VIEW_PROPERTIES_PAGE_GROUPACCESS_DOCUMENT_AUTHORIZATION| Constructor and Description |
|---|
BaseViewDocument() |
BaseViewDocument(DocumentManager factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterAdd() |
void |
afterRemove() |
void |
center(Envelope envelope)
Center view in the envelope.
|
boolean |
contains(DataStore store)
Return true if this view has a layer with this store.
|
boolean |
contains(FLayer layer)
Return true if layer is in this view.
|
Iterator<FLayer> |
deepiterator()
Get all layer in the view TOC.
|
void |
errorThrown(ErrorEvent e)
Listen for error events
(usually caused by driverExceptions)
|
Map |
getExtendedProperties()
Returns a hash map with all new properties associated to this layer.
|
MapContext |
getMapContext()
Gets the MapContext of the main map in the view.
|
MapContext |
getMapOverViewContext()
Gets the MapContext from the locator, which is the small map in the
left-bottom corner of the View.
|
IProjection |
getOverViewProjection() |
IProjection |
getProjection()
Gets the CRS of the view
|
Object |
getProperty(Object key)
Returns a reference to an object (property) associated to this layer.
|
boolean |
isLocked()
Tells whether if this project's element is locked/protected or not.
|
Iterator<FLayer> |
iterator()
Get the first level of layer in the view TOC.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
reportDriverExceptions(String introductoryText,
List driverExceptions)
Reports to the user a bundle of driver exceptions produced in the same
atomic MapContext transaction
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setBackColor(Color c) |
void |
setMapContext(MapContext fmap) |
void |
setMapOverViewContext(MapContext fmap) |
void |
setName(String name)
Sets the nane of the document
|
void |
setProjection(IProjection proj) |
void |
setProperty(Object key,
Object obj)
Inserts an object as a property to this layer.
|
void |
showErrors() |
addListener, addPropertyChangeListener, callCreateWindow, exportDocumentAsText, getComment, getCreationDate, getFactory, getMainComponent, getMainWindow, getName, getOwner, getProject, getPropertiesWindow, getTypeName, getWindowLayout, isAvailable, isModified, isTemporary, lock, raiseEventCreateWindow, registerPersistent, setComment, setCreationDate, setModified, setOwner, setProject, setStateFromText, setWindowLayout, toString, unlockclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddPropertyChangeListener, getName, getProjectaddListener, getComment, getCreationDate, getFactory, getMainComponent, getMainWindow, getOwner, getPropertiesWindow, getTypeName, getWindowLayout, isAvailable, isModified, isTemporary, lock, setComment, setCreationDate, setModified, setOwner, setProject, setWindowLayout, unlockpublic static final String PERSISTENCE_DEFINITION_NAME
protected MapContext mapOverViewContext
protected MapContext mapContext
public BaseViewDocument()
public BaseViewDocument(DocumentManager factory)
public MapContext getMapContext()
getMapContext in interface ViewDocumentpublic void setName(String name)
AbstractDocumentsetName in interface DocumentsetName in class AbstractDocumentname - as stringpublic MapContext getMapOverViewContext()
getMapOverViewContext in interface ViewDocumentpublic void setMapContext(MapContext fmap)
setMapContext in interface ViewDocumentpublic void setMapOverViewContext(MapContext fmap)
setMapOverViewContext in interface ViewDocumentpublic void showErrors()
public void reportDriverExceptions(String introductoryText, List driverExceptions)
reportDriverExceptions in interface ErrorListenerintroductoryText - introductory text specified by developer. It null, used ""driverExceptions - list with a bundle of driver exceptions catched during
an atomic eventpublic IProjection getProjection()
ViewDocumentgetProjection in interface ViewDocumentpublic void setProjection(IProjection proj)
setProjection in interface ViewDocumentpublic IProjection getOverViewProjection()
public void afterRemove()
afterRemove in interface DocumentafterRemove in class AbstractDocumentpublic void afterAdd()
afterAdd in interface DocumentafterAdd in class AbstractDocumentpublic void setBackColor(Color c)
setBackColor in interface ViewDocumentpublic void errorThrown(ErrorEvent e)
ErrorListenererrorThrown in interface ErrorListenerpublic boolean isLocked()
AbstractDocumentisLocked in interface DocumentisLocked in class AbstractDocumentpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class AbstractDocumentPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentloadFromState in class AbstractDocumentPersistenceExceptionpublic Object getProperty(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(Object key, Object obj)
ExtendedPropertiesSupportsetProperty in interface ExtendedPropertiesSupportkey - the key associated to the propertyobj - the propertyExtendedPropertiesSupport.getProperty(Object),
ExtendedPropertiesSupport.getExtendedProperties()public Map getExtendedProperties()
ExtendedPropertiesSupportgetExtendedProperties in interface ExtendedPropertiesSupportExtendedPropertiesSupport.getProperty(Object),
ExtendedPropertiesSupport.setProperty(Object, Object)public Iterator<FLayer> iterator()
ViewDocumentiterator in interface ViewDocumentpublic Iterator<FLayer> deepiterator()
ViewDocumentdeepiterator in interface ViewDocumentpublic boolean contains(FLayer layer)
ViewDocumentcontains in interface ViewDocumentpublic boolean contains(DataStore store)
ViewDocumentcontains in interface ViewDocumentpublic void center(Envelope envelope)
ViewDocumentcenter in interface ViewDocument