|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractGraduation
NumberGraduation
public class NumberGraduation
A graduation using numbers on a linear axis.
| display/geotk-display (download) | View source code for this class |
| Field Summary |
|---|
| Fields inherited from class AbstractGraduation |
|---|
listenerList |
| Fields inherited from interface Graduation |
|---|
AXIS_TITLE_FONT, TICK_LABEL_FONT, VISUAL_AXIS_LENGTH, VISUAL_TICK_SPACING |
| Constructor Summary | |
|---|---|
NumberGraduation(Unit<?> unit)
Constructs a graduation with the supplied units. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object object)
Compares this graduation with the specified object for equality. |
NumberFormat |
getFormat()
Returns the format used for formatting labels. |
double |
getMaximum()
Returns the maximal value for this graduation. |
double |
getMinimum()
Returns the minimal value for this graduation |
double |
getSpan()
Returns the graduation's range. |
TickIterator |
getTickIterator(RenderingHints hints,
TickIterator reuse)
Returns an iterator object that iterates along the graduation ticks and provides access to the graduation values. |
int |
hashCode()
Returns a hash value for this graduation. |
void |
setFormat(NumberFormat format)
Sets the format used for formatting labels. |
boolean |
setMaximum(double value)
Sets the maximum value for this graduation. |
boolean |
setMinimum(double value)
Sets the minimum value for this graduation. |
void |
setRange(double min,
double max,
Unit<?> unit)
Sets the graduation's minimum, maximum and units. |
void |
setUnit(Unit<?> unit)
Changes the graduation's units. |
| Methods inherited from class AbstractGraduation |
|---|
addPropertyChangeListener, getLocale, getTitle, getUnit, removePropertyChangeListener, setLocale, setTitle, toString |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NumberGraduation(Unit<?> unit)
unit - The axis's units, or null if unknown.| Method Detail |
|---|
public boolean setMinimum(double value)
throws IllegalArgumentException
setMinimum in class AbstractGraduationvalue - The new minimum in AbstractGraduation.getUnit() units.
true if the state of this graduation changed as a result of this call,
or false if the new value is identical to the previous one.
IllegalArgumentException - Si value is NaN ou infinite.getMinimum(),
setMaximum(double)
public boolean setMaximum(double value)
throws IllegalArgumentException
setMaximum in class AbstractGraduationvalue - The new maximum in AbstractGraduation.getUnit() units.
true if the state of this graduation changed as a result of this call,
or false if the new value is identical to the previous one.
IllegalArgumentException - If value is NaN ou infinite.getMaximum(),
setMinimum(double)public double getMinimum()
AbstractGraduation.getUnit() units.setMinimum(double),
getMaximum(),
getSpan()public double getMaximum()
AbstractGraduation.getUnit() units.setMaximum(double),
getMinimum(),
getSpan()public double getSpan()
getMaximum() - getMinimum().
public void setRange(double min,
double max,
Unit<?> unit)
"minimum", "maximum" and "unit" property names.
min - The minimal value in the graduation.max - The maximal value in the graduation.unit - The graduation unit.
public void setUnit(Unit<?> unit)
throws IllegalArgumentException
setUnit in class AbstractGraduationunit - The new units, or null if unknown.
If null, minimum and maximum values are not converted.
IllegalArgumentException - if units are not convertible.public NumberFormat getFormat()
TickIterator.currentLabel()
method will use a copy of this format configured in the same way except for the number
of fraction digits, which will be calculated automatically.
This method returns a direct reference to the format used internally - not a clone.
If the returned format is changed, then the changes will be reflected in the next
tick iterations except for the properties that are automatically calculated. Note
however that it is advisable to invoke setFormat(NumberFormat) after a
change in order to keep the listener list informed.
public void setFormat(NumberFormat format)
format - The new format.
public TickIterator getTickIterator(RenderingHints hints,
TickIterator reuse)
RenderingHints is specified, tick locations are
adjusted according values for Graduation.VISUAL_AXIS_LENGTH and Graduation.VISUAL_TICK_SPACING
keys.
hints - Rendering hints, or null for the default hints.reuse - An iterator to reuse if possible, or null to create a new one. A
non-null object may help to reduce the number of object garbage-collected when
rendering the axis.
reuse object.public boolean equals(Object object)
equals in class AbstractGraduationobject - The object to compare with.
true if this graduation is equal to the given object.public int hashCode()
hashCode in class AbstractGraduation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||