Class MapTheme.Builder

java.lang.Object
edu.cnu.mdi.mapping.theme.MapTheme.Builder
Enclosing class:
MapTheme

public static final class MapTheme.Builder extends Object
Mutable builder for MapTheme.

All setter methods return this to support fluent chaining. Stroke widths are clamped to ≥ 0 to prevent negative values being stored.

  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • backgroundColor

      public MapTheme.Builder backgroundColor(Color c)
      Sets the panel background color.
    • oceanColor

      public MapTheme.Builder oceanColor(Color c)
      Sets the ocean fill color.
    • landColor

      public MapTheme.Builder landColor(Color c)
      Sets the land (country polygon) fill color.
    • cityColor

      public MapTheme.Builder cityColor(Color c)
      Sets the city marker dot color.
    • outlineColor

      public MapTheme.Builder outlineColor(Color c)
      Sets the projection boundary outline stroke color.
    • graticuleColor

      public MapTheme.Builder graticuleColor(Color c)
      Sets the graticule line color.
    • labelColor

      public MapTheme.Builder labelColor(Color c)
      Sets the text label color.
    • outlineStrokeWidth

      public MapTheme.Builder outlineStrokeWidth(float w)
      Sets the projection boundary outline stroke width.
      Parameters:
      w - stroke width in points; clamped to ≥ 0
    • graticuleStrokeWidth

      public MapTheme.Builder graticuleStrokeWidth(float w)
      Sets the graticule line stroke width.
      Parameters:
      w - stroke width in points; clamped to ≥ 0
    • borderColor

      public MapTheme.Builder borderColor(Color c)
      Sets the country political border stroke color.
    • borderStroke

      public MapTheme.Builder borderStroke(Stroke s)
      Sets the country political border Stroke.
    • build

      public MapTheme build()
      Constructs an immutable MapTheme from the current builder state.
      Returns:
      a new MapTheme instance