|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infovis.visualization.ColorVisualization infovis.visualization.color.CategoricalColor
public class CategoricalColor
Color BasicVisualization for Categorical Colors.
Constructor Summary | |
---|---|
CategoricalColor(IntColumn column)
Creates a new CategoricalColor object. |
|
CategoricalColor(IntColumn column,
Color start)
Creates a new CategoricalColor object. |
|
CategoricalColor(IntColumn column,
float[] hsbStart)
Creates a new CategoricalColor object. |
|
CategoricalColor(IntColumn column,
float startHue,
float startSaturation,
float startValue)
Creates a new CategoricalColor object. |
Method Summary | |
---|---|
Color |
getColorForValue(int val)
Returns a color given a category number. |
int |
getColorValue(int row)
Returns the color value omputed for the specified row. |
Column |
getColumn()
Returns the managed Column. |
void |
setColumn(Column c)
Sets the managed column. |
void |
stateChanged(ChangeEvent e)
|
Methods inherited from class infovis.visualization.ColorVisualization |
---|
colorComplement, computeColor, getColor |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CategoricalColor(IntColumn column, float startHue, float startSaturation, float startValue)
column
- the Column,startHue
- Starting HuestartSaturation
- Starting Saturation.startValue
- Starting value.public CategoricalColor(IntColumn column, float[] hsbStart)
column
- the column.hsbStart
- a table of three floats for the hue, saturatio and brightness.public CategoricalColor(IntColumn column, Color start)
column
- the column.start
- the starting color in the hsb cirle.public CategoricalColor(IntColumn column)
column
- the color.Method Detail |
---|
public void stateChanged(ChangeEvent e)
public int getColorValue(int row)
Color are coded as a 32bits integers. If the
color is coded with red, green, blue and alpha
floating point values between 0 and 1, the
returned value is:
((((int)(a * 255)) & 0xFF) << 24) |
((((int)(r * 255)) & 0xFF) << 16) |
((((int)(g * 255)) & 0xFF) << 8) |
((((int)(b * 255)) & 0xFF) << 0);
getColorValue
in class ColorVisualization
public Color getColorForValue(int val)
val
- the category
public Column getColumn()
getColumn
in class ColorVisualization
public void setColumn(Column c)
setColumn
in class ColorVisualization
c
- the column.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |