| AndBase开发框架 1.6

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

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

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

## Public 成员函数
| GraphicalView (Context context, AbstractChart chart)
SeriesSelection | getCurrentSeriesAndPoint ()
double[] | toRealPoint (int scale)
void | setZoomRate (float rate)
void | zoomIn ()
void | zoomOut ()
void | zoomReset ()
void | addZoomListener (ZoomListener listener, boolean onButtons, boolean onPinch)
synchronized void | removeZoomListener (ZoomListener listener)
void | addPanListener (PanListener listener)
void | removePanListener (PanListener listener)
boolean | onTouchEvent (MotionEvent event)
void | repaint ()
void | repaint (final int left, final int top, final int right, final int bottom)
Bitmap | toBitmap ()

## Protected 成员函数
void | onDraw (Canvas canvas)
RectF | getZoomRectangle ()

## Private 属性
Context | mContext
AbstractChart | mChart
DefaultRenderer | mRenderer
Rect | mRect = new Rect()
Handler | mHandler
RectF | mZoomR = new RectF()
Bitmap | zoomInImage
Bitmap | zoomOutImage
Bitmap | fitZoomImage
Zoom | mZoomIn
Zoom | mZoomOut
FitZoom | mFitZoom
Paint | mPaint = new Paint()
ITouchHandler | mTouchHandler
float | oldX
float | oldY

## 静态 Private 属性
static final int | ZOOM_BUTTONS_COLOR = Color.argb(175, 150, 150, 150)

## 详细描述

The view that encapsulates the graphical chart.

## 构造及析构函数说明

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

Creates a new graphical view.

参数

  context | the context
  chart | the chart to be drawn

## 成员函数说明

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

Adds a new pan listener.

参数

  listener | pan listener

void com.ab.view.chart.GraphicalView.addZoomListener | ( | ZoomListener | listener,
|  | boolean | onButtons,
|  | boolean | onPinch
| ) |  |
| inline

Adds a new zoom listener.

参数

  listener | zoom listener
  onButtons | the on buttons
  onPinch | the on pinch

SeriesSelection com.ab.view.chart.GraphicalView.getCurrentSeriesAndPoint | ( |  | ) |
| inline

Returns the current series selection object.

返回
  the series selection

RectF com.ab.view.chart.GraphicalView.getZoomRectangle | ( |  | ) |
| inline protected

Gets the zoom rectangle.

返回
  the zoom rectangle

void com.ab.view.chart.GraphicalView.onDraw | ( | Canvas | canvas | ) |
| inline protected

描述：TODO.

版本
  v1.0

参数

  canvas | the canvas

参见
  android.view.View::onDraw(android.graphics.Canvas)

作者
  : amsoft.cn

日期
  ：2013-6-17 上午9:04:51

boolean com.ab.view.chart.GraphicalView.onTouchEvent | ( | MotionEvent | event | ) |
| inline

描述：TODO.

版本
  v1.0

参数

  event | the event

返回
  true, if successful

参见
  android.view.View::onTouchEvent(android.view.MotionEvent)

作者
  : amsoft.cn

日期
  ：2013-6-17 上午9:04:51

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

Removes a pan listener.

参数

  listener | pan listener

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

Removes a zoom listener.

参数

  listener | zoom listener

void com.ab.view.chart.GraphicalView.repaint | ( |  | ) |
| inline

Schedule a view content repaint.

void com.ab.view.chart.GraphicalView.repaint | ( | final int | left,
|  | final int | top,
|  | final int | right,
|  | final int | bottom
| ) |  |
| inline

Schedule a view content repaint, in the specified rectangle area.

参数

  left | the left position of the area to be repainted
  top | the top position of the area to be repainted
  right | the right position of the area to be repainted
  bottom | the bottom position of the area to be repainted

void com.ab.view.chart.GraphicalView.setZoomRate | ( | float | rate | ) |
| inline

Sets the zoom rate.

参数

  rate | the zoom rate

Bitmap com.ab.view.chart.GraphicalView.toBitmap | ( |  | ) |
| inline

Saves the content of the graphical view to a bitmap.

返回
  the bitmap

double [] com.ab.view.chart.GraphicalView.toRealPoint | ( | int | scale | ) |
| inline

Transforms the currently selected screen point to a real point.

参数

  scale | the scale

返回
  the currently selected real point

void com.ab.view.chart.GraphicalView.zoomIn | ( |  | ) |
| inline

Do a chart zoom in.

void com.ab.view.chart.GraphicalView.zoomOut | ( |  | ) |
| inline

Do a chart zoom out.

void com.ab.view.chart.GraphicalView.zoomReset | ( |  | ) |
| inline

Do a chart zoom reset / fit zoom.

## 类成员变量说明

Bitmap com.ab.view.chart.GraphicalView.fitZoomImage
| private

The fit zoom icon.

AbstractChart com.ab.view.chart.GraphicalView.mChart
| private

The chart to be drawn.

Context com.ab.view.chart.GraphicalView.mContext
| private

The m context.

FitZoom com.ab.view.chart.GraphicalView.mFitZoom
| private

The fit zoom tool.

Handler com.ab.view.chart.GraphicalView.mHandler
| private

The user interface thread handler.

Paint com.ab.view.chart.GraphicalView.mPaint = new Paint()
| private

The paint to be used when drawing the chart.

Rect com.ab.view.chart.GraphicalView.mRect = new Rect()
| private

The view bounds.

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

The chart renderer.

ITouchHandler com.ab.view.chart.GraphicalView.mTouchHandler
| private

The touch handler.

Zoom com.ab.view.chart.GraphicalView.mZoomIn
| private

The zoom in tool.

Zoom com.ab.view.chart.GraphicalView.mZoomOut
| private

The zoom out tool.

RectF com.ab.view.chart.GraphicalView.mZoomR = new RectF()
| private

The zoom buttons rectangle.

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

The old x coordinate.

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

The old y coordinate.

final int com.ab.view.chart.GraphicalView.ZOOM_BUTTONS_COLOR = Color.argb(175, 150, 150, 150)
| static private

The zoom buttons background color.

Bitmap com.ab.view.chart.GraphicalView.zoomInImage
| private

The zoom in icon.

Bitmap com.ab.view.chart.GraphicalView.zoomOutImage
| private

The zoom out icon.

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

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