|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.tickunit.DateTickUnit
public class DateTickUnit
Title: IJChart
Description: a chart library for the Java(tm) platform.
Calculate the tick unit for date data.Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static long |
ONE_HOUR_MILLSECONDS
The millisecond of 1 hour. |
Constructor Summary | |
---|---|
DateTickUnit(DateTickUnitType unitType)
Constructor. |
|
DateTickUnit(DateTickUnitType unitType,
java.text.DateFormat formatter)
Constructor. |
Method Summary | |
---|---|
static DateTickUnitType |
calculateDateTickUnitType(double minMillis,
double maxMillis,
int maxCount)
Calculate the tick unit type of date value,the unit is constant value defined in class DateTickUnitType . |
java.lang.Object |
clone()
Returns a clone of the object. |
boolean |
equals(java.lang.Object obj)
Tests the axis for equality with an arbitrary object. |
static java.text.DateFormat |
getDataFormatter(DateTickUnitType unitType)
Returns the DateFormat by date unit type. |
java.text.DateFormat |
getDateFormatter()
Returns the date formatter. |
java.lang.String[] |
getTickUnits(double minValue,
double maxValue,
int maxCount,
boolean includeZero)
According to the minimum and maximum data and the largest number of coordinates to determine the scale of axis,all values are integer. |
java.util.TimeZone |
getTimeZone()
Returns the time zone. |
DateTickUnitType |
getUnitType()
Returns the unit type of date. |
int |
hashCode()
Returns a hash code value for the object. |
void |
setDateFormatter(java.text.DateFormat dateFormatter)
Sets the date formatter. |
void |
setTimeZone(java.util.TimeZone timeZone)
Sets the time zone. |
void |
setUnitType(DateTickUnitType unitType)
Sets the unit type of date. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long ONE_HOUR_MILLSECONDS
Constructor Detail |
---|
public DateTickUnit(DateTickUnitType unitType)
unitType
- DateTickUnitType
The unit type of date,the unit type will be auto select for null value.(null permitted).public DateTickUnit(DateTickUnitType unitType, java.text.DateFormat formatter)
unitType
- DateTickUnitType
The unit type of date,the unit type will be auto select for null value.(null permitted).formatter
- DateFormat
The date formatter,the unit type will be auto select for null value.(null not permitted).Method Detail |
---|
public DateTickUnitType getUnitType()
public void setUnitType(DateTickUnitType unitType)
unitType
- DateTickUnitType
The unit type of date (maybe null).public java.text.DateFormat getDateFormatter()
public void setDateFormatter(java.text.DateFormat dateFormatter)
dateFormatter
- DateFormat
The date formatter (never null).public java.util.TimeZone getTimeZone()
public void setTimeZone(java.util.TimeZone timeZone)
timeZone
- TimeZone
The time zone.public java.lang.String[] getTickUnits(double minValue, double maxValue, int maxCount, boolean includeZero)
getTickUnits
in interface INumberTickUnit
minValue
- double
The minimum value.maxValue
- double
The max value.maxCount
- int
The maximum count of tick units (must great than 0).includeZero
- boolean
A boolean flag indicates whether or not include zero value.This parameter is not used.
public static DateTickUnitType calculateDateTickUnitType(double minMillis, double maxMillis, int maxCount)
DateTickUnitType
.
minMillis
- double
The minimum value.maxMillis
- double
The maximum value.maxCount
- int
The maximum count of tick units (must great than 0).
public static java.text.DateFormat getDataFormatter(DateTickUnitType unitType)
DateFormat
by date unit type.
unitType
- DateTickUnitType
The date tick unit type (null not permitted).
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object (null permitted).
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if some component of the axis does
not support cloning.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |