|
|||||||||
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.
用于计算日期类型的数据的坐标轴刻度值.Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static long |
ONE_HOUR_MILLSECONDS
1个小时的毫秒值. |
Constructor Summary | |
---|---|
DateTickUnit(DateTickUnitType unitType)
构造器. |
|
DateTickUnit(DateTickUnitType unitType,
java.text.DateFormat formatter)
构造器. |
Method Summary | |
---|---|
static DateTickUnitType |
calculateDateTickUnitType(double minMillis,
double maxMillis,
int maxCount)
计算日期值的刻度类型,返回值为类 DateTickUnitType 定义的常量值.
|
java.lang.Object |
clone()
Returns a clone of the object. |
boolean |
equals(java.lang.Object obj)
测试本对象是否和另一个对象相等. |
static java.text.DateFormat |
getDataFormatter(DateTickUnitType unitType)
根据日期的类型返回相应的 DateFormat .
|
java.text.DateFormat |
getDateFormatter()
返回格式化日期的类. |
java.lang.String[] |
getTickUnits(double minValue,
double maxValue,
int maxCount,
boolean includeZero)
根据最小值和最大值及数据的最大个数来确定坐标轴上的刻度值,刻度值都是整数. |
java.util.TimeZone |
getTimeZone()
返回时区. |
DateTickUnitType |
getUnitType()
返回日期的单位类型. |
int |
hashCode()
覆盖hashCode方法. |
void |
setDateFormatter(java.text.DateFormat dateFormatter)
设置格式化日期的类. |
void |
setTimeZone(java.util.TimeZone timeZone)
设置时区. |
void |
setUnitType(DateTickUnitType unitType)
设置日期的单位类型. |
java.lang.String |
toString()
覆盖toString方法. |
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 日期的单位类型,如果为null,则会自动选择.(可为null).
public DateTickUnit(DateTickUnitType unitType, java.text.DateFormat formatter)
unitType
- DateTickUnitType 日期的单位类型,如果为null,则会自动选择.(可为null).
formatter
- DateFormat 格式化日期的类,如果为null,则会自动选择.(不可为null).
Method Detail |
---|
public DateTickUnitType getUnitType()
public void setUnitType(DateTickUnitType unitType)
unitType
- DateTickUnitType 日期的单位类型 (可为null).
public java.text.DateFormat getDateFormatter()
public void setDateFormatter(java.text.DateFormat dateFormatter)
dateFormatter
- DateFormat 格式化日期的类 (不为null).
public java.util.TimeZone getTimeZone()
public void setTimeZone(java.util.TimeZone timeZone)
timeZone
- TimeZone 时区.
public java.lang.String[] getTickUnits(double minValue, double maxValue, int maxCount, boolean includeZero)
getTickUnits
in interface INumberTickUnit
minValue
- double 最小值.
maxValue
- double 最大值.
maxCount
- int 刻度值的最大个数,必须大于0.
includeZero
- boolean 布尔值,是否包含0值.此参数没有使用.
public static DateTickUnitType calculateDateTickUnitType(double minMillis, double maxMillis, int maxCount)
DateTickUnitType
定义的常量值.
minMillis
- double 小值.
maxMillis
- double 大值.
maxCount
- int 刻度值的最大个数,必须大于0.
public static java.text.DateFormat getDataFormatter(DateTickUnitType unitType)
DateFormat
.
unitType
- DateTickUnitType 日期的刻度类型 (不可为null).
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 |