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.

Calculate the tick unit for number data and all values is logarithmic.

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
           The default logarithm base.
 
Constructor Summary
LogTickUnit()
           A default constructor.
LogTickUnit(boolean notUseFlag, double step)
           A constructor.
LogTickUnit(double logarithmBase, boolean notUseFlag)
           A constructor.
LogTickUnit(double logarithmBase, double step)
           A constructor.
 
Method Summary
 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.
 double getBaseLogValue()
           Returns the log value for base logarithm.
 java.lang.String[] getExponentLabels()
           Returns the exponent labels.
 double getLogarithmBase()
           Returns the logarithm base.
 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 double.
 int hashCode()
           Returns a hash code value for the object.
 java.lang.String toString()
           Returns a string representation of the object.
 
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
The default logarithm base.

See Also:
Constant Field Values
Constructor Detail

LogTickUnit

public LogTickUnit()
A default constructor.


LogTickUnit

public LogTickUnit(double logarithmBase,
                   boolean notUseFlag)
A constructor.

Parameters:
logarithmBase - double The logarithm base,must be greater than 1.
notUseFlag - A boolean.

LogTickUnit

public LogTickUnit(boolean notUseFlag,
                   double step)
A constructor.

Parameters:
notUseFlag - A boolean.
step - double The step.

LogTickUnit

public LogTickUnit(double logarithmBase,
                   double step)
A constructor.

Parameters:
logarithmBase - double The logarithm base,must be greater than 1.
step - double The step.
Method Detail

getLogarithmBase

public double getLogarithmBase()
Returns the logarithm base.

Returns:
double The logarithm base.

getBaseLogValue

public double getBaseLogValue()
Returns the log value for base logarithm.

Returns:
double The log value for base logarithm.

getExponentLabels

public java.lang.String[] getExponentLabels()
Returns the exponent labels.

Returns:
String[] The exponent labels (maybe null).

getTickUnits

public 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 double.

Specified by:
getTickUnits in interface INumberTickUnit
Overrides:
getTickUnits in class DoubleTickUnit
Parameters:
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.
Returns:
String[] An array of tick units,the values are sorted ascending. All elements in array is number (never null).

equals

public boolean equals(java.lang.Object obj)
Tests the axis for equality with an arbitrary object.

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()
Returns a hash code value for the object.

Overrides:
hashCode in class DoubleTickUnit
Returns:
A hash code value for this object.

toString

public java.lang.String toString()
Returns a string representation of the object.

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