visidia.misc
Class ColorLabel

java.lang.Object
  extended by visidia.misc.ColorLabel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

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

The Class ColorLabel associates a color and a label.

See Also:
Serialized Form

Constructor Summary
ColorLabel(java.awt.Color color, java.lang.String label)
          Instantiates a new color label.
ColorLabel(java.lang.String label)
          Instantiates a new color label.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 java.awt.Color getColor()
          Gets the color.
 java.lang.String getLabel()
          Gets the label.
 void set(java.awt.Color color, java.lang.String label)
          Sets both the color and label.
 void setColor(java.awt.Color color)
          Sets the color.
 void setLabel(java.lang.String label)
          Sets the label.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColorLabel

public ColorLabel(java.lang.String label)
Instantiates a new color label.

Parameters:
label - the label

ColorLabel

public ColorLabel(java.awt.Color color,
                  java.lang.String label)
Instantiates a new color label.

Parameters:
color - the color
label - the label
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getColor

public java.awt.Color getColor()
Gets the color.

Returns:
the color

setColor

public void setColor(java.awt.Color color)
Sets the color.

Parameters:
color - the new color

getLabel

public java.lang.String getLabel()
Gets the label.

Returns:
the label

setLabel

public void setLabel(java.lang.String label)
Sets the label.

Parameters:
label - the new label

set

public void set(java.awt.Color color,
                java.lang.String label)
Sets both the color and label.

Parameters:
color - the color
label - the label

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object