Class BalloonPopupButtonStyleBuilder

java.lang.Object
com.massifmaps.styles.StyleBuilder
com.massifmaps.styles.BalloonPopupButtonStyleBuilder

public class BalloonPopupButtonStyleBuilder extends StyleBuilder
A builder class for BalloonPopupButtonStyle.
  • Constructor Details

    • BalloonPopupButtonStyleBuilder

      public BalloonPopupButtonStyleBuilder()
      Constructs a BalloonPopupButtonStyleBuilder object with all parameters set to defaults.
  • Method Details

    • getButtonWidth

      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.
    • setButtonWidth

      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.
    • getCornerRadius

      public int getCornerRadius()
      Returns the corner radius of the button.
      Returns:
      The corner radius of the button in dp.
    • setCornerRadius

      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.
    • getTextColor

      public Color getTextColor()
      Returns the color of the text.
      Returns:
      The color of the text.
    • setTextColor

      public void setTextColor(Color textColor)
      Sets the color of the text. The default is 0xFF000000.
      Parameters:
      textColor - The new color for the text.
    • getTextFontName

      public String getTextFontName()
      Returns the name of the text font.
      Returns:
      The name of the text font.
    • setTextFontName

      public void setTextFontName(String textFontName)
      Sets the name of the text font. Accepts a CSS-like list, the most preferred name first, entries
      optionally tagged with the platform they are for ("android:Roboto, ios:Helvetica Neue,
      sans-serif"). A name the device has no font for is skipped; generic names ("sans-serif",
      "serif", "monospace", "Arial", ...) map to the platform font. The default is HelveticaNeue-Light.
      Parameters:
      textFontName - The new name for the text font.
    • getTextFontSize

      public int getTextFontSize()
      Returns the size of the text font.
      Returns:
      The size of the text font.
    • setTextFontSize

      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.
    • getTextMargins

      public BalloonPopupMargins getTextMargins()
      Returns the margins of the text.
      Returns:
      The margins of the text.
    • setTextMargins

      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.
    • getStrokeColor

      public Color getStrokeColor()
      Returns the color of the stroke surrounding the button.
      Returns:
      The color of the stroke surrounding the button.
    • setStrokeColor

      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.
    • getStrokeWidth

      public int getStrokeWidth()
      Returns the width of the stroke surrounding the button.
      Returns:
      The width of the stroke surrounding the button in dp.
    • setStrokeWidth

      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.
    • buildStyle

      public BalloonPopupButtonStyle buildStyle()
      Builds a new instance of the BalloonPopupButtonStyle object using previously set parameters.
      Returns:
      A new BalloonPopupButtonStyle object.