|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Graduation
An axis's graduation. A Graduation
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 RenderingHints.Key |
AXIS_TITLE_FONT
The font to use for rendering the title. |
static RenderingHints.Key |
TICK_LABEL_FONT
The font to use for rendering tick labels. |
static RenderingHints.Key |
VISUAL_AXIS_LENGTH
Rendering hint for the axis length, in pixels or points (1/72 of inch). |
static 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(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
Format |
getFormat()
Returns the format to use for formatting labels. |
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(RenderingHints hints,
TickIterator reuse)
Returns an iterator object that iterates along the graduation ticks and provides access to the graduation values. |
String |
getTitle(boolean includeSymbol)
Returns the axis title. |
Unit<?> |
getUnit()
Returns the graduation's units, or null if unknow. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
Field Detail |
---|
static final 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)
static final 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)
static final RenderingHints.Key TICK_LABEL_FONT
Font
object. If this hint is not provided, a default font will be used.
Axis2D.paint(java.awt.Graphics2D)
static final 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 |
---|
double getMinimum()
getUnit()
units.getMaximum()
,
getRange()
double getMaximum()
getUnit()
units.getMinimum()
,
getRange()
double getRange()
getMaximum()
-getMinimum()
. However, some
implementation may optimize this computation in order to avoid rounding errors.
String getTitle(boolean includeSymbol)
includeUnits
is true
, then the returned string
will includes units as in "Temperature (°C)", or time zone as in "Start time (UTC)". The
exact formatting is local-dependent.
includeSymbol
- true
to format the unit or timezone symbol after the name.
Unit<?> getUnit()
null
if unknow.
null
.Locale getLocale()
Format getFormat()
TickIterator.currentLabel()
may not be the same. For example, some
iterators may adjust automatically the number of fraction digits.
TickIterator getTickIterator(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 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.void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener
to the listener list.
The listener is registered for all properties, such as "label"
and "locale".
listener
- The listener to add.void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener
from the listener list.
listener
- The listener to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |