| AndBase开发框架 1.6

- 首页
- 相关页面
- 命名空间
- 类
- 文件

- 类列表
- 类索引
- 类继承关系
- 类成员

全部 类 命名空间 文件 函数 变量 枚举值 页
Public 成员函数 | Private 属性 | 所有成员列表
com.ab.view.chart.TouchHandler类 参考
类 com.ab.view.chart.TouchHandler 继承关系图:

## Public 成员函数
| TouchHandler (GraphicalView view, AbstractChart chart)
boolean | handleTouch (MotionEvent event)
boolean | handleTouchControl (MotionEvent event)
void | addZoomListener (ZoomListener listener)
void | removeZoomListener (ZoomListener listener)
void | addPanListener (PanListener listener)
void | removePanListener (PanListener listener)
float | getOldX ()
float | getOldY ()

## Private 属性
DefaultRenderer | mRenderer
float | oldX
float | oldY
float | oldX2
float | oldY2
RectF | zoomR = new RectF()
Pan | mPan
Zoom | mPinchZoom
GraphicalView | graphicalView

## 详细描述

The main handler of the touch events.

## 构造及析构函数说明

com.ab.view.chart.TouchHandler.TouchHandler | ( | GraphicalView | view,
|  | AbstractChart | chart
| ) |  |
| inline

Creates a new graphical view.

参数

  view | the graphical view
  chart | the chart to be drawn

## 成员函数说明

void com.ab.view.chart.TouchHandler.addPanListener | ( | PanListener | listener | ) |
| inline

Adds a new pan listener.

参数

  listener | pan listener

实现了 com.ab.view.chart.ITouchHandler.

void com.ab.view.chart.TouchHandler.addZoomListener | ( | ZoomListener | listener | ) |
| inline

Adds a new zoom listener.

参数

  listener | zoom listener

实现了 com.ab.view.chart.ITouchHandler.

float com.ab.view.chart.TouchHandler.getOldX | ( |  | ) |
| inline

Gets the old x.

返回
  the old x

float com.ab.view.chart.TouchHandler.getOldY | ( |  | ) |
| inline

Gets the old y.

返回
  the old y

boolean com.ab.view.chart.TouchHandler.handleTouch | ( | MotionEvent | event | ) |
| inline

Handles the touch event. 图表的滑动事件

参数

  event | the touch event

返回
  true, if successful

实现了 com.ab.view.chart.ITouchHandler.

boolean com.ab.view.chart.TouchHandler.handleTouchControl | ( | MotionEvent | event | ) |
| inline

描述：标尺滑动和比例缩放的点击的事件.

版本
  v1.0

参数

  event | the event

返回
  true, if successful

参见
  com.ab.view.chart.ITouchHandler::handleTouchControl(android.view.MotionEvent)

作者
  : amsoft.cn

日期
  ：2013-6-7 上午9:56:06

实现了 com.ab.view.chart.ITouchHandler.

void com.ab.view.chart.TouchHandler.removePanListener | ( | PanListener | listener | ) |
| inline

Removes a pan listener.

参数

  listener | pan listener

实现了 com.ab.view.chart.ITouchHandler.

void com.ab.view.chart.TouchHandler.removeZoomListener | ( | ZoomListener | listener | ) |
| inline

Removes a zoom listener.

参数

  listener | zoom listener

实现了 com.ab.view.chart.ITouchHandler.

## 类成员变量说明

GraphicalView com.ab.view.chart.TouchHandler.graphicalView
| private

The graphical view.

Pan com.ab.view.chart.TouchHandler.mPan
| private

The pan tool.

Zoom com.ab.view.chart.TouchHandler.mPinchZoom
| private

The zoom for the pinch gesture.

DefaultRenderer com.ab.view.chart.TouchHandler.mRenderer
| private

The chart renderer.

float com.ab.view.chart.TouchHandler.oldX
| private

The old x coordinate.

float com.ab.view.chart.TouchHandler.oldX2
| private

The old x2 coordinate.

float com.ab.view.chart.TouchHandler.oldY
| private

The old y coordinate.

float com.ab.view.chart.TouchHandler.oldY2
| private

The old y2 coordinate.

RectF com.ab.view.chart.TouchHandler.zoomR = new RectF()
| private

The zoom buttons rectangle.

该类的文档由以下文件生成:

- src/com/ab/view/chart/TouchHandler.java