public final class FeaturePainterContext extends Object implements 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.
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
long |
getDetailLevel()
Returns the current detail level for the currently painted
Feature . |
long |
getLayerId() |
IFeatureModel |
getModel() |
boolean |
isFeatureStateEnabled(FeatureState featureState)
Returns if the given
FeatureState is enabled for the Feature that is currently being painted. |
public void close()
close
in interface AutoCloseable
public long getDetailLevel()
Feature
.
See FeaturePainterMetadata#detailLevelScales
on how to define detail levels.
Feature
.public boolean isFeatureStateEnabled(@NotNull FeatureState featureState)
FeatureState
is enabled for the Feature
that is currently being painted.featureState
- a given FeatureState
FeatureState
is enabled for the Feature
that is currently being painted.@NotNull public IFeatureModel getModel()
IFeatureModel
of the Feature
that is being painted.public long getLayerId()
Feature
that is being painted.