Interface GraphicLayer
- All Superinterfaces:
Classifiable,ClassifiableVectorial,org.gvsig.tools.dispose.Disposable,org.gvsig.tools.dynobject.DynObject,ExtendedPropertiesSupport,FLayer,org.gvsig.fmap.dal.HasDataStore,ILabelable,InfoByPoint,org.gvsig.metadata.Metadata,org.gvsig.tools.persistence.Persistent,Projected,SingleLayer,VectorLayer
- All Known Implementing Classes:
DefaultGraphicLayer
Utility layer to be able to draw graphics in a
MapContext. Those
graphics won't be stored and will be rendered on top of all the other
MapContext's layers.- Version:
- $Id$
- Author:
- gvSIG team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.gvsig.fmap.mapcontext.layers.FLayer
METADATA_CRS, METADATA_DEFINITION_DESCRIPTION, METADATA_DEFINITION_NAME, METADATA_NAME -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGraphic(String groupId, org.gvsig.fmap.geom.Geometry geom, int idsym) Adds a newGeometryto be rendered into the layer.voidaddGraphic(String groupId, org.gvsig.fmap.geom.Geometry geom, int idsym, String label) Adds a newGeometryto be rendered into the layer.voidaddGraphic(String groupId, org.gvsig.fmap.geom.Geometry geom, int idsym, String label, Object tag, int priority) Adds a newGeometryto be rendered into the layer.voidaddGraphic(org.gvsig.fmap.geom.Geometry geom, int idsym) voidaddGraphic(org.gvsig.fmap.geom.Geometry geom, int idsym, String label) voidaddGraphics(String groupId, Iterator geoms, int idsym) Adds a newGeometryto be rendered into the layer.voidaddGraphics(String groupId, Iterator geoms, int idsym, String label) Adds a newGeometryto be rendered into the layer.voidaddGraphics(String groupId, Iterator geoms, int idsym, String label, Object tag, int priority) Adds a newGeometryto be rendered into the layer.intAdds a newISymbolto the layer to be used to render theGeometryobjects.voidRemoves all registeredGeometryobjects.intRemoves all registeredISymbolobjects.getSymbol(int symbolId) Returns theISymbolof the layer with the given identifier.intgetSymbolId(ISymbol symbol) Returns the identifier of the symbol into the layer.booleanremoveGraphics(String groupId) Removes all previously registeredGeometryobjects from the layer with the given groupId.Methods inherited from interface org.gvsig.fmap.mapcontext.layers.operations.Classifiable
addLegendListener, getGeometryType, getLegend, getShapeType, removeLegendListenerMethods inherited from interface org.gvsig.fmap.mapcontext.layers.operations.ClassifiableVectorial
setLegendMethods inherited from interface org.gvsig.tools.dispose.Disposable
disposeMethods inherited from interface org.gvsig.tools.dynobject.DynObject
clear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValueMethods inherited from interface org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport
getExtendedProperties, getProperty, setPropertyMethods inherited from interface org.gvsig.fmap.mapcontext.layers.FLayer
addError, addLayerListener, allowLinks, cloneLayer, draw, getCoordTrans, getDefaultTolerance, getDrawVersion, getError, getErrors, getFLayerStatus, getFullEnvelope, getInfoString, getLayerListeners, getLink, getLinkProperties, getMapContext, getMaxScale, getMinScale, getName, getNumErrors, getParentLayer, getTocImageIcon, getTocStatusImage, invalidate, isActive, isAvailable, isEditing, isInTOC, isOk, isTemporary, isVisible, isWithinScale, isWritable, load, newComposedLayer, print, reload, removeLayerListener, setActive, setAvailable, setCoordTrans, setEditing, setError, setFLayerStatus, setInTOC, setMaxScale, setMinScale, setName, setParentLayer, setProjection, setTemporary, setVisible, visibleRequiredMethods inherited from interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelable
drawLabels, getLabelingStrategy, isLabeled, printLabels, setIsLabeled, setLabelingStrategyMethods inherited from interface org.gvsig.fmap.mapcontext.layers.operations.InfoByPoint
getInfo, getInfo, getInfoMethods inherited from interface org.gvsig.metadata.Metadata
getMetadataChildren, getMetadataID, getMetadataNameMethods inherited from interface org.gvsig.tools.persistence.Persistent
loadFromState, saveToStateMethods inherited from interface org.gvsig.fmap.mapcontext.Projected
getProjection, reProjectMethods inherited from interface org.gvsig.fmap.mapcontext.layers.operations.SingleLayer
getDataStore, setDataStoreMethods inherited from interface org.gvsig.fmap.mapcontext.layers.vectorial.VectorLayer
addBaseFilter, addBaseFilter, createFeatureQuery, getBaseQuery, getFeatureStore, setBaseQuery
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITY- See Also:
-
FEATURE_ATTR_FEATUREID
- See Also:
-
FEATURE_ATTR_GROUPID
- See Also:
-
FEATURE_ATTR_GEOMETRY
- See Also:
-
FEATURE_ATTR_IDSYMBOL
- See Also:
-
FEATURE_ATTR_LABEL
- See Also:
-
FEATURE_ATTR_TAG
- See Also:
-
FEATURE_ATTR_PRIORITY
- See Also:
-
-
Method Details
-
addSymbol
Adds a newISymbolto the layer to be used to render theGeometryobjects. The symbol will be added to the legend of the layer.- Parameters:
newSymbol- theISymbolto add- Returns:
- an identifier of the symbol to be used when adding geometries
-
getSymbol
Returns theISymbolof the layer with the given identifier.- Parameters:
symbolId- the symbol identifier- Returns:
- the symbol with the given id or null if there is not any symbol registered with that id
-
getSymbolId
Returns the identifier of the symbol into the layer.- Parameters:
symbol- the symbol to look for- Returns:
- the symbol identifier or -1 if it is not registered into the layer
-
addGraphic
void addGraphic(org.gvsig.fmap.geom.Geometry geom, int idsym) -
addGraphic
-
addGraphic
Adds a newGeometryto be rendered into the layer.- Parameters:
groupId- group identifier. Allows to identify a group ofGeometryadded to the layergeom- theGeometryto addidsym- theISymbolidentifier to apply to render theGeometry
-
addGraphic
Adds a newGeometryto be rendered into the layer.- Parameters:
groupId- group identifier. Allows to identify a group ofGeometryadded to the layergeom- theGeometryto addidsym- theISymbolidentifier to apply to render theGeometrylabel- the text to show if theISymbolis aITextSymbol. Set null otherwise.
-
addGraphic
void addGraphic(String groupId, org.gvsig.fmap.geom.Geometry geom, int idsym, String label, Object tag, int priority) Adds a newGeometryto be rendered into the layer.- Parameters:
groupId- group identifier. Allows to identify a group ofGeometryadded to the layergeom- theGeometryto addidsym- theISymbolidentifier to apply to render theGeometrylabel- the text to show if theISymbolis aITextSymbol. Set null otherwise.tag- an object to classify, identify or add related information to theGeometrypriority- to apply while rendering theGeometry. Values with lower priority will be rendered first.
-
addGraphics
Adds a newGeometryto be rendered into the layer.- Parameters:
groupId- group identifier. Allows to identify a group ofGeometryadded to the layergeoms- theGeometrys to addidsym- theISymbolidentifier to apply to render theGeometry
-
addGraphics
Adds a newGeometryto be rendered into the layer.- Parameters:
groupId- group identifier. Allows to identify a group ofGeometryadded to the layergeoms- theGeometrys to addidsym- theISymbolidentifier to apply to render theGeometrylabel- the text to show if theISymbolis aITextSymbol. Set null otherwise.
-
addGraphics
Adds a newGeometryto be rendered into the layer.- Parameters:
groupId- group identifier. Allows to identify a group ofGeometryadded to the layergeoms- theGeometrys to addidsym- theISymbolidentifier to apply to render theGeometrylabel- the text to show if theISymbolis aITextSymbol. Set null otherwise.tag- an object to classify, identify or add related information to theGeometrypriority- to apply while rendering theGeometry. Values with lower priority will be rendered first.
-
removeGraphics
Removes all previously registeredGeometryobjects from the layer with the given groupId.- Parameters:
groupId- of the geometries to remove
-
clearAllGraphics
void clearAllGraphics()Removes all registeredGeometryobjects. -
clearAllSymbols
int clearAllSymbols()Removes all registeredISymbolobjects.
-