Class BaseViewDocument
java.lang.Object
org.gvsig.tools.dispose.impl.AbstractDisposable
org.gvsig.app.project.documents.AbstractDocument
org.gvsig.app.project.documents.view.BaseViewDocument
- All Implemented Interfaces:
Serializable,Document,ViewDocument,org.gvsig.fmap.mapcontext.events.listeners.ErrorListener,org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport,org.gvsig.tools.dispose.Disposable,org.gvsig.tools.persistence.Persistent,org.gvsig.tools.util.Contains,org.gvsig.tools.util.PropertiesSupport
- Direct Known Subclasses:
DefaultViewDocument
public abstract class BaseViewDocument
extends AbstractDocument
implements org.gvsig.fmap.mapcontext.events.listeners.ErrorListener, ViewDocument
- Author:
- 2005- Vicente Caballero, 2009- Joaquin del Cerro
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.slf4j.Loggerprotected org.gvsig.fmap.mapcontext.MapContextprotected org.gvsig.fmap.mapcontext.MapContextstatic final StringFields inherited from class org.gvsig.app.project.documents.AbstractDocument
changeFields inherited from interface org.gvsig.app.project.documents.Document
ACCESS_DOCUMENT_AUTHORIZATIONFields inherited from interface org.gvsig.app.project.documents.view.ViewDocument
LAYER_PROPERTIES_PAGE_GROUP, VIEW_PROPERTIES_PAGE_GROUP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAdd()voidvoidcenter(org.gvsig.fmap.geom.primitive.Envelope envelope) Center view in the envelope.booleanbooleancontains(org.gvsig.fmap.dal.DataStore store) Return true if this view has a layer with this store.booleancontains(org.gvsig.fmap.mapcontext.layers.FLayer layer) Return true if layer is in this view.Iterator<org.gvsig.fmap.mapcontext.layers.FLayer> Get all layer in the view TOC.voiderrorThrown(org.gvsig.fmap.mapcontext.events.ErrorEvent e) org.gvsig.fmap.mapcontext.layers.FLayerorg.gvsig.fmap.mapcontext.MapContextGets the MapContext of the main map in the view.org.gvsig.fmap.mapcontext.MapContextGets the MapContext from the locator, which is the small map in the left-bottom corner of the View.org.gvsig.crs.projection.lib.Projectionorg.gvsig.crs.projection.lib.ProjectionGets the CRS of the viewgetProperty(Object key) booleanisLocked()Tells whether if this project's element is locked/protected or not.Iterator<org.gvsig.fmap.mapcontext.layers.FLayer> iterator()Get the first level of layer in the view TOC.Iterable<org.gvsig.fmap.mapcontext.layers.FLayer> layers()voidloadFromState(org.gvsig.tools.persistence.PersistentState state) voidrefresh()voidreportDriverExceptions(String introductoryText, List driverExceptions) Reports to the user a bundle of driver exceptions produced in the same atomic MapContext transactionvoidsaveToState(org.gvsig.tools.persistence.PersistentState state) voidvoidsetMapContext(org.gvsig.fmap.mapcontext.MapContext fmap) voidsetMapOverViewContext(org.gvsig.fmap.mapcontext.MapContext fmap) voidSets the nane of the documentvoidsetProject(Project project) voidsetProjection(org.gvsig.crs.projection.lib.Projection proj) voidsetProperty(Object key, Object obj) voidMethods inherited from class org.gvsig.app.project.documents.AbstractDocument
addListener, addPropertyChangeListener, callCreateWindow, doDispose, exportDocumentAsText, getComment, getCreationDate, getFactory, getMainComponent, getMainWindow, getName, getOpenWhenTheUserCreates, getOwner, getProject, getProperties, getPropertiesWindow, getProperty, getTypeName, getWindowLayout, isAvailable, isModified, isTemporary, lock, raiseEventCreateWindow, registerPersistent, setComment, setCreationDate, setModified, setOwner, setProperty, setStateFromText, setWindowLayout, toString, unlockMethods inherited from class org.gvsig.tools.dispose.impl.AbstractDisposable
dispose, disposeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gvsig.app.project.documents.Document
addListener, getComment, getCreationDate, getFactory, getMainComponent, getMainWindow, getOpenWhenTheUserCreates, getOwner, getPropertiesWindow, getTypeName, getWindowLayout, isAvailable, isModified, isTemporary, lock, setComment, setCreationDate, setModified, setOwner, setWindowLayout, unlockMethods inherited from interface org.gvsig.tools.util.PropertiesSupport
getProperties, getProperty, setPropertyMethods inherited from interface org.gvsig.app.project.documents.view.ViewDocument
addPropertyChangeListener, getName, getProject
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
PERSISTENCE_DEFINITION_NAME
- See Also:
-
mapOverViewContext
protected org.gvsig.fmap.mapcontext.MapContext mapOverViewContext -
mapContext
protected org.gvsig.fmap.mapcontext.MapContext mapContext
-
-
Constructor Details
-
BaseViewDocument
public BaseViewDocument() -
BaseViewDocument
-
-
Method Details
-
setProject
- Specified by:
setProjectin interfaceDocument- Overrides:
setProjectin classAbstractDocument
-
getMapContext
public org.gvsig.fmap.mapcontext.MapContext getMapContext()Gets the MapContext of the main map in the view.- Specified by:
getMapContextin interfaceViewDocument- Returns:
- the main MapContext
-
setName
Description copied from class:AbstractDocumentSets the nane of the document- Specified by:
setNamein interfaceDocument- Overrides:
setNamein classAbstractDocument- Parameters:
name- as string
-
getMapOverViewContext
public org.gvsig.fmap.mapcontext.MapContext getMapOverViewContext()Gets the MapContext from the locator, which is the small map in the left-bottom corner of the View.- Specified by:
getMapOverViewContextin interfaceViewDocument- Returns:
- the locator MapContext
-
setMapContext
public void setMapContext(org.gvsig.fmap.mapcontext.MapContext fmap) - Specified by:
setMapContextin interfaceViewDocument
-
setMapOverViewContext
public void setMapOverViewContext(org.gvsig.fmap.mapcontext.MapContext fmap) - Specified by:
setMapOverViewContextin interfaceViewDocument
-
showErrors
public void showErrors() -
reportDriverExceptions
Reports to the user a bundle of driver exceptions produced in the same atomic MapContext transaction- Specified by:
reportDriverExceptionsin interfaceorg.gvsig.fmap.mapcontext.events.listeners.ErrorListener
-
getProjection
public org.gvsig.crs.projection.lib.Projection getProjection()Description copied from interface:ViewDocumentGets the CRS of the view- Specified by:
getProjectionin interfaceViewDocument- Returns:
- CRS of the view
-
setProjection
public void setProjection(org.gvsig.crs.projection.lib.Projection proj) - Specified by:
setProjectionin interfaceViewDocument
-
getOverViewProjection
public org.gvsig.crs.projection.lib.Projection getOverViewProjection() -
afterRemove
public void afterRemove()- Specified by:
afterRemovein interfaceDocument- Overrides:
afterRemovein classAbstractDocument
-
afterAdd
public void afterAdd()- Specified by:
afterAddin interfaceDocument- Overrides:
afterAddin classAbstractDocument
-
setBackColor
- Specified by:
setBackColorin interfaceViewDocument
-
errorThrown
public void errorThrown(org.gvsig.fmap.mapcontext.events.ErrorEvent e) - Specified by:
errorThrownin interfaceorg.gvsig.fmap.mapcontext.events.listeners.ErrorListener
-
isLocked
public boolean isLocked()Description copied from class:AbstractDocumentTells whether if this project's element is locked/protected or not. A protected element cannot be removed from the current project.- Specified by:
isLockedin interfaceDocument- Overrides:
isLockedin classAbstractDocument- Returns:
- true if it is locked, false otherwise
- See Also:
-
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- Overrides:
saveToStatein classAbstractDocument- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
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- Overrides:
loadFromStatein classAbstractDocument- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
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
-
getLayer
- Specified by:
getLayerin interfaceViewDocument
-
iterator
Description copied from interface:ViewDocumentGet the first level of layer in the view TOC.- Specified by:
iteratorin interfaceViewDocument- Returns:
- layers in TOC
-
deepiterator
Description copied from interface:ViewDocumentGet all layer in the view TOC.- Specified by:
deepiteratorin interfaceViewDocument- Returns:
- layers in TOC
-
layers
- Specified by:
layersin interfaceViewDocument
-
contains
public boolean contains(org.gvsig.fmap.mapcontext.layers.FLayer layer) Description copied from interface:ViewDocumentReturn true if layer is in this view.- Specified by:
containsin interfaceViewDocument- Parameters:
layer-- Returns:
-
contains
public boolean contains(org.gvsig.fmap.dal.DataStore store) Description copied from interface:ViewDocumentReturn true if this view has a layer with this store.- Specified by:
containsin interfaceViewDocument- Parameters:
store-- Returns:
-
center
public void center(org.gvsig.fmap.geom.primitive.Envelope envelope) Description copied from interface:ViewDocumentCenter view in the envelope.- Specified by:
centerin interfaceViewDocument- Parameters:
envelope-
-
contains
- Specified by:
containsin interfaceorg.gvsig.tools.util.Contains- Overrides:
containsin classAbstractDocument
-
refresh
public void refresh()- Specified by:
refreshin interfaceDocument- Overrides:
refreshin classAbstractDocument
-