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 TypeMethodDescriptionvoidclose()protected voidfinalize()longReturns the current detail level for the currently paintedFeature.longReturns the layer id of theFeaturethat is being painted.getModel()Returns theIFeatureModelof theFeaturethat is being painted.booleanis3D()booleanisDependentOnFeatureState(FeatureState featureState) Returns whether thisIFeaturePainteris dependent on the givenFeatureState.booleanisFeatureStateEnabled(FeatureState featureState) Returns if the givenFeatureStateis enabled for theFeaturethat is currently being painted.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getDetailLevel
public long getDetailLevel()Returns the current detail level for the currently paintedFeature.See
FeaturePainterMetadata#detailLevelScaleson how to define detail levels.- Returns:
- the current detail level for the currently painted
Feature.
-
isDependentOnFeatureState
Returns whether thisIFeaturePainteris dependent on the givenFeatureState.- Parameters:
featureState- a givenFeatureState- Returns:
- whether this
IFeaturePainteris dependent on the givenFeatureState. - Since:
- 2024.1
-
isFeatureStateEnabled
Returns if the givenFeatureStateis enabled for theFeaturethat is currently being painted.- Parameters:
featureState- a givenFeatureState- Returns:
- if the given
FeatureStateis enabled for theFeaturethat is currently being painted. - Throws:
RuntimeException- if thisIFeaturePainterdoes not depend on the givenFeatureState.- See Also:
-
getModel
Returns theIFeatureModelof theFeaturethat is being painted.- Returns:
- the
IFeatureModelof theFeaturethat is being painted.
-
getLayerId
public long getLayerId()Returns the layer id of theFeaturethat is being painted.- Returns:
- the layer id of the
Featurethat is being painted.
-
is3D
public boolean is3D()
-