|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractGraduation
DateGraduation
public class DateGraduation
A graduation using dates 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 | |
|---|---|
DateGraduation(TimeZone timezone)
Constructs a graduation with the supplied time zone. |
|
DateGraduation(TimeZone timezone,
Unit<Duration> unit)
Constructs a graduation with the supplied time zone and unit. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object object)
Compares this graduation with the specified object for equality. |
DateFormat |
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 |
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. |
TimeZone |
getTimeZone()
Returns the timezone for this graduation. |
Unit<Duration> |
getUnit()
Returns the graduation's units, or null if unknown. |
int |
hashCode()
Returns a hash value for this graduation. |
boolean |
setMaximum(Date time)
Set the maximum value for this graduation. |
boolean |
setMaximum(double value)
Sets the maximum value as a real number. |
boolean |
setMinimum(Date time)
Set the minimum value for this graduation. |
boolean |
setMinimum(double value)
Sets the minimum value as a real number. |
void |
setTimeZone(TimeZone timezone)
Sets the time zone for this graduation. |
void |
setUnit(Unit<?> unit)
Changes the graduation units. |
| Methods inherited from class AbstractGraduation |
|---|
addPropertyChangeListener, getLocale, getTitle, removePropertyChangeListener, setLocale, setTitle, toString |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DateGraduation(TimeZone timezone)
timezone - The timezone.
public DateGraduation(TimeZone timezone,
Unit<Duration> unit)
timezone - The timezone.unit - The unit, or null if unknown. Must be compatible with
milliseconds.| Method Detail |
|---|
public Unit<Duration> getUnit()
null if unknown.
getUnit in interface GraduationgetUnit in class AbstractGraduationnull.public boolean setMinimum(Date time)
time - The new minimum.
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.setMaximum(Date)public boolean setMaximum(Date time)
time - The new maximum.
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.setMinimum(Date)public final boolean setMinimum(double value)
setMinimum(Date).
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.Graduation.getMinimum(),
AbstractGraduation.setMaximum(double)public final boolean setMaximum(double value)
setMaximum(Date).
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.Graduation.getMaximum(),
AbstractGraduation.setMinimum(double)public double getMinimum()
getUnit().
By default, it is the number of milliseconds elapsed since January 1st, 1970 at 00:00 UTC.
Graduation.getUnit() units.setMinimum(double),
getMaximum(),
getSpan()public double getMaximum()
getUnit().
By default, it is the number of milliseconds elapsed since January 1st, 1970 at 00:00 UTC.
Graduation.getUnit() units.setMaximum(double),
getMinimum(),
getSpan()public double getSpan()
getMaximum() - getMinimum(), but using integer arithmetic.
public TimeZone getTimeZone()
public void setTimeZone(TimeZone timezone)
timezone - The new timezone.
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 the specified unit is not a time unit.public DateFormat 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(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 | |||||||||