Package de.gsi.chart.axes.spi
Class AxisRange
- java.lang.Object
-
- de.gsi.dataset.spi.DataRange
-
- de.gsi.chart.axes.spi.AxisRange
-
public class AxisRange extends de.gsi.dataset.spi.DataRangeHolds the range of the axis along withscaleand tick numbers format to be used.- Author:
- rstein
-
-
Field Summary
Fields Modifier and Type Field Description protected doubleaxisLengthprotected doublescaleprotected doubletickUnit
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(AxisRange range)Add the specified data range to this range.AxisRangecopy()booleanequals(java.lang.Object obj)doublegetAxisLength()doublegetLowerBound()doublegetScale()doublegetTickUnit()doublegetUpperBound()inthashCode()voidsetAxisLength(double length, Side side)Calculate a new scale for this axis.java.lang.StringtoString()
-
-
-
Constructor Detail
-
AxisRange
public AxisRange()
-
AxisRange
public AxisRange(AxisRange other)
-
AxisRange
public AxisRange(double lowerBound, double upperBound, double axisLength, double scale, double tickUnit)
-
-
Method Detail
-
add
public boolean add(AxisRange range)
Add the specified data range to this range.- Parameters:
range- range to be added- Returns:
- true if added range causes a change in range
-
copy
public AxisRange copy()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classde.gsi.dataset.spi.DataRange
-
getAxisLength
public double getAxisLength()
- Returns:
- the axis length in display (ie. pixel) units
-
getLowerBound
public double getLowerBound()
- Returns:
- the lower bound of the axis
-
getScale
public double getScale()
- Returns:
- the calculated
scale
-
getTickUnit
public double getTickUnit()
-
getUpperBound
public double getUpperBound()
- Returns:
- the upper bound of the axis
-
hashCode
public int hashCode()
- Overrides:
hashCodein classde.gsi.dataset.spi.DataRange
-
setAxisLength
public void setAxisLength(double length, Side side)Calculate a new scale for this axis. This should not effect any state(properties) of this axis.- Parameters:
length- The display length of the axisside- axis side
-
toString
public java.lang.String toString()
- Overrides:
toStringin classde.gsi.dataset.spi.DataRange
-
-