com.tensegrity.generic.persistence
Class Color

java.lang.Object
  extended bycom.tensegrity.generic.persistence.Color

public class Color
extends java.lang.Object

The Color class acts as a wrapper for Color Objects. To be type- safe during XML reading and writing this class is required to identify Color objects.

Version:
$Id: Color.java,v 1.6 2004/04/05 13:39:51 BurkhardWick Exp $
Author:
Gilles Iachelini
See Also:
ColorParser

Constructor Summary
Color(int color)
          Constructor specifying the color with an int.
Color(java.lang.String colorString)
          Constructor specifying the color with a String.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getRGB()
          Returns the RGB values of the color packed into one int.
 int hashCode()
           
 java.lang.String toString()
          Returns the appropriate string representation of a Color- object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Color

public Color(int color)
Constructor specifying the color with an int.

Parameters:
color - color specified in RGB-format

Color

public Color(java.lang.String colorString)
Constructor specifying the color with a String.

Parameters:
colorString - a textual representation of the desired color (for example "white").
Method Detail

getRGB

public int getRGB()
Returns the RGB values of the color packed into one int.

Returns:
the RGB values of the color packed into one int.

toString

public java.lang.String toString()
Returns the appropriate string representation of a Color- object. The returned string can be used to restore the color instance.

See Also:
Object.toString()

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.