Package com.luciad.layers.features
Class FeaturePainterContext
java.lang.Object
com.luciad.layers.features.FeaturePainterContext
- All Implemented Interfaces:
AutoCloseable
FeaturePainterContext
provides information for use during feature painting.
IFeaturePainter
implementations can use it to find out the applicable detail level, feature state and so on to determine how to paint the current feature.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
long
Returns the current detail level for the currently paintedFeature
.long
Returns the layer id of theFeature
that is being painted.getModel()
Returns theIFeatureModel
of theFeature
that is being painted.boolean
is3D()
boolean
isDependentOnFeatureState
(FeatureState featureState) Returns whether thisIFeaturePainter
is dependent on the givenFeatureState
.boolean
isFeatureStateEnabled
(FeatureState featureState) Returns if the givenFeatureState
is enabled for theFeature
that is currently being painted.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
getDetailLevel
public long getDetailLevel()Returns the current detail level for the currently paintedFeature
.See
FeaturePainterMetadata#detailLevelScales
on how to define detail levels.- Returns:
- the current detail level for the currently painted
Feature
.
-
isDependentOnFeatureState
Returns whether thisIFeaturePainter
is dependent on the givenFeatureState
.- Parameters:
featureState
- a givenFeatureState
- Returns:
- whether this
IFeaturePainter
is dependent on the givenFeatureState
. - Since:
- 2024.1
-
isFeatureStateEnabled
Returns if the givenFeatureState
is enabled for theFeature
that is currently being painted.- Parameters:
featureState
- a givenFeatureState
- Returns:
- if the given
FeatureState
is enabled for theFeature
that is currently being painted. - Throws:
RuntimeException
- if thisIFeaturePainter
does not depend on the givenFeatureState
.- See Also:
-
getModel
Returns theIFeatureModel
of theFeature
that is being painted.- Returns:
- the
IFeatureModel
of theFeature
that is being painted.
-
getLayerId
public long getLayerId()Returns the layer id of theFeature
that is being painted.- Returns:
- the layer id of the
Feature
that is being painted.
-
is3D
public boolean is3D()
-