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 theLayerViewStatus
has changed.Returns the new status as an EnumSet ofLayerViewStatus
s.Methods inherited from class java.util.EventObject
toString
-
Method Details
-
getSource
- Overrides:
getSource
in classEventObject
-
getLayer
Returns the layer for which theLayerViewStatus
has changed.- Returns:
- the layer
- Since:
- 100.0.0
-
getLayerViewStatus
Returns the new status as an EnumSet ofLayerViewStatus
s.The layer view status is an EnumSet which means a layer can have multiple states. It could for instance be both
LayerViewStatus.NOT_VISIBLE
andLayerViewStatus.OUT_OF_SCALE
, orLayerViewStatus.NOT_VISIBLE
LayerViewStatus.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.ACTIVE
can only be combined withLayerViewStatus.WARNING
to indicate that the layer is encountering a problem. For instance it can't both beLayerViewStatus.ACTIVE
andLayerViewStatus.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.LOADING
andLayerViewStatus.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
-