| AndBase开发框架 1.6

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

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

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

## Public 成员函数
String | getChartTitle ()
void | setChartTitle (String title)
float | getChartTitleTextSize ()
void | setChartTitleTextSize (float textSize)
void | addSeriesRenderer (SimpleSeriesRenderer renderer)
void | addSeriesRenderer (int index, SimpleSeriesRenderer renderer)
void | removeSeriesRenderer (SimpleSeriesRenderer renderer)
void | removeAllRenderers ()
SimpleSeriesRenderer | getSeriesRendererAt (int index)
int | getSeriesRendererCount ()
SimpleSeriesRenderer[] | getSeriesRenderers ()
int | getBackgroundColor ()
void | setBackgroundColor (int color)
boolean | isApplyBackgroundColor ()
void | setApplyBackgroundColor (boolean apply)
int | getAxesColor ()
void | setAxesColor (int color)
int | getLabelsColor ()
void | setLabelsColor (int color)
float | getLabelsTextSize ()
void | setLabelsTextSize (float textSize)
boolean | isShowAxes ()
void | setShowAxes (boolean showAxes)
boolean | isShowLabels ()
void | setShowLabels (boolean showLabels)
boolean | isShowGridX ()
boolean | isShowGridY ()
void | setShowGridX (boolean showGrid)
void | setShowGridY (boolean showGrid)
void | setShowGrid (boolean showGrid)
boolean | isShowCustomTextGrid ()
void | setShowCustomTextGrid (boolean showGrid)
boolean | isShowLegend ()
void | setShowLegend (boolean showLegend)
boolean | isFitLegend ()
void | setFitLegend (boolean fit)
String | getTextTypefaceName ()
int | getTextTypefaceStyle ()
float | getLegendTextSize ()
void | setLegendTextSize (float textSize)
void | setTextTypeface (String typefaceName, int style)
boolean | isAntialiasing ()
void | setAntialiasing (boolean antialiasing)
float | getScale ()
float | getOriginalScale ()
void | setScale (float scale)
boolean | isZoomEnabled ()
void | setZoomEnabled (boolean enabled)
boolean | isZoomButtonsVisible ()
void | setZoomButtonsVisible (boolean visible)
boolean | isExternalZoomEnabled ()
void | setExternalZoomEnabled (boolean enabled)
float | getZoomRate ()
boolean | isPanEnabled ()
void | setPanEnabled (boolean enabled)
void | setZoomRate (float rate)
boolean | isClickEnabled ()
void | setClickEnabled (boolean enabled)
int | getSelectableBuffer ()
void | setSelectableBuffer (int buffer)
int | getLegendHeight ()
void | setLegendHeight (int height)
int[] | getMargins ()
void | setMargins (int[] margins)
boolean | isInScroll ()
void | setInScroll (boolean inScroll)
float | getStartAngle ()
void | setStartAngle (float startAngle)
boolean | isDisplayValues ()
void | setDisplayValues (boolean display)

## 静态 Public 属性
static final int | NO_COLOR = 0
static final int | BACKGROUND_COLOR = Color.BLACK
static final int | TEXT_COLOR = Color.LTGRAY

## Private 属性
String | mChartTitle = ""
float | mChartTitleTextSize = 15
String | mTextTypefaceName = REGULAR_TEXT_FONT.toString()
int | mTextTypefaceStyle = Typeface.NORMAL
int | mBackgroundColor
boolean | mApplyBackgroundColor
boolean | mShowAxes = true
int | mAxesColor = TEXT_COLOR
boolean | mShowLabels = true
int | mLabelsColor = TEXT_COLOR
float | mLabelsTextSize = 10
boolean | mShowLegend = true
float | mLegendTextSize = 12
boolean | mFitLegend = false
boolean | mShowGridX = false
boolean | mShowGridY = false
boolean | mShowCustomTextGrid = false
List< SimpleSeriesRenderer > | mRenderers = new ArrayList<SimpleSeriesRenderer>()
boolean | mAntialiasing = true
int | mLegendHeight = 0
int[] | mMargins = new int[] { 20, 30, 10, 20 }
float | mScale = 1
boolean | mPanEnabled = true
boolean | mZoomEnabled = true
boolean | mZoomButtonsVisible = false
float | mZoomRate = 1.5f
boolean | mExternalZoomEnabled = false
float | mOriginalScale = mScale
boolean | mClickEnabled = false
int | selectableBuffer = 15
boolean | mDisplayValues
boolean | mInScroll
float | mStartAngle = 0

## 静态 Private 属性
static final Typeface | REGULAR_TEXT_FONT

## 详细描述

An abstract renderer to be extended by the multiple series classes.

## 成员函数说明

void com.ab.view.chart.DefaultRenderer.addSeriesRenderer | ( | SimpleSeriesRenderer | renderer | ) |
| inline

Adds a simple renderer to the multiple renderer.

参数

  renderer | the renderer to be added

void com.ab.view.chart.DefaultRenderer.addSeriesRenderer | ( | int | index,
|  | SimpleSeriesRenderer | renderer
| ) |  |
| inline

Adds a simple renderer to the multiple renderer.

参数

  index | the index in the renderers list
  renderer | the renderer to be added

int com.ab.view.chart.DefaultRenderer.getAxesColor | ( |  | ) |
| inline

Returns the axes color.

返回
  the axes color

int com.ab.view.chart.DefaultRenderer.getBackgroundColor | ( |  | ) |
| inline

Returns the background color.

返回
  the background color

String com.ab.view.chart.DefaultRenderer.getChartTitle | ( |  | ) |
| inline

Returns the chart title.

返回
  the chart title

float com.ab.view.chart.DefaultRenderer.getChartTitleTextSize | ( |  | ) |
| inline

Returns the chart title text size.

返回
  the chart title text size

int com.ab.view.chart.DefaultRenderer.getLabelsColor | ( |  | ) |
| inline

Returns the labels color. 获取图表上标题与X轴与Y轴的说明文字颜色

返回
  the labels color

float com.ab.view.chart.DefaultRenderer.getLabelsTextSize | ( |  | ) |
| inline

Returns the labels text size.

返回
  the labels text size

int com.ab.view.chart.DefaultRenderer.getLegendHeight | ( |  | ) |
| inline

Returns the legend height.

返回
  the legend height

float com.ab.view.chart.DefaultRenderer.getLegendTextSize | ( |  | ) |
| inline

Returns the legend text size.

返回
  the legend text size

int [] com.ab.view.chart.DefaultRenderer.getMargins | ( |  | ) |
| inline

Returns the margin sizes. An array containing the margins in this order: top, left, bottom, right

返回
  the margin sizes

float com.ab.view.chart.DefaultRenderer.getOriginalScale | ( |  | ) |
| inline

Returns the original value to be used for scaling the chart.

返回
  the original scale value

float com.ab.view.chart.DefaultRenderer.getScale | ( |  | ) |
| inline

Returns the value to be used for scaling the chart.

返回
  the scale value

int com.ab.view.chart.DefaultRenderer.getSelectableBuffer | ( |  | ) |
| inline

Returns the selectable radius value around clickable points.

返回
  the selectable radius

SimpleSeriesRenderer com.ab.view.chart.DefaultRenderer.getSeriesRendererAt | ( | int | index | ) |
| inline

Returns the simple renderer from the multiple renderer list.

参数

  index | the index in the simple renderers list

返回
  the simple renderer at the specified index

int com.ab.view.chart.DefaultRenderer.getSeriesRendererCount | ( |  | ) |
| inline

Returns the simple renderers count in the multiple renderer list.

返回
  the simple renderers count

SimpleSeriesRenderer [] com.ab.view.chart.DefaultRenderer.getSeriesRenderers | ( |  | ) |
| inline

Returns an array of the simple renderers in the multiple renderer list.

返回
  the simple renderers array

float com.ab.view.chart.DefaultRenderer.getStartAngle | ( |  | ) |
| inline

Returns the start angle for circular charts such as pie, doughnut. An angle of 0 degrees correspond to the geometric angle of 0 degrees (3 o'clock on a watch.)

返回
  the start angle in degrees

String com.ab.view.chart.DefaultRenderer.getTextTypefaceName | ( |  | ) |
| inline

Returns the text typeface name.

返回
  the text typeface name

int com.ab.view.chart.DefaultRenderer.getTextTypefaceStyle | ( |  | ) |
| inline

Returns the text typeface style.

返回
  the text typeface style

float com.ab.view.chart.DefaultRenderer.getZoomRate | ( |  | ) |
| inline

Returns the zoom rate.

返回
  the zoom rate

boolean com.ab.view.chart.DefaultRenderer.isAntialiasing | ( |  | ) |
| inline

Returns the antialiasing flag value.

返回
  the antialiasing value

boolean com.ab.view.chart.DefaultRenderer.isApplyBackgroundColor | ( |  | ) |
| inline

Returns if the background color should be applied.

返回
  the apply flag for the background color.

boolean com.ab.view.chart.DefaultRenderer.isClickEnabled | ( |  | ) |
| inline

Returns the enabled state of the click.

返回
  if click is enabled

boolean com.ab.view.chart.DefaultRenderer.isDisplayValues | ( |  | ) |
| inline

Returns if the values should be displayed as text.

返回
  if the values should be displayed as text

boolean com.ab.view.chart.DefaultRenderer.isExternalZoomEnabled | ( |  | ) |
| inline

Returns the enabled state of the external (application implemented) zoom.

返回
  if external zoom is enabled

boolean com.ab.view.chart.DefaultRenderer.isFitLegend | ( |  | ) |
| inline

Returns if the legend should size to fit.

返回
  the fit behavior

boolean com.ab.view.chart.DefaultRenderer.isInScroll | ( |  | ) |
| inline

Returns if the chart is inside a scroll view and doesn't need to shrink.

返回
  if it is inside a scroll view

boolean com.ab.view.chart.DefaultRenderer.isPanEnabled | ( |  | ) |
| inline

Returns the enabled state of the pan.

返回
  if pan is enabled

boolean com.ab.view.chart.DefaultRenderer.isShowAxes | ( |  | ) |
| inline

Returns if the axes should be visible.

返回
  the visibility flag for the axes

boolean com.ab.view.chart.DefaultRenderer.isShowCustomTextGrid | ( |  | ) |
| inline

Returns if the grid should be visible for custom X or Y labels.

返回
  the visibility flag for the custom text grid

boolean com.ab.view.chart.DefaultRenderer.isShowGridX | ( |  | ) |
| inline

Returns if the X axis grid should be visible.

返回
  the visibility flag for the X axis grid

boolean com.ab.view.chart.DefaultRenderer.isShowGridY | ( |  | ) |
| inline

Returns if the Y axis grid should be visible.

返回
  the visibility flag for the Y axis grid

boolean com.ab.view.chart.DefaultRenderer.isShowLabels | ( |  | ) |
| inline

Returns if the labels should be visible.

返回
  the visibility flag for the labels

boolean com.ab.view.chart.DefaultRenderer.isShowLegend | ( |  | ) |
| inline

Returns if the legend should be visible.

返回
  the visibility flag for the legend

boolean com.ab.view.chart.DefaultRenderer.isZoomButtonsVisible | ( |  | ) |
| inline

Returns the visible state of the zoom buttons.

返回
  if zoom buttons are visible

boolean com.ab.view.chart.DefaultRenderer.isZoomEnabled | ( |  | ) |
| inline

Returns the enabled state of the zoom.

返回
  if zoom is enabled

void com.ab.view.chart.DefaultRenderer.removeAllRenderers | ( |  | ) |
| inline

Removes all renderers from the multiple renderer.

void com.ab.view.chart.DefaultRenderer.removeSeriesRenderer | ( | SimpleSeriesRenderer | renderer | ) |
| inline

Removes a simple renderer from the multiple renderer.

参数

  renderer | the renderer to be removed

void com.ab.view.chart.DefaultRenderer.setAntialiasing | ( | boolean | antialiasing | ) |
| inline

Sets the antialiasing value.

参数

  antialiasing | the antialiasing

void com.ab.view.chart.DefaultRenderer.setApplyBackgroundColor | ( | boolean | apply | ) |
| inline

Sets if the background color should be applied.

参数

  apply | the apply flag for the background color

void com.ab.view.chart.DefaultRenderer.setAxesColor | ( | int | color | ) |
| inline

Sets the axes color.

参数

  color | the axes color

void com.ab.view.chart.DefaultRenderer.setBackgroundColor | ( | int | color | ) |
| inline

Sets the background color.

参数

  color | the background color

void com.ab.view.chart.DefaultRenderer.setChartTitle | ( | String | title | ) |
| inline

Sets the chart title.

参数

  title | the chart title

void com.ab.view.chart.DefaultRenderer.setChartTitleTextSize | ( | float | textSize | ) |
| inline

Sets the chart title text size.

参数

  textSize | the chart title text size

void com.ab.view.chart.DefaultRenderer.setClickEnabled | ( | boolean | enabled | ) |
| inline

Sets the enabled state of the click.

参数

  enabled | click enabled

void com.ab.view.chart.DefaultRenderer.setDisplayValues | ( | boolean | display | ) |
| inline

Sets if the values should be displayed as text (supported by pie chart).

参数

  display | if the values should be displayed as text

void com.ab.view.chart.DefaultRenderer.setExternalZoomEnabled | ( | boolean | enabled | ) |
| inline

Sets the enabled state of the external (application implemented) zoom.

参数

  enabled | external zoom enabled

void com.ab.view.chart.DefaultRenderer.setFitLegend | ( | boolean | fit | ) |
| inline

Sets if the legend should size to fit.

参数

  fit | the fit behavior

void com.ab.view.chart.DefaultRenderer.setInScroll | ( | boolean | inScroll | ) |
| inline

To be set if the chart is inside a scroll view and doesn't need to shrink when not enough space.

参数

  inScroll | if it is inside a scroll view

void com.ab.view.chart.DefaultRenderer.setLabelsColor | ( | int | color | ) |
| inline

Sets the labels color. 设置图表上标题与X轴与Y轴的说明文字颜色

参数

  color | the labels color

void com.ab.view.chart.DefaultRenderer.setLabelsTextSize | ( | float | textSize | ) |
| inline

Sets the labels text size.

参数

  textSize | the labels text size

void com.ab.view.chart.DefaultRenderer.setLegendHeight | ( | int | height | ) |
| inline

Sets the legend height, in pixels.

参数

  height | the legend height

void com.ab.view.chart.DefaultRenderer.setLegendTextSize | ( | float | textSize | ) |
| inline

Sets the legend text size.

参数

  textSize | the legend text size

void com.ab.view.chart.DefaultRenderer.setMargins | ( | int[] | margins | ) |
| inline

Sets the margins, in pixels.

参数

  margins | an array containing the margin size values, in this order: top, left, bottom, right

void com.ab.view.chart.DefaultRenderer.setPanEnabled | ( | boolean | enabled | ) |
| inline

Sets the enabled state of the pan.

参数

  enabled | pan enabled

void com.ab.view.chart.DefaultRenderer.setScale | ( | float | scale | ) |
| inline

Sets the value to be used for scaling the chart. It works on some charts like pie, doughnut, dial.

参数

  scale | the scale value

void com.ab.view.chart.DefaultRenderer.setSelectableBuffer | ( | int | buffer | ) |
| inline

Sets the selectable radius value around clickable points.

参数

  buffer | the selectable radius

void com.ab.view.chart.DefaultRenderer.setShowAxes | ( | boolean | showAxes | ) |
| inline

Sets if the axes should be visible.

参数

  showAxes | the visibility flag for the axes

void com.ab.view.chart.DefaultRenderer.setShowCustomTextGrid | ( | boolean | showGrid | ) |
| inline

Sets if the grid for custom X or Y labels should be visible.

参数

  showGrid | the visibility flag for the custom text grid

void com.ab.view.chart.DefaultRenderer.setShowGrid | ( | boolean | showGrid | ) |
| inline

Sets if the grid should be visible.

参数

  showGrid | the visibility flag for the grid

void com.ab.view.chart.DefaultRenderer.setShowGridX | ( | boolean | showGrid | ) |
| inline

Sets if the X axis grid should be visible.

参数

  showGrid | the visibility flag for the X axis grid

void com.ab.view.chart.DefaultRenderer.setShowGridY | ( | boolean | showGrid | ) |
| inline

Sets if the Y axis grid should be visible.

参数

  showGrid | the visibility flag for the Y axis grid

void com.ab.view.chart.DefaultRenderer.setShowLabels | ( | boolean | showLabels | ) |
| inline

Sets if the labels should be visible.

参数

  showLabels | the visibility flag for the labels

void com.ab.view.chart.DefaultRenderer.setShowLegend | ( | boolean | showLegend | ) |
| inline

Sets if the legend should be visible.

参数

  showLegend | the visibility flag for the legend

void com.ab.view.chart.DefaultRenderer.setStartAngle | ( | float | startAngle | ) |
| inline

Sets the start angle for circular charts such as pie, doughnut, etc. An angle of 0 degrees correspond to the geometric angle of 0 degrees (3 o'clock on a watch.)

参数

  startAngle | the start angle in degrees

void com.ab.view.chart.DefaultRenderer.setTextTypeface | ( | String | typefaceName,
|  | int | style
| ) |  |
| inline

Sets the text typeface name and style.

参数

  typefaceName | the text typeface name
  style | the text typeface style

void com.ab.view.chart.DefaultRenderer.setZoomButtonsVisible | ( | boolean | visible | ) |
| inline

Sets the visible state of the zoom buttons.

参数

  visible | if the zoom buttons are visible

void com.ab.view.chart.DefaultRenderer.setZoomEnabled | ( | boolean | enabled | ) |
| inline

Sets the enabled state of the zoom. 缩放打开默认拖动也打开

参数

  enabled | zoom enabled

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

Sets the zoom rate.

参数

  rate | the zoom rate

## 类成员变量说明

final int com.ab.view.chart.DefaultRenderer.BACKGROUND_COLOR = Color.BLACK
| static

The default background color.

boolean com.ab.view.chart.DefaultRenderer.mAntialiasing = true
| private

The antialiasing flag.

boolean com.ab.view.chart.DefaultRenderer.mApplyBackgroundColor
| private

If the background color is applied.

int com.ab.view.chart.DefaultRenderer.mAxesColor = TEXT_COLOR
| private

The axes color.

int com.ab.view.chart.DefaultRenderer.mBackgroundColor
| private

The chart background color.

String com.ab.view.chart.DefaultRenderer.mChartTitle = ""
| private

The chart title.

float com.ab.view.chart.DefaultRenderer.mChartTitleTextSize = 15
| private

The chart title text size.

boolean com.ab.view.chart.DefaultRenderer.mClickEnabled = false
| private

A flag for enabling the click on elements.

boolean com.ab.view.chart.DefaultRenderer.mDisplayValues
| private

If the chart should display the values (available for pie chart).

boolean com.ab.view.chart.DefaultRenderer.mExternalZoomEnabled = false
| private

A flag for enabling the external zoom.

boolean com.ab.view.chart.DefaultRenderer.mFitLegend = false
| private

If the legend should size to fit.

boolean com.ab.view.chart.DefaultRenderer.mInScroll
| private

A flag to be set if the chart is inside a scroll and doesn't need to shrink when not enough space.

int com.ab.view.chart.DefaultRenderer.mLabelsColor = TEXT_COLOR
| private

The labels color.

float com.ab.view.chart.DefaultRenderer.mLabelsTextSize = 10
| private

The labels text size.

int com.ab.view.chart.DefaultRenderer.mLegendHeight = 0
| private

The legend height.

float com.ab.view.chart.DefaultRenderer.mLegendTextSize = 12
| private

The legend text size.

int [] com.ab.view.chart.DefaultRenderer.mMargins = new int[] { 20, 30, 10, 20 }
| private

The margins size.

float com.ab.view.chart.DefaultRenderer.mOriginalScale = mScale
| private

The original chart scale.

boolean com.ab.view.chart.DefaultRenderer.mPanEnabled = true
| private

A flag for enabling the pan.

List<SimpleSeriesRenderer> com.ab.view.chart.DefaultRenderer.mRenderers = new ArrayList<SimpleSeriesRenderer>()
| private

The simple renderers that are included in this multiple series renderer.

float com.ab.view.chart.DefaultRenderer.mScale = 1
| private

A value to be used for scaling the chart.

boolean com.ab.view.chart.DefaultRenderer.mShowAxes = true
| private

If the axes are visible.

boolean com.ab.view.chart.DefaultRenderer.mShowCustomTextGrid = false
| private

If the custom text grid should be displayed.

boolean com.ab.view.chart.DefaultRenderer.mShowGridX = false
| private

If the X axis grid should be displayed.

boolean com.ab.view.chart.DefaultRenderer.mShowGridY = false
| private

If the Y axis grid should be displayed.

boolean com.ab.view.chart.DefaultRenderer.mShowLabels = true
| private

If the labels are visible.

boolean com.ab.view.chart.DefaultRenderer.mShowLegend = true
| private

If the legend is visible.

float com.ab.view.chart.DefaultRenderer.mStartAngle = 0
| private

The start angle for circular charts such as pie, doughnut, etc.

String com.ab.view.chart.DefaultRenderer.mTextTypefaceName = REGULAR_TEXT_FONT.toString()
| private

The typeface name for the texts.

int com.ab.view.chart.DefaultRenderer.mTextTypefaceStyle = Typeface.NORMAL
| private

The typeface style for the texts.

boolean com.ab.view.chart.DefaultRenderer.mZoomButtonsVisible = false
| private

A flag for enabling the visibility of the zoom buttons.

boolean com.ab.view.chart.DefaultRenderer.mZoomEnabled = true
| private

A flag for enabling the zoom.

float com.ab.view.chart.DefaultRenderer.mZoomRate = 1.5f
| private

The zoom rate.

final int com.ab.view.chart.DefaultRenderer.NO_COLOR = 0
| static

A no color constant.

final Typeface com.ab.view.chart.DefaultRenderer.REGULAR_TEXT_FONT
| static private

初始值:
= Typeface
.create(Typeface.SERIF, Typeface.NORMAL)

A text font for regular text, like the chart labels.

int com.ab.view.chart.DefaultRenderer.selectableBuffer = 15
| private

The selectable radius around a clickable point.

final int com.ab.view.chart.DefaultRenderer.TEXT_COLOR = Color.LTGRAY
| static

The default color for text.

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

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