us.ihmc.utilities.color
Class HeatMap
java.lang.Object
us.ihmc.utilities.color.HeatMap
public class HeatMap
- extends java.lang.Object
User: mjohnson
Date: 6/4/12
Constructor Summary |
HeatMap(double[][] data,
boolean useGraphicsYAxis,
java.awt.Color[] colors)
|
HeatMap(double[][] data,
boolean useGraphicsYAxis,
java.awt.Color[] colors,
double minValue,
double maxValue)
|
Method Summary |
java.awt.Color |
getColor(double value)
|
java.awt.Color |
getColor(int x,
int y)
|
void |
updateData(double[][] data,
boolean useGraphicsYAxis)
Updates the data display, calls drawData() to do the expensive re-drawing
of the data plot, and then calls repaint(). |
void |
updateGradient(java.awt.Color[] colors)
Updates the gradient used to display the data. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HeatMap
public HeatMap(double[][] data,
boolean useGraphicsYAxis,
java.awt.Color[] colors)
- Parameters:
data
- The data to display, must be a complete array (non-ragged)useGraphicsYAxis
- If true, the data will be displayed with the y=0 row at the top of the screen. If false, the data will be displayed with they=0 row at the bottom of the screen.colors
- A variable of the type Color[].
HeatMap
public HeatMap(double[][] data,
boolean useGraphicsYAxis,
java.awt.Color[] colors,
double minValue,
double maxValue)
getColor
public java.awt.Color getColor(int x,
int y)
getColor
public java.awt.Color getColor(double value)
updateGradient
public void updateGradient(java.awt.Color[] colors)
- Updates the gradient used to display the data. Calls drawData() and
repaint() when finished.
- Parameters:
colors
- A variable of type Color[]
updateData
public void updateData(double[][] data,
boolean useGraphicsYAxis)
- Updates the data display, calls drawData() to do the expensive re-drawing
of the data plot, and then calls repaint().
- Parameters:
useGraphicsYAxis
- If true, the data will be displayed with the y=0 row at the top of the screen. If false, the data will be displayed with the y=0 row at the bottom of the screen.