public class NumberTickUnitSource extends java.lang.Object implements TickUnitSource, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private java.text.DecimalFormat |
df |
private java.text.DecimalFormat |
df0 |
private java.text.DecimalFormat |
dfNeg1 |
private java.text.DecimalFormat |
dfNeg2 |
private java.text.DecimalFormat |
dfNeg3 |
private java.text.DecimalFormat |
dfNeg4 |
private int |
factor |
private java.text.NumberFormat |
formatter
The number formatter to use (an override, it can be null).
|
private boolean |
integers |
private int |
power |
| Constructor and Description |
|---|
NumberTickUnitSource()
Creates a new instance.
|
NumberTickUnitSource(boolean integers)
Creates a new instance.
|
NumberTickUnitSource(boolean integers,
java.text.NumberFormat formatter)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
TickUnit |
getCeilingTickUnit(double size)
Returns the smallest tick unit available in the source that is greater
than or equal to the specified size.
|
TickUnit |
getCeilingTickUnit(TickUnit unit)
Returns the tick unit in the collection that is greater than or equal
to (in size) the specified unit.
|
TickUnit |
getLargerTickUnit(TickUnit unit)
Returns the smallest tick unit available in the source that is larger
than
unit or, if there is no larger unit, returns
unit. |
private int |
getMinorTickCount() |
private java.text.NumberFormat |
getTickLabelFormat() |
private double |
getTickSize() |
private boolean |
next() |
private boolean |
previous() |
private boolean integers
private int power
private int factor
private java.text.NumberFormat formatter
private java.text.DecimalFormat dfNeg4
private java.text.DecimalFormat dfNeg3
private java.text.DecimalFormat dfNeg2
private java.text.DecimalFormat dfNeg1
private java.text.DecimalFormat df0
private java.text.DecimalFormat df
public NumberTickUnitSource()
public NumberTickUnitSource(boolean integers)
integers - show integers only.public NumberTickUnitSource(boolean integers,
java.text.NumberFormat formatter)
integers - show integers only?formatter - a formatter for the axis tick labels (null
permitted).public TickUnit getLargerTickUnit(TickUnit unit)
TickUnitSourceunit or, if there is no larger unit, returns
unit.getLargerTickUnit in interface TickUnitSourceunit - the unit (null not permitted).public TickUnit getCeilingTickUnit(TickUnit unit)
TickUnitSourcegetCeilingTickUnit in interface TickUnitSourceunit - the unit.public TickUnit getCeilingTickUnit(double size)
TickUnitSourcegetCeilingTickUnit in interface TickUnitSourcesize - the size.null).private boolean next()
private boolean previous()
private double getTickSize()
private java.text.NumberFormat getTickLabelFormat()
private int getMinorTickCount()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Object