java.lang.Object | ||||
↳ | com.carto.styles.StyleBuilder | |||
↳ | com.carto.styles.BillboardStyleBuilder | |||
↳ | com.carto.styles.PopupStyleBuilder | |||
↳ | com.carto.styles.BalloonPopupStyleBuilder |
A builder class for BalloonPopupStyle.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BalloonPopupStyleBuilder()
Constructs a BalloonPopupStyleBuilder object with all parameters set to defaults.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BalloonPopupStyle |
buildStyle()
Builds a new instance of the BalloonPopupStyle object using previously set parameters.
| ||||||||||
synchronized void | delete() | ||||||||||
BalloonPopupMargins |
getButtonMargins()
Returns the margins for popup buttons.
| ||||||||||
int |
getCornerRadius()
Returns the corner radius of the popup.
| ||||||||||
Color |
getDescriptionColor()
Returns the color of the description.
| ||||||||||
String |
getDescriptionField()
Returns the description field variable.
| ||||||||||
String |
getDescriptionFontName()
Returns the name of the description font.
| ||||||||||
int |
getDescriptionFontSize()
Returns the size of the description font.
| ||||||||||
BalloonPopupMargins |
getDescriptionMargins()
Returns the margins of the description.
| ||||||||||
Color |
getLeftColor()
Returns the background color of the left part of the popup.
| ||||||||||
Bitmap |
getLeftImage()
Returns the image of the left part of the popup.
| ||||||||||
BalloonPopupMargins |
getLeftMargins()
Returns the margins of the left part of the popup.
| ||||||||||
Color |
getRightColor()
Returns the background color of the right part of the popup.
| ||||||||||
Bitmap |
getRightImage()
Returns the image of the right part of the popup.
| ||||||||||
BalloonPopupMargins |
getRightMargins()
Returns the margins of the right part of the popup.
| ||||||||||
Color |
getStrokeColor()
Returns the color of the stroke surrounding the popup.
| ||||||||||
int |
getStrokeWidth()
Returns the width of the stroke surrounding the popup.
| ||||||||||
Color |
getTitleColor()
Returns the color of the title.
| ||||||||||
String |
getTitleField()
Returns the title field variable.
| ||||||||||
String |
getTitleFontName()
Returns the name of the title font.
| ||||||||||
int |
getTitleFontSize()
Returns the size of the title font.
| ||||||||||
BalloonPopupMargins |
getTitleMargins()
Returns the margins of the title.
| ||||||||||
int |
getTriangleHeight()
Returns the height of the triangle at the bottom of the popup.
| ||||||||||
int |
getTriangleWidth()
Returns the width of the triangle at the bottom of the popup.
| ||||||||||
boolean |
isDescriptionWrap()
Returns the state of the description wrap parameter.
| ||||||||||
boolean |
isTitleWrap()
Returns the state of the title wrap parameter.
| ||||||||||
void |
setButtonMargins(BalloonPopupMargins buttonMargins)
Sets the margins for popup buttons.
| ||||||||||
void |
setCornerRadius(int cornerRadius)
Sets the corner radius of the popup.
| ||||||||||
void |
setDescriptionColor(Color descColor)
Sets the color of the description.
| ||||||||||
void |
setDescriptionField(String field)
Sets the description field variable.
| ||||||||||
void |
setDescriptionFontName(String descFontName)
Sets the name of the description font.
| ||||||||||
void |
setDescriptionFontSize(int descFontSize)
Sets the size of the description font.
| ||||||||||
void |
setDescriptionMargins(BalloonPopupMargins descMargins)
Sets the margins for the description.
| ||||||||||
void |
setDescriptionWrap(boolean descWrap)
Sets the state of the description wrap parameter.
| ||||||||||
void |
setLeftColor(Color leftColor)
Sets the background color of the left part of the popup.
| ||||||||||
void |
setLeftImage(Bitmap leftImage)
Sets the image for the left part of the popup.
| ||||||||||
void |
setLeftMargins(BalloonPopupMargins leftMargins)
Sets the margins for the left part of the popup.
| ||||||||||
void |
setRightColor(Color rightColor)
Sets the background color of the right part of the popup.
| ||||||||||
void |
setRightImage(Bitmap rightImage)
Sets the image for the right part of the popup.
| ||||||||||
void |
setRightMargins(BalloonPopupMargins rightMargins)
Sets the margins for the right part of the popup.
| ||||||||||
void |
setStrokeColor(Color strokeColor)
Sets the color of the stroke surrounding the popup.
| ||||||||||
void |
setStrokeWidth(int strokeWidth)
Sets the width of the stroke surrounding the popup.
| ||||||||||
void |
setTitleColor(Color titleColor)
Sets the color of the title.
| ||||||||||
void |
setTitleField(String field)
Sets the title field variable.
| ||||||||||
void |
setTitleFontName(String titleFontName)
Sets the name of the title font.
| ||||||||||
void |
setTitleFontSize(int titleFontSize)
Sets the size of the title font.
| ||||||||||
void |
setTitleMargins(BalloonPopupMargins titleMargins)
Sets the margins for the title.
| ||||||||||
void |
setTitleWrap(boolean titleWrap)
Sets the state of the title wrap parameter.
| ||||||||||
void |
setTriangleHeight(int triangleHeight)
Sets the height of the triangle at the bottom of the popup.
| ||||||||||
void |
setTriangleWidth(int triangleWidth)
Sets the width of the triangle at the bottom of the popup.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a BalloonPopupStyleBuilder object with all parameters set to defaults.
Builds a new instance of the BalloonPopupStyle object using previously set parameters.
Returns the margins for popup buttons.
Returns the corner radius of the popup.
Returns the color of the description.
Returns the description field variable. If not empty, this variable is used to read actual text string from object meta info.
Returns the name of the description font.
Returns the size of the description font.
Returns the margins of the description.
Returns the background color of the left part of the popup.
Returns the image of the left part of the popup.
Returns the margins of the left part of the popup.
Returns the background color of the right part of the popup.
Returns the image of the right part of the popup.
Returns the margins of the right part of the popup.
Returns the color of the stroke surrounding the popup.
Returns the width of the stroke surrounding the popup.
Returns the title field variable. If not empty, this variable is used to read actual text string from object meta info.
Returns the name of the title font.
Returns the size of the title font.
Returns the margins of the title.
Returns the height of the triangle at the bottom of the popup.
Returns the width of the triangle at the bottom of the popup.
Returns the state of the description wrap parameter.
Returns the state of the title wrap parameter.
Sets the margins for popup buttons. The margins will determine how much
empty space should surround the buttons. The default is BalloonPopupMargins(8, 0, 8, 8).
buttonMargins | The new popup margins for the buttons in dp. |
---|
Sets the corner radius of the popup. Bigger values mean rounder corners, 0 creates
a rectangular popup. The default is 3.
cornerRadius | The new corner radius in dp. |
---|
Sets the color of the description. The default is 0xFF000000.
descColor | The new color for the description. |
---|
Sets the description field variable. If not empty, this variable is used to read actual text string from object meta info.
field | The description field to use for displaying text from metainfo. |
---|
Sets the name of the description font. It must be one of the fonts bundled with the platform.
The default is HelveticaNeue-Light.
descFontName | The new name for the description font. |
---|
Sets the size of the description font. The default is 14.
descFontSize | The new size for the description font in pts. |
---|
Sets the margins for the description. The margins will determine how much
empty space should surround the description. The default is BalloonPopupMargins(8, 0, 8, 6).
descMargins | The new margins for the description in dp. |
---|
Sets the state of the description wrap parameter. If set to true, long descriptions that are
wider than the sreen width will be wrapped to multiple lines, increasing the height of the popup.
If set to false, long descriptions are truncated with three dots.
descWrap | The new state of the description wrap parameter. |
---|
Sets the background color of the left part of the popup. The size of the colored area
is determined by the left margins and the left image. The default is 0xFF00B483.
leftColor | The new color for the left part of the popup. |
---|
Sets the image for the left part of the popup. If null is passed no image will be drawn.
The default is null.
leftImage | The new image for the left part of the popup. |
---|
Sets the margins for the left part of the popup. The margins will determine how much
empty space should surround the left image. The default is BalloonPopupMargins(5, 0, 5, 0).
leftMargins | The new margins for the left part of the popup in dp. |
---|
Sets the background color of the right part of the popup. The size of the colored area
is determined by the right margins and the right image. The default is 0xFF00B483.
rightColor | The new color for the right part of the popup. |
---|
Sets the image for the right part of the popup. If null is passed no image will be drawn.
The default is null.
rightImage | The new image for the right part of the popup. |
---|
Sets the margins for the right part of the popup. The margins will determine how much
empty space should surround the right image. The default is BalloonPopupMargins(5, 0, 5, 0).
rightMargins | The new margins for the right part of the popup in dp. |
---|
Sets the color of the stroke surrounding the popup. The default is 0xFF000000.
strokeColor | The new color of the stroke surrounding the popup. |
---|
Sets the width of the stroke surrounding the popup. The default is 1.
strokeWidth | The new width of the stroke surrounding the popup. |
---|
Sets the color of the title. The default is 0xFF000000.
titleColor | The new color for the title. |
---|
Sets the title field variable. If not empty, this variable is used to read actual text string from object meta info.
field | The text field to use for displaying title from metainfo. |
---|
Sets the name of the title font. It must be one of the fonts bundled with the platform.
The default is HelveticaNeue-Light.
titleFontName | The new name for the title font. |
---|
Sets the size of the title font. The default is 16.
titleFontSize | The new size for the title font in pts. |
---|
Sets the margins for the title. The margins will determine how much
empty space should surround the title. The default is BalloonPopupMargins(8, 4, 8, 0).
titleMargins | The new margins for the title in dp. |
---|
Sets the state of the title wrap parameter. If set to true, long titles that are
wider than the sreen width will be wrapped to multiple lines, increasing the height of the popup.
If set to false, long titles are truncated with three dots.
titleWrap | The new state of the title wrap parameter. |
---|
Sets the height of the triangle at the bottom of the popup. The default is 10.
triangleHeight | The new height of the triangle at the bottom of the popup. |
---|
Sets the width of the triangle at the bottom of the popup. The default is 20.
triangleWidth | The new width of the triangle at the bottom of the popup. |
---|