|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.graph.formatter.Formatter
org.faceless.graph.formatter.IntegerFormatter
public class IntegerFormatter
The IntegerFormatter is the default formatter that's used if none of the values on the graph contains any decimal places. It formats each argument as an integer, rounding down.
Field Summary |
---|
Fields inherited from class org.faceless.graph.formatter.Formatter |
---|
MINIMAL, NORMAL, SPARSE |
Constructor Summary | |
---|---|
IntegerFormatter()
Return a new IntegerFormatter using the Formatter.NORMAL density
settings. |
|
IntegerFormatter(int density)
Return a new IntegerFormatter of the specified density - Formatter.NORMAL , Formatter.SPARSE or Formatter.MINIMAL |
Method Summary | |
---|---|
String |
format(double in)
Return a String that is the formatted version of the input parameter. |
double[] |
steps(double min,
double max)
Which steps between min and max should be marked on the axis. |
Methods inherited from class org.faceless.graph.formatter.Formatter |
---|
isDiscrete, setDensity, setFixedEnds |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntegerFormatter()
Formatter.NORMAL
density
settings.
public IntegerFormatter(int density)
Formatter.NORMAL
, Formatter.SPARSE
or Formatter.MINIMAL
density
- the number of steps to display on the axisMethod Detail |
---|
public String format(double in)
Formatter
format
in class Formatter
public double[] steps(double min, double max)
Formatter
Which steps between min and max should be marked on the axis.
This is an array because although the steps will usually be
evenly spaced, they may not always be (see the DateFormatter
for an example).
This method returns the default settings, which is to calculate a number of "useful" values between min and max, possibly rounding those two values up or down to fit the scale. The number of values returned depends on the density setting.
steps
in class Formatter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |