|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An axis's graduation. A object encompass minimal
and maximal values for an axis in arbitrary units, and allow access to
tick locations and labels through a TickIterator
object.
Different implementations may compute tick locations in different ways.
For example a graduation for dates is handled in a different way than a
graduation for numbers.
Field Summary | |
static java.awt.RenderingHints.Key |
AXIS_TITLE_FONT
The font to use for rendering the title. |
static java.awt.RenderingHints.Key |
TICK_LABEL_FONT
The font to use for rendering tick labels. |
static java.awt.RenderingHints.Key |
VISUAL_AXIS_LENGTH
Rendering hint for the axis length, in pixels or points (1/72 of inch). |
static java.awt.RenderingHints.Key |
VISUAL_TICK_SPACING
Rendering hint for the preferred spacing between ticks, in pixels or points (1/72 of inch). |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.
|
java.text.Format |
getFormat()
Returns the format to use for formatting labels. |
java.util.Locale |
getLocale()
Returns the locale to use for formatting title and labels. |
double |
getMaximum()
Returns the maximal value for this graduation. |
double |
getMinimum()
Returns the minimal value for this graduation. |
double |
getRange()
Returns the graduation's range. |
TickIterator |
getTickIterator(java.awt.RenderingHints hints,
TickIterator reuse)
Returns an iterator object that iterates along the graduation ticks and provides access to the graduation values. |
java.lang.String |
getTitle(boolean includeSymbol)
Returns the axis title. |
javax.units.Unit |
getUnit()
Returns the graduation's units, or if unknow. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
Field Detail |
public static final java.awt.RenderingHints.Key VISUAL_AXIS_LENGTH
Number
objects. This hint is used
together with VISUAL_TICK_SPACING
during TickIterator
creation in order to compute a tick increment value.
getTickIterator(java.awt.RenderingHints, org.geotools.axis.TickIterator)
public static final java.awt.RenderingHints.Key VISUAL_TICK_SPACING
Number
objects. This hint
is used together with VISUAL_AXIS_LENGTH
during TickIterator
creation in order to compute a tick increment value. The tick spacing really
used may be slightly different, since TickIterator
may choose a rounded
value.
getTickIterator(java.awt.RenderingHints, org.geotools.axis.TickIterator)
public static final java.awt.RenderingHints.Key TICK_LABEL_FONT
Font
object. If this hint is not provided, a default font will be used.
Axis2D.paint(java.awt.Graphics2D)
public static final java.awt.RenderingHints.Key AXIS_TITLE_FONT
Font
object.
If this hint is not provided, a default font will be used.
Axis2D.paint(java.awt.Graphics2D)
Method Detail |
public double getMinimum()
getUnit()
units.getMaximum()
,
getRange()
public double getMaximum()
getUnit()
units.getMinimum()
,
getRange()
public double getRange()
getMaximum()
-getMinimum()
. However, some
implementation may optimize this computation in order to avoid rounding errors.
public java.lang.String getTitle(boolean includeSymbol)
includeSymbol
- to format the unit or timezone symbol after the name.
public javax.units.Unit getUnit()
public java.util.Locale getLocale()
public java.text.Format getFormat()
TickIterator.currentLabel()
may not be the same. For example, some
iterators may adjust automatically the number of fraction digits.
public TickIterator getTickIterator(java.awt.RenderingHints hints, TickIterator reuse)
RenderingHints
is specified, tick locations are
adjusted according values for VISUAL_AXIS_LENGTH
and VISUAL_TICK_SPACING
keys.
hints
- Rendering hints for the axis, or for the default hints.reuse
- An iterator to reuse if possible, or to create a new one. A
non-null object may help to reduce the number of object garbage-collected when
rendering the axis.
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
to the listener list.
The listener is registered for all properties, such as "label"
and "locale".
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
from the listener list.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |