public class DefaultGraphicLayer extends FLyrVect implements GraphicLayer
GraphicLayer
implementation.Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
layerListeners, metadataContainer
DEFAULT_PRIORITY, FEATURE_ATTR_FEATUREID, FEATURE_ATTR_GEOMETRY, FEATURE_ATTR_GROUPID, FEATURE_ATTR_IDSYMBOL, FEATURE_ATTR_LABEL, FEATURE_ATTR_PRIORITY, FEATURE_ATTR_TAG
METADATA_CRS, METADATA_DEFINITION_DESCRIPTION, METADATA_DEFINITION_NAME, METADATA_NAME
Constructor and Description |
---|
DefaultGraphicLayer() |
Modifier and Type | Method and Description |
---|---|
void |
addGraphic(org.gvsig.fmap.geom.Geometry geom,
int idsym) |
void |
addGraphic(org.gvsig.fmap.geom.Geometry geom,
int idsym,
java.lang.String label) |
void |
addGraphic(java.lang.String groupId,
org.gvsig.fmap.geom.Geometry geom,
int idsym)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphic(java.lang.String groupId,
org.gvsig.fmap.geom.Geometry geom,
int idsym,
java.lang.String label)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphic(java.lang.String groupId,
org.gvsig.fmap.geom.Geometry geom,
int idsym,
java.lang.String label,
java.lang.Object tag,
int priority)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphics(java.lang.String groupId,
java.util.Iterator geoms,
int idsym)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphics(java.lang.String groupId,
java.util.Iterator geoms,
int idsym,
java.lang.String label)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphics(java.lang.String groupId,
java.util.Iterator geoms,
int idsym,
java.lang.String label,
java.lang.Object tag,
int priority)
Adds a new
Geometry to be rendered into the layer. |
int |
addSymbol(ISymbol newSymbol)
Adds a new
ISymbol to the layer to be used to render the
Geometry objects. |
void |
clearAllGraphics()
Removes all registered
Geometry objects. |
int |
clearAllSymbols()
Removes all registered
ISymbol objects. |
protected void |
doDispose() |
org.gvsig.fmap.geom.primitive.Envelope |
getFullEnvelope()
Returns the full extension of the layer node.
|
ISymbol |
getSymbol(int symbolPos)
Returns the
ISymbol of the layer with the given identifier. |
int |
getSymbolId(ISymbol symbol)
Returns the identifier of the symbol into the layer.
|
void |
initialize(org.cresques.cts.IProjection projection) |
void |
removeGraphics(java.lang.String groupId)
Removes all previously registered
Geometry objects from the layer
with the given groupId. |
void |
setLegend(IVectorLegend legend)
Sets the layer's legend as a vector legend.
|
bindToDataStore, cleanLoadOptions, cloneLayer, draw, drawLabels, fromViewPortCRSToSourceCRS, fromViewPortCRSToSourceCRS, getDataStore, getFeatureStore, getGeometryType, getInfo, getInfo, getInfo, getLabelingStrategy, getLegend, getMetadataChildren, getMetadataID, getShapeType, getSpatialCache, getTocImageIcon, getTypeVectorLayer, isEditing, isLabeled, isOnePoint, isPropertiesMenuVisible, isWritable, legendCleared, load, loadFromState, print, printLabels, putLoadLegend, putLoadSelection, queryByEnvelope, queryByEnvelope, queryByGeometry, queryByPoint, registerPersistent, reload, saveToState, setEditing, setIsLabeled, setLabelingStrategy, setLoadLegend, setLoadSelection, setMaxFeaturesInEditionCache, symbolChanged, toString, update
activationChanged, addError, addLayerListener, addLegendListener, allowLinks, callEditionChanged, callLegendChanged, clear, delegate, drawValueChanged, editionChanged, getClassName, getCoordTrans, getDrawVersion, getDynClass, getDynValue, getError, getErrors, getExtendedProperties, getFLayerStatus, getInfoString, getLayerListeners, getLink, getLinkProperties, getMapContext, getMaxScale, getMetadataName, getMinScale, getName, getNumErrors, getParentLayer, getProjection, getProperty, getTocStatusImage, getTransparency, hasChangedForDrawing, hasDynValue, hidesThisArea, implement, invokeDynMethod, invokeDynMethod, isActive, isAvailable, isInTOC, isOk, isVisible, isWithinScale, nameChanged, newComposedLayer, registerMetadata, removeLayerListener, removeLegendListener, reProject, setActive, setAvailable, setCoordTrans, setDynValue, setFLayerStatus, setInTOC, setMaxScale, setMinScale, setName, setParentLayer, setProjection, setProperty, setTocStatusImage, setTransparency, setVisible, updateDrawVersion, visibilityChanged, visibleRequired, wakeUp
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFeatureStore
getDataStore
addError, addLayerListener, allowLinks, cloneLayer, draw, getCoordTrans, getDrawVersion, getError, getErrors, getExtendedProperties, getFLayerStatus, getInfoString, getLayerListeners, getLink, getLinkProperties, getMapContext, getMaxScale, getMinScale, getName, getNumErrors, getParentLayer, getProperty, getTocImageIcon, getTocStatusImage, isActive, isAvailable, isEditing, isInTOC, isOk, isVisible, isWithinScale, isWritable, load, newComposedLayer, print, reload, removeLayerListener, setActive, setAvailable, setCoordTrans, setFLayerStatus, setInTOC, setMaxScale, setMinScale, setName, setParentLayer, setProjection, setProperty, setVisible, visibleRequired
getMetadataChildren, getMetadataID, getMetadataName
clear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValue
drawLabels, getLabelingStrategy, isLabeled, printLabels, setIsLabeled, setLabelingStrategy
getInfo
addLegendListener, getGeometryType, getLegend, removeLegendListener
public void addGraphic(org.gvsig.fmap.geom.Geometry geom, int idsym)
addGraphic
in interface GraphicLayer
public void addGraphic(org.gvsig.fmap.geom.Geometry geom, int idsym, java.lang.String label)
addGraphic
in interface GraphicLayer
public void addGraphic(java.lang.String groupId, org.gvsig.fmap.geom.Geometry geom, int idsym)
GraphicLayer
Geometry
to be rendered into the layer.addGraphic
in interface GraphicLayer
groupId
- group identifier. Allows to identify a group of
Geometry
added to the layergeom
- the Geometry
to addidsym
- the ISymbol
identifier to apply to render the
Geometry
public void addGraphic(java.lang.String groupId, org.gvsig.fmap.geom.Geometry geom, int idsym, java.lang.String label)
GraphicLayer
Geometry
to be rendered into the layer.addGraphic
in interface GraphicLayer
groupId
- group identifier. Allows to identify a group of
Geometry
added to the layergeom
- the Geometry
to addidsym
- the ISymbol
identifier to apply to render the
Geometry
label
- the text to show if the ISymbol
is a
ITextSymbol
. Set null otherwise.public void addGraphic(java.lang.String groupId, org.gvsig.fmap.geom.Geometry geom, int idsym, java.lang.String label, java.lang.Object tag, int priority)
GraphicLayer
Geometry
to be rendered into the layer.addGraphic
in interface GraphicLayer
groupId
- group identifier. Allows to identify a group of
Geometry
added to the layergeom
- the Geometry
to addidsym
- the ISymbol
identifier to apply to render the
Geometry
label
- the text to show if the ISymbol
is a
ITextSymbol
. Set null otherwise.tag
- an object to classify, identify or add related information to
the Geometry
priority
- to apply while rendering the Geometry
. Values with
lower priority will be rendered first.public void addGraphics(java.lang.String groupId, java.util.Iterator geoms, int idsym)
GraphicLayer
Geometry
to be rendered into the layer.addGraphics
in interface GraphicLayer
groupId
- group identifier. Allows to identify a group of
Geometry
added to the layergeoms
- the Geometry
s to addidsym
- the ISymbol
identifier to apply to render the
Geometry
public void addGraphics(java.lang.String groupId, java.util.Iterator geoms, int idsym, java.lang.String label)
GraphicLayer
Geometry
to be rendered into the layer.addGraphics
in interface GraphicLayer
groupId
- group identifier. Allows to identify a group of
Geometry
added to the layergeoms
- the Geometry
s to addidsym
- the ISymbol
identifier to apply to render the
Geometry
label
- the text to show if the ISymbol
is a
ITextSymbol
. Set null otherwise.public void addGraphics(java.lang.String groupId, java.util.Iterator geoms, int idsym, java.lang.String label, java.lang.Object tag, int priority)
GraphicLayer
Geometry
to be rendered into the layer.addGraphics
in interface GraphicLayer
groupId
- group identifier. Allows to identify a group of
Geometry
added to the layergeoms
- the Geometry
s to addidsym
- the ISymbol
identifier to apply to render the
Geometry
label
- the text to show if the ISymbol
is a
ITextSymbol
. Set null otherwise.tag
- an object to classify, identify or add related information to
the Geometry
priority
- to apply while rendering the Geometry
. Values with
lower priority will be rendered first.public int addSymbol(ISymbol newSymbol)
GraphicLayer
ISymbol
to the layer to be used to render the
Geometry
objects. The symbol will be added to the legend of the
layer.addSymbol
in interface GraphicLayer
newSymbol
- the ISymbol
to addpublic void clearAllGraphics()
GraphicLayer
Geometry
objects.clearAllGraphics
in interface GraphicLayer
public int clearAllSymbols()
GraphicLayer
ISymbol
objects.clearAllSymbols
in interface GraphicLayer
protected void doDispose() throws org.gvsig.tools.exception.BaseException
public org.gvsig.fmap.geom.primitive.Envelope getFullEnvelope() throws org.gvsig.fmap.dal.exception.ReadException
FLayer
getFullEnvelope
in interface FLayer
getFullEnvelope
in class FLyrVect
org.gvsig.fmap.dal.exception.ReadException
- if fails the driver used in this method.public ISymbol getSymbol(int symbolPos)
GraphicLayer
ISymbol
of the layer with the given identifier.getSymbol
in interface GraphicLayer
symbolPos
- the symbol identifierpublic int getSymbolId(ISymbol symbol)
GraphicLayer
getSymbolId
in interface GraphicLayer
symbol
- the symbol to look forpublic void initialize(org.cresques.cts.IProjection projection) throws org.gvsig.fmap.dal.exception.ValidateDataParametersException, org.gvsig.fmap.dal.exception.DataException, LoadLayerException
org.gvsig.fmap.dal.exception.ValidateDataParametersException
org.gvsig.fmap.dal.exception.DataException
LoadLayerException
public void removeGraphics(java.lang.String groupId)
GraphicLayer
Geometry
objects from the layer
with the given groupId.removeGraphics
in interface GraphicLayer
groupId
- of the geometries to removepublic void setLegend(IVectorLegend legend) throws LegendLayerException
ClassifiableVectorial
Sets the layer's legend as a vector legend.
setLegend
in interface ClassifiableVectorial
setLegend
in class FLyrVect
legend
- the legend with vector dataLegendLayerException
- if fails setting the legend to this layer.Copyright © 2013 gvSIG Association. All rights reserved.