com.supermap.data

Class Color

  • java.lang.Object
    • com.supermap.data.Color


  • public class Color
    extends java.lang.Object

    SuperMap iMobile RGB color class.

    • Constructor Summary

      Constructors 
      Constructor and Description
      Color(int rgb)
      Construct a color class with a RGB color value
      Color(int r, int g, int b)
      Create a color class with three color components of RGB.
      Color(int r, int g, int b, int a)
      Create a color class with three color components of RGB.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getA()
      Return a transparency component
      int getB()
      Return a blue component
      int getG()
      Return a green component
      int getR()
      Return a red component
      int getRGB()
      Return a RGB color value
      int getRGBA()
      Return a RGBA color value
      java.lang.String toColorString()
      Return RGB color value hexadecimal string.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Color

        public Color(int rgb)
        Construct a color class with a RGB color value
        Parameters:
        rgb - RGB value
      • Color

        public Color(int r,
                     int g,
                     int b)
        Create a color class with three color components of RGB.
        Parameters:
        r - red
        g - green
        b - blue
      • Color

        public Color(int r,
                     int g,
                     int b,
                     int a)
        Create a color class with three color components of RGB.
        Parameters:
        r - red
        g - green
        b - blue
        a - transparency
    • Method Detail

      • getR

        public int getR()
        Return a red component
        Returns:
        Red component
      • getG

        public int getG()
        Return a green component
        Returns:
        Green component
      • getB

        public int getB()
        Return a blue component
        Returns:
        Blue component
      • getA

        public int getA()
        Return a transparency component
        Returns:
        Transparency component
      • getRGB

        public int getRGB()
        Return a RGB color value
        Returns:
        RGB color value
      • getRGBA

        public int getRGBA()
        Return a RGBA color value
        Returns:
        RGBA color value
      • toColorString

        public java.lang.String toColorString()
        Return RGB color value hexadecimal string.

        This type string can be accepted by Android and convert to the color of android.

        Returns:
        RGB color value