infovis.visualization.color
Class ExplicitColor
java.lang.Object
infovis.visualization.ColorVisualization
infovis.visualization.color.ExplicitColor
- All Implemented Interfaces:
- EventListener, ChangeListener
public class ExplicitColor
- extends ColorVisualization
- Version:
- $Revision: 1.5 $
- Author:
- Jean-Daniel Fekete
ExplicitColor
public ExplicitColor(IntColumn column)
- Constructor for ExplicitColor.
- Parameters:
column
-
setColumn
public void setColumn(Column c)
- Description copied from class:
ColorVisualization
- Sets the managed column
- Overrides:
setColumn
in class ColorVisualization
- Parameters:
c
- the new column to manage
getColorValue
public int getColorValue(int row)
- Description copied from class:
ColorVisualization
- Returns the color value omputed for the specified 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);
- Specified by:
getColorValue
in class ColorVisualization
- Returns:
- the color computed for the specified row.
- See Also:
ColorVisualization.getColorValue(int)
stateChanged
public void stateChanged(ChangeEvent e)
- See Also:
ChangeListener.stateChanged(ChangeEvent)
Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.