|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.axis.AbstractGraduation org.geotools.axis.DateGraduation
A graduation using dates on a linear axis.
Field Summary | |
static javax.units.Unit |
MILLISECOND
The unit for millisecond. |
Fields inherited from class org.geotools.axis.AbstractGraduation |
listenerList |
Fields inherited from interface org.geotools.axis.Graduation |
AXIS_TITLE_FONT, TICK_LABEL_FONT, VISUAL_AXIS_LENGTH, VISUAL_TICK_SPACING |
Constructor Summary | |
DateGraduation(java.util.TimeZone timezone)
Construct a graduation with the supplied time zone. |
|
DateGraduation(java.util.TimeZone timezone,
javax.units.Unit unit)
Construct a graduation with the supplied time zone and unit. |
Method Summary | |
boolean |
equals(java.lang.Object object)
Compares this graduation with the specified object for equality. |
java.text.Format |
getFormat()
Returns the format to use for formatting 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.util.TimeZone |
getTimeZone()
Returns the timezone for this graduation. |
int |
hashCode()
Returns a hash value for this graduation. |
boolean |
setMaximum(java.util.Date time)
Set the maximum value for this graduation. |
boolean |
setMaximum(double value)
Set the maximum value as a real number. |
boolean |
setMinimum(java.util.Date time)
Set the minimum value for this graduation. |
boolean |
setMinimum(double value)
Set the minimum value as a real number. |
void |
setTimeZone(java.util.TimeZone timezone)
Sets the time zone for this graduation. |
void |
setUnit(javax.units.Unit unit)
Changes the graduation's units. |
Methods inherited from class org.geotools.axis.AbstractGraduation |
addPropertyChangeListener, getLocale, getTitle, getUnit, removePropertyChangeListener, setLocale, setTitle |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final javax.units.Unit MILLISECOND
Constructor Detail |
public DateGraduation(java.util.TimeZone timezone)
timezone
- The timezone.public DateGraduation(java.util.TimeZone timezone, javax.units.Unit unit) throws javax.units.ConversionException
timezone
- The timezone.unit
- The unit. Must be compatible with milliseconds.
javax.units.ConversionException
- if the supplied unit is not a time unit.Method Detail |
public boolean setMinimum(java.util.Date time)
time
- The new minimum.
setMaximum(Date)
public boolean setMaximum(java.util.Date time)
time
- The new maximum.
setMinimum(Date)
public final boolean setMinimum(double value)
setMinimum(Date)
.
setMinimum
in class AbstractGraduation
value
- The new minimum in AbstractGraduation.getUnit()
units.
Graduation.getMinimum()
,
AbstractGraduation.setMaximum(double)
public final boolean setMaximum(double value)
setMaximum(Date)
.
setMaximum
in class AbstractGraduation
value
- The new maximum in AbstractGraduation.getUnit()
units.
Graduation.getMaximum()
,
AbstractGraduation.setMinimum(double)
public double getMinimum()
AbstractGraduation.getUnit()
.
By default, it is the number of millisecondes ellapsed since January 1st, 1970 at 00:00 UTC.
Graduation.getUnit()
units.setMinimum(double)
,
getMaximum()
,
getRange()
public double getMaximum()
AbstractGraduation.getUnit()
.
By default, it is the number of millisecondes ellapsed since January 1st, 1970 at 00:00 UTC.
Graduation.getUnit()
units.setMaximum(double)
,
getMinimum()
,
getRange()
public double getRange()
getMaximum()
-getMinimum()
, but using integer arithmetic.
public java.util.TimeZone getTimeZone()
public void setTimeZone(java.util.TimeZone timezone)
public void setUnit(javax.units.Unit unit) throws javax.units.ConversionException
setUnit
in class AbstractGraduation
unit
- The new units, or if unknow. If null, minimum and maximum values
are not converted.
javax.units.ConversionException
- if the specified unit is not a time unit.public java.text.Format getFormat()
TickIterator.currentLabel()
may not be the same. For example, some
iterators may choose to show or hide hours, minutes and seconds.
public TickIterator getTickIterator(java.awt.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 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 boolean equals(java.lang.Object object)
equals
in class AbstractGraduation
public int hashCode()
hashCode
in class AbstractGraduation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |