org.achartengine.tools
Class AbstractTool

java.lang.Object
  extended by org.achartengine.tools.AbstractTool
Direct Known Subclasses:
FitZoom, Pan, Zoom

public abstract class AbstractTool
extends java.lang.Object

Abstract class for being extended by graphical view tools.


Field Summary
protected  AbstractChart mChart
          The chart.
protected  XYMultipleSeriesRenderer mRenderer
          The renderer.
 
Constructor Summary
AbstractTool(AbstractChart chart)
          Abstract tool constructor.
 
Method Summary
 void checkRange(double[] range, int scale)
          Sets the range to the calculated one, if not already set.
 double[] getRange(int scale)
          Returns the current chart range.
protected  void setXRange(double min, double max, int scale)
          Sets a new range on the X axis.
protected  void setYRange(double min, double max, int scale)
          Sets a new range on the Y axis.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mChart

protected AbstractChart mChart
The chart.


mRenderer

protected XYMultipleSeriesRenderer mRenderer
The renderer.

Constructor Detail

AbstractTool

public AbstractTool(AbstractChart chart)
Abstract tool constructor.

Parameters:
chart - the chart
Method Detail

getRange

public double[] getRange(int scale)
Returns the current chart range.

Parameters:
scale - the scale
Returns:
the chart range

checkRange

public void checkRange(double[] range,
                       int scale)
Sets the range to the calculated one, if not already set.

Parameters:
range - the range
scale - the scale

setXRange

protected void setXRange(double min,
                         double max,
                         int scale)
Sets a new range on the X axis.

Parameters:
min - the minimum value
max - the maximum value
scale - the scale

setYRange

protected void setYRange(double min,
                         double max,
                         int scale)
Sets a new range on the Y axis.

Parameters:
min - the minimum value
max - the maximum value
scale - the scale


Copyright © 2009 - 2011 4ViewSoft. All Rights Reserved.