Package com.kheops.jmap.client.layers
Class VectorLayer
java.lang.Object
com.kheops.jmap.metadata.LocalizedObject
com.kheops.jmap.client.layers.Layer
com.kheops.jmap.client.layers.VectorLayer
- All Implemented Interfaces:
JMapEventDispatcher,ILayer,IVectorLayer,LayerConstants,LayerNode,Shareable,Serializable,Cloneable,Comparable<Layer>
- Direct Known Subclasses:
PersonalVectorLayer
A class that represents a layer of vector map elements. Map elements are
instances of K2DElement. A vector layer has a tile set
(TileSet) that actually contains the elements grouped together in
tiles.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Attribute[]protected Stringprotected Stringprotected Vector<DisplayFilter> protected Hyperlink[]protected Stringprotected Stringprotected LabelsConfigurationprotected Stringprotected MouseOverConfigurationprotected PointThe offset is an instance of Point.protected Vector<QueryFilter> protected booleanDeprecated.intprotected Vector<K2DElement> protected List<SubFormInfo> protected Thematic[]protected TileSetFields inherited from class com.kheops.jmap.client.layers.Layer
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, verboseFields inherited from interface com.kheops.jmap.client.layers.ILayer
serialVersionUIDFields inherited from interface com.kheops.jmap.client.layers.IVectorLayer
serialVersionUIDFields inherited from interface com.kheops.jmap.client.layers.LayerConstants
DEFAULT_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 Summary
ConstructorsConstructorDescriptionVectorLayer(int id, int geometryType, int elementType, String name, boolean isVisible) Deprecated.VectorLayer(int id, int geometryType, int elementType, String name, boolean isVisible, int col, int row, Rectangle extent) Deprecated.VectorLayer(int id, 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, 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. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDisplayFilter(DisplayFilter filter) Adds a new filter to the list of display filters for the layer.voidaddElement(K2DElement elem) Adds the specified element to the layer and then fires a LayerElementsAddedEvent.voidaddElement(K2DElement element, boolean fireEvent) Adds the specified element (K2DElement) to the layer.voidaddElements(K2DElement[] elements) Adds the specified elements to the layer and then fires a LayerElementsAddedEvent.voidaddElements(K2DElement[] elements, boolean fireEvent) Adds the specified elements (K2DElement) to the layer.voidaddQueryFilter(QueryFilter filter) Adds a new query filter to the list of filters for the layer.voidaddThematic(Thematic thematic) Adds a thematic to this layer.voidaddToSelection(K2DElement elem) Adds the specified element to the selection of the layer.voidaddToSelection(K2DElement elem, boolean fireEvent) Adds the specified element to the selection of the layer.voidaddToSelection(Collection<K2DElement> elems) Adds the specified elements to the selection of the layer.voidaddToSelection(Collection<K2DElement> elems, boolean fireEvent) Adds the specified elements to the selection of the layer.booleanReturns whether the layer selection will always be drawn.
If enabled, the selection will be drawn at any scale, even if the layer is not visible.booleanapplyFilters(K2DElement elem) Returns whether the specified element was accepted by the current display filters configured in the layer.voidbringForward(K2DElement[] elements) Moves the specified elements one z order position up.voidbringToFront(K2DElement[] elements) Moves the specified elements to the highest z order position.voidEmpties the selection of the layer.clone()Returns a deep clone of the current LayerInfo instance.protected voidcloneImpl(IVectorLayer newLayer, boolean sharedGeometry) Share method implementation.voidclose()Clears all elements in the layer and removes all configured listeners.computeDisplayBounds(ViewState viewState, Collection<K2DElement> elements, boolean onlyIfVisible) computeExtent(Collection<K2DElement> elements) computeZoomedDisplayBounds(ViewState viewState, Collection<K2DElement> elements, boolean onlyIfVisible) voiddraw(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 voiddraw(GraphicsRef gr, ViewState viewState, Vector<Tile> tileVec, OrientedRectangle region, double scale, int drawOptions) Deprecated.protected voiddraw(GraphicsRef gr, ViewState viewState, 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.voiddrawGrid(GraphicsRef gr, K2DTransform t) Draws a grid representing the tiles configuration of the layer.protected voiddrawImpl(GraphicsRef gr, ViewState viewState, Vector<Tile> tileVec, OrientedRectangle region, double scale, int drawOptions) Deprecated.protected voiddrawImpl(GraphicsRef gr, ViewState viewState, Vector<Tile> tileVec, OrientedRectangle region, double scale, DrawParameters drawParameters) voiddrawSelection(GraphicsRef gr, ViewState viewState, double scale) Draws the selected elements of the layer.voidenableThematic(int thematicIx, boolean isEnabled) Enables or disables a thematic configured in the current layer.voidenableThematic(Thematic thematic, boolean isEnabled) Enables or disables a thematic configured in the current layer.voidenableThematics(boolean isEnabled) Enables or disables all thematics configured in the current layer.protected voidprotected voidfireDataRequestedEvent(OrientedRectangle region, boolean sync) protected voidfireDataRequestedEvent(Vector<Tile> reqTiles, boolean sync) protected voidprotected voidfireElementRemovedEvent(K2DElement[] elements) protected voidfireElementsAddedEvent(K2DElement[] elements) voidfireElementsChangedEvent(K2DElement[] elements) protected voidprotected voidfireSelChangedEvent(K2DElement elem, int operType) protected voidfireSelChangedEvent(Vector<K2DElement> elems, int operType) final AclgetAcl()Deprecated.use getElements() insteadintgetAttributeIndex(Attribute attrib) Returns the index of the specified attribute in the current metadata attributes array.Returns bound attributes on this layer.Gets the default selection stylegetDisplaySelectedBounds(View view) Deprecated.getDisplaySelectedBounds(ViewState viewState) Returns the DC bounding box of the current selection of the layer.getDisplaySelectedBounds(ViewState viewState, boolean zoomed) Returns the DC bounding box of the current selection of the layer.getElement(int tileIx, int elemIx) Returns the element contained in the specified tile at the specified position.getElement(long id) Returns the element having the specified id or null if it does not exist.getElementAtPoint(Point WCCoord, View view, boolean onlyIfVisible) Deprecated.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.intReturns the number of elements contained by the layer.getElementLabel(K2DElement elem) Returns the label string from the layer label column for the specified element.getElementLabel(K2DElement elem, Project project) Returns the label string from the layer label column for the specified element.getElementsAtPoint(Point WCCoord, View view, boolean onlyIfVisible) Deprecated.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.getElementsInCircle(Point WCCoord, View view, double radius, boolean onlyIfVisible) Deprecated.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.getElementsInSurface(Surface wcSurface, View view, boolean onlyIfVisible) Deprecated.getElementsInSurface(Surface wcSurface, ViewState viewState, boolean onlyIfVisible) Returns the enumeration of elements that are contained copmpletely or partially in the specified world coordinate surface.getElementsOnLine(LineString wcLine, View view, boolean onlyIfVisible) Deprecated.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[]Return an array of enabled thematic (displayed thematic).Returns a clone of the layer extent.getForm(int id) Returns the form or subfom with the specified id.getForms()Returns the labels configuration for this layer.Gets the offsetGets the offset transformation matrixintReturns the request mode for this layer.Gets the selected elementsReturns the extent created from selected element geometries in the current layer.Gets the selected elementsintGets the selection countReturns 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.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.getSelectionStyle(K2DElement elem, double scale) Returns the current selection style for the specified element.getStyle(K2DElement elem, double scale) Returns the current style for the specified element.getThematic(int id) Thematic[]Return all thematics added to this layer.getTiles()Returns the TileSet object associated with the layer.booleanGets the useClientCache boolean flagbooleanhasElementsInSurface(Surface wcSurface, ViewState viewState, boolean onlyIfVisible) Returns whether at least one element is contained completely or partially in the specified world coordinate surface.voidInvalidates the current layer.voidInverts the selection on this layer.booleanReturns whether this layer is editable.booleanvoidThis method automatically loads the data tiles intersecting with the specified geometry.voidprepareSyncData(GraphicsRef gr, ViewState viewState, Vector<Tile> tileVec, OrientedRectangle region) voidRemove all display filters from the layervoidRemoves all the elements from this layer and fires an fireElementRemovedEvent event.voidremoveAllElements(boolean fireEvent) Removes all the elements from this layer.voidRemove all query filters from the layervoidremoveDisplayFilter(DisplayFilter filter) Removes the specified filter from the list of display filters for the layer.booleanremoveElement(long elemId) Removes the element that has the specified id from the layer.booleanremoveElement(long elemId, boolean fireEvent) Removes the element that has the specified id from the layer.booleanremoveElement(K2DElement elem) Removes the specified element (K2DElement) from the layer.booleanremoveElement(K2DElement elem, boolean fireEvent) Removes the specified element (K2DElement) from the layer.booleanremoveElements(K2DElement[] aElements) Removes the specified elements from the layer.booleanremoveElements(K2DElement[] aElements, boolean fireEvent) Removes the specified elements from the layer.voidRemoves the specified element from the selection of the layer.voidremoveFromSelection(K2DElement elem, boolean fireEvent) Removes the specified element from the selection of the layer.voidremoveFromSelection(Vector<K2DElement> elements) Removes the specified elements from the selection of the layer.voidremoveFromSelection(Vector<K2DElement> elements, boolean fireEvent) Removes the specified elements from the selection of the layer.voidremoveQueryFilter(QueryFilter filter) Removes the specified query filter from the list of filters for the layer.voidremoveThematic(Thematic thematic) Removes a thematic from this layer.voidrequestUnsyncData(GraphicsRef gr, ViewState viewState, Vector<Tile> reqTiles, OrientedRectangle region) voidvoidsendBackward(K2DElement[] elements) Moves the specified elements one z order position down.voidsendToBack(K2DElement[] elements) Moves the specified elements to the lowest z order position.final voidvoidsetAlwayDrawSelection(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.voidsetAttributeMetaData(Attribute[] attribMetaData) Replaces the current attribute array of the layer with the one specified.voidsetClusterDisplayStrategyInfo(ClusterDisplayStrategyInfo clusterDisplayStrategyInfo) voidsetEditable(boolean editable) Adds or removes edition permissions on the layer:Permission.ADD_LAYER_ELEMENT,Permission.EDIT_LAYER_ELEMENT,Permission.DELETE_LAYER_ELEMENTandPermission.EDIT_LAYER_ATTRIBUTE_VALUES.voidsetEditing(boolean flag) voidvoidsetHeatMapDisplayStrategyInfo(HeatMapDisplayStrategyInfo heatMapDisplayStrategyInfo) voidsetHyperlinks(Hyperlink[] hyperlinks) voidsetLabelsConfig(LabelsConfiguration labelsConfig) Sets the labels configuration for this layer.voidDeprecated.useLayer.revalidate(K2DTransform)insteadvoidsetMouseOverConfiguration(MouseOverConfiguration mouseOverConfiguration) voidSets the OffsetvoidsetRequestMode(int requestMode) Sets the request mode for this layer.voidsetSubForms(List<SubFormInfo> subForms) voidsetThematics(Thematic[] thematics) Sets all thematics of this layer.voidSets the tile set for this layer.voidsetUseClientCache(boolean flag) Sets useClientCache boolean flagshare()Creates a deep copy of the current layer, excluding geometries in elements of the layer which remain the same instances in all shared layers.voidswapThematic(Thematic thematic, int index) Moves a thematic to a specific position in the layer's thematics.voidunselectElement(K2DElement elem) Deprecated.Use removeFromSelection(K2DElement) instead.voidunselectElement(K2DElement elem, boolean fireEvent) Deprecated.Use removeFromSelection(K2DElement, boolean) instead.voidvoidvalidateTiling(K2DElement[] elements) Methods inherited from class com.kheops.jmap.client.layers.Layer
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, toStringMethods inherited from class com.kheops.jmap.metadata.LocalizedObject
getAvailableLocales, getTranslation, isTranslationExists, setTranslation, updateTranslationsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.kheops.jmap.client.layers.ILayer
getDescription, 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, setVisibleMethods inherited from interface com.kheops.jmap.client.layers.IVectorLayer
getAuthorColumnName, getCreationTimeColumnName, getDatabaseConfigInfo, getElementFactory, getIdAttributeName, getKeyAttributeName, getModificationTimeColumnName, setAuthorColumnName, setCreationTimeColumnName, setDatabaseConfigInfo, setElementFactory, setIdAttributeName, setKeyAttributeName, setModificationTimeColumnName
-
Field Details
-
displayFilters
-
queryFilters
-
tileSet
-
offset
The offset is an instance of Point. Each element of the layer will be translated by the amount contained in the offset. It is used to keep double precision coordinates for the elements while using floats. -
attribMetaData
-
mouseOverConfiguration
-
labelsConfig
-
hyperlinks
-
thematics
-
selection
-
requestMode
public int requestMode -
queryFiltersChanged
Deprecated.useinvalidate()instead. -
forms
-
subForms
-
idAttributeName
-
keyAttributeName
-
creationTimeColumnName
-
modificationTimeColumnName
-
authorColumnName
-
-
Constructor Details
-
VectorLayer
Creates a new VectorLayer using the specified VectorLayerInfo.- Parameters:
layerInfo- the new layer configuration.
-
VectorLayer
@Deprecated public VectorLayer(int id, int geometryType, int elementType, String name, boolean isVisible) Deprecated.Creates a new VectorLayer using the specified parameters.
The new layer will be configured with one infinite tile.- Parameters:
id- the id of the new layer.geometryType- the geometry type.elementType- the element type.name- the name.isVisible- whether this layer is visible.
-
VectorLayer
Creates a new VectorLayer using the specified parameters.
The new layer will be configured with one infinite tile.- Parameters:
id- the id of the new layer.name- the name.elementType- the element type.- See Also:
-
VectorLayer
@Deprecated public VectorLayer(int id, int geometryType, int elementType, String name, boolean isVisible, int col, int row, Rectangle extent) Deprecated.Creates a new VectorLayer using the specified parameters.- Parameters:
id- the id of the new layer.geometryType- the geometry type.elementType- the element type.name- the name.isVisible- whether 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.
-
VectorLayer
Creates a new VectorLayer using the specified parameters.- Parameters:
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.- See Also:
-
-
Method Details
-
getAttributeMetaData
Returns bound attributes on this layer.- Specified by:
getAttributeMetaDatain interfaceIVectorLayer- Returns:
- an attribute of bound attributes. If there is no bound attribute, an empty non-null array is returned.
-
getAttributeIndex
Returns the index of the specified attribute in the current metadata attributes array.- Parameters:
attrib- the attribute to search in the metadata attributes.- Returns:
- the index of the specified attribute, or -1 if the attribute was not found.
-
setAttributeMetaData
Replaces the current attribute array of the layer with the one specified.- Specified by:
setAttributeMetaDatain interfaceIVectorLayer- Parameters:
attribMetaData- the new attribute table of the layer
-
getTiles
Returns the TileSet object associated with the layer.- Specified by:
getTilesin interfaceIVectorLayer- Returns:
- the tile set of the layer
- See Also:
-
getUpdateLock
-
setTiles
Sets the tile set for this layer.- Specified by:
setTilesin interfaceIVectorLayer- Parameters:
tileSet- the tile set- See Also:
-
getThematics
Return all thematics added to this layer. All thematics will be returned, including thematics which are not currently displayed.- Specified by:
getThematicsin interfaceIVectorLayer- Returns:
- all thematics added to this layer.
-
getThematic
- Parameters:
id-- Returns:
- Since:
- 7.0
-
getEnabledThematics
Return an array of enabled thematic (displayed thematic).- Returns:
- all enabled thematics in the layer.
-
setThematics
Sets all thematics of this layer.- Specified by:
setThematicsin interfaceIVectorLayer- Parameters:
thematics- the thematics array to set
-
enableThematic
public void enableThematic(int thematicIx, boolean isEnabled) Enables or disables a thematic configured in the current layer.- Parameters:
thematicIx- the index of the thematic.isEnabled- whether to enable it.
-
enableThematic
Enables or disables a thematic configured in the current layer.- Parameters:
thematic- the thematic to enable.isEnabled- whether to enable it.
-
enableThematics
public void enableThematics(boolean isEnabled) Enables or disables all thematics configured in the current layer.- Parameters:
isEnabled- whether to enable them.
-
swapThematic
Moves a thematic to a specific position in the layer's thematics.- Parameters:
thematic- the thematic to move.index- the new index where the thematic has to move.
-
addThematic
Adds a thematic to this layer.- Parameters:
thematic- the thematic to add.
-
removeThematic
Removes a thematic from this layer.- Parameters:
thematic- the thematic to remove.
-
draw
public 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. -
draw
protected void draw(GraphicsRef gr, ViewState viewState, 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.- Parameters:
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.- See Also:
-
draw
@Deprecated protected void draw(GraphicsRef gr, ViewState viewState, Vector<Tile> tileVec, OrientedRectangle region, double scale, int drawOptions) Deprecated.Draws all elements contained in the specified tiles and intersecting with the specified region to the specified graphics object and applying the specified transformation.- Parameters:
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 usingLayerManager.DRAW_*constants.- See Also:
-
requestUnsyncData
public void requestUnsyncData(GraphicsRef gr, ViewState viewState, Vector<Tile> reqTiles, OrientedRectangle region) -
prepareSyncData
public void prepareSyncData(GraphicsRef gr, ViewState viewState, Vector<Tile> tileVec, OrientedRectangle region) -
drawImpl
@Deprecated protected void drawImpl(GraphicsRef gr, ViewState viewState, Vector<Tile> tileVec, OrientedRectangle region, double scale, int drawOptions) Deprecated. -
drawImpl
protected void drawImpl(GraphicsRef gr, ViewState viewState, Vector<Tile> tileVec, OrientedRectangle region, double scale, DrawParameters drawParameters) -
drawGrid
Draws a grid representing the tiles configuration of the layer. -
clone
Returns a deep clone of the current LayerInfo instance. -
update
-
toLayerInfo
- Specified by:
toLayerInfoin classLayer
-
cloneImpl
Share method implementation.- Parameters:
newLayer- the new shared layer.
-
getElementsInSurface
@Deprecated public Enumeration<K2DElement> getElementsInSurface(Surface wcSurface, View view, boolean onlyIfVisible) Deprecated.Returns the enumeration of elements that are contained completely or partially in the specified world coordinate surface.- Parameters:
wcSurface- the world coordinate region to look intoview- the view in which the test is doneonlyIfVisible- specifies whether only visible elements should be returned.- Returns:
- the enumeration of contained elements
-
getElementsInSurface
public 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.- Parameters:
wcSurface- the world coordinate region to look intoviewState- the current view state.onlyIfVisible- specifies whether only visible elements should be returned.- Returns:
- the enumeration of contained elements
- Since:
- JMap 4.0
-
getElementsOnLine
@Deprecated public Enumeration<K2DElement> getElementsOnLine(LineString wcLine, View view, boolean onlyIfVisible) Deprecated.Returns the enumeration of elements that are contained completely or partially on the specified world coordinate line.- Parameters:
wcLine- the world coordinate line to look ontoview- the view in which the test is doneonlyIfVisible- specifies whether only visible elements should be returned.- Returns:
- the enumeration of contained elements
-
getElementsOnLine
public 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.- Parameters:
wcLine- the world coordinate line to look ontoviewState- the current view state.onlyIfVisible- specifies whether only visible elements should be returned.- Returns:
- the enumeration of contained elements
- Since:
- JMap 4.0
-
getElementsInCircle
@Deprecated public Enumeration<K2DElement> getElementsInCircle(Point WCCoord, View view, double radius, boolean onlyIfVisible) Deprecated.Returns the enumeration of elements that are contained completely or partially in the specified world coordinate circle.- Parameters:
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.- Returns:
- the enumeration of contained elements
-
getElementsInCircle
public 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.- Parameters:
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.- Returns:
- the enumeration of contained elements
- Since:
- JMap 4.0
-
getElementsAtPoint
@Deprecated public Enumeration<K2DElement> getElementsAtPoint(Point WCCoord, View view, boolean onlyIfVisible) Deprecated.Returns all the elements found at the specified point in world coordinate system or null if none is found.- Parameters:
WCCoord- the coordinate where to look for elementsview- the view in which the test is doneonlyIfVisible- specifies whether only visible elements should be returned.- Returns:
- all the elements found at the specified point.
-
getElementsAtPoint
public 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.- Parameters:
WCCoord- the coordinate where to look for elementsviewState- the current view state.onlyIfVisible- specifies whether only visible elements should be returned.- Returns:
- an enumeration of all the elements found at the specified point
- Since:
- JMap 4.0
-
getElementAtPoint
Deprecated.Returns the first element found at the specified point in world coordinate system or null if none is found.- Parameters:
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.- Returns:
- the first visible element found at the specified point.
-
getElementAtPoint
Returns the first element found at the specified point in world coordinate system or null if none is found.- Parameters:
WCCoord- the coordinate where to look for elementsviewState- the current view state.onlyIfVisible- specifies whether only a visible element should be returned.- Returns:
- the first visible element found at the specified point.
- Since:
- JMap 4.0
-
addElement
Adds the specified element to the layer and then fires a LayerElementsAddedEvent.- Parameters:
elem- the element to add- See Also:
-
addElement
Adds the specified element (K2DElement) to the layer.- Parameters:
element- the element to addfireEvent- indicates whether a LayerElementsAddedEvent is fired- See Also:
-
addElements
Adds the specified elements to the layer and then fires a LayerElementsAddedEvent.- Parameters:
elements- the elements to add- See Also:
-
addElements
Adds the specified elements (K2DElement) to the layer.- Parameters:
elements- the elements to addfireEvent- indicates whether a LayerElementsAddedEvent is fired- See Also:
-
fireElementsAddedEvent
-
fireElementsChangedEvent
-
validateTiling
-
removeElement
Removes the specified element (K2DElement) from the layer.- Parameters:
elem- the element to remove- Returns:
- true if the element was properly removed, false otherwise.
- See Also:
-
removeElement
Removes the specified element (K2DElement) from the layer.- Parameters:
elem- the element to removefireEvent- indicates whether an event should be fired after removing the element- Returns:
- true if the element was properly removed, false otherwise.
- See Also:
-
removeElements
Removes the specified elements from the layer.- Parameters:
aElements- the element to remove- Returns:
- true if one of the elements was properly removed, false otherwise.
- See Also:
-
removeElements
Removes the specified elements from the layer.- Parameters:
aElements- the elements to removefireEvent- indicates whether an event should be fired after removing the elements- Returns:
- true if one of the elements was properly removed, false otherwise.
- See Also:
-
removeElement
public boolean removeElement(long elemId) Removes the element that has the specified id from the layer.- Parameters:
elemId- the id of the element to be removed.- Returns:
- true if the element was properly removed false otherwise.
-
removeElement
public boolean removeElement(long elemId, boolean fireEvent) Removes the element that has the specified id from the layer.- Parameters:
elemId- the id of the element to be removed.fireEvent- indicates whether an event should be fired after removing the element- Returns:
- true if the element was properly removed false otherwise.
-
fireElementRemovedEvent
-
getElementCount
public int getElementCount()Returns the number of elements contained by the layer. The element filters don't influence the result.- Returns:
- the number of elements contained by the layer
-
removeAllElements
public void removeAllElements()Removes all the elements from this layer and fires an fireElementRemovedEvent event. -
removeAllElements
public void removeAllElements(boolean fireEvent) Removes all the elements from this layer.- Parameters:
fireEvent- if a fireElementRemovedEvent has to be fired
-
getElementLabel
Returns the label string from the layer label column for the specified element.- Parameters:
elem- the element for which the label string must be returned- Returns:
- the label string for the specified element
-
getElementLabel
Returns the label string from the layer label column for the specified element.- Parameters:
elem- the element for which the label string must be returnedproject- the project related to the specified element- Returns:
- the label string for the specified element
-
getAllElements
Deprecated.use getElements() instead- Returns:
- An array containing all elements present on the layer and that pass the display filters of the layer..
-
getElements
- Returns:
- A collection containing all the elements present on the layer and that pass the display filters of the layer.
-
getElement
Returns the element having the specified id or null if it does not exist. This method is slower thangetElement(int tileIx, int elemIx)because it has to scan the elements.- Parameters:
id- the id of the element to retrieve.- Returns:
- the element having the specified id, null if none was found.
-
getElement
Returns the element contained in the specified tile at the specified position. The filters re applied.- Parameters:
tileIx- specifies the tile that is supposed to contain the requested elementelemIx- specifies the element position in the tile- Returns:
- the requested element or null if it is not found
-
addToSelection
Adds the specified element to the selection of the layer. Fires a LayerSelChangedEvent.- Parameters:
elem- the element to add to the selection.- See Also:
-
addToSelection
Adds the specified element to the selection of the layer. Fires a LayerSelChangedEvent.- Parameters:
elem- the element to add to the selection.fireEvent- whether to fire the selection event.- See Also:
-
addToSelection
Adds the specified elements to the selection of the layer. Fires a LayerSelChangedEvent.- Parameters:
elems- the elements to add to the selection.- See Also:
-
addToSelection
Adds the specified elements to the selection of the layer. Fires a LayerSelChangedEvent.- Parameters:
elems- the elements to add to the selection.fireEvent- whether to fire the selection event.- See Also:
-
getSelection
Gets the selected elements- Returns:
- an Enumeration of the selected elements of the layer.
-
getSelectedElements
Gets the selected elements- Returns:
- an Array of the selected elements of the layer.
-
getSelectionSize
public int getSelectionSize()Gets the selection count- Returns:
- the number of selected elements of the layer.
-
getDefaultSelectionStyle
Gets the default selection style- Returns:
- the style of selected elements of the layer.
-
getDisplaySelectedBounds
Deprecated.Returns the DC bounding box of the current selection of the layer.- Parameters:
view- the view to use when calculating the bounding box.- Returns:
- the bounding box of the selection or null if no elements are selected
-
getDisplaySelectedBounds
Returns the DC bounding box of the current selection of the layer.- Parameters:
viewState- the current view state.- Returns:
- the bounding box of the selection or null if no elements are selected
- Since:
- JMap 4.0
-
getDisplaySelectedBounds
Returns the DC bounding box of the current selection of the layer.- Parameters:
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).- Returns:
- the bounding box of the selection or null if no elements are selected
- Since:
- JMap 4.0.2
-
drawSelection
Draws the selected elements of the layer.- Parameters:
gr- the Graphics wrapper object used to draw the selected elementsviewState- the view statescale- the scale of the current View.
-
clearSelection
public void clearSelection()Empties the selection of the layer. Fires a LayerSelChangedEvent.- See Also:
-
invertSelection
public void invertSelection()Inverts the selection on this layer. All selected elements get unselected while all unselected elements become selected. Fires selection events. -
selectAll
public void selectAll() -
unselectElement
Deprecated.Use removeFromSelection(K2DElement) instead.Removes the specified element from the selection of the layer. Fires a LayerSelChangedEvent.- Parameters:
elem- the element to remove from the selection- See Also:
-
removeFromSelection
Removes the specified element from the selection of the layer. Fires a LayerSelChangedEvent.- Parameters:
elem- the element to remove from the selection- See Also:
-
unselectElement
Deprecated.Use removeFromSelection(K2DElement, boolean) instead.Removes the specified element from the selection of the layer. Fires a LayerSelChangedEvent if the specified boolean parameter is true..- Parameters:
elem- the element to remove from the selectionfireEvent- whether to fire a layer selection event.- See Also:
-
removeFromSelection
Removes the specified element from the selection of the layer. Fires a LayerSelChangedEvent if the specified boolean parameter is true.- Parameters:
elem- the element to remove from the selectionfireEvent- whether to fire a layer selection event.- See Also:
-
removeFromSelection
Removes the specified elements from the selection of the layer. Fires a LayerSelChangedEvent if the specified boolean parameter is true.- Parameters:
elements- the elements to remove from the selectionfireEvent- whether to fire a layer selection event.- See Also:
-
removeFromSelection
Removes the specified elements from the selection of the layer. Fires a LayerSelChangedEvent.- Parameters:
elements- the elements to remove from the selection- See Also:
-
fireDataRequestedEvent
-
fireDataRequestedEvent
-
fireSelChangedEvent
-
fireSelChangedEvent
-
fireDisplayFilterChangedEvent
-
fireAttributeMetadataChangedEvent
-
fireQueryfilterChangedEvent
-
addQueryFilter
Adds a new query filter to the list of filters for the layer.- Parameters:
filter- the filter to add
-
removeQueryFilter
Removes the specified query filter from the list of filters for the layer.- Parameters:
filter- the filter to remove
-
getQueryFilters
- Returns:
- an array containing the current query filters for the layer
-
removeAllQueryFilters
public void removeAllQueryFilters()Remove all query filters from the layer -
addDisplayFilter
Adds a new filter to the list of display filters for the layer. Filters are applied in the order they are added.- Parameters:
filter- the filter to add
-
removeDisplayFilter
Removes the specified filter from the list of display filters for the layer.- Parameters:
filter- the filter to remove
-
getDisplayFilters
- Returns:
- an array containing the current display filters for the layer
-
removeAllDisplayFilters
public void removeAllDisplayFilters()Remove all display filters from the layer -
applyFilters
Returns whether the specified element was accepted by the current display filters configured in the layer.- Parameters:
elem- the element to test.- Returns:
- whether the element should be displayed.
-
alwayDrawSelection
public boolean alwayDrawSelection()Returns whether the layer selection will always be drawn.
If enabled, the selection will be drawn at any scale, even if the layer is not visible.- Returns:
- a boolean that specifies if the layer selection will always be drawn
-
setAlwayDrawSelection
public 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.- Parameters:
isTrue- a boolean value
-
getExtent
Returns a clone of the layer extent. -
getSelectedExtent
Returns the extent created from selected element geometries in the current layer.- Returns:
- the bounding box of the selected element geometries in the layer.
-
computeExtent
-
computeDisplayBounds
public Rectangle computeDisplayBounds(ViewState viewState, Collection<K2DElement> elements, boolean onlyIfVisible) -
computeZoomedDisplayBounds
public Rectangle computeZoomedDisplayBounds(ViewState viewState, Collection<K2DElement> elements, boolean onlyIfVisible) -
setOffset
Sets the Offset- Specified by:
setOffsetin interfaceIVectorLayer- Parameters:
offset- the corresponding offset
-
getOffset
Gets the offset- Specified by:
getOffsetin interfaceIVectorLayer- Returns:
- the offset of the layer
-
getUseClientCache
public boolean getUseClientCache()Gets the useClientCache boolean flag- Specified by:
getUseClientCachein interfaceIVectorLayer- Returns:
- true if the use of cache on the client is enabled, false otherwise
-
setUseClientCache
public void setUseClientCache(boolean flag) Sets useClientCache boolean flag- Specified by:
setUseClientCachein interfaceIVectorLayer- Parameters:
flag- the boolean value to be set.
-
getOffsetTransform
Gets the offset transformation matrix- Parameters:
t- the transformation that is applied- Returns:
- the new transformation matrix that also translates the elements by the offset
- See Also:
-
close
public void close()Clears all elements in the layer and removes all configured listeners. -
setEditing
public void setEditing(boolean flag) -
isEditing
public boolean isEditing() -
setEditable
public void setEditable(boolean editable) Adds or removes edition permissions on the layer:Permission.ADD_LAYER_ELEMENT,Permission.EDIT_LAYER_ELEMENT,Permission.DELETE_LAYER_ELEMENTandPermission.EDIT_LAYER_ATTRIBUTE_VALUES.- Parameters:
editable- whether this layer is editable.
-
isEditable
public boolean isEditable()Returns whether this layer is editable.- Specified by:
isEditablein interfaceIVectorLayer- Returns:
- the boolean value whether this layer is editable.
-
sendToBack
Moves the specified elements to the lowest z order position. Only allowed on layers with the universe tile as the only tile.- Parameters:
elements- the elements to send to back
-
bringToFront
Moves the specified elements to the highest z order position. Only allowed on layers with the universe tile as the only tile.- Parameters:
elements- the elements to bring to front
-
bringForward
Moves the specified elements one z order position up. Only allowed on layers with the universe tile as the only tile.- Parameters:
elements- the elements to bring forward
-
sendBackward
Moves the specified elements one z order position down. Only allowed on layers with the universe tile as the only tile.- Parameters:
elements- the elements to send backward
-
getStyle
Returns the current style for the specified element. The current style is based on the element selection state, enabled thematics in the layer and the specified scale.
If the specified element has no style for any enabled thematics in the layer, null is returned.- Parameters:
elem- the element.scale- the current scale of the view.- Returns:
- the current element style. If the element should not be drawn,
nullis returned.
-
getSelectionStyle
Returns the current selection style for the specified element. The selection style is based on enabled thematics in the layer and the specified scale.
If the specified element has no style for any enabled thematics in the layer, null is returned.- Parameters:
elem- the element.scale- the current scale.- Returns:
- the current selection element style. If the element should not be
drawn,
nullis returned.
-
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.- Overrides:
getSelectionStylein classLayer- Returns:
- the default selection style of the layer
- See Also:
-
getSelectionStyle
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.- Overrides:
getSelectionStylein classLayer- Parameters:
scale- the scale of the current View.- Returns:
- the selection style of the layer for the specified scale.
- See Also:
-
getRequestMode
public int getRequestMode()Description copied from class:LayerReturns the request mode for this layer. The request mode can be either by tile (REQUEST_MODE_TILE) or by random region (REQUEST_MODE_REGION). When using requests by tile, predimensionned tiles are exchanged between JMapServer and the client application. When using requests by region, random regions of data are exchanged depending on the region the user is viewing. Requests by tiles are generally more performant because they allow caching on the server and client sides. Requests by region are useful when data must always be up-to-date, as it will be requested each time from the spatial data source.- Specified by:
getRequestModein interfaceIVectorLayer- Specified by:
getRequestModein classLayer- Returns:
- the current request mode in use by this layer.
-
setRequestMode
public void setRequestMode(int requestMode) Sets the request mode for this layer.- Specified by:
setRequestModein interfaceIVectorLayer- Parameters:
requestMode- the request mode to use (LayerInfo.REQUEST_MODE_BY_TILEorLayerInfo.REQUEST_MODE_BY_REGION).
-
getLabelsConfig
Returns the labels configuration for this layer.- Specified by:
getLabelsConfigin interfaceIVectorLayer- Returns:
- the labels configuration.
-
setLabelsConfig
Sets the labels configuration for this layer.- Specified by:
setLabelsConfigin interfaceIVectorLayer- Parameters:
labelsConfig- the label configuration.
-
getHyperlinks
- Specified by:
getHyperlinksin interfaceIVectorLayer
-
setHyperlinks
- Specified by:
setHyperlinksin interfaceIVectorLayer
-
setLastTransform
Deprecated.useLayer.revalidate(K2DTransform)insteadSets the last view transformation matrix that was used to draw the layer.- Parameters:
t- the view transformation matrix.gr- the view graphics reference instance.- See Also:
-
loadData
This method automatically loads the data tiles intersecting with the specified geometry. -
getMouseOverConfiguration
- Specified by:
getMouseOverConfigurationin interfaceIVectorLayer- Returns:
- the mouse over configuration
-
setMouseOverConfiguration
- Specified by:
setMouseOverConfigurationin interfaceIVectorLayer- Parameters:
mouseOverConfiguration-
-
getForms
- Specified by:
getFormsin interfaceIVectorLayer
-
setForms
- Specified by:
setFormsin interfaceIVectorLayer
-
getSubForms
- Specified by:
getSubFormsin interfaceIVectorLayer
-
setSubForms
- Specified by:
setSubFormsin interfaceIVectorLayer
-
getForm
Returns the form or subfom with the specified id.- Parameters:
id-- Returns:
-
hasElementsInSurface
Returns whether at least one element is contained completely or partially in the specified world coordinate surface.- Parameters:
wcSurface- the world coordinate region to look intoviewState- the current view state.onlyIfVisible- specifies whether only visible elements should be returned.- Returns:
- true if the specified surface contains elements, false otherwise
- Since:
- JMap 4.0.2
-
getAcl
- Specified by:
getAclin interfaceIVectorLayer- Returns:
- acl for VectorLayers
-
setAcl
- Specified by:
setAclin interfaceIVectorLayer- Parameters:
acl- for VectorLayers
-
invalidate
public void invalidate()Invalidates the current layer. NOTE: This does not invalidate the DiskCache. To invalidate the disk cache, call the invalidateLayer method of the LayerManager containing the layer- Overrides:
invalidatein classLayer- Since:
- 6.5
-
getDisplayStrategyManager
-
getHeatMapDisplayStrategyInfo
- Specified by:
getHeatMapDisplayStrategyInfoin interfaceIVectorLayer
-
setHeatMapDisplayStrategyInfo
- Specified by:
setHeatMapDisplayStrategyInfoin interfaceIVectorLayer
-
getClusterDisplayStrategyInfo
- Specified by:
getClusterDisplayStrategyInfoin interfaceIVectorLayer
-
setClusterDisplayStrategyInfo
- Specified by:
setClusterDisplayStrategyInfoin interfaceIVectorLayer
-
invalidate()instead.