lt.monarch.chart.mapper
Class SimpleAxisMapperRange

java.lang.Object
  extended by lt.monarch.chart.mapper.AbstractAxisMapperRange
      extended by lt.monarch.chart.mapper.SimpleAxisMapperRange
All Implemented Interfaces:
java.io.Serializable, AxisMapperRange, Range<java.lang.Double>

public class SimpleAxisMapperRange
extends AbstractAxisMapperRange

Default simple implementation of the mapper range

See Also:
Serialized Form

Constructor Summary
Constructor and Description
SimpleAxisMapperRange()
          Constructs a new SimpleAxisMapperRange object with the minimum 0 and extent 1.
 
Method Summary
Modifier and Type Method and Description
 java.lang.Double getMaximum()
          Returns the range maximum.
 java.lang.Double getMinimum()
          Returns the range minimum.
 boolean isMoreZoomAvailable()
          Returns true if the axis can more zoom, false otherwise.
 void setExtent(double ext)
          Sets the range extent.
 void setMinimum(double min)
          Sets the range minimum.
 void setRange(double min, double max)
          Sets the range minimum and maximum to the specified values.
 java.lang.String toString()
          Returns the string representation of this SimpleAxisMapperRange object.
 
Methods inherited from class lt.monarch.chart.mapper.AbstractAxisMapperRange
addListener, fireRangeAdjusting, fireRangeChanged, fireRangeShifted, isAdjusting, removeListener, setIsAdjusting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleAxisMapperRange

public SimpleAxisMapperRange()
Constructs a new SimpleAxisMapperRange object with the minimum 0 and extent 1.

Method Detail

getMinimum

public java.lang.Double getMinimum()
Returns the range minimum.

Returns:
the range minimum

getMaximum

public java.lang.Double getMaximum()
Returns the range maximum. Maximum for the range is calculated as: minimum + extent

Returns:
the range maximum

setMinimum

public void setMinimum(double min)
Sets the range minimum. If min < 0, then the range minimum is set to 0. If min+extent > 1, then the range minimum is set to 1-extent.

Parameters:
min - the new range minimum

setExtent

public void setExtent(double ext)
Sets the range extent. If ext < 0, then the range extent is set to 0. If minimum+ext > 1, then the the extent is set to 1-minimum.

Parameters:
ext - the new range extent

setRange

public void setRange(double min,
                     double max)
Sets the range minimum and maximum to the specified values. If needed the range minimum and maximum are corrected so that: 0 <= minimum <= maximum <= 1

Parameters:
min - the new range minimum
max - the new range maximum

toString

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

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this object

isMoreZoomAvailable

public boolean isMoreZoomAvailable()
Description copied from interface: AxisMapperRange
Returns true if the axis can more zoom, false otherwise.

Returns:
true, if is more zoom available. false otherwise