Class FeaturePaintCache
- java.lang.Object
-
- mil.nga.geopackage.tiles.features.FeaturePaintCache
-
public class FeaturePaintCache extends Object
Feature Paint Cache of Feature Paint objects for each feature id and draw type- Since:
- 3.2.0
- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_STYLE_PAINT_CACHE_SIZE
Default max number of feature style paints to maintain
-
Constructor Summary
Constructors Constructor Description FeaturePaintCache()
ConstructorFeaturePaintCache(int size)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the cacheFeaturePaint
getFeaturePaint(long styleId)
Get the feature paint for the style row idFeaturePaint
getFeaturePaint(StyleRow styleRow)
Get the feature paint for the style rowPaint
getPaint(long styleId, FeatureDrawType type)
Get the paint for the style row id and draw typePaint
getPaint(StyleRow styleRow, FeatureDrawType type)
Get the paint for the style row and draw typevoid
resize(int maxSize)
Resize the cachevoid
setPaint(long styleId, FeatureDrawType type, Paint paint)
Set the paint for the style id and draw typevoid
setPaint(StyleRow styleRow, FeatureDrawType type, Paint paint)
Set the paint for the style id and draw type
-
-
-
Field Detail
-
DEFAULT_STYLE_PAINT_CACHE_SIZE
public static final int DEFAULT_STYLE_PAINT_CACHE_SIZE
Default max number of feature style paints to maintain- See Also:
- Constant Field Values
-
-
Method Detail
-
clear
public void clear()
Clear the cache
-
resize
public void resize(int maxSize)
Resize the cache- Parameters:
maxSize
- max size
-
getFeaturePaint
public FeaturePaint getFeaturePaint(StyleRow styleRow)
Get the feature paint for the style row- Parameters:
styleRow
- style row- Returns:
- feature paint
-
getFeaturePaint
public FeaturePaint getFeaturePaint(long styleId)
Get the feature paint for the style row id- Parameters:
styleId
- style row id- Returns:
- feature paint
-
getPaint
public Paint getPaint(StyleRow styleRow, FeatureDrawType type)
Get the paint for the style row and draw type- Parameters:
styleRow
- style rowtype
- feature draw type- Returns:
- paint
-
getPaint
public Paint getPaint(long styleId, FeatureDrawType type)
Get the paint for the style row id and draw type- Parameters:
styleId
- style row idtype
- feature draw type- Returns:
- paint
-
setPaint
public void setPaint(StyleRow styleRow, FeatureDrawType type, Paint paint)
Set the paint for the style id and draw type- Parameters:
styleRow
- style rowtype
- feature draw typepaint
- paint
-
setPaint
public void setPaint(long styleId, FeatureDrawType type, Paint paint)
Set the paint for the style id and draw type- Parameters:
styleId
- style row idtype
- feature draw typepaint
- paint
-
-