com.droplets.util
Class ColorBase
java.lang.Object
|
+--com.droplets.util.ColorBase
- Direct Known Subclasses:
- Color
Deprecated. Use com.droplets.api.Color instead.
Represents a color in RGB format, meaning that the red, green, and blue
components of the color are each specified as an integer between 0 and 255.
Objects of this class are immutable; once created, their values cannot be
changed (create another object instead).
- public class ColorBase
- extends java.lang.Object
Constructor Summary |
ColorBase(int red,
int green,
int blue)
Deprecated. Construct a new ColorBase object with the given red, green, and blue
components. |
Method Summary |
boolean |
equals(java.lang.Object o)
Deprecated. Tests two ColorBase objects for equality. |
int |
getBlue()
Deprecated. Gets the blue component of this ColorBase. |
int |
getGreen()
Deprecated. Gets the green component of this ColorBase. |
int |
getRed()
Deprecated. Gets the red component of this ColorBase. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColorBase
public ColorBase(int red,
int green,
int blue)
- Deprecated.
- Construct a new ColorBase object with the given red, green, and blue
components.
- Parameters:
red
- the red component (0-255)green
- the green component (0-255)blue
- the blue component (0-255)- Throws:
java.lang.IllegalArgumentException
- if any of the arguments is out of
range
equals
public boolean equals(java.lang.Object o)
- Deprecated.
- Tests two ColorBase objects for equality. Two colors are equal if their
R, G, and B values are equal.
- Overrides:
equals
in class java.lang.Object
- Parameters:
o
- the object to test for equality- Returns:
- true if equal, false if not
getBlue
public int getBlue()
- Deprecated.
- Gets the blue component of this ColorBase.
- Returns:
- the blue value, 0-255
getGreen
public int getGreen()
- Deprecated.
- Gets the green component of this ColorBase.
- Returns:
- the green value, 0-255
getRed
public int getRed()
- Deprecated.
- Gets the red component of this ColorBase.
- Returns:
- the red value, 0-255
Copyright © Droplets, 2001. All Rights Reserved.