|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.strbio.util.graph.ColorScaleLegend
public class ColorScaleLegend
A legend for graphs, showing a bar indicating which ColorScale colors correspond to which numeric values.
Version 1.0, 5/17/99 - adapted from org.strbio.util.BarLegend
Constructor Summary | |
---|---|
ColorScaleLegend(double a,
double b,
ColorScale c,
java.awt.Font f,
java.awt.FontMetrics fmet,
java.lang.String l,
java.lang.String fmt)
Initialize new legend. |
Method Summary | |
---|---|
ColorScale |
getColorScale()
Return the color scale being used. |
int |
getHeight()
Get the height that the legend wants to draw in. |
int |
getWidth()
Get the width that the legend wants to draw in. |
void |
paintLegend(java.awt.Graphics g,
int x,
int y)
draw the legend, at a given top, left position. |
void |
setColorScale(ColorScale x)
Set the color scale to use. |
void |
setFont(java.awt.Font f,
java.awt.FontMetrics fmet)
set the font labels will be printed in. |
void |
setFormat(java.lang.String x)
Sets the format string for printing min, max; i.e. "%.2f". |
void |
setLabel(java.lang.String l)
set the label for this legend. |
void |
setMinMax(double x,
double y)
Sets the min anx max values for the scale. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorScaleLegend(double a, double b, ColorScale c, java.awt.Font f, java.awt.FontMetrics fmet, java.lang.String l, java.lang.String fmt)
Method Detail |
---|
public ColorScale getColorScale()
public void setColorScale(ColorScale x)
public void setFormat(java.lang.String x)
public void setLabel(java.lang.String l)
setLabel
in interface Legend
public void setMinMax(double x, double y)
public void setFont(java.awt.Font f, java.awt.FontMetrics fmet)
setFont
in interface Legend
public int getWidth()
Legend
getWidth
in interface Legend
public int getHeight()
Legend
getHeight
in interface Legend
public void paintLegend(java.awt.Graphics g, int x, int y)
Legend
paintLegend
in interface Legend
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |