|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jcurzez.Color
A Jcurzez color, different from java.awt.Color.
There are two classes extending this one, respectively named
BackgroundColor and ForegroundColor. This one is package
private, it should not be used.
Basically, a Color is defined by its name
and by an object, its real color. This object will
depend on the implementation of Jcurzez.
Thus the user should not call setRealColor(Object).
Note: all colors are immutable ojects, so they can be compare using
==. Anyway, equals(java.lang.Object) is the same as ==,
and it will remain ; I made it final.
| Field Summary | |
protected java.lang.String |
name
Name of this color. |
private java.lang.Object |
realColor
The real color object. |
| Constructor Summary | |
protected |
Color(java.lang.String name)
Creates a new Color with specified name. |
| Method Summary | |
boolean |
equals(java.lang.Object o)
Tests equality. |
java.lang.Object |
getRealColor()
Returns the real color. |
void |
setRealColor(java.lang.Object o)
Modifies the real color. |
java.lang.String |
toString()
Returns the name of this color. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.lang.Object realColor
protected final java.lang.String name
| Constructor Detail |
protected Color(java.lang.String name)
Color with specified name.
java.lang.IllegalArgumentException - thrown if name is
null.| Method Detail |
public java.lang.String toString()
toString in class java.lang.Objectname.public void setRealColor(java.lang.Object o)
o - the object to store as a real color.IllegalColorStateException - if this method is invoked
more than once.java.lang.IllegalArgumentException - if o is
null.public java.lang.Object getRealColor()
realColor.public final boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||