org.achartengine
Class TouchHandler

java.lang.Object
  extended by org.achartengine.TouchHandler
All Implemented Interfaces:
ITouchHandler

public class TouchHandler
extends java.lang.Object
implements ITouchHandler

The main handler of the touch events.


Constructor Summary
TouchHandler(GraphicalView view, AbstractChart chart)
          Creates a new graphical view.
 
Method Summary
 void addPanListener(PanListener listener)
          Adds a new pan listener.
 void addZoomListener(ZoomListener listener)
          Adds a new zoom listener.
 boolean handleTouch(android.view.MotionEvent event)
          Handles the touch event.
 void removePanListener(PanListener listener)
          Removes a pan listener.
 void removeZoomListener(ZoomListener listener)
          Removes a zoom listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TouchHandler

public TouchHandler(GraphicalView view,
                    AbstractChart chart)
Creates a new graphical view.

Parameters:
view - the graphical view
chart - the chart to be drawn
Method Detail

handleTouch

public boolean handleTouch(android.view.MotionEvent event)
Handles the touch event.

Specified by:
handleTouch in interface ITouchHandler
Parameters:
event - the touch event
Returns:
true if the event was handled

addZoomListener

public void addZoomListener(ZoomListener listener)
Adds a new zoom listener.

Specified by:
addZoomListener in interface ITouchHandler
Parameters:
listener - zoom listener

removeZoomListener

public void removeZoomListener(ZoomListener listener)
Removes a zoom listener.

Specified by:
removeZoomListener in interface ITouchHandler
Parameters:
listener - zoom listener

addPanListener

public void addPanListener(PanListener listener)
Adds a new pan listener.

Specified by:
addPanListener in interface ITouchHandler
Parameters:
listener - pan listener

removePanListener

public void removePanListener(PanListener listener)
Removes a pan listener.

Specified by:
removePanListener in interface ITouchHandler
Parameters:
listener - pan listener


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