public class DefaultGraphicLayer extends FLyrVect implements GraphicLayer
GraphicLayer implementation.FLyrVect.EnvelopeCantBeInitializedException, FLyrVect.SelfRegisterFLyrDefault.RegisterMetadata, FLyrDefault.RegisterPersistence| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
LOGGER |
strategy, TAG_LAYERVECT_MAXSCALE, TAG_LAYERVECT_MINSCALEdrawVersion, layerListeners, metadataContainer, propertiesDEFAULT_PRIORITY, FEATURE_ATTR_FEATUREID, FEATURE_ATTR_GEOMETRY, FEATURE_ATTR_GROUPID, FEATURE_ATTR_IDSYMBOL, FEATURE_ATTR_LABEL, FEATURE_ATTR_PRIORITY, FEATURE_ATTR_TAGMETADATA_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,
java.lang.String label) |
void |
addGraphic(java.lang.String groupId,
Geometry geom,
int idsym)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphic(java.lang.String groupId,
Geometry geom,
int idsym,
java.lang.String label)
Adds a new
Geometry to be rendered into the layer. |
void |
addGraphic(java.lang.String groupId,
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)
|
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) |
boolean |
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.
|
addBaseFilter, addBaseFilter, allowLinks, bindToDataStore, cleanLoadOptions, clearSpatialCache, cloneLayer, createFeatureQuery, createQueryByGeometry, createQueryByPoint, draw, drawLabels, fromViewPortCRSToSourceCRS, fromViewPortCRSToSourceCRS, getBaseQuery, getDataStore, getDataStoreParameters, getFeatureStore, getGeometryType, getInfo, getInfo, getInfo, getInfoString, getLabelingStrategy, getLegend, getMetadataChildren, getMetadataID, getProjection, getProperty, getShapeType, getSpatialCache, getTocImageIcon, getTypeVectorLayer, invalidate, isEditing, isLabeled, isLayerToSnap, isPropertiesMenuVisible, isSpatialCacheEnabled, isTemporary, isWritable, iterator, legendCleared, load, loadFromState, print, printLabels, putLoadLegend, putLoadSelection, queryByContainedInEnvelope, queryByContainedInEnvelope, queryByContainedInGeometry, queryByEnvelope, queryByEnvelope, queryByGeometry, queryByPoint, queryByPoint, refreshSpatialCache, reload, saveToState, setBaseQuery, setDataStore, setDataStoreParameters, setEditing, setIsLabeled, setLabelingStrategy, setLayerToSnap, setLoadLegend, setLoadSelection, setMaxFeaturesInEditionCache, setSpatialCacheEnabled, setVisible, symbolChanged, toString, transformToSourceCRS, updateactivationChanged, addError, addLayerListener, addLegendListener, callEditionChanged, callLegendChanged, clear, delegate, drawValueChanged, editionChanged, getClassName, getCoordTrans, getDefaultTolerance, getDrawVersion, getDynClass, getDynValue, getError, getErrors, getExtendedProperties, getFLayerStatus, getLayerListeners, getLink, getLinkProperties, getMapContext, getMaxScale, getMetadataName, getMinScale, getName, getNumErrors, getParentLayer, getTocStatusImage, getTransparency, hasChangedForDrawing, hasDynValue, hidesThisArea, implement, invokeDynMethod, invokeDynMethod, isActive, isAvailable, isInTOC, isOk, isVisible, isWithinScale, nameChanged, newComposedLayer, removeLayerListener, removeLegendListener, reProject, setActive, setAvailable, setCoordTrans, setDynValue, setError, setFLayerStatus, setInTOC, setMaxScale, setMinScale, setName, setParentLayer, setProjection, setProperty, setTemporary, setTocStatusImage, setTransparency, updateDrawVersion, updateDrawVersion, visibilityChanged, visibleRequired, wakeUpdispose, disposeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddBaseFilter, addBaseFilter, createFeatureQuery, getBaseQuery, getFeatureStore, setBaseQuerygetDataStore, setDataStoreaddError, addLayerListener, allowLinks, cloneLayer, draw, getCoordTrans, getDefaultTolerance, getDrawVersion, getError, getErrors, getFLayerStatus, 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, visibleRequiredgetProjection, reProjectloadFromState, saveToStategetMetadataChildren, getMetadataID, getMetadataNameclear, clone, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValuedisposegetExtendedProperties, getProperty, setPropertydrawLabels, getLabelingStrategy, isLabeled, printLabels, setIsLabeled, setLabelingStrategygetInfo, getInfo, getInfoaddLegendListener, getGeometryType, getLegend, getShapeType, removeLegendListenerpublic void initialize(IProjection projection) throws ValidateDataParametersException, DataException, LoadLayerException
public void addGraphic(java.lang.String groupId,
Geometry geom,
int idsym)
GraphicLayerGeometry to be rendered into the layer.addGraphic in interface GraphicLayergroupId - 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
Geometrypublic void addGraphic(Geometry geom, int idsym)
addGraphic in interface GraphicLayerpublic void addGraphic(Geometry geom, int idsym, java.lang.String label)
addGraphic in interface GraphicLayerpublic void addGraphic(java.lang.String groupId,
Geometry geom,
int idsym,
java.lang.String label)
GraphicLayerGeometry to be rendered into the layer.addGraphic in interface GraphicLayergroupId - 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
Geometrylabel - the text to show if the ISymbol is a
ITextSymbol. Set null otherwise.public void addGraphic(java.lang.String groupId,
Geometry geom,
int idsym,
java.lang.String label,
java.lang.Object tag,
int priority)
GraphicLayerGeometry to be rendered into the layer.addGraphic in interface GraphicLayergroupId - 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
Geometrylabel - 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 Geometrypriority - 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)
GraphicLayerGeometry to be rendered into the layer.addGraphics in interface GraphicLayergroupId - group identifier. Allows to identify a group of
Geometry added to the layergeoms - the Geometrys to addidsym - the ISymbol identifier to apply to render the
Geometrypublic void addGraphics(java.lang.String groupId,
java.util.Iterator geoms,
int idsym,
java.lang.String label)
GraphicLayerGeometry to be rendered into the layer.addGraphics in interface GraphicLayergroupId - group identifier. Allows to identify a group of
Geometry added to the layergeoms - the Geometrys to addidsym - the ISymbol identifier to apply to render the
Geometrylabel - 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)
GraphicLayerGeometry to be rendered into the layer.addGraphics in interface GraphicLayergroupId - group identifier. Allows to identify a group of
Geometry added to the layergeoms - the Geometrys to addidsym - the ISymbol identifier to apply to render the
Geometrylabel - 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 Geometrypriority - to apply while rendering the Geometry. Values with
lower priority will be rendered first.public int addSymbol(ISymbol newSymbol)
GraphicLayerISymbol 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 GraphicLayernewSymbol - the ISymbol to addpublic ISymbol getSymbol(int symbolPos)
GraphicLayerISymbol of the layer with the given identifier.getSymbol in interface GraphicLayersymbolPos - the symbol identifierpublic int getSymbolId(ISymbol symbol)
GraphicLayergetSymbolId in interface GraphicLayersymbol - the symbol to look forpublic void clearAllGraphics()
GraphicLayerGeometry objects.clearAllGraphics in interface GraphicLayerpublic int clearAllSymbols()
GraphicLayerISymbol objects.clearAllSymbols in interface GraphicLayerpublic boolean removeGraphics(java.lang.String groupId)
GraphicLayerGeometry objects from the layer
with the given groupId.removeGraphics in interface GraphicLayergroupId - of the geometries to removeprotected void doDispose()
throws BaseException
AbstractDisposableAbstractDisposable.dispose() method, to be
implemented by child classes.doDispose in class FLyrVectBaseExceptionAbstractDisposable.dispose()public void setLegend(IVectorLegend legend) throws LegendLayerException
ClassifiableVectorialSets the layer's legend as a vector legend.
setLegend in interface ClassifiableVectorialsetLegend in class FLyrVectlegend - the legend with vector dataLegendLayerException - if fails setting the legend to this layer.public Envelope getFullEnvelope() throws ReadException
FLayergetFullEnvelope in interface FLayergetFullEnvelope in class FLyrVectReadException - if fails the driver used in this method.