public class SVGScoreBar
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.text.NumberFormat |
format
Number format, set to print the actual score
|
protected java.lang.String |
label
Label (on the right)
|
protected double |
max
Value, minimum and maximum values
|
protected double |
min
Value, minimum and maximum values
|
protected boolean |
reversed
Reversed flag.
|
protected double |
val
Value, minimum and maximum values
|
| Constructor and Description |
|---|
SVGScoreBar()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLabel(java.lang.String text)
Set label (right of the bar)
|
org.w3c.dom.Element |
build(SVGPlot svgp,
double x,
double y,
double width,
double height)
Build the actual element
|
void |
setFill(double val,
double min,
double max)
Set the fill of the score bar.
|
void |
setReversed(boolean reversed)
Set the reversed flag.
|
void |
showValues(java.text.NumberFormat format)
To show score values, set a number format
|
protected double val
protected double min
protected double max
protected boolean reversed
protected java.lang.String label
private java.text.NumberFormat format
public void setFill(double val,
double min,
double max)
val - Valuemin - Minimum valuemax - Maximum valuepublic void setReversed(boolean reversed)
reversed - Reversed flag.public void addLabel(java.lang.String text)
text - Label textpublic void showValues(java.text.NumberFormat format)
format - Number formatpublic org.w3c.dom.Element build(SVGPlot svgp, double x, double y, double width, double height)
svgp - Plot to draw tox - X coordinatey - Y coordinatewidth - Widthheight - HeightCopyright © 2019 ELKI Development Team. License information.