Package com.kheops.jmap.client.layers
Class LayerManager
java.lang.Object
com.kheops.jmap.client.layers.LayerAdapter
com.kheops.jmap.client.layers.LayerManager
- All Implemented Interfaces:
JMapEventDispatcher,LayerEventListener,JMapRequestClient,EventListener
- Direct Known Subclasses:
SharedLayerManager
A LayerManager object responsible for managing two lists of ordered layers:
- Normal layers: layers that are used to display data. They are normally configured in JMapAdmin, but may be added manually.
- User layers: these layers are always on top of the normal layers. They can be used to do special work like drawing or adding temporary special elements to the view.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA bit field constant that specifies to draw everything.
The value of this constant is equals to:DRAW_LAYERS | DRAW_LABELS | DRAW_USERS_LAYERS | DRAW_BY_REGION_LAYERS | DRAW_STATIC_ELEMENTSstatic final intA bit field constant that specifies to draw all the layers except the labels.
The value of this constant is equals to:DRAW_USERS_LAYERS | DRAW_LAYERS | DRAW_BY_REGION_LAYERS | DRAW_STATIC_ELEMENTSstatic final intA bit field constant that specifies to restore the baseOffImage user layers.static final intA bit field constant that specifies to draw layers that use the request mode by region.static final intA bit field constant that specifies to draw labels.static final intA bit field constant that specifies to draw normal layers.static final intA bit field constant that specifies to draw static elements on the map.static final intA bit field constant that specifies to draw layers synchronously.static final intA bit field constant that specifies to draw the labels and the user layers.
The value of this constant is equals to:DRAW_USERS_LAYERS | DRAW_LABELSstatic final intA bit field constant that specifies to user layers.protected final AsyncElementSelectorImplprotected final LayerEventDispatcherstatic final intA bit field constant that specifies to draw everything even if normally not visible.
The value of this constant is equals to:FORCE_DRAW_LAYERS | FORCE_DRAW_LABELS | FORCE_DRAW_USERS_LAYERS | DRAW_BY_REGION_LAYERS | DRAW_ALLstatic final intA bit field constant that specifies to draw layers that use the request mode by region even if they are normally not visible.static final intA bit field constant that specifies to draw labels even if they are normally not visible.static final intA bit field constant that specifies to draw normal layers even if they are not visible.static final intA bit field constant that specifies to draw user layers even if they are normally not visible.static final intA bit field constant that specifies to invalidate layers before draw layers.protected LabelManagerprotected LayerTreeGroupprotected booleanprotected PrecisionModelprotected JMapSrvConnectionprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionLayerManager(JMapSrvConnection srvConn) Creates a new LayerManager instance.LayerManager(JMapSrvConnection srvConn, boolean useMemRelease, long maxUsedMem, float perRelMem, boolean useCache, long diskCacheSize) Creates a new LayerManager associated with the specified JMapSrvConnection.LayerManager(JMapSrvConnection srvConn, boolean useMemRelease, long maxUsedMem, float perRelMem, boolean useCache, File cachePath, long diskCacheSize) Creates a new LayerManager associated with the specified JMapSrvConnection. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new layer on top of all othersvoidInserts a layer at a specific positionvoidaddLayerEventListener(LayerEventListener listener) Adds a layer event listener to the list of listeners.protected voidaddLayerImpl(Vector<Layer> layerVect, Layer layer, int pos, boolean addToTree) voidaddUserLayer(Layer layer) Adds a new user layer on top of all other user layers.voidaddUserLayer(Layer layer, int pos) Adds a new user layer at a specific position.voidcallback(JMapRequest request, JMapResponse response) This method will be called when a request is executed.voidcancelCallback(JMapRequest request) This method will be called when a request has been ignored by servicing thread.protected voidvoidEmpties the selection of every layer that is managed by this layer manager.voidclose()voidThis method creates and adds different drawing layers in the Layer ManagervoidcreateLayers(Project project, LayerInfo[] layerDescs, LayerTreeGroup packedLayerGroup) TODO commentvoiddispatchEvent(JMapEvent event) ThedispatchEventmethod is used to dispatch synchronously JMap events to all registered listeners.voiddraw(ViewState viewState, GraphicsRef gr, int drawOptions) Draws specified layers and auto labels into the specified GraphicsRef object.protected JMapServerResponseexecuteRequest(JMapServerRequest request) voidfinalize()protected voidfireLayerReceivedDataEvent(Layer layer, Tile[] tiles, boolean sync) Layer[]Returns an array containing both normal and user layers.Returns the current connection associated with this LayerManager.intgetCount()Returns the number of layers managed by this layer manager.longReturns the maximum size of the disk cache.getDisplaySelectedBounds(ViewState viewState) Returns a DC Rectangle that completely contains every selection of every layer that is managed by this layer manager.getDisplaySelectedBounds(ViewState viewState, boolean zoomed) Returns a DC Rectangle that completely contains every selection of every layer that is managed by this layer manager.getElementsAtPoint(Point wcCoord, ViewState viewState, boolean onlySelectable) Returns the elements found at the specified point in world coordinate system.Returns the KLabelManager object created by this LayerManager instance.getLayer(int id) Returns the layer with the specified idReturns the layer with the specified namegetLayerByPos(int pos) Returns the layer at the specified positionintgetLayerPos(Layer layer) Returns the position of the specified layer object.Layer[]Returns an array containing normal layers.Object[]getLogos()intReturns the position of the lowest layer that has at least one selected element.longReturns the maximum size of the memory that can be allocated to data.floatReturns the percentage of memory to release when releasing memory.intgetPosByName(String name) Returns the position of the layer with the specified nameReturns the precision model to use for geometrical operations.Returns an array of all selected elements on all layers managed by this layer manager.intReturns the total number of selected elements of every layer that is managed by this layer manager.Returns a Rectangle that completely contains every layer that is managed by this layer manager.Layer[]Returns an array containing user layers.booleanprotected LayerEventDispatchervoidinvalidateLayer(int layerId) Invalidates the specified layer as well as the Disk CachevoidFires a layerAddedEvent each time a layer is addedvoidHandles data request events.voidvoidFires a LayerElementsAddedEvent when an element is addedvoidFires a LayerElementsChangedEvent when an element is changedvoidFires a layerElementsRemovedEventOccurred when an element is removedvoidFires a LayerPosChangedEvent when a layer position is changedvoidHandles property before change events.voidHandles property changed events.voidvoidCalled when new data is received from the server.voidHandles layerRefreshRequestEventvoidFires a layerRemovedEventOccurred when a layer is removedvoidHandles selection change events.voidHandles style changes events.intmoveDown(int pos, boolean fireEvent) Moves the layer (located at specified position) one position down if possible and returns the new position.voidmoveLayerTo(int layerPos, int newPos, boolean fireEvent) Moves a layer to a specific positionintmoveUp(int pos, boolean fireEvent) Moves the layer (located at specified position) one position up if possible and returns the new position.protected voidprotected voidprocessRasterDataResponse(JMapServerRequest.ExtractRasterData request, JMapServerResponse.ExtractRasterData response, boolean sync) protected voidprocessReceivedRegion(VectorLayer vectorLayer, JMapGeoElement[] elements, OrientedRectangle requestedExtent, boolean sync) protected voidprocessReceivedTile(VectorLayer layer, Tile tile, byte[] compressedData, long lastUseTime) protected voidprotected voidprocessVectorDataRegionResponse(JMapServerRequest.ExtractElements request, JMapServerResponse.ExtractElements response, boolean sync) protected voidprotected voidprocessVectorDataTileResponse(JMapServerRequest.ExtractTile request, JMapServerResponse.ExtractTile response, boolean sync) protected voidprocessVectorDataTileResponseImpl(JMapServerRequest.ExtractTile request, JMapServerResponse.ExtractTile response, boolean sync) voidRemoves all layers.booleanremoveLayer(int pos) Removes the layer at the specified position.voidremoveLayerEventListener(LayerEventListener listener) Removes a layer event listener from the list of listeners.voidvoidsetDefaultSelectionColor(Color selectionColor) voidsetMaxUsedMem(long maxUsedMem) Sets the maximum size of the memory that can be allocated to data.voidsetPerMemRelease(float perMemRelease) Sets the percentage of memory to release when releasing memory.voidsetPrecisionModel(PrecisionModel precisionModel) Sets the precision model to use for geometrical operations.voidsetUseMemRelease(boolean useMemRelease) Sets whether to use the memory management.voidsetVerbose(boolean verbose) booleanReturns whether this LayerManager is using its cache.booleanReturns whether to use the memory management.Methods inherited from class com.kheops.jmap.client.layers.LayerAdapter
layerAttributeMetadataChangedEventOccurred
-
Field Details
-
DRAW_LAYERS
public static final int DRAW_LAYERSA bit field constant that specifies to draw normal layers.- See Also:
-
FORCE_DRAW_LAYERS
public static final int FORCE_DRAW_LAYERSA bit field constant that specifies to draw normal layers even if they are not visible.- See Also:
-
DRAW_LABELS
public static final int DRAW_LABELSA bit field constant that specifies to draw labels.- See Also:
-
FORCE_DRAW_LABELS
public static final int FORCE_DRAW_LABELSA bit field constant that specifies to draw labels even if they are normally not visible.- See Also:
-
DRAW_USERS_LAYERS
public static final int DRAW_USERS_LAYERSA bit field constant that specifies to user layers.- See Also:
-
FORCE_DRAW_USERS_LAYERS
public static final int FORCE_DRAW_USERS_LAYERSA bit field constant that specifies to draw user layers even if they are normally not visible.- See Also:
-
DRAW_BY_REGION_LAYERS
public static final int DRAW_BY_REGION_LAYERSA bit field constant that specifies to draw layers that use the request mode by region.- See Also:
-
FORCE_DRAW_BY_REGION_LAYERS
public static final int FORCE_DRAW_BY_REGION_LAYERSA bit field constant that specifies to draw layers that use the request mode by region even if they are normally not visible.- See Also:
-
DRAW_BASE_OFFIMAGE
public static final int DRAW_BASE_OFFIMAGEA bit field constant that specifies to restore the baseOffImage user layers.- See Also:
-
DRAW_SYNC
public static final int DRAW_SYNCA bit field constant that specifies to draw layers synchronously.- See Also:
-
INVALIDATE_LAYERS
public static final int INVALIDATE_LAYERSA bit field constant that specifies to invalidate layers before draw layers.- See Also:
-
DRAW_STATIC_ELEMENTS
public static final int DRAW_STATIC_ELEMENTSA bit field constant that specifies to draw static elements on the map.- See Also:
-
DRAW_ALL
public static final int DRAW_ALLA bit field constant that specifies to draw everything.
The value of this constant is equals to:DRAW_LAYERS | DRAW_LABELS | DRAW_USERS_LAYERS | DRAW_BY_REGION_LAYERS | DRAW_STATIC_ELEMENTS- See Also:
-
FORCE_DRAW_ALL
public static final int FORCE_DRAW_ALLA bit field constant that specifies to draw everything even if normally not visible.
The value of this constant is equals to:FORCE_DRAW_LAYERS | FORCE_DRAW_LABELS | FORCE_DRAW_USERS_LAYERS | DRAW_BY_REGION_LAYERS | DRAW_ALL- See Also:
-
DRAW_USER_LAYERS_AND_LABELS
public static final int DRAW_USER_LAYERS_AND_LABELSA bit field constant that specifies to draw the labels and the user layers.
The value of this constant is equals to:DRAW_USERS_LAYERS | DRAW_LABELS- See Also:
-
DRAW_ALL_EXCEPT_LABELS
public static final int DRAW_ALL_EXCEPT_LABELSA bit field constant that specifies to draw all the layers except the labels.
The value of this constant is equals to:DRAW_USERS_LAYERS | DRAW_LAYERS | DRAW_BY_REGION_LAYERS | DRAW_STATIC_ELEMENTS- See Also:
-
elementSelector
-
userLayers
-
layers
-
srvConn
-
labelManager
-
verbose
protected boolean verbose -
layerTreeGroup
-
eventDispatcher
-
memoryCleanupNeeded
protected boolean memoryCleanupNeeded -
precisionModel
-
-
Constructor Details
-
LayerManager
public LayerManager(JMapSrvConnection srvConn, boolean useMemRelease, long maxUsedMem, float perRelMem, boolean useCache, long diskCacheSize) Creates a new LayerManager associated with the specified JMapSrvConnection.- Parameters:
srvConn- a connection to JMapServer.useMemRelease- whether to use the memory management.maxUsedMem- the maximum memory (in bytes) that can be allocated to data.perRelMem- the percentage of memory to release when releasing memory.useCache- whether using disk cache.diskCacheSize- the maximum size of the disk cache.
-
LayerManager
public LayerManager(JMapSrvConnection srvConn, boolean useMemRelease, long maxUsedMem, float perRelMem, boolean useCache, File cachePath, long diskCacheSize) Creates a new LayerManager associated with the specified JMapSrvConnection.- Parameters:
srvConn- a connection to JMapServer.useMemRelease- whether to use the memory management.maxUsedMem- the maximum memory (in bytes) that can be allocated to data.perRelMem- the percentage of memory to release when releasing memory.useCache- whether using disk cache.cachePath- a File that defined the path of the disk cache.diskCacheSize- the maximum size of the disk cache.
-
LayerManager
Creates a new LayerManager instance.- Parameters:
srvConn- the connection to JMapServer to use.- See Also:
-
-
Method Details
-
initEventDispatcher
-
setVerbose
public void setVerbose(boolean verbose) - Parameters:
verbose- The verbose mode
-
getVerbose
public boolean getVerbose()- Returns:
- Returns the verbose mode
-
getConnection
Returns the current connection associated with this LayerManager.- Returns:
- a reference to the current connection.
-
setDefaultSelectionColor
-
close
public void close() -
finalize
-
getDiskTileCache
-
createDrawLayers
public void createDrawLayers()This method creates and adds different drawing layers in the Layer Manager -
createLayers
TODO comment- Parameters:
project- the project associatedlayerDescs- a vector containing the descriptions of the layers
-
callback
This method will be called when a request is executed.- Specified by:
callbackin interfaceJMapRequestClient- Parameters:
request- the original requestresponse- the resulting response received from the server- See Also:
-
cancelCallback
This method will be called when a request has been ignored by servicing thread.- Specified by:
cancelCallbackin interfaceJMapRequestClient- Parameters:
request- the original request- See Also:
-
processVectorDataRegionResponse
protected void processVectorDataRegionResponse(JMapServerRequest.ExtractElements request, JMapServerResponse.ExtractElements response, boolean sync) throws Exception - Throws:
Exception
-
processRasterDataResponse
protected void processRasterDataResponse(JMapServerRequest.ExtractRasterData request, JMapServerResponse.ExtractRasterData response, boolean sync) -
processVectorDataTileResponse
protected void processVectorDataTileResponse(JMapServerRequest.ExtractTile request, JMapServerResponse.ExtractTile response, boolean sync) -
processVectorDataTileResponseImpl
protected void processVectorDataTileResponseImpl(JMapServerRequest.ExtractTile request, JMapServerResponse.ExtractTile response, boolean sync) -
draw
Draws specified layers and auto labels into the specified GraphicsRef object.- Parameters:
viewState- the state of the view requesting the draw.gr- a wrapper to a Graphics object to draw on.drawOptions- a bit field value that specifies what to draw.
-
cleanupMemory
protected void cleanupMemory() -
processReceivedTile
protected void processReceivedTile(VectorLayer layer, Tile tile, byte[] compressedData, long lastUseTime) -
addUserLayer
Adds a new user layer on top of all other user layers.- Parameters:
layer- the layer to be added- Since:
- JMap 2.5
-
addUserLayer
Adds a new user layer at a specific position.- Parameters:
layer- the layer to be addedpos- the layer position- Since:
- JMap 2.5
-
addLayer
Adds a new layer on top of all others- Parameters:
layer- the layer to be added
-
addLayer
Inserts a layer at a specific position- Parameters:
layer- the layer to be insertedpos- the layer position
-
addLayerImpl
-
removeAllLayers
public void removeAllLayers()Removes all layers. -
removeLayer
public boolean removeLayer(int pos) Removes the layer at the specified position.- Parameters:
pos- the position- Returns:
- boolean flag indicating if the layer was removed successfully
-
moveUp
public int moveUp(int pos, boolean fireEvent) Moves the layer (located at specified position) one position up if possible and returns the new position.- Parameters:
pos- the initial positionfireEvent- indicates if an event should be fired- Returns:
- the final position
-
moveDown
public int moveDown(int pos, boolean fireEvent) Moves the layer (located at specified position) one position down if possible and returns the new position.- Parameters:
pos- the initial positionfireEvent- indicates if an event should be fired- Returns:
- the final position
-
moveLayerTo
public void moveLayerTo(int layerPos, int newPos, boolean fireEvent) Moves a layer to a specific position- Parameters:
layerPos- the initial layer position to movenewPos- the final positionfireEvent- if view needs to be refreshed
-
getCount
public int getCount()Returns the number of layers managed by this layer manager.- Returns:
- the layer count.
-
getLayerByPos
Returns the layer at the specified position- Parameters:
pos- the layer position- Returns:
- the layer at the specified position
-
getLayer
Returns the layer with the specified id- Parameters:
id- the layer id- Returns:
- the layer with the specified id
-
getLayer
Returns the layer with the specified name- Parameters:
name- the layer name- Returns:
- the layer with the specified name
-
getPosByName
Returns the position of the layer with the specified name- Parameters:
name- the layer name- Returns:
- the position of the layer with the specified name
-
getLayerPos
Returns the position of the specified layer object. with the specified name- Parameters:
layer- the layer object- Returns:
- the position of the specified layer
-
getLayers
Returns an array containing normal layers.- Returns:
- an array containing normal layers.
- Since:
- JMap 2.5
-
getUserLayers
Returns an array containing user layers.- Returns:
- an array containing user layers.
- Since:
- JMap 2.5
-
getAllLayers
Returns an array containing both normal and user layers.- Returns:
- an array containing all layers.
- Since:
- JMap 2.5
-
addLayerEventListener
Adds a layer event listener to the list of listeners.- Parameters:
listener- the new listener to be added
-
removeLayerEventListener
Removes a layer event listener from the list of listeners.- Parameters:
listener- the listener to be removed
-
fireLayerReceivedDataEvent
-
dispatchEvent
ThedispatchEventmethod is used to dispatch synchronously JMap events to all registered listeners. The main use of theJMapEventDispatcherinterface is to dispatch events that were previously added to the JMap event queue.
Note: onlyLayerEventwill be accepted by this method. Any other JMap event types will cause the layer manager to throw an exception.- Specified by:
dispatchEventin interfaceJMapEventDispatcher- Parameters:
event- the event to be dispatched.- Throws:
IllegalArgumentException- will be thrown if theJMapEventinstance is no an instance of theLayerEventclass.- See Also:
-
getTotalLayerExtent
Returns a Rectangle that completely contains every layer that is managed by this layer manager. In other words, the addition of all layer extents.- Returns:
- the combined extent of all layers
-
getDisplaySelectedBounds
Returns a DC Rectangle that completely contains every selection of every layer that is managed by this layer manager.- Parameters:
viewState- the state of the current view.- Returns:
- the DC bounding box of all layer selections
-
getDisplaySelectedBounds
Returns a DC Rectangle that completely contains every selection of every layer that is managed by this layer manager.- Parameters:
viewState- the state of the current view.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 DC bounding box of all layer selections
- Since:
- JMap 4.0.2
-
getSelectedExtent
-
getSelectionSize
public int getSelectionSize()Returns the total number of selected elements of every layer that is managed by this layer manager.- Returns:
- the number of selected elements in all layers
-
clearAllSelection
public void clearAllSelection()Empties the selection of every layer that is managed by this layer manager. -
getLowestSelectPos
public int getLowestSelectPos()Returns the position of the lowest layer that has at least one selected element.- Returns:
- the position of the lowest layer that has at least one selected element.
-
getSelectedElements
Returns an array of all selected elements on all layers managed by this layer manager.- Returns:
- the selected elements from all layers
-
getElementsAtPoint
Returns the elements found at the specified point in world coordinate system. All visible and displayed vector layers and elements are considered but, if the specified boolean is true, only selectable layers are searched. The first element found on the highest layer is placed at position 0 in the array and the last element found on the lowest layer is at position length - 1 in the returned array. This method is equivalent to calling the getElementsAtPoint method on all layers of this layer manager, sorted from top layer to bottom layer.- Parameters:
wcCoord- the world coordinate where to look for elementsviewState- the view in which the test is doneonlySelectable- search only selectable layers- Returns:
- all visible elements found at the specified point or an empty array if none was found.
- Since:
- JMap 4.0
-
layerPropertyBeforeChangeEventOccurred
Handles property before change events.- Specified by:
layerPropertyBeforeChangeEventOccurredin interfaceLayerEventListener- Overrides:
layerPropertyBeforeChangeEventOccurredin classLayerAdapter- Parameters:
e- the corresponding public
-
layerPropertyChangedEventOccurred
Handles property changed events.- Specified by:
layerPropertyChangedEventOccurredin interfaceLayerEventListener- Overrides:
layerPropertyChangedEventOccurredin classLayerAdapter- Parameters:
e- the corresponding LayerPropertyChangedEvent
-
layerSelChangedEventOccurred
Handles selection change events.- Specified by:
layerSelChangedEventOccurredin interfaceLayerEventListener- Overrides:
layerSelChangedEventOccurredin classLayerAdapter- Parameters:
e- the corresponding LayerSelChangedEvent
-
layerDataRequestedEventOccurred
Handles data request events.- Specified by:
layerDataRequestedEventOccurredin interfaceLayerEventListener- Overrides:
layerDataRequestedEventOccurredin classLayerAdapter- Parameters:
event- the corresponding LayerDataRequestedEvent
-
processVectorDataRegionRequest
-
processReceivedRegion
protected void processReceivedRegion(VectorLayer vectorLayer, JMapGeoElement[] elements, OrientedRectangle requestedExtent, boolean sync) -
processRasterDataRequest
-
processVectorDataTileRequest
-
getCurrentProject
-
executeRequest
-
layerReceivedDataEventOccurred
Called when new data is received from the server.- Specified by:
layerReceivedDataEventOccurredin interfaceLayerEventListener- Overrides:
layerReceivedDataEventOccurredin classLayerAdapter- Parameters:
event- the event object.
-
layerDisplayFilterChangedEventOccurred
- Specified by:
layerDisplayFilterChangedEventOccurredin interfaceLayerEventListener- Overrides:
layerDisplayFilterChangedEventOccurredin classLayerAdapter
-
layerQueryFilterChangedEventOccurred
- Specified by:
layerQueryFilterChangedEventOccurredin interfaceLayerEventListener- Overrides:
layerQueryFilterChangedEventOccurredin classLayerAdapter
-
layerStyleChangedEventOccurred
Handles style changes events.- Specified by:
layerStyleChangedEventOccurredin interfaceLayerEventListener- Overrides:
layerStyleChangedEventOccurredin classLayerAdapter- Parameters:
event- the event- Since:
- JMap 2.5
-
layerRefreshRequestEvent
Handles layerRefreshRequestEvent- Specified by:
layerRefreshRequestEventin interfaceLayerEventListener- Overrides:
layerRefreshRequestEventin classLayerAdapter
-
layerAddedEventOccurred
Fires a layerAddedEvent each time a layer is added- Specified by:
layerAddedEventOccurredin interfaceLayerEventListener- Overrides:
layerAddedEventOccurredin classLayerAdapter- Parameters:
event- the event
-
layerElementsChangedEventOccurred
Fires a LayerElementsChangedEvent when an element is changed- Specified by:
layerElementsChangedEventOccurredin interfaceLayerEventListener- Overrides:
layerElementsChangedEventOccurredin classLayerAdapter- Parameters:
event- the event
-
layerElementsAddedEventOccurred
Fires a LayerElementsAddedEvent when an element is added- Specified by:
layerElementsAddedEventOccurredin interfaceLayerEventListener- Overrides:
layerElementsAddedEventOccurredin classLayerAdapter- Parameters:
event- the event
-
layerElementsRemovedEventOccurred
Fires a layerElementsRemovedEventOccurred when an element is removed- Specified by:
layerElementsRemovedEventOccurredin interfaceLayerEventListener- Overrides:
layerElementsRemovedEventOccurredin classLayerAdapter- Parameters:
event- the event
-
layerPosChangedEventOccurred
Fires a LayerPosChangedEvent when a layer position is changed- Specified by:
layerPosChangedEventOccurredin interfaceLayerEventListener- Overrides:
layerPosChangedEventOccurredin classLayerAdapter- Parameters:
event- the event
-
layerRemovedEventOccurred
Fires a layerRemovedEventOccurred when a layer is removed- Specified by:
layerRemovedEventOccurredin interfaceLayerEventListener- Overrides:
layerRemovedEventOccurredin classLayerAdapter- Parameters:
event- the event
-
getLabelManager
Returns the KLabelManager object created by this LayerManager instance.- Returns:
- the KLabelManager object created by this LayerManager instance.
- Since:
- JMap 2.5
-
getLogos
-
getMaxUsedMem
public long getMaxUsedMem()Returns the maximum size of the memory that can be allocated to data.- Returns:
- the maximum size of the memory in bytes.
-
usesMemRelease
public boolean usesMemRelease()Returns whether to use the memory management.- Returns:
- a boolean which indicates whether the memory management is currently used.
-
usesCache
public boolean usesCache()Returns whether this LayerManager is using its cache.- Returns:
- whether this LayerManager is using its cache.
-
setMaxUsedMem
public void setMaxUsedMem(long maxUsedMem) Sets the maximum size of the memory that can be allocated to data.- Parameters:
maxUsedMem- the maximum size of the memory in bytes.
-
setUseMemRelease
public void setUseMemRelease(boolean useMemRelease) Sets whether to use the memory management.- Parameters:
useMemRelease- indicates whether to use the memory management.
-
setPerMemRelease
public void setPerMemRelease(float perMemRelease) Sets the percentage of memory to release when releasing memory.- Parameters:
perMemRelease- the percentage of memory to release when releasing memory.
-
getPerMemRelease
public float getPerMemRelease()Returns the percentage of memory to release when releasing memory.- Returns:
- the percentage of memory to release when releasing memory.
-
getDiskCacheSize
public long getDiskCacheSize()Returns the maximum size of the disk cache.- Returns:
- the maximum size of the disk cache.
-
getMemoryMonitoringInfo
-
setConnection
-
setPrecisionModel
Sets the precision model to use for geometrical operations.- Parameters:
precisionModel- the precision model to use.- Since:
- 4.0.3
-
getPrecisionModel
Returns the precision model to use for geometrical operations.- Returns:
- the precision model to use for geometrical operations.
- Since:
- 4.0.3
-
getElementSelector
- Returns:
- Returns the elementSelector.
-
getLayerTreeVisibility
-
getLayerTreeGroup
-
invalidateLayer
public void invalidateLayer(int layerId) Invalidates the specified layer as well as the Disk Cache- Parameters:
layerId-- Since:
- 6.5
-