Class GoogleMapsColor

java.lang.Object
org.deltava.util.color.GoogleColor
org.deltava.util.color.GoogleMapsColor

public class GoogleMapsColor extends GoogleColor
A class to define Google Maps colors.
Since:
1.0
Version:
7.0
Author:
Luke
  • Constructor Details

    • GoogleMapsColor

      public GoogleMapsColor(int red, int green, int blue)
      Creates a Google Maps color with default opacity (255).
      Parameters:
      red - the RGB red value
      green - the RGB green value
      blue - the RGB blue value
    • GoogleMapsColor

      public GoogleMapsColor(String colors)
      Creates a Google Maps color from an RGB string.
      Parameters:
      colors - a dash-delimited string, in format R-G-B
      Throws:
      NumberFormatException - if the string is invalid
      See Also:
  • Method Details

    • toString

      public String toString()
      Renders the color in a format to be passed to the Goolge Maps JavaScript API.
      Overrides:
      toString in class Object
      Returns:
      the rendered color