Package com.luciad.layers.features
Class FeatureState
java.lang.Object
com.luciad.layers.features.FeatureState
- All Implemented Interfaces:
AutoCloseable
Representation of the state of a feature.
By default the following states exist:
It is possible to register custom feature states using FeatureState#registerValue
. You can use such custom feature states to style objects differently.
-
Field Summary
Modifier and TypeFieldDescriptionstatic FeatureState
A feature state representing an object that is under the cursor.static FeatureState
A feature state representing an object that is selected. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
protected void
finalize()
getName()
Returns the name of thisFeatureState
.static FeatureState
Returns theFeatureState
with the given name.static List
<@NotNull FeatureState> Returns the registered feature states.int
hashCode()
static FeatureState
registerValue
(String name) Registers a newFeatureState
with the given name.
-
Field Details
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
getValues
Returns the registered feature states.This includes the selection states that are available by default.
- Returns:
- the registered feature states.
-
registerValue
@NotNull public static FeatureState registerValue(@NotNull String name) throws IllegalArgumentException Registers a newFeatureState
with the given name.It is not allows the register multiple FeatureStates with the same name. If not, an exception will be thrown.
- Parameters:
name
- the name for the feature state. Must be unique.- Throws:
IllegalArgumentException
- if the value already exists.
-
getValue
Returns theFeatureState
with the given name.If no such
FeatureState
exists, an exception will be thrown.- Parameters:
name
- the name of theFeatureState
.- Returns:
- the
FeatureState
with the given name. - Throws:
IllegalArgumentException
- if there is no feature state for the given name.
-
getName
Returns the name of thisFeatureState
.- Returns:
- the name of this
FeatureState
.
-
hashCode
public int hashCode() -
equals
-