Class LayerViewStateChangedEvent
- All Implemented Interfaces:
Serializable
LayerViewStateChangedListener.
This event returns LayerViewStatus as an java.util.EnumSet for each layer, which means the layer can
have multiple states. See getLayerViewStatus() for more information.
- Since:
- 100.0.0
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Method Summary
Modifier and TypeMethodDescriptiongetError()Gets the error that occurred ifgetLayerViewStatus()returnsLayerViewStatus.ERROR.getLayer()Returns the layer for which theLayerViewStatushas changed.Returns the new status as an EnumSet ofLayerViewStatuss.Methods inherited from class java.util.EventObject
toString
-
Method Details
-
getSource
- Overrides:
getSourcein classEventObject
-
getLayer
Returns the layer for which theLayerViewStatushas changed.- Returns:
- the layer
- Since:
- 100.0.0
-
getLayerViewStatus
Returns the new status as an EnumSet ofLayerViewStatuss.The layer view status is an EnumSet which means a layer can have multiple states. It could for instance be both
LayerViewStatus.NOT_VISIBLEandLayerViewStatus.OUT_OF_SCALE, orLayerViewStatus.NOT_VISIBLELayerViewStatus.LOADING. This means your layer list in a table of contents (TOCs) could use the status to both determine whether to gray out the layer, and also show a spinning loading icon. However a layer status ofLayerViewStatus.ACTIVEcan only be combined withLayerViewStatus.WARNINGto indicate that the layer is encountering a problem. For instance it can't both beLayerViewStatus.ACTIVEandLayerViewStatus.NOT_VISIBLE. It's important to note that the benefit here over just checking layer visibility and scale ranges, is that also parent layers are taken into account - i.e. if a group layer is out of scale range or off. This greatly simplifies the code needed for building table TOCs that update with the map view.- Returns:
- the layer view status, which can be a set of statuses such as
LayerViewStatus.LOADINGandLayerViewStatus.NOT_VISIBLE. - Since:
- 100.0.0
-
getError
Gets the error that occurred ifgetLayerViewStatus()returnsLayerViewStatus.ERROR.- Returns:
- an ArcGISRuntimeException if an error occurred, otherwise null
- Since:
- 100.0.0
-