Package com.massifmaps.styles
Class PointStyleBuilder
java.lang.Object
com.massifmaps.styles.StyleBuilder
com.massifmaps.styles.PointStyleBuilder
A builder class for PointStyle.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a PointStyleBuilder object with all parameters set to defaults. -
Method Summary
Modifier and TypeMethodDescriptionBuilds a new instance of the PointStyle object using previously set parameters.Returns the bitmap of the point.floatReturns the size of the point used for click detection.floatgetSize()Returns the size of the point.voidSets the bitmap that will be used for drawing the point.voidsetClickSize(float size) Sets the size for the point that will be used for click detection.
Units are screen density independent pixels (DP or DIP).voidsetSize(float size) Sets the size for the point in screen density independent pixels (DP or DIP).Methods inherited from class com.massifmaps.styles.StyleBuilder
equals, getColor, hashCode, setColor
-
Constructor Details
-
PointStyleBuilder
public PointStyleBuilder()Constructs a PointStyleBuilder object with all parameters set to defaults.
-
-
Method Details
-
getBitmap
Returns the bitmap of the point.- Returns:
- The bitmap of the point.
-
setBitmap
Sets the bitmap that will be used for drawing the point. The default is "default_point.png".- Parameters:
bitmap- The new bitmap for the point.
-
getClickSize
public float getClickSize()Returns the size of the point used for click detection.- Returns:
- The size of the point used for click detection.
-
setClickSize
public void setClickSize(float size) Sets the size for the point that will be used for click detection.
Units are screen density independent pixels (DP or DIP). If set to -1 the click size will be
calculated automatically. The default is -1.- Parameters:
size- The new point size in dp.
-
getSize
public float getSize()Returns the size of the point.- Returns:
- The size of the point.
-
setSize
public void setSize(float size) Sets the size for the point in screen density independent pixels (DP or DIP). The default is 20.- Parameters:
size- The new point size in dp.
-
buildStyle
Builds a new instance of the PointStyle object using previously set parameters.- Returns:
- A new PointStyle object.
-