|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ijchart.xychart.range.NumberRange
public class NumberRange
Title: IJChart
Description: a chart library for the Java(tm) platform.
Represents an immutable range of values.Copyright: Copyright (c) 2013
Company:
| Field Summary | |
|---|---|
static NumberRange |
RANGE_ZERO
The NumberRange object with lower and upper value both 0. |
| Constructor Summary | |
|---|---|
NumberRange(double lower,
double upper)
Creates a new range. |
|
| Method Summary | |
|---|---|
protected java.lang.Object |
clone()
Creates and returns a copy of this object. |
boolean |
contains(double value)
Returns true if the range contains the specified value and false otherwise. |
boolean |
equals(java.lang.Object obj)
Tests this object for equality with an arbitrary object. |
double |
getCentralValue()
Returns the central value for the range. |
double |
getLength()
Returns the length of the range. |
double |
getLowerBound()
Returns the lower bound for the range. |
double |
getUpperBound()
Returns the upper bound for the range. |
int |
hashCode()
Returns a hash code. |
NumberRange |
resizeRange(double percent)
Increases or decreases the range by the specified percentage about the specified anchor value. |
NumberRange |
resizeRange(double percent,
double anchorValue)
Increases or decreases the range by the specified percentage about the specified anchor value. |
NumberRange |
resizeRange2(double percent,
double anchorValue)
Increases or decreases the range by the specified percentage about the specified anchor value. |
java.lang.String |
toString()
Returns a string representation of this Range. |
NumberRange |
zoomRange(double lowerPercent,
double upperPercent,
boolean invert)
Zooms in on the current range. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final NumberRange RANGE_ZERO
| Constructor Detail |
|---|
public NumberRange(double lower,
double upper)
lower -
The lower bound (must be <= upper bound).upper -
The upper bound (must be >= lower bound).| Method Detail |
|---|
public double getLowerBound()
public double getUpperBound()
public double getLength()
public double getCentralValue()
public boolean contains(double value)
value - double
The value.
public NumberRange resizeRange(double percent)
To double the length of the axis range, use 200% (2.0). To halve the length of the axis range, use 50% (0.5).
percent - double
The resize factor.
public NumberRange resizeRange(double percent,
double anchorValue)
To double the length of the axis range, use 200% (2.0). To halve the length of the axis range, use 50% (0.5).
percent - double
The resize factor.anchorValue - double
the new central value after the resize.
public NumberRange resizeRange2(double percent,
double anchorValue)
To double the length of the axis range, use 200% (2.0). To halve the length of the axis range, use 50% (0.5).
percent - double
The resize factor.anchorValue - double
the new central value after the resize.
public NumberRange zoomRange(double lowerPercent,
double upperPercent,
boolean invert)
lowerPercent - double
The new lower bound.upperPercent - double
The new upper bound.invert - boolean
Whether or not the axis is invert.
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj -
The object to test against (null permitted).
public int hashCode()
hashCode in class java.lang.Object
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic 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 | ||||||||