com.ijchart.xychart.tickunit
Class LogTickUnit

java.lang.Object
  extended by com.ijchart.xychart.tickunit.DoubleTickUnit
      extended by com.ijchart.xychart.tickunit.LogTickUnit
All Implemented Interfaces:
INumberTickUnit, java.io.Serializable, java.lang.Cloneable

public class LogTickUnit
extends DoubleTickUnit
implements java.lang.Cloneable, java.io.Serializable

Title: IJChart

Description: a chart library for the Java(tm) platform.

用于计算对数数字类型的数据的坐标轴刻度值.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Field Summary
static double DEFAULT_LOGARITHM_BASE
          缺省的对数基数.
 
Constructor Summary
LogTickUnit()
          缺省构造器.
LogTickUnit(boolean notUseFlag, double step)
          构造器.
LogTickUnit(double logarithmBase, boolean notUseFlag)
          构造器.
LogTickUnit(double logarithmBase, double step)
          构造器.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the object.
 boolean equals(java.lang.Object obj)
          测试本对象是否和另一个对象相等.
 double getBaseLogValue()
          返回基数的log值.
 java.lang.String[] getExponentLabels()
          返回指数标签.
 double getLogarithmBase()
          返回对数基数.
 java.lang.String[] getTickUnits(double minValue, double maxValue, int maxCount, boolean includeZero)
          根据最小值和最大值及数据的最大个数来确定坐标轴上的刻度值,刻度值都是double类型的浮点数.
 int hashCode()
          覆盖hashCode方法.
 java.lang.String toString()
          覆盖toString方法.
 
Methods inherited from class com.ijchart.xychart.tickunit.DoubleTickUnit
getStep
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_LOGARITHM_BASE

public static final double DEFAULT_LOGARITHM_BASE
缺省的对数基数.

See Also:
Constant Field Values
Constructor Detail

LogTickUnit

public LogTickUnit()
缺省构造器.


LogTickUnit

public LogTickUnit(double logarithmBase,
                   boolean notUseFlag)
构造器.

Parameters:
logarithmBase - double 对数基数,须大于1.
notUseFlag - 布尔值.

LogTickUnit

public LogTickUnit(boolean notUseFlag,
                   double step)
构造器.

Parameters:
notUseFlag - 布尔值.
step - double 步长.

LogTickUnit

public LogTickUnit(double logarithmBase,
                   double step)
构造器.

Parameters:
logarithmBase - double 对数基数,须大于1.
step - double 步长.
Method Detail

getLogarithmBase

public double getLogarithmBase()
返回对数基数.

Returns:
double 对数基数.

getBaseLogValue

public double getBaseLogValue()
返回基数的log值.

Returns:
double 基数的log值.

getExponentLabels

public java.lang.String[] getExponentLabels()
返回指数标签.

Returns:
String[] 指数标签 (可为null).

getTickUnits

public java.lang.String[] getTickUnits(double minValue,
                                       double maxValue,
                                       int maxCount,
                                       boolean includeZero)
根据最小值和最大值及数据的最大个数来确定坐标轴上的刻度值,刻度值都是double类型的浮点数.

Specified by:
getTickUnits in interface INumberTickUnit
Overrides:
getTickUnits in class DoubleTickUnit
Parameters:
minValue - double 最小值.
maxValue - double 最大值.
maxCount - int 刻度值的最大个数,必须大于0.
includeZero - boolean 布尔值,是否包含0值.
Returns:
String[] 刻度值非空数组,且值按由小到大的顺序排列,数组的每个元素都是数字,(不可为null).

equals

public boolean equals(java.lang.Object obj)
测试本对象是否和另一个对象相等.

Overrides:
equals in class DoubleTickUnit
Parameters:
obj - the object (null permitted).
Returns:
true or false.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the object.

Overrides:
clone in class DoubleTickUnit
Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - if some component of the axis does not support cloning.

hashCode

public int hashCode()
覆盖hashCode方法.

Overrides:
hashCode in class DoubleTickUnit
Returns:
hashcode值.

toString

public java.lang.String toString()
覆盖toString方法.

Overrides:
toString in class DoubleTickUnit
Returns:
A string representation of the object.