public class DefaultGraphicLayer extends FLyrVect implements GraphicLayer
GraphicLayer
implementation.FLyrVect.EnvelopeCantBeInitializedException, FLyrVect.RegisterPersistence
FLyrDefault.RegisterMetadata
Modifier and Type | Field and Description |
---|---|
protected static 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(Geometry geom,
int idsym) |
void |
addGraphic(Geometry geom,
int idsym,
String label) |
void |
addGraphic(String groupId,
Geometry geom,
int idsym)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphic(String groupId,
Geometry geom,
int idsym,
String label)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphic(String groupId,
Geometry geom,
int idsym,
String label,
Object tag,
int priority)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphics(String groupId,
Iterator geoms,
int idsym)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphics(String groupId,
Iterator geoms,
int idsym,
String label)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphics(String groupId,
Iterator geoms,
int idsym,
String label,
Object tag,
int priority)
Adds a new
Geometry to be rendered into the layer. |
int |
addSymbol(ISymbol newSymbol)
|
void |
clearAllGraphics()
Removes all registered
Geometry objects. |
int |
clearAllSymbols()
Removes all registered
ISymbol objects. |
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
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(IProjection projection) |
void |
removeGraphics(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.
|
addBaseFilter, allowLinks, bindToDataStore, cleanLoadOptions, clearSpatialCache, cloneLayer, createFeatureQuery, draw, drawLabels, fromViewPortCRSToSourceCRS, fromViewPortCRSToSourceCRS, getBaseQuery, getDataStore, getFeatureStore, getGeometryType, getInfo, getInfo, getInfo, getLabelingStrategy, getLegend, getMetadataChildren, getMetadataID, getShapeType, getSpatialCache, getTocImageIcon, getTypeVectorLayer, isEditing, isLabeled, isOnePoint, isPropertiesMenuVisible, isSpatialCacheEnabled, isWritable, iterator, legendCleared, load, loadFromState, print, printLabels, putLoadLegend, putLoadSelection, queryByEnvelope, queryByEnvelope, queryByGeometry, queryByPoint, queryByPoint, reload, saveToState, setBaseQuery, setDataStore, setEditing, setIsLabeled, setLabelingStrategy, setLoadLegend, setLoadSelection, setMaxFeaturesInEditionCache, setSpatialCacheEnabled, symbolChanged, toString, transformToSourceCRS, update
activationChanged, addError, addLayerListener, addLegendListener, 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, isTemporary, isVisible, isWithinScale, nameChanged, newComposedLayer, removeLayerListener, removeLegendListener, reProject, setActive, setAvailable, setCoordTrans, setDynValue, setError, setFLayerStatus, setInTOC, setMaxScale, setMinScale, setName, setParentLayer, setProjection, setProperty, setTemporary, setTocStatusImage, setTransparency, setVisible, updateDrawVersion, visibilityChanged, visibleRequired, wakeUp
dispose, dispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addBaseFilter, createFeatureQuery, getBaseQuery, getFeatureStore, setBaseQuery
getDataStore, setDataStore
addError, addLayerListener, allowLinks, cloneLayer, draw, getCoordTrans, getDrawVersion, getError, getErrors, getFLayerStatus, getInfoString, getLayerListeners, getLink, getLinkProperties, getMapContext, getMaxScale, getMinScale, getName, getNumErrors, getParentLayer, getTocImageIcon, getTocStatusImage, 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, visibleRequired
getProjection, reProject
loadFromState, saveToState
getMetadataChildren, getMetadataID, getMetadataName
clear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValue
dispose
getExtendedProperties, getProperty, setProperty
drawLabels, getLabelingStrategy, isLabeled, printLabels, setIsLabeled, setLabelingStrategy
getInfo, getInfo, getInfo
addLegendListener, getGeometryType, getLegend, getShapeType, removeLegendListener
public void initialize(IProjection projection) throws ValidateDataParametersException, DataException, LoadLayerException
public void addGraphic(String groupId, 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(Geometry geom, int idsym)
addGraphic
in interface GraphicLayer
public void addGraphic(Geometry geom, int idsym, String label)
addGraphic
in interface GraphicLayer
public void addGraphic(String groupId, Geometry geom, int idsym, 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(String groupId, Geometry geom, int idsym, String label, 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(String groupId, 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(String groupId, Iterator geoms, int idsym, 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(String groupId, Iterator geoms, int idsym, String label, 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 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 clearAllGraphics()
GraphicLayer
Geometry
objects.clearAllGraphics
in interface GraphicLayer
public int clearAllSymbols()
GraphicLayer
ISymbol
objects.clearAllSymbols
in interface GraphicLayer
public void removeGraphics(String groupId)
GraphicLayer
Geometry
objects from the layer
with the given groupId.removeGraphics
in interface GraphicLayer
groupId
- of the geometries to removeprotected void doDispose() throws BaseException
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class FLyrVect
BaseException
AbstractDisposable.dispose()
public 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.public Envelope getFullEnvelope() throws ReadException
FLayer
getFullEnvelope
in interface FLayer
getFullEnvelope
in class FLyrVect
ReadException
- if fails the driver used in this method.