public class

BalloonPopupButtonStyleBuilder

extends StyleBuilder
java.lang.Object
   ↳ com.carto.styles.StyleBuilder
     ↳ com.carto.styles.BalloonPopupButtonStyleBuilder

Class Overview

A builder class for BalloonPopupButtonStyle.

Summary

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
From class com.carto.styles.StyleBuilder
From class java.lang.Object

Public Constructors

public BalloonPopupButtonStyleBuilder ()

Constructs a BalloonPopupButtonStyleBuilder object with all parameters set to defaults.

Public Methods

public BalloonPopupButtonStyle buildStyle ()

Builds a new instance of the BalloonPopupButtonStyle object using previously set parameters.

Returns
  • A new BalloonPopupButtonStyle object.

public synchronized void delete ()

public int getButtonWidth ()

Returns the width of the button.
If this value is -1, then button width is calculated automatically based on button text.

Returns
  • The width of the button in dp.

public int getCornerRadius ()

Returns the corner radius of the button.

Returns
  • The corner radius of the button in dp.

public Color getStrokeColor ()

Returns the color of the stroke surrounding the button.

Returns
  • The color of the stroke surrounding the button.

public int getStrokeWidth ()

Returns the width of the stroke surrounding the button.

Returns
  • The width of the stroke surrounding the button in dp.

public Color getTextColor ()

Returns the color of the text.

Returns
  • The color of the text.

public String getTextFontName ()

Returns the name of the text font.

Returns
  • The name of the text font.

public int getTextFontSize ()

Returns the size of the text font.

Returns
  • The size of the text font.

public BalloonPopupMargins getTextMargins ()

Returns the margins of the text.

Returns
  • The margins of the text.

public void setButtonWidth (int buttonWidth)

Sets the width of the button.
The default is -1, which means that button width is calculated automatically based on button text.

Parameters
buttonWidth The button width in dp, or -1.

public void setCornerRadius (int cornerRadius)

Sets the corner radius of the button. Bigger values mean rounder corners, 0 creates
a rectangular button. The default is 3.

Parameters
cornerRadius The new corner radius in dp.

public void setStrokeColor (Color strokeColor)

Sets the color of the stroke surrounding the button. The default is 0xFF000000.

Parameters
strokeColor The new color of the stroke surrounding the button.

public void setStrokeWidth (int strokeWidth)

Sets the width of the stroke surrounding the button. The default is 1.

Parameters
strokeWidth The new width of the stroke surrounding the button.

public void setTextColor (Color textColor)

Sets the color of the text. The default is 0xFF000000.

Parameters
textColor The new color for the text.

public void setTextFontName (String textFontName)

Sets the name of the text font. It must be one of the fonts bundled with the platform.
The default is HelveticaNeue-Light.

Parameters
textFontName The new name for the text font.

public void setTextFontSize (int textFontSize)

Sets the size of the text font. The default is 16.

Parameters
textFontSize The new size for the text font in pts.

public void setTextMargins (BalloonPopupMargins textMargins)

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).

Parameters
textMargins The new margins for the text in dp.