com.moximedia.aims
Class AimsColor

java.lang.Object
  extended bycom.moximedia.aims.AimsColor
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class AimsColor
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

The AimsColor class is used to store color information, and also contains static color definitions per the ArcIms ActiveX documentation.

See Also:
Serialized Form

Field Summary
static long imsAliceblue
           
static long imsAntiquewhite
           
static long imsAqua
           
static long imsAquamarine
           
static long imsAzure
           
static long imsBeige
           
static long imsBisque
           
static long imsBlack
           
static long imsBlanchedalmond
           
static long imsBlue
           
static long imsBlueViolet
           
static long imsBrown
           
static long imsCadetblue
           
static long imsChartreuse
           
static long imsChocolate
           
static long imsCoral
           
static long imsCornflowerblue
           
static long imsCornsilk
           
static long imsCrimson
           
static long imsCyan
           
static long imsDarkblue
           
static long imsDarkcyan
           
static long imsDarkgoldenrod
           
static long imsDarkgray
           
static long imsDarkgreen
           
static long imsDarkkhaki
           
static long imsDarkmagenta
           
static long imsDarkolivegreen
           
static long imsDarkorange
           
static long imsDarkred
           
static long imsDarksalmon
           
static long imsDarkseagreen
           
static long imsDarkslateblue
           
static long imsDarkslategray
           
static long imsDarkturquoise
           
static long imsDarkviolet
           
static long imsDeeppink
           
static long imsDeepskyblue
           
static long imsDimgray
           
static long imsDodgerblue
           
static long imsFirebrick
           
static long imsFloralwhite
           
static long imsForestgreen
           
static long imsFuchsia
           
static long imsGainsboro
           
static long imsGhostwhite
           
static long imsGold
           
static long imsGoldenrod
           
static long imsGray
           
static long imsGreen
           
static long imsGreenyellow
           
static long imsHoneydey
           
static long imsHotPink
           
static long imsIndianred
           
static long imsIndigo
           
static long imsIvory
           
static long imsKhaki
           
static long imsLavender
           
static long imsLavenderblush
           
static long imsLawngreen
           
static long imsLemonchiffon
           
static long imsLightblue
           
static long imsLightcoral
           
static long imsLightcyan
           
static long imsLightgoldenrodyellow
           
static long imsLightgray
           
static long imsLightGreen
           
static long imsLightpink
           
static long imsLightsalmon
           
static long imsLightseagreen
           
static long imsLightskyblue
           
static long imsLightslategray
           
static long imsLightsteelblue
           
static long imsLightyellow
           
static long imsLime
           
static long imsLimegreen
           
static long imsLinen
           
static long imsMagenta
           
static long imsMaroon
           
static long imsMediumaquamarine
           
static long imsMediumblue
           
static long imsMediumorchid
           
static long imsMediumpurple
           
static long imsMediumseagreen
           
static long imsMediumslateblue
           
static long imsMediumspringgreen
           
static long imsMediumturquoise
           
static long imsMediumvioletred
           
static long imsMidnightblue
           
static long imsMintcream
           
static long imsMistyrose
           
static long imsMoccasin
           
static long imsNavajowhite
           
static long imsNavy
           
static long imsOldlace
           
static long imsOlive
           
static long imsOlivedrab
           
static long imsOrange
           
static long imsOrangered
           
static long imsOrchid
           
static long imsPalegoldenrod
           
static long imsPalegreen
           
static long imsPaleturquoise
           
static long imsPalevioletred
           
static long imsPapayawhip
           
static long imsPeachpuff
           
static long imsPeru
           
static long imsPink
           
static long imsPowderblue
           
static long imsPurple
           
static long imsRed
           
static long imsRosybrown
           
static long imsRoyalblue
           
static long imsSaddlebrown
           
static long imsSalmon
           
static long imsSandybrown
           
static long imsSeagreen
           
static long imsSeashell
           
static long imsSienna
           
static long imsSilver
           
static long imsSkyblue
           
static long imsSlateblue
           
static long imsSlategray
           
static long imsSnow
           
static long imsSteelblue
           
static long imsTan
           
static long imsThistle
           
static long imsTomato
           
static long imsTurquoise
           
static long imsViolet
           
static long imsWheat
           
static long imsWhite
           
static long imsWhitesmoke
           
static long imsYellow
           
static long imsYellowgreen
           
 
Constructor Summary
AimsColor()
          Creates a new AimsColor object with default (black) color.
AimsColor(int r, int g, int b)
          Creates a new AimsColor object with red, green, blue arguments.
AimsColor(long colornum)
          Creates a new AimsColor object with a color number argument.
AimsColor(java.lang.String colorString)
          Creates a new AimsColor object with red, green, blue arguments contained in a String.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this object.
 int getBlue()
          Returns the blue component of the color.
 int getGreen()
          Returns the green component of the color.
static AimsColor getRandomColor()
          Gets a random color.
 int getRed()
          Returns the red component of the color.
 void setAxlAttribute(java.lang.String tag, java.lang.String name, java.lang.String value)
          Sets one of the attributes of this object using a string value.
 void setColor(int r, int g, int b)
          Sets the color object with red, green, blue arguments.
 void setColor(java.lang.String colorString)
          Sets the color object with red, green, blue arguments contained in a String.
 java.lang.String toHexString()
          Returns a string representation of the color.
 java.lang.String toRBGString()
          Returns a string representation of the color.
 java.lang.String toString()
          Returns a string representation of the color.
 java.lang.String toWebHexString()
          Returns a string representation of the color.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

imsAliceblue

public static long imsAliceblue

imsAntiquewhite

public static long imsAntiquewhite

imsAqua

public static long imsAqua

imsAquamarine

public static long imsAquamarine

imsAzure

public static long imsAzure

imsBeige

public static long imsBeige

imsBisque

public static long imsBisque

imsBlack

public static long imsBlack

imsBlanchedalmond

public static long imsBlanchedalmond

imsBlue

public static long imsBlue

imsBlueViolet

public static long imsBlueViolet

imsBrown

public static long imsBrown

imsCadetblue

public static long imsCadetblue

imsChartreuse

public static long imsChartreuse

imsChocolate

public static long imsChocolate

imsCoral

public static long imsCoral

imsCornflowerblue

public static long imsCornflowerblue

imsCornsilk

public static long imsCornsilk

imsCrimson

public static long imsCrimson

imsCyan

public static long imsCyan

imsDarkblue

public static long imsDarkblue

imsDarkcyan

public static long imsDarkcyan

imsDarkgoldenrod

public static long imsDarkgoldenrod

imsDarkgray

public static long imsDarkgray

imsDarkgreen

public static long imsDarkgreen

imsDarkkhaki

public static long imsDarkkhaki

imsDarkmagenta

public static long imsDarkmagenta

imsDarkolivegreen

public static long imsDarkolivegreen

imsDarkorange

public static long imsDarkorange

imsDarkred

public static long imsDarkred

imsDarksalmon

public static long imsDarksalmon

imsDarkseagreen

public static long imsDarkseagreen

imsDarkslateblue

public static long imsDarkslateblue

imsDarkslategray

public static long imsDarkslategray

imsDarkturquoise

public static long imsDarkturquoise

imsDarkviolet

public static long imsDarkviolet

imsDeeppink

public static long imsDeeppink

imsDeepskyblue

public static long imsDeepskyblue

imsDimgray

public static long imsDimgray

imsDodgerblue

public static long imsDodgerblue

imsFirebrick

public static long imsFirebrick

imsFloralwhite

public static long imsFloralwhite

imsForestgreen

public static long imsForestgreen

imsFuchsia

public static long imsFuchsia

imsGainsboro

public static long imsGainsboro

imsGhostwhite

public static long imsGhostwhite

imsGold

public static long imsGold

imsGoldenrod

public static long imsGoldenrod

imsGray

public static long imsGray

imsGreen

public static long imsGreen

imsGreenyellow

public static long imsGreenyellow

imsHoneydey

public static long imsHoneydey

imsHotPink

public static long imsHotPink

imsIndianred

public static long imsIndianred

imsIndigo

public static long imsIndigo

imsIvory

public static long imsIvory

imsKhaki

public static long imsKhaki

imsLavender

public static long imsLavender

imsLavenderblush

public static long imsLavenderblush

imsLawngreen

public static long imsLawngreen

imsLemonchiffon

public static long imsLemonchiffon

imsLightblue

public static long imsLightblue

imsLightcoral

public static long imsLightcoral

imsLightcyan

public static long imsLightcyan

imsLightgoldenrodyellow

public static long imsLightgoldenrodyellow

imsLightGreen

public static long imsLightGreen

imsLightgray

public static long imsLightgray

imsLightpink

public static long imsLightpink

imsLightsalmon

public static long imsLightsalmon

imsLightseagreen

public static long imsLightseagreen

imsLightskyblue

public static long imsLightskyblue

imsLightslategray

public static long imsLightslategray

imsLightsteelblue

public static long imsLightsteelblue

imsLightyellow

public static long imsLightyellow

imsLime

public static long imsLime

imsLimegreen

public static long imsLimegreen

imsLinen

public static long imsLinen

imsMagenta

public static long imsMagenta

imsMaroon

public static long imsMaroon

imsMediumaquamarine

public static long imsMediumaquamarine

imsMediumblue

public static long imsMediumblue

imsMediumorchid

public static long imsMediumorchid

imsMediumpurple

public static long imsMediumpurple

imsMediumseagreen

public static long imsMediumseagreen

imsMediumslateblue

public static long imsMediumslateblue

imsMediumspringgreen

public static long imsMediumspringgreen

imsMediumturquoise

public static long imsMediumturquoise

imsMediumvioletred

public static long imsMediumvioletred

imsMidnightblue

public static long imsMidnightblue

imsMintcream

public static long imsMintcream

imsMistyrose

public static long imsMistyrose

imsMoccasin

public static long imsMoccasin

imsNavajowhite

public static long imsNavajowhite

imsNavy

public static long imsNavy

imsOldlace

public static long imsOldlace

imsOlive

public static long imsOlive

imsOlivedrab

public static long imsOlivedrab

imsOrange

public static long imsOrange

imsOrangered

public static long imsOrangered

imsOrchid

public static long imsOrchid

imsPalegoldenrod

public static long imsPalegoldenrod

imsPalegreen

public static long imsPalegreen

imsPaleturquoise

public static long imsPaleturquoise

imsPalevioletred

public static long imsPalevioletred

imsPapayawhip

public static long imsPapayawhip

imsPeachpuff

public static long imsPeachpuff

imsPeru

public static long imsPeru

imsPink

public static long imsPink

imsPowderblue

public static long imsPowderblue

imsPurple

public static long imsPurple

imsRed

public static long imsRed

imsRosybrown

public static long imsRosybrown

imsRoyalblue

public static long imsRoyalblue

imsSaddlebrown

public static long imsSaddlebrown

imsSalmon

public static long imsSalmon

imsSandybrown

public static long imsSandybrown

imsSeagreen

public static long imsSeagreen

imsSeashell

public static long imsSeashell

imsSienna

public static long imsSienna

imsSilver

public static long imsSilver

imsSkyblue

public static long imsSkyblue

imsSlateblue

public static long imsSlateblue

imsSlategray

public static long imsSlategray

imsSnow

public static long imsSnow

imsSteelblue

public static long imsSteelblue

imsTan

public static long imsTan

imsThistle

public static long imsThistle

imsTomato

public static long imsTomato

imsTurquoise

public static long imsTurquoise

imsViolet

public static long imsViolet

imsWheat

public static long imsWheat

imsWhite

public static long imsWhite

imsWhitesmoke

public static long imsWhitesmoke

imsYellow

public static long imsYellow

imsYellowgreen

public static long imsYellowgreen
Constructor Detail

AimsColor

public AimsColor()
Creates a new AimsColor object with default (black) color.


AimsColor

public AimsColor(long colornum)
Creates a new AimsColor object with a color number argument. To use a predefined color, follow this example:
AimsColor myYellow = new AimsColor(AimsColor.imsYellow); same as: AimsColor myYellow = new AimsColor(65535);

Parameters:
colornum - A color number.

AimsColor

public AimsColor(int r,
                 int g,
                 int b)
Creates a new AimsColor object with red, green, blue arguments. The following is an example:
AimsColor myRed = new AimsColor(255,0,0);

Parameters:
r - A value for the red color intensity (0-255).
g - A value for the green color intensity (0-255).
b - A value for the blue color intensity (0-255).

AimsColor

public AimsColor(java.lang.String colorString)
Creates a new AimsColor object with red, green, blue arguments contained in a String. The following is an example:
AimsColor myRed = new AimsColor("255,0,0");

Parameters:
colorString - The color value in string format.
Method Detail

setColor

public void setColor(int r,
                     int g,
                     int b)
Sets the color object with red, green, blue arguments. The following is an example:

Parameters:
r - A value for the red color intensity (0-255).
g - A value for the green color intensity (0-255).
b - A value for the blue color intensity (0-255).

setColor

public void setColor(java.lang.String colorString)
Sets the color object with red, green, blue arguments contained in a String.

Parameters:
colorString - The color value in string format (eg. "255,0,0").

getRandomColor

public static AimsColor getRandomColor()
Gets a random color.

Returns:
A random color.

clone

public java.lang.Object clone()
Creates a copy of this object.

Returns:
An object that is a copy of this object. The object must be cast to an AimsColor object before use.

toString

public java.lang.String toString()
Returns a string representation of the color.

Returns:
The RBG color value as a string, e.g. "255,0,0".

setAxlAttribute

public void setAxlAttribute(java.lang.String tag,
                            java.lang.String name,
                            java.lang.String value)
Sets one of the attributes of this object using a string value. This method should only be called from the SAX event handler.

Parameters:
tag - The AXL element tag containing this attribute.
name - The AXL attribute name.
value - The AXL attribute value.

toRBGString

public java.lang.String toRBGString()
Returns a string representation of the color.

Returns:
The RBG color value as a string, e.g. "255,0,0".

getRed

public int getRed()
Returns the red component of the color.

Returns:
The red value, 0 to 255.

getGreen

public int getGreen()
Returns the green component of the color.

Returns:
The green value, 0 to 255.

getBlue

public int getBlue()
Returns the blue component of the color.

Returns:
The blue value, 0 to 255.

toHexString

public java.lang.String toHexString()
Returns a string representation of the color.

Returns:
The hex color value as a string, e.g. "FF0000".

toWebHexString

public java.lang.String toWebHexString()
Returns a string representation of the color.

Returns:
The hex color value as a string, e.g. "#FF0000".