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 |
change
LAYER_PROPERTIES_PAGE_GROUP, VIEW_PROPERTIES_PAGE_GROUP
ACCESS_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, unlock
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, getName, getProject
addListener, getComment, getCreationDate, getFactory, getMainComponent, getMainWindow, getOwner, getPropertiesWindow, getTypeName, getWindowLayout, isAvailable, isModified, isTemporary, lock, setComment, setCreationDate, setModified, setOwner, setProject, setWindowLayout, unlock
public static final String PERSISTENCE_DEFINITION_NAME
protected MapContext mapOverViewContext
protected MapContext mapContext
public BaseViewDocument()
public BaseViewDocument(DocumentManager factory)
public MapContext getMapContext()
getMapContext
in interface ViewDocument
public void setName(String name)
AbstractDocument
setName
in interface Document
setName
in class AbstractDocument
name
- as stringpublic MapContext getMapOverViewContext()
getMapOverViewContext
in interface ViewDocument
public void setMapContext(MapContext fmap)
setMapContext
in interface ViewDocument
public void setMapOverViewContext(MapContext fmap)
setMapOverViewContext
in interface ViewDocument
public void showErrors()
public void reportDriverExceptions(String introductoryText, List driverExceptions)
reportDriverExceptions
in interface ErrorListener
introductoryText
- introductory text specified by developer. It null, used ""driverExceptions
- list with a bundle of driver exceptions catched during
an atomic eventpublic IProjection getProjection()
ViewDocument
getProjection
in interface ViewDocument
public void setProjection(IProjection proj)
setProjection
in interface ViewDocument
public IProjection getOverViewProjection()
public void afterRemove()
afterRemove
in interface Document
afterRemove
in class AbstractDocument
public void afterAdd()
afterAdd
in interface Document
afterAdd
in class AbstractDocument
public void setBackColor(Color c)
setBackColor
in interface ViewDocument
public void errorThrown(ErrorEvent e)
ErrorListener
errorThrown
in interface ErrorListener
public boolean isLocked()
AbstractDocument
isLocked
in interface Document
isLocked
in class AbstractDocument
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class AbstractDocument
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
loadFromState
in class AbstractDocument
PersistenceException
public Object getProperty(Object key)
ExtendedPropertiesSupport
Returns 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 ExtendedPropertiesSupport
key
- the key associated to the propertynull
if key is not foundExtendedPropertiesSupport.getExtendedProperties()
,
ExtendedPropertiesSupport.setProperty(Object, Object)
public void setProperty(Object key, Object obj)
ExtendedPropertiesSupport
setProperty
in interface ExtendedPropertiesSupport
key
- the key associated to the propertyobj
- the propertyExtendedPropertiesSupport.getProperty(Object)
,
ExtendedPropertiesSupport.getExtendedProperties()
public Map getExtendedProperties()
ExtendedPropertiesSupport
getExtendedProperties
in interface ExtendedPropertiesSupport
ExtendedPropertiesSupport.getProperty(Object)
,
ExtendedPropertiesSupport.setProperty(Object, Object)
public Iterator<FLayer> iterator()
ViewDocument
iterator
in interface ViewDocument
public Iterator<FLayer> deepiterator()
ViewDocument
deepiterator
in interface ViewDocument
public boolean contains(FLayer layer)
ViewDocument
contains
in interface ViewDocument
public boolean contains(DataStore store)
ViewDocument
contains
in interface ViewDocument
public void center(Envelope envelope)
ViewDocument
center
in interface ViewDocument