public class VectorLayer extends Layer implements IVectorLayer, Shareable
TileSet,
K2DElement,
LayerManager,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected Attribute[] |
attribMetaData |
protected java.lang.String |
authorColumnName |
protected java.lang.String |
creationTimeColumnName |
protected java.util.Vector<DisplayFilter> |
displayFilters |
protected java.util.List<FormInfo> |
forms |
protected Hyperlink[] |
hyperlinks |
protected java.lang.String |
idAttributeName |
protected java.lang.String |
keyAttributeName |
protected LabelsConfiguration |
labelsConfig |
protected java.lang.String |
modificationTimeColumnName |
protected MouseOverConfiguration |
mouseOverConfiguration |
protected Point |
offset
The offset is an instance of Point.
|
protected java.util.Vector<QueryFilter> |
queryFilters |
protected boolean |
queryFiltersChanged
Deprecated.
use
invalidate() instead. |
int |
requestMode |
protected java.util.Vector<K2DElement> |
selection |
protected java.util.List<SubFormInfo> |
subForms |
protected Thematic[] |
thematics |
protected TileSet |
tileSet |
DEFAULT_DRAW_STATE, description, DRAW_OPTIONS_SYNC, drawState, dynamicRefresh, elementFactory, elementType, eventDispatcher, id, infoReportConfig, lastUpdateTime, LAYER_ID_HIGHLIGHT, LAYER_ID_INITIAL_VIEW_BOUNDS, LAYER_ID_LABELS, LAYER_ID_MARKERS, LAYER_ID_SYS_DRAWINGS, LAYER_ID_TMP_DRAWINGS, LAYER_ID_USER_DRAWINGS, LAYER_ID_USER_LABELS, layerProperties, maximumVisibleScale, metadataUrl, minimumVisibleScale, name, precisionModel, readOnlyProperties, styleManager, verboseserialVersionUIDDEFAULT_MAXIMUM_SCALE, DEFAULT_MINIMUM_SCALE, PERSONAL_LAYER_BASE_ID, PERSONAL_LAYER_MAX_ID, PROJECT_LAYER_BASE_ID, PROJECT_LAYER_MAX_ID, PROPERTY_ALL_SETTINGS, PROPERTY_ALWAYS_DRAW_SELECTION, PROPERTY_DRAW_GRID, PROPERTY_EDITABLE, PROPERTY_EDITING, PROPERTY_INCLUDE_IN_CONTEXT, PROPERTY_INDEX, PROPERTY_LISTED, PROPERTY_LOCAL, PROPERTY_MAX_SCALE, PROPERTY_MIN_SCALE, PROPERTY_PUBLISHED, PROPERTY_QUERIABLE, PROPERTY_SELECTABLE, PROPERTY_USE_CLIENT_CACHE, PROPERTY_VISIBLE, REQUEST_MODE_BY_REGION, REQUEST_MODE_BY_TILE, RESERVED_LAYER_BASE_ID, RESERVED_LAYER_MAX_ID, SYSTEM_LAYER_BASE_AUTO_ID, SYSTEM_LAYER_BASE_ID, SYSTEM_LAYER_MAX_ID, TILING_MODE_AUTO, TILING_MODE_MANUAL, USER_LAYER_BASE_AUTO_ID, USER_LAYER_BASE_ID, USER_LAYER_MAX_ID| Constructor and Description |
|---|
VectorLayer(int id,
int geometryType,
int elementType,
java.lang.String name,
boolean isVisible)
Deprecated.
|
VectorLayer(int id,
int geometryType,
int elementType,
java.lang.String name,
boolean isVisible,
int col,
int row,
Rectangle extent)
Deprecated.
|
VectorLayer(int id,
java.lang.String name,
int elementType)
Creates a new VectorLayer using the specified parameters.
The new layer will be configured with one infinite tile. |
VectorLayer(int id,
java.lang.String name,
int elementType,
int col,
int row,
Rectangle extent)
Creates a new VectorLayer using the specified parameters.
|
VectorLayer(VectorLayerInfo layerInfo)
Creates a new VectorLayer using the specified VectorLayerInfo.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDisplayFilter(DisplayFilter filter)
Adds a new filter to the list of display filters for the layer.
|
void |
addElement(K2DElement elem)
Adds the specified element to the layer and then fires a LayerElementsAddedEvent.
|
void |
addElement(K2DElement element,
boolean fireEvent)
Adds the specified element (K2DElement) to the layer.
|
void |
addElements(K2DElement[] elements)
Adds the specified elements to the layer and then fires a LayerElementsAddedEvent.
|
void |
addElements(K2DElement[] elements,
boolean fireEvent)
Adds the specified elements (K2DElement) to the layer.
|
void |
addQueryFilter(QueryFilter filter)
Adds a new query filter to the list of filters for the layer.
|
void |
addThematic(Thematic thematic)
Adds a thematic to this layer.
|
void |
addToSelection(java.util.Collection<K2DElement> elems)
Adds the specified elements to the selection of the layer.
|
void |
addToSelection(java.util.Collection<K2DElement> elems,
boolean fireEvent)
Adds the specified elements to the selection of the layer.
|
void |
addToSelection(K2DElement elem)
Adds the specified element to the selection of the layer.
|
void |
addToSelection(K2DElement elem,
boolean fireEvent)
Adds the specified element to the selection of the layer.
|
boolean |
alwayDrawSelection()
Returns whether or not the layer selection will always be drawn.
If enabled, the selection will be drawn at any scale, even if the layer is not visible. |
boolean |
applyFilters(K2DElement elem)
Returns whether or not the specified element was accepted by the current
display filters configured in the layer.
|
void |
bringForward(K2DElement[] elements)
Moves the specified elements one z order position up.
|
void |
bringToFront(K2DElement[] elements)
Moves the specified elements to the highest z order position.
|
void |
clearSelection()
Empties the selection of the layer.
|
java.lang.Object |
clone()
Returns a deep clone of the current LayerInfo instance.
|
protected void |
cloneImpl(IVectorLayer newLayer,
boolean sharedGeometry)
Share method implementation.
|
void |
close()
Clears all elements in the layer and removes all configured listeners.
|
Rectangle |
computeDisplayBounds(ViewState viewState,
java.util.Collection<K2DElement> elements,
boolean onlyIfVisible) |
Rectangle |
computeExtent(java.util.Collection<K2DElement> elements) |
Rectangle |
computeZoomedDisplayBounds(ViewState viewState,
java.util.Collection<K2DElement> elements,
boolean onlyIfVisible) |
void |
draw(GraphicsRef gr,
ViewState viewState,
OrientedRectangle region,
double scale,
DrawParameters drawParameters)
Draws all elements contained in the specified region to the specified
graphics object and applying the specified transformation.
|
protected void |
draw(GraphicsRef gr,
ViewState viewState,
java.util.Vector<Tile> tileVec,
OrientedRectangle region,
double scale,
DrawParameters drawParameters)
Draws all elements contained in the specified tiles and intersecting with
the specified region to the specified graphics object and applying the
specified transformation.
|
protected void |
draw(GraphicsRef gr,
ViewState viewState,
java.util.Vector<Tile> tileVec,
OrientedRectangle region,
double scale,
int drawOptions)
Deprecated.
|
void |
drawGrid(GraphicsRef gr,
K2DTransform t)
Draws a grid representing the tiles configuration of the layer.
|
protected void |
drawImpl(GraphicsRef gr,
ViewState viewState,
java.util.Vector<Tile> tileVec,
OrientedRectangle region,
double scale,
DrawParameters drawParameters) |
protected void |
drawImpl(GraphicsRef gr,
ViewState viewState,
java.util.Vector<Tile> tileVec,
OrientedRectangle region,
double scale,
int drawOptions)
Deprecated.
|
void |
drawSelection(GraphicsRef gr,
ViewState viewState,
double scale)
Draws the selected elements of the layer.
|
void |
enableThematic(int thematicIx,
boolean isEnabled)
Enables or disables a thematic configured in the current layer.
|
void |
enableThematic(Thematic thematic,
boolean isEnabled)
Enables or disables a thematic configured in the current layer.
|
void |
enableThematics(boolean isEnabled)
Enables or disables all thematics configured in the current layer.
|
protected void |
fireAttributeMetadataChangedEvent(LayerAttributeMetadataChangedEvent event) |
protected void |
fireDataRequestedEvent(OrientedRectangle region,
boolean sync) |
protected void |
fireDataRequestedEvent(java.util.Vector<Tile> reqTiles,
boolean sync) |
protected void |
fireDisplayFilterChangedEvent(LayerDisplayFilterChangedEvent event) |
protected void |
fireElementRemovedEvent(K2DElement[] elements) |
protected void |
fireElementsAddedEvent(K2DElement[] elements) |
void |
fireElementsChangedEvent(K2DElement[] elements) |
protected void |
fireQueryfilterChangedEvent(LayerQueryFilterChangedEvent event) |
protected void |
fireSelChangedEvent(K2DElement elem,
int operType) |
protected void |
fireSelChangedEvent(java.util.Vector<K2DElement> elems,
int operType) |
Acl |
getAcl() |
K2DElement[] |
getAllElements()
Deprecated.
use getElements() instead
|
int |
getAttributeIndex(Attribute attrib)
Returns the index of the specified attribute in the current metadata
attributes array.
|
Attribute[] |
getAttributeMetaData()
Returns bound attributes on this layer.
|
ClusterDisplayStrategyInfo |
getClusterDisplayStrategyInfo() |
Style |
getDefaultSelectionStyle()
Gets the default selection style
|
DisplayFilter[] |
getDisplayFilters() |
Rectangle |
getDisplaySelectedBounds(View view)
Deprecated.
|
Rectangle |
getDisplaySelectedBounds(ViewState viewState)
Returns the DC bounding box of the current selection of the layer.
|
Rectangle |
getDisplaySelectedBounds(ViewState viewState,
boolean zoomed)
Returns the DC bounding box of the current selection of the layer.
|
VectorDisplayStrategyManager |
getDisplayStrategyManager() |
K2DElement |
getElement(int tileIx,
int elemIx)
Returns the element contained in the specified tile at the specified
position.
|
K2DElement |
getElement(long id)
Returns the element having the specified id or null if it does not exist.
|
K2DElement |
getElementAtPoint(Point WCCoord,
View view,
boolean onlyIfVisible)
Deprecated.
|
K2DElement |
getElementAtPoint(Point WCCoord,
ViewState viewState,
boolean onlyIfVisible)
Returns the first element found at the specified point in world coordinate
system or null if none is found.
|
int |
getElementCount()
Returns the number of elements contained by the layer.
|
java.lang.String |
getElementLabel(K2DElement elem)
Returns the label string from the layer label column for the specified
element.
|
java.lang.String |
getElementLabel(K2DElement elem,
Project project)
Returns the label string from the layer label column for the specified
element.
|
java.util.Collection<K2DElement> |
getElements() |
java.util.Enumeration<K2DElement> |
getElementsAtPoint(Point WCCoord,
View view,
boolean onlyIfVisible)
Deprecated.
|
java.util.Enumeration<K2DElement> |
getElementsAtPoint(Point WCCoord,
ViewState viewState,
boolean onlyIfVisible)
Returns all the elements found at the specified point in world coordinate
system or null if none is found.
|
java.util.Enumeration<K2DElement> |
getElementsInCircle(Point WCCoord,
View view,
double radius,
boolean onlyIfVisible)
Deprecated.
|
java.util.Enumeration<K2DElement> |
getElementsInCircle(Point WCCoord,
ViewState viewState,
double radius,
boolean onlyIfVisible)
Returns the enumeration of elements that are contained completely or
partially in the specified world coordinate circle.
|
java.util.Enumeration<K2DElement> |
getElementsInSurface(Surface wcSurface,
View view,
boolean onlyIfVisible)
Deprecated.
|
java.util.Enumeration<K2DElement> |
getElementsInSurface(Surface wcSurface,
ViewState viewState,
boolean onlyIfVisible)
Returns the enumeration of elements that are contained copmpletely or
partially in the specified world coordinate surface.
|
java.util.Enumeration<K2DElement> |
getElementsOnLine(LineString wcLine,
View view,
boolean onlyIfVisible)
Deprecated.
|
java.util.Enumeration<K2DElement> |
getElementsOnLine(LineString wcLine,
ViewState viewState,
boolean onlyIfVisible)
Returns the enumeration of elements that are contained completely or
partially on the specified world coordinate line.
|
Thematic[] |
getEnabledThematics()
Return an array of enabled thematic (displayed thematic).
|
Rectangle |
getExtent()
Returns a clone of the layer extent.
|
AbstractFormInfo |
getForm(int id)
Returns the form or subfom with the specified id.
|
java.util.List<FormInfo> |
getForms() |
HeatMapDisplayStrategyInfo |
getHeatMapDisplayStrategyInfo() |
Hyperlink[] |
getHyperlinks() |
LabelsConfiguration |
getLabelsConfig()
Returns the labels configuration for this layer.
|
MouseOverConfiguration |
getMouseOverConfiguration() |
Point |
getOffset()
Gets the offset
|
K2DTransform |
getOffsetTransform(K2DTransform t)
Gets the offset transformation matrix
|
QueryFilter[] |
getQueryFilters() |
int |
getRequestMode()
Returns the request mode for this layer.
|
K2DElement[] |
getSelectedElements()
Gets the selected elements
|
Rectangle |
getSelectedExtent()
Returns the extent created from selected element geometries in the current
layer.
|
java.util.Collection<K2DElement> |
getSelection()
Gets the selected elements
|
int |
getSelectionSize()
Gets the selection count
|
Style |
getSelectionStyle()
Returns the default selection style object associated with the layer.
Note: If this layer has more than one style (depending on the view scale), the lowest scale selection style is returned. If the layer is editable, the default edition style of the layer will be returned. |
Style |
getSelectionStyle(double scale)
Returns the selection style object associated with the layer for the
specified scale.
If the layer is editable, the edition style of the layer corresponding to the specified scale will be returned. |
Style |
getSelectionStyle(K2DElement elem,
double scale)
Returns the current selection style for the specified element.
|
Style |
getStyle(K2DElement elem,
double scale)
Returns the current style for the specified element.
|
java.util.List<SubFormInfo> |
getSubForms() |
Thematic |
getThematic(int id) |
Thematic[] |
getThematics()
Return all thematics added to this layer.
|
TileSet |
getTiles()
Returns the TileSet object associated with the layer.
|
LockManager |
getUpdateLock() |
boolean |
getUseClientCache()
Gets the useClientCache boolean flag
|
boolean |
hasElementsInSurface(Surface wcSurface,
ViewState viewState,
boolean onlyIfVisible)
Returns whether at least one element is contained completely or partially
in the specified world coordinate surface.
|
void |
invalidate()
Invalidates the current layer.
|
void |
invertSelection()
Inverts the selection on this layer.
|
boolean |
isEditable()
Returns whether or not this layer is editable.
|
boolean |
isEditing() |
void |
loadData(Geometry bounds,
boolean sync)
This method automatically loads the data tiles intersecting with the
specified geometry.
|
void |
prepareSyncData(GraphicsRef gr,
ViewState viewState,
java.util.Vector<Tile> tileVec,
OrientedRectangle region) |
void |
removeAllDisplayFilters()
Remove all display filters from the layer
|
void |
removeAllElements()
Removes all the elements from this layer and fires an fireElementRemovedEvent event.
|
void |
removeAllElements(boolean fireEvent)
Removes all the elements from this layer.
|
void |
removeAllQueryFilters()
Remove all query filters from the layer
|
void |
removeDisplayFilter(DisplayFilter filter)
Removes the specified filter from the list of display filters for the
layer.
|
boolean |
removeElement(K2DElement elem)
Removes the specified element (K2DElement) from the layer.
|
boolean |
removeElement(K2DElement elem,
boolean fireEvent)
Removes the specified element (K2DElement) from the layer.
|
boolean |
removeElement(long elemId)
Removes the element that has the specified id from the layer.
|
boolean |
removeElement(long elemId,
boolean fireEvent)
Removes the element that has the specified id from the layer.
|
boolean |
removeElements(K2DElement[] aElements)
Removes the specified elements from the layer.
|
boolean |
removeElements(K2DElement[] aElements,
boolean fireEvent)
Removes the specified elements from the layer.
|
void |
removeFromSelection(K2DElement elem)
Removes the specified element from the selection of the layer.
|
void |
removeFromSelection(K2DElement elem,
boolean fireEvent)
Removes the specified element from the selection of the layer.
|
void |
removeFromSelection(java.util.Vector<K2DElement> elements)
Removes the specified elements from the selection of the layer.
|
void |
removeFromSelection(java.util.Vector<K2DElement> elements,
boolean fireEvent)
Removes the specified elements from the selection of the layer.
|
void |
removeQueryFilter(QueryFilter filter)
Removes the specified query filter from the list of filters for the layer.
|
void |
removeThematic(Thematic thematic)
Removes a thematic from this layer.
|
void |
requestUnsyncData(GraphicsRef gr,
ViewState viewState,
java.util.Vector<Tile> reqTiles,
OrientedRectangle region) |
void |
selectAll() |
void |
sendBackward(K2DElement[] elements)
Moves the specified elements one z order position down.
|
void |
sendToBack(K2DElement[] elements)
Moves the specified elements to the lowest z order position.
|
void |
setAcl(Acl acl) |
void |
setAlwayDrawSelection(boolean isTrue)
Enables layer selection to always be drawn.
If enabled, the selection will be drawn at any scale, even if the layer is not visible. |
void |
setAttributeMetaData(Attribute[] attribMetaData)
Replaces the current attribute array of the layer with the one specified.
|
void |
setClusterDisplayStrategyInfo(ClusterDisplayStrategyInfo clusterDisplayStrategyInfo) |
void |
setEditable(boolean editable)
Adds or removes edition permissions on the layer:
Permission.ADD_LAYER_ELEMENT, Permission.EDIT_LAYER_ELEMENT,
Permission.DELETE_LAYER_ELEMENT and Permission.EDIT_LAYER_ATTRIBUTE_VALUES. |
void |
setEditing(boolean flag) |
void |
setForms(java.util.List<FormInfo> forms) |
void |
setHeatMapDisplayStrategyInfo(HeatMapDisplayStrategyInfo heatMapDisplayStrategyInfo) |
void |
setHyperlinks(Hyperlink[] hyperlinks) |
void |
setLabelsConfig(LabelsConfiguration labelsConfig)
Sets the labels configuration for this layer.
|
void |
setLastTransform(K2DTransform t,
GraphicsRef gr)
Deprecated.
use
Layer.revalidate(K2DTransform) instead |
void |
setMouseOverConfiguration(MouseOverConfiguration mouseOverConfiguration) |
void |
setOffset(Point offset)
Sets the Offset
|
void |
setRequestMode(int requestMode)
Sets the request mode for this layer.
|
void |
setSubForms(java.util.List<SubFormInfo> subForms) |
void |
setThematics(Thematic[] thematics)
Sets all thematics of this layer.
|
void |
setTiles(TileSet tileSet)
Sets the tile set for this layer.
|
void |
setUseClientCache(boolean flag)
Sets useClientCache boolean flag
|
Shareable |
share()
Creates a deep copy of the current layer, excluding geometries in elements
of the layer which remain the same instances in all shared layers.
|
void |
swapThematic(Thematic thematic,
int index)
Moves a thematic to a specific position in the layer's thematics.
|
VectorLayerInfo |
toLayerInfo() |
void |
unselectElement(K2DElement elem)
Deprecated.
Use removeFromSelection(K2DElement) instead.
|
void |
unselectElement(K2DElement elem,
boolean fireEvent)
Deprecated.
Use removeFromSelection(K2DElement, boolean) instead.
|
void |
update(ILayer layer) |
void |
validateTiling(K2DElement[] elements) |
addLayerEventListener, clone, compareTo, dispatchEvent, draw, drawGrid, fireLayerPropertyBeforeChangeEvent, fireLayerPropertyChangedEvent, fireLayerReceivedDataEvent, fireRefreshRequestEvent, fireStyleChangedEvent, getDescription, getDescription, getDynamicRefresh, getElementFactory, getElementType, getId, getInfoReportConfig, getLastUpdateTime, getLayerProperties, getMaximumVisibleScale, getMetadataUrl, getMinimumVisibleScale, getName, getName, getNextSystemLayerId, getNextUserLayerId, getPrecisionModel, getReadOnlyProperties, getStyle, getStyle, getStyleManager, getVerbose, initEventDispatcher, isDrawable, isDynamic, isIncludeInContext, isIndex, isListed, isLocal, isNamed, isPersonalLayerId, isProjectLayerId, isQueriable, isReservedLayerId, isSelectable, isSystemLayerId, isUserLayerId, isVisible, removeLayerEventListener, removeTranslationsOtherThan, revalidate, setDescription, setDescription, setDrawGrid, setDynamicRefresh, setElementFactory, setElementType, setId, setIncludeInContext, setIndex, setInfoReportConfig, setLastUpdateTime, setLayerProperties, setListed, setLocal, setMaximumVisibleScale, setMetadataUrl, setMinimumVisibleScale, setName, setName, setPrecisionModel, setProperty, setQueriable, setReadOnlyProperties, setReadOnlyProperty, setSelectable, setStyle, setStyle, setStyleManager, setVerbose, setVisible, setVisible, toStringgetAvailableLocales, getTranslation, isTranslationExists, setTranslation, updateTranslationsequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAuthorColumnName, getCreationTimeColumnName, getDatabaseConfigInfo, getElementFactory, getIdAttributeName, getKeyAttributeName, getModificationTimeColumnName, setAuthorColumnName, setCreationTimeColumnName, setDatabaseConfigInfo, setElementFactory, setIdAttributeName, setKeyAttributeName, setModificationTimeColumnNamegetDescription, getDescription, getDynamicRefresh, getElementType, getId, getInfoReportConfig, getLastUpdateTime, getLayerProperties, getMaximumVisibleScale, getMetadataUrl, getMinimumVisibleScale, getName, getName, getReadOnlyProperties, getStyleManager, isDynamic, isIndex, isListed, isLocal, isSelectable, isVisible, setDescription, setDescription, setDynamicRefresh, setElementType, setId, setIndex, setInfoReportConfig, setLastUpdateTime, setLayerProperties, setListed, setLocal, setMaximumVisibleScale, setMetadataUrl, setMinimumVisibleScale, setName, setName, setProperty, setReadOnlyProperties, setReadOnlyProperty, setSelectable, setStyleManager, setVisibleprotected java.util.Vector<DisplayFilter> displayFilters
protected java.util.Vector<QueryFilter> queryFilters
protected TileSet tileSet
protected Point offset
protected Attribute[] attribMetaData
protected MouseOverConfiguration mouseOverConfiguration
protected LabelsConfiguration labelsConfig
protected Hyperlink[] hyperlinks
protected Thematic[] thematics
protected java.util.Vector<K2DElement> selection
public int requestMode
@Deprecated protected boolean queryFiltersChanged
invalidate() instead.protected java.util.List<FormInfo> forms
protected java.util.List<SubFormInfo> subForms
protected java.lang.String idAttributeName
protected java.lang.String keyAttributeName
protected java.lang.String creationTimeColumnName
protected java.lang.String modificationTimeColumnName
protected java.lang.String authorColumnName
public VectorLayer(VectorLayerInfo layerInfo)
layerInfo - the new layer configuration.@Deprecated
public VectorLayer(int id,
int geometryType,
int elementType,
java.lang.String name,
boolean isVisible)
id - the id of the new layer.geometryType - the geometry type.elementType - the element type.name - the name.isVisible - whether or not this layer is visible.public VectorLayer(int id,
java.lang.String name,
int elementType)
id - the id of the new layer.name - the name.elementType - the element type.ElementTypes@Deprecated
public VectorLayer(int id,
int geometryType,
int elementType,
java.lang.String name,
boolean isVisible,
int col,
int row,
Rectangle extent)
id - the id of the new layer.geometryType - the geometry type.elementType - the element type.name - the name.isVisible - whether or not this layer is visible.col - the number of columns in the tiles grid.row - the number of rows in the tiles grid.extent - the layer extent.public VectorLayer(int id,
java.lang.String name,
int elementType,
int col,
int row,
Rectangle extent)
id - the id of the new layer.name - the name.elementType - the element type.col - the number of columns in the tiles grid.row - the number of rows in the tiles grid.extent - the layer extent.ElementTypespublic Attribute[] getAttributeMetaData()
getAttributeMetaData in interface IVectorLayerpublic int getAttributeIndex(Attribute attrib)
attrib - the attribute to search in the metadata attributes.public void setAttributeMetaData(Attribute[] attribMetaData)
setAttributeMetaData in interface IVectorLayerattribMetaData - the new attribute table of the layerpublic TileSet getTiles()
getTiles in interface IVectorLayerTileSetpublic LockManager getUpdateLock()
public void setTiles(TileSet tileSet)
setTiles in interface IVectorLayertileSet - the tile setTileSetpublic Thematic[] getThematics()
getThematics in interface IVectorLayerpublic Thematic getThematic(int id)
id - public Thematic[] getEnabledThematics()
public void setThematics(Thematic[] thematics)
setThematics in interface IVectorLayerthematics - the thematics array to setpublic void enableThematic(int thematicIx,
boolean isEnabled)
thematicIx - the index of the thematic.isEnabled - whether or not to enable it.public void enableThematic(Thematic thematic, boolean isEnabled)
thematic - the thematic to enable.isEnabled - whether or not to enable it.public void enableThematics(boolean isEnabled)
isEnabled - whether or not to enable them.public void swapThematic(Thematic thematic, int index)
thematic - the thematic to move.index - the new index where the thematic has to move.public void addThematic(Thematic thematic)
thematic - the thematic to add.public void removeThematic(Thematic thematic)
thematic - the thematic to remove.public void draw(GraphicsRef gr, ViewState viewState, OrientedRectangle region, double scale, DrawParameters drawParameters)
draw in class Layergr - the graphics wrapper object to use.viewState - the view state.region - the world coordinate region to redraw.scale - the scale of the current View.drawParameters - drawParameters to use.LayerManagerprotected void draw(GraphicsRef gr, ViewState viewState, java.util.Vector<Tile> tileVec, OrientedRectangle region, double scale, DrawParameters drawParameters)
gr - the graphic reference to draw the elements.viewState - the view state that provides context information to draw the layer.tileVec - the vector containing the tiles to be drawn.region - the world coordinate region to redraw.scale - the scale of the current View.drawParameters - draw parameters to use.LayerManager@Deprecated protected void draw(GraphicsRef gr, ViewState viewState, java.util.Vector<Tile> tileVec, OrientedRectangle region, double scale, int drawOptions)
draw(GraphicsRef, ViewState, Vector, OrientedRectangle, double, DrawParameters) instead.gr - the graphic reference to draw the elements.viewState - the view state that provides context information to draw the layer.tileVec - the vector containing the tiles to be drawn.region - the world coordinate region to redraw.scale - the scale of the current View.drawOptions - draw options to use. Options can be retrieved with bitwise operations using LayerManager.DRAW_* constants.LayerManagerpublic void requestUnsyncData(GraphicsRef gr, ViewState viewState, java.util.Vector<Tile> reqTiles, OrientedRectangle region)
public void prepareSyncData(GraphicsRef gr, ViewState viewState, java.util.Vector<Tile> tileVec, OrientedRectangle region)
@Deprecated protected void drawImpl(GraphicsRef gr, ViewState viewState, java.util.Vector<Tile> tileVec, OrientedRectangle region, double scale, int drawOptions)
drawImpl(GraphicsRef, ViewState, Vector, OrientedRectangle, double, DrawParameters) instead.protected void drawImpl(GraphicsRef gr, ViewState viewState, java.util.Vector<Tile> tileVec, OrientedRectangle region, double scale, DrawParameters drawParameters)
public void drawGrid(GraphicsRef gr, K2DTransform t)
public java.lang.Object clone()
public VectorLayerInfo toLayerInfo()
toLayerInfo in class Layerpublic Shareable share()
protected void cloneImpl(IVectorLayer newLayer, boolean sharedGeometry)
newLayer - the new shared layer.@Deprecated public java.util.Enumeration<K2DElement> getElementsInSurface(Surface wcSurface, View view, boolean onlyIfVisible)
getElementsInSurface(Surface, ViewState, boolean)wcSurface - the world coordinate region to look intoview - the view in which the test is doneonlyIfVisible - specifies whether only visible elements should be returned.public java.util.Enumeration<K2DElement> getElementsInSurface(Surface wcSurface, ViewState viewState, boolean onlyIfVisible)
wcSurface - the world coordinate region to look intoviewState - the current view state.onlyIfVisible - specifies whether only visible elements should be returned.@Deprecated public java.util.Enumeration<K2DElement> getElementsOnLine(LineString wcLine, View view, boolean onlyIfVisible)
getElementsOnLine(LineString, ViewState, boolean)wcLine - the world coordinate line to look ontoview - the view in which the test is doneonlyIfVisible - specifies whether only visible elements should be returned.public java.util.Enumeration<K2DElement> getElementsOnLine(LineString wcLine, ViewState viewState, boolean onlyIfVisible)
wcLine - the world coordinate line to look ontoviewState - the current view state.onlyIfVisible - specifies whether only visible elements should be returned.@Deprecated public java.util.Enumeration<K2DElement> getElementsInCircle(Point WCCoord, View view, double radius, boolean onlyIfVisible)
getElementsInCircle(Point, ViewState, double, boolean)WCCoord - the center of the circle in world coordinateview - the view in which the test is doneradius - the radius of the circleonlyIfVisible - specifies whether only visible elements should be returned.public java.util.Enumeration<K2DElement> getElementsInCircle(Point WCCoord, ViewState viewState, double radius, boolean onlyIfVisible)
WCCoord - the center of the circle in world coordinateviewState - the current view state.radius - the radius of the circleonlyIfVisible - specifies whether only visible elements should be returned.@Deprecated public java.util.Enumeration<K2DElement> getElementsAtPoint(Point WCCoord, View view, boolean onlyIfVisible)
getElementsAtPoint(Point, ViewState, boolean)WCCoord - the coordinate where to look for elementsview - the view in which the test is doneonlyIfVisible - specifies whether only visible elements should be returned.public java.util.Enumeration<K2DElement> getElementsAtPoint(Point WCCoord, ViewState viewState, boolean onlyIfVisible)
WCCoord - the coordinate where to look for elementsviewState - the current view state.onlyIfVisible - specifies whether only visible elements should be returned.@Deprecated public K2DElement getElementAtPoint(Point WCCoord, View view, boolean onlyIfVisible)
getElementAtPoint(Point, ViewState, boolean)WCCoord - the coordinate where to look for elementsview - the view in which the test is doneonlyIfVisible - specifies whether only a visible element should be returned.public K2DElement getElementAtPoint(Point WCCoord, ViewState viewState, boolean onlyIfVisible)
WCCoord - the coordinate where to look for elementsviewState - the current view state.onlyIfVisible - specifies whether only a visible element should be returned.public void addElement(K2DElement elem)
elem - the element to addK2DElementpublic void addElement(K2DElement element, boolean fireEvent)
element - the element to addfireEvent - indicates whether a LayerElementsAddedEvent is firedK2DElementpublic void addElements(K2DElement[] elements)
elements - the elements to addK2DElementpublic void addElements(K2DElement[] elements, boolean fireEvent)
elements - the elements to addfireEvent - indicates whether a LayerElementsAddedEvent is firedK2DElementprotected void fireElementsAddedEvent(K2DElement[] elements)
public void fireElementsChangedEvent(K2DElement[] elements)
public void validateTiling(K2DElement[] elements)
public boolean removeElement(K2DElement elem)
elem - the element to removeK2DElementpublic boolean removeElement(K2DElement elem, boolean fireEvent)
elem - the element to removefireEvent - indicates whether an event should be fired after removing the
elementK2DElementpublic boolean removeElements(K2DElement[] aElements)
aElements - the element to removeK2DElementpublic boolean removeElements(K2DElement[] aElements, boolean fireEvent)
aElements - the elements to removefireEvent - indicates whether an event should be fired after removing the
elementsK2DElementpublic boolean removeElement(long elemId)
elemId - the id of the element to be removed.public boolean removeElement(long elemId,
boolean fireEvent)
elemId - the id of the element to be removed.fireEvent - indicates whether an event should be fired after removing the
elementprotected void fireElementRemovedEvent(K2DElement[] elements)
public int getElementCount()
public void removeAllElements()
public void removeAllElements(boolean fireEvent)
fireEvent - if a fireElementRemovedEvent has to be firedpublic java.lang.String getElementLabel(K2DElement elem)
elem - the element for which the label string must be returnedpublic java.lang.String getElementLabel(K2DElement elem, Project project)
elem - the element for which the label string must be returnedproject - the project related to the specified element@Deprecated public K2DElement[] getAllElements()
public java.util.Collection<K2DElement> getElements()
public K2DElement getElement(long id)
getElement(int tileIx, int elemIx)
because it has to scan the elements.id - the id of the element to retrieve.public K2DElement getElement(int tileIx, int elemIx)
tileIx - specifies the tile that is supposed to contain the requested
elementelemIx - specifies the element position in the tilepublic void addToSelection(K2DElement elem)
elem - the element to add to the selection.LayerSelChangedEventpublic void addToSelection(K2DElement elem, boolean fireEvent)
elem - the element to add to the selection.fireEvent - whether or not to fire the selection event.LayerSelChangedEventpublic void addToSelection(java.util.Collection<K2DElement> elems)
elems - the elements to add to the selection.LayerSelChangedEventpublic void addToSelection(java.util.Collection<K2DElement> elems, boolean fireEvent)
elems - the elements to add to the selection.fireEvent - whether or not to fire the selection event.LayerSelChangedEventpublic java.util.Collection<K2DElement> getSelection()
public K2DElement[] getSelectedElements()
public int getSelectionSize()
public Style getDefaultSelectionStyle()
@Deprecated public Rectangle getDisplaySelectedBounds(View view)
getDisplaySelectedBounds(ViewState)view - the view to use when calculating the bounding box.public Rectangle getDisplaySelectedBounds(ViewState viewState)
viewState - the current view state.public Rectangle getDisplaySelectedBounds(ViewState viewState, boolean zoomed)
viewState - the current view state.zoomed - defines if display selected bounds should be computed with the transformation
matrix scaled at the geometry extent (zoomed) or at the current scale (not zoomed).public void drawSelection(GraphicsRef gr, ViewState viewState, double scale)
gr - the Graphics wrapper object used to draw the selected elementsviewState - the view statescale - the scale of the current View.public void clearSelection()
LayerSelChangedEventpublic void invertSelection()
public void selectAll()
@Deprecated public void unselectElement(K2DElement elem)
elem - the element to remove from the selectionLayerSelChangedEventpublic void removeFromSelection(K2DElement elem)
elem - the element to remove from the selectionLayerSelChangedEvent@Deprecated public void unselectElement(K2DElement elem, boolean fireEvent)
elem - the element to remove from the selectionfireEvent - whether or not to fire a layer selection event.LayerSelChangedEventpublic void removeFromSelection(K2DElement elem, boolean fireEvent)
elem - the element to remove from the selectionfireEvent - whether or not to fire a layer selection event.LayerSelChangedEventpublic void removeFromSelection(java.util.Vector<K2DElement> elements, boolean fireEvent)
elements - the elements to remove from the selectionfireEvent - whether or not to fire a layer selection event.LayerSelChangedEventpublic void removeFromSelection(java.util.Vector<K2DElement> elements)
elements - the elements to remove from the selectionLayerSelChangedEventprotected void fireDataRequestedEvent(OrientedRectangle region, boolean sync)
protected void fireDataRequestedEvent(java.util.Vector<Tile> reqTiles, boolean sync)
protected void fireSelChangedEvent(java.util.Vector<K2DElement> elems, int operType)
protected void fireSelChangedEvent(K2DElement elem, int operType)
protected void fireDisplayFilterChangedEvent(LayerDisplayFilterChangedEvent event)
protected void fireAttributeMetadataChangedEvent(LayerAttributeMetadataChangedEvent event)
protected void fireQueryfilterChangedEvent(LayerQueryFilterChangedEvent event)
public void addQueryFilter(QueryFilter filter)
filter - the filter to addpublic void removeQueryFilter(QueryFilter filter)
filter - the filter to removepublic QueryFilter[] getQueryFilters()
public void removeAllQueryFilters()
public void addDisplayFilter(DisplayFilter filter)
filter - the filter to addpublic void removeDisplayFilter(DisplayFilter filter)
filter - the filter to removepublic DisplayFilter[] getDisplayFilters()
public void removeAllDisplayFilters()
public boolean applyFilters(K2DElement elem)
elem - the element to test.public boolean alwayDrawSelection()
public void setAlwayDrawSelection(boolean isTrue)
isTrue - a boolean valuepublic Rectangle getExtent()
public Rectangle getSelectedExtent()
public Rectangle computeExtent(java.util.Collection<K2DElement> elements)
public Rectangle computeDisplayBounds(ViewState viewState, java.util.Collection<K2DElement> elements, boolean onlyIfVisible)
public Rectangle computeZoomedDisplayBounds(ViewState viewState, java.util.Collection<K2DElement> elements, boolean onlyIfVisible)
public void setOffset(Point offset)
setOffset in interface IVectorLayeroffset - the corresponding offsetpublic Point getOffset()
getOffset in interface IVectorLayerpublic boolean getUseClientCache()
getUseClientCache in interface IVectorLayerpublic void setUseClientCache(boolean flag)
setUseClientCache in interface IVectorLayerflag - the boolean value to be set.public K2DTransform getOffsetTransform(K2DTransform t)
t - the transformation that is appliedK2DTransformpublic void close()
public void setEditing(boolean flag)
public boolean isEditing()
public void setEditable(boolean editable)
Permission.ADD_LAYER_ELEMENT, Permission.EDIT_LAYER_ELEMENT,
Permission.DELETE_LAYER_ELEMENT and Permission.EDIT_LAYER_ATTRIBUTE_VALUES.editable - whether or not this layer is editable.public boolean isEditable()
isEditable in interface IVectorLayerpublic void sendToBack(K2DElement[] elements)
elements - the elements to send to backpublic void bringToFront(K2DElement[] elements)
elements - the elements to bring to frontpublic void bringForward(K2DElement[] elements)
elements - the elements to bring forwardpublic void sendBackward(K2DElement[] elements)
elements - the elements to send backwardpublic Style getStyle(K2DElement elem, double scale)
elem - the element.scale - the current scale of the view.null is returned.public Style getSelectionStyle(K2DElement elem, double scale)
elem - the element.scale - the current scale.null is returned.public Style getSelectionStyle()
getSelectionStyle in class LayerStyle,
StyleManager.getSelectionStyle(double scale)public Style getSelectionStyle(double scale)
getSelectionStyle in class Layerscale - the scale of the current View.Style,
StyleManager.getSelectionStyle(double scale)public int getRequestMode()
LayergetRequestMode in interface IVectorLayergetRequestMode in class Layerpublic void setRequestMode(int requestMode)
setRequestMode in interface IVectorLayerrequestMode - the request mode to use (
LayerInfo.REQUEST_MODE_BY_TILE or
LayerInfo.REQUEST_MODE_BY_REGION).public LabelsConfiguration getLabelsConfig()
getLabelsConfig in interface IVectorLayerpublic void setLabelsConfig(LabelsConfiguration labelsConfig)
setLabelsConfig in interface IVectorLayerlabelsConfig - the label configuration.public Hyperlink[] getHyperlinks()
getHyperlinks in interface IVectorLayerpublic void setHyperlinks(Hyperlink[] hyperlinks)
setHyperlinks in interface IVectorLayer@Deprecated public void setLastTransform(K2DTransform t, GraphicsRef gr)
Layer.revalidate(K2DTransform) insteadt - the view transformation matrix.gr - the view graphics reference instance.invalidate()public void loadData(Geometry bounds, boolean sync)
public MouseOverConfiguration getMouseOverConfiguration()
getMouseOverConfiguration in interface IVectorLayerpublic void setMouseOverConfiguration(MouseOverConfiguration mouseOverConfiguration)
setMouseOverConfiguration in interface IVectorLayerpublic java.util.List<FormInfo> getForms()
getForms in interface IVectorLayerpublic void setForms(java.util.List<FormInfo> forms)
setForms in interface IVectorLayerpublic java.util.List<SubFormInfo> getSubForms()
getSubForms in interface IVectorLayerpublic void setSubForms(java.util.List<SubFormInfo> subForms)
setSubForms in interface IVectorLayerpublic AbstractFormInfo getForm(int id)
id - public boolean hasElementsInSurface(Surface wcSurface, ViewState viewState, boolean onlyIfVisible)
wcSurface - the world coordinate region to look intoviewState - the current view state.onlyIfVisible - specifies whether only visible elements should be returned.public final Acl getAcl()
getAcl in interface IVectorLayerpublic final void setAcl(Acl acl)
setAcl in interface IVectorLayeracl - for VectorLayerspublic void invalidate()
invalidate in class Layerpublic VectorDisplayStrategyManager getDisplayStrategyManager()
public HeatMapDisplayStrategyInfo getHeatMapDisplayStrategyInfo()
getHeatMapDisplayStrategyInfo in interface IVectorLayerpublic void setHeatMapDisplayStrategyInfo(HeatMapDisplayStrategyInfo heatMapDisplayStrategyInfo)
setHeatMapDisplayStrategyInfo in interface IVectorLayerpublic ClusterDisplayStrategyInfo getClusterDisplayStrategyInfo()
getClusterDisplayStrategyInfo in interface IVectorLayerpublic void setClusterDisplayStrategyInfo(ClusterDisplayStrategyInfo clusterDisplayStrategyInfo)
setClusterDisplayStrategyInfo in interface IVectorLayer