Package de.gsi.chart.axes.spi
Class AxisRange
- java.lang.Object
-
- de.gsi.dataset.spi.DataRange
-
- de.gsi.chart.axes.spi.AxisRange
-
- All Implemented Interfaces:
java.lang.Cloneable
public class AxisRange extends de.gsi.dataset.spi.DataRangeHolds the range of the axis along withscaleand tick numbers format to be used.
-
-
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 voidadd(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.AxisRangesubstract(AxisRange range)Substracts the specified data range from this range.java.lang.StringtoString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classde.gsi.dataset.spi.DataRange
-
getLowerBound
public double getLowerBound()
- Returns:
- the lower bound of the axis
-
getUpperBound
public double getUpperBound()
- Returns:
- the upper bound of the axis
-
getAxisLength
public double getAxisLength()
- Returns:
- the axis length in display (ie. pixel) units
-
getScale
public double getScale()
- Returns:
- the calculated
scale
-
getTickUnit
public double getTickUnit()
-
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
-
add
public void add(AxisRange range)
Add the specified data range to this range.- Parameters:
range- range to be added
-
substract
public AxisRange substract(AxisRange range)
Substracts the specified data range from this range. TODO: check algorithm definiton- Parameters:
range- range to be subtracted- Returns:
- this axis with reduced limits
-
hashCode
public int hashCode()
- Overrides:
hashCodein classde.gsi.dataset.spi.DataRange
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classde.gsi.dataset.spi.DataRange
-
copy
public AxisRange copy()
-
-