java.lang.Object | ||
↳ | com.carto.styles.StyleBuilder | |
↳ | com.carto.styles.BalloonPopupButtonStyleBuilder |
A builder class for BalloonPopupButtonStyle.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BalloonPopupButtonStyleBuilder()
Constructs a BalloonPopupButtonStyleBuilder object with all parameters set to defaults.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BalloonPopupButtonStyle |
buildStyle()
Builds a new instance of the BalloonPopupButtonStyle object using previously set parameters.
| ||||||||||
synchronized void | delete() | ||||||||||
int |
getButtonWidth()
Returns the width of the button.
| ||||||||||
int |
getCornerRadius()
Returns the corner radius of the button.
| ||||||||||
Color |
getStrokeColor()
Returns the color of the stroke surrounding the button.
| ||||||||||
int |
getStrokeWidth()
Returns the width of the stroke surrounding the button.
| ||||||||||
Color |
getTextColor()
Returns the color of the text.
| ||||||||||
String |
getTextFontName()
Returns the name of the text font.
| ||||||||||
int |
getTextFontSize()
Returns the size of the text font.
| ||||||||||
BalloonPopupMargins |
getTextMargins()
Returns the margins of the text.
| ||||||||||
void |
setButtonWidth(int buttonWidth)
Sets the width of the button.
| ||||||||||
void |
setCornerRadius(int cornerRadius)
Sets the corner radius of the button.
| ||||||||||
void |
setStrokeColor(Color strokeColor)
Sets the color of the stroke surrounding the button.
| ||||||||||
void |
setStrokeWidth(int strokeWidth)
Sets the width of the stroke surrounding the button.
| ||||||||||
void |
setTextColor(Color textColor)
Sets the color of the text.
| ||||||||||
void |
setTextFontName(String textFontName)
Sets the name of the text font.
| ||||||||||
void |
setTextFontSize(int textFontSize)
Sets the size of the text font.
| ||||||||||
void |
setTextMargins(BalloonPopupMargins textMargins)
Sets the margins for the text.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructs a BalloonPopupButtonStyleBuilder object with all parameters set to defaults.
Builds a new instance of the BalloonPopupButtonStyle object using previously set parameters.
Returns the width of the button.
If this value is -1, then button width is calculated automatically based on button text.
Returns the corner radius of the button.
Returns the color of the stroke surrounding the button.
Returns the width of the stroke surrounding the button.
Returns the name of the text font.
Returns the size of the text font.
Returns the margins of the text.
Sets the width of the button.
The default is -1, which means that button width is calculated automatically based on button text.
buttonWidth | The button width in dp, or -1. |
---|
Sets the corner radius of the button. Bigger values mean rounder corners, 0 creates
a rectangular button. The default is 3.
cornerRadius | The new corner radius in dp. |
---|
Sets the color of the stroke surrounding the button. The default is 0xFF000000.
strokeColor | The new color of the stroke surrounding the button. |
---|
Sets the width of the stroke surrounding the button. The default is 1.
strokeWidth | The new width of the stroke surrounding the button. |
---|
Sets the color of the text. The default is 0xFF000000.
textColor | The new color for the text. |
---|
Sets the name of the text font. It must be one of the fonts bundled with the platform.
The default is HelveticaNeue-Light.
textFontName | The new name for the text font. |
---|
Sets the size of the text font. The default is 16.
textFontSize | The new size for the text font in pts. |
---|
Sets the margins for the text. The margins will determine how much
empty space should surround the text. The default is BalloonPopupMargins(8, 4, 8, 8).
textMargins | The new margins for the text in dp. |
---|