|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jas.plot.AxisType | +--jas.plot.TimeAxis
An axis type for representing times.
Note that this is not the same as dates. A date represents a particular point in time (e.g., when an event took place). This axis represents time values, such as the time between two events. Therefore, while a date value may be represented as "Jan 31, 1994", a time value might be represented as "3 weeks".
DateAxis
, Serialized FormField Summary | |
static int |
DAYS
The integer code for day units. |
static int |
HOURS
The integer code for hour units. |
static int |
MILLISECONDS
The integer code for millisecond units. |
static int |
MINUTES
The integer code for minute units. |
static int |
MONTHS
The integer code for month units. |
static long |
OMIT
Set OMIT as the length of a time unit to have that unit not
considered as a candidate for axis units. |
static int |
SECONDS
The integer code for second units. |
static int |
WEEKS
The integer code for week units. |
static int |
YEARS
The integer code for year units. |
Fields inherited from class jas.plot.AxisType |
axis |
Constructor Summary | |
TimeAxis()
|
Method Summary | |
double |
convert(long time)
Returns a pixel value for a time value. |
long |
getAxisMax()
Returns the maximum value on the axis range. |
long |
getAxisMin()
Returns the minimum value on the axis range. |
long |
getDataMax()
Returns the maximum value on the axis range, as set by the method setMax(long) . |
long |
getDataMin()
Returns the minimum value on the data range, as set by the method setMin(long) . |
long |
getUnitLength(int unit)
Returns the number of milliseconds for this unit, or OMIT . |
java.lang.String |
getUnits()
Returns a string representation of the units showing on the axis. |
void |
readExternal(java.io.ObjectInput in)
|
void |
setMax(long max)
Sets the maximum value for the axis data. |
void |
setMin(long min)
Sets the minimum value for the axis data. |
void |
setUnitLength(int unit,
long length)
Allows units to be viewed as valued different from the default. |
void |
setUseSuggestedRange(boolean useSuggestedRange)
Sets whether this object should round the minimum down and the maximum up to make labels land exactly on the min and max of the axis range. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class jas.plot.AxisType |
getAxis |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MILLISECONDS
public static final int SECONDS
public static final int MINUTES
public static final int HOURS
public static final int DAYS
public static final int WEEKS
public static final int MONTHS
public static final int YEARS
public static final long OMIT
OMIT
as the length of a time unit to have that unit not
considered as a candidate for axis units.Constructor Detail |
public TimeAxis()
Method Detail |
public void setUnitLength(int unit, long length)
1000L * 60L * 60L * 24L * 365L
milliseconds,
but a call such as this may be desirable:setUnitLength(TimeAxis.YEARS, (long) (1000 * 60 * 60 * 24 * 365.24));
public long getUnitLength(int unit)
OMIT
.OMIT
public java.lang.String getUnits()
public void setUseSuggestedRange(boolean useSuggestedRange)
public void setMin(long min)
public void setMax(long max)
public long getAxisMin()
setUseSuggestedRange(boolean)
,
setMin(long)
,
getDataMin()
public long getAxisMax()
setUseSuggestedRange(boolean)
,
setMax(long)
,
getDataMax()
public long getDataMin()
setMin(long)
. This value may be
larger than the axis minimum if the axis has been told to use the
suggested range.setMin(long)
,
setUseSuggestedRange(boolean)
,
getAxisMin()
public long getDataMax()
setMax(long)
. This value may be
smaller than the axis maximum if the axis has been told to use the
suggested range.setMax(long)
,
setUseSuggestedRange(boolean)
,
getAxisMax()
public double convert(long time)
TimeCoordinateTransformation
convert
in interface TimeCoordinateTransformation
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |