com.mapquest
Class ColorStyle

java.lang.Object
  extended bycom.mapquest.ColorStyle

public final class ColorStyle
extends java.lang.Object

Constants used for specifying color values. When using DTStyles you may reset the color back to the its default color from the style file state by specifying INVALID.


Field Summary
static ColorStyle BLACK
          The color black.
static ColorStyle BLUE
          The color blue.
static ColorStyle CYAN
          The color cyan.
static ColorStyle DARK_GRAY
          The color dark gray.
static ColorStyle GRAY
          The color gray.
static ColorStyle GREEN
          The color green.
static ColorStyle INVALID
          Invalid color.
static ColorStyle INVALID_COLOR
          Deprecated. Use INVALID instead.
static ColorStyle LIGHT_GRAY
          The color light gray.
static ColorStyle MAGENTA
          The color magenta.
static ColorStyle mqBlack
          Deprecated. Use BLACK instead.
static ColorStyle mqBlue
          Deprecated. Use BLUE instead.
static ColorStyle mqCyan
          Deprecated. Use CYAN instead.
static ColorStyle mqDarkGray
          Deprecated. Use DARK_GRAY instead.
static ColorStyle mqGray
          Deprecated. Use GRAY instead.
static ColorStyle mqGreen
          Deprecated. Use GREEN instead.
static ColorStyle mqInvalidColor
          Deprecated. Use INVALID instead.
static ColorStyle mqLightGray
          Deprecated. Use LIGHT_GRAY instead.
static ColorStyle mqMagenta
          Deprecated. Use MAGENTA instead.
static ColorStyle mqOrange
          Deprecated. Use ORANGE instead.
static ColorStyle mqPink
          Deprecated. Use PINK instead.
static ColorStyle mqRed
          Deprecated. Use RED instead.
static ColorStyle mqWhite
          Deprecated. Use WHITE instead.
static ColorStyle mqYellow
          Deprecated. Use YELLOW instead.
static ColorStyle ORANGE
          The color orange.
static ColorStyle PINK
          The color pink.
static ColorStyle RED
          The color red.
static ColorStyle WHITE
          The color white.
static ColorStyle YELLOW
          The color yellow.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
static ColorStyle from_int(int i)
          Deprecated. Use fromInt instead.
static ColorStyle fromInt(int i)
          Creates a ColorStyle object based on the specified combined int value consisting of the blue component in bits 16-23, the green component in bits 8-15, and the red component in bits 0-7.
static ColorStyle fromRGB(int rgb)
          Creates a ColorStyle object based on the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
static ColorStyle fromRGB(int r, int g, int b)
          Creates a ColorStyle object based on the specified red, green, and blue values in the range (0 - 255).
 int getRGB()
          Returns the RGB value representing the color in the default sRGB ColorModel.
 int hashCode()
          Returns a hash code for this ColorStyle.
 int intValue()
          Returns an int type representing this object consisting of the blue component in bits 16-23, the green component in bits 8-15, and the red component in bits 0-7.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

mqInvalidColor

public static final ColorStyle mqInvalidColor
Deprecated. Use INVALID instead.

Invalid color.


INVALID_COLOR

public static final ColorStyle INVALID_COLOR
Deprecated. Use INVALID instead.

Invalid color.


INVALID

public static final ColorStyle INVALID
Invalid color.


mqBlack

public static final ColorStyle mqBlack
Deprecated. Use BLACK instead.

The color black.


BLACK

public static final ColorStyle BLACK
The color black.


mqBlue

public static final ColorStyle mqBlue
Deprecated. Use BLUE instead.

The color blue.


BLUE

public static final ColorStyle BLUE
The color blue.


mqCyan

public static final ColorStyle mqCyan
Deprecated. Use CYAN instead.

The color cyan.


CYAN

public static final ColorStyle CYAN
The color cyan.


mqDarkGray

public static final ColorStyle mqDarkGray
Deprecated. Use DARK_GRAY instead.

The color dark gray.


DARK_GRAY

public static final ColorStyle DARK_GRAY
The color dark gray.


mqGray

public static final ColorStyle mqGray
Deprecated. Use GRAY instead.

The color gray.


GRAY

public static final ColorStyle GRAY
The color gray.


mqGreen

public static final ColorStyle mqGreen
Deprecated. Use GREEN instead.

The color green.


GREEN

public static final ColorStyle GREEN
The color green.


mqLightGray

public static final ColorStyle mqLightGray
Deprecated. Use LIGHT_GRAY instead.

The color light gray.


LIGHT_GRAY

public static final ColorStyle LIGHT_GRAY
The color light gray.


mqMagenta

public static final ColorStyle mqMagenta
Deprecated. Use MAGENTA instead.

The color magenta.


MAGENTA

public static final ColorStyle MAGENTA
The color magenta.


mqOrange

public static final ColorStyle mqOrange
Deprecated. Use ORANGE instead.

The color orange.


ORANGE

public static final ColorStyle ORANGE
The color orange.


mqPink

public static final ColorStyle mqPink
Deprecated. Use PINK instead.

The color pink.


PINK

public static final ColorStyle PINK
The color pink.


mqRed

public static final ColorStyle mqRed
Deprecated. Use RED instead.

The color red.


RED

public static final ColorStyle RED
The color red.


mqWhite

public static final ColorStyle mqWhite
Deprecated. Use WHITE instead.

The color white.


WHITE

public static final ColorStyle WHITE
The color white.


mqYellow

public static final ColorStyle mqYellow
Deprecated. Use YELLOW instead.

The color yellow.


YELLOW

public static final ColorStyle YELLOW
The color yellow.

Method Detail

fromInt

public static final ColorStyle fromInt(int i)
Creates a ColorStyle object based on the specified combined int value consisting of the blue component in bits 16-23, the green component in bits 8-15, and the red component in bits 0-7.

Parameters:
i - the combined BGR components
Returns:
the new ColorStyle object.

from_int

public static final ColorStyle from_int(int i)
Deprecated. Use fromInt instead.

Creates a ColorStyle object based on the specified combined int value consisting of the blue component in bits 16-23, the green component in bits 8-15, and the red component in bits 0-7.

Parameters:
i - the combined BGR components
Returns:
the new ColorStyle object.

fromRGB

public static final ColorStyle fromRGB(int rgb)
Creates a ColorStyle object based on the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.

Parameters:
rgb - the combined RGB components
Returns:
the new ColorStyle object.

fromRGB

public static final ColorStyle fromRGB(int r,
                                       int g,
                                       int b)
Creates a ColorStyle object based on the specified red, green, and blue values in the range (0 - 255).

Parameters:
r - the Red component (0 - 255).
g - the Green component (0 - 255).
b - the Blue component (0 - 255).
Returns:
the new ColorStyle object.

toString

public java.lang.String toString()
Returns a string representation of this object.

Returns:
a string representation of this ColorStyle.

intValue

public int intValue()
Returns an int type representing this object consisting of the blue component in bits 16-23, the green component in bits 8-15, and the red component in bits 0-7.

Returns:
the int value representing this object.

getRGB

public int getRGB()
Returns the RGB value representing the color in the default sRGB ColorModel. (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue). Alpha is defaulted to 255.

Returns:
the RGB value representing this object.

equals

public boolean equals(java.lang.Object otherObject)
Compares this object to the specified object. The result is true if and only if the argument is not null and is a ColorStyle object that has same attributes as this object.

Parameters:
otherObject - the object to compare this ColorStyle against.
Returns:
true if the ColorStyle objects are equal; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this ColorStyle.

Returns:
a hash code value for this ColorStyle.