org.nakedobjects.applib.value
Class Color
java.lang.Object
org.nakedobjects.applib.value.Magnitude
org.nakedobjects.applib.value.Color
- All Implemented Interfaces:
- Serializable
public class Color
- extends Magnitude
Color is simple numerical representation of a color using the brightness of red, green and blue (RGB)
components.
Where there is no basic colors (RGB all equal 0) then you get black; where each color is at maximum (RGB
all equal 255) you get white.
TODO: currently this value type still uses @Facets rather than @Value.
- See Also:
- Serialized Form
|
Constructor Summary |
Color(int color)
|
WHITE
public static final Color WHITE
BLACK
public static final Color BLACK
Color
public Color(int color)
intValue
public int intValue()
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
isEqualTo
public boolean isEqualTo(Magnitude number)
- returns true if the number of this object has the same value as the specified number
- Specified by:
isEqualTo in class Magnitude
isLessThan
public boolean isLessThan(Magnitude value)
- Returns true if this value is less than the specified value.
- Specified by:
isLessThan in class Magnitude
title
public String title()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.