cn.limc.androidcharts.view
Class PieChart

java.lang.Object
  extended by android.view.View
      extended by cn.limc.androidcharts.view.BaseChart
          extended by cn.limc.androidcharts.view.PieChart
All Implemented Interfaces:
android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback, IChart

public class PieChart
extends BaseChart

PieChart is a kind of graph that display all in a pie-like graph, each of the data will get a part of the pie. another kind of pie chart you can refer from PizzaChart

PieChartは円グラフの一種です、分割表示をお使い場合、PizzaChartを利用してください

PieChart是最简单的饼图,如果您需要可以分割表示的饼图,请参照PizzaChart

Version:
v1.0 2011/05/29 15:15:03
Author:
limc

Nested Class Summary
 
Nested classes/interfaces inherited from class android.view.View
android.view.View.BaseSavedState, android.view.View.MeasureSpec, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnFocusChangeListener, android.view.View.OnKeyListener, android.view.View.OnLongClickListener, android.view.View.OnTouchListener
 
Field Summary
static int DEFAULT_CIRCLE_BORDER_COLOR
           default color for circle's border
static boolean DEFAULT_DISPLAY_RADIUS
           default should display longitude lines
static android.graphics.Point DEFAULT_POSITION
           default position
static int DEFAULT_RADIUS_COLOR
           default color for longitude lines
static int DEFAULT_RADIUS_LENGTH
           default radius length
static java.lang.String DEFAULT_TITLE
           default title
 
Fields inherited from class android.view.View
DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, KEEP_SCREEN_ON, NO_ID, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, VISIBLE
 
Constructor Summary
PieChart(android.content.Context context)
           
PieChart(android.content.Context context, android.util.AttributeSet attrs)
           
PieChart(android.content.Context context, android.util.AttributeSet attrs, int defStyle)
           
 
Method Summary
 int getCircleBorderColor()
           
 java.util.List<TitleValueColorEntity> getData()
           
 android.graphics.Point getPosition()
           
 int getRadiusColor()
           
 int getRadiusLength()
           
 java.lang.String getTitle()
           
 boolean isDisplayRadius()
           
 void setCircleBorderColor(int circleBorderColor)
           
 void setData(java.util.List<TitleValueColorEntity> data)
           
 void setDisplayRadius(boolean displayRadius)
           
 void setPosition(android.graphics.Point position)
           
 void setRadiusColor(int radiusColor)
           
 void setRadiusLength(int radiusLength)
           
 void setTitle(java.lang.String title)
           
 
Methods inherited from class android.view.View
addFocusables, addFocusables, addTouchables, bringToFront, buildDrawingCache, buildDrawingCache, cancelLongPress, checkInputConnectionProxy, clearAnimation, clearFocus, computeScroll, createContextMenu, destroyDrawingCache, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, focusSearch, forceLayout, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getContentDescription, getContext, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getKeepScreenOn, getKeyDispatcherState, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMeasuredHeight, getMeasuredWidth, getNextFocusDownId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getResources, getRight, getRootView, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getTag, getTag, getTop, getTouchables, getTouchDelegate, getVerticalFadingEdgeLength, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, hasFocus, hasFocusable, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isClickable, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPressed, isSaveEnabled, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onCheckIsTextEditor, onCreateInputConnection, onFinishTemporaryDetach, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onWindowFocusChanged, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setKeepScreenOn, setLayoutParams, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnTouchListener, setPadding, setPressed, setSaveEnabled, setScrollbarFadingEnabled, setScrollBarStyle, setScrollContainer, setSelected, setSoundEffectsEnabled, setTag, setTag, setTouchDelegate, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVisibility, setWillNotCacheDrawing, setWillNotDraw, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TITLE

public static final java.lang.String DEFAULT_TITLE

default title

タイトルのデフォルト値

默认图表标题

See Also:
Constant Field Values

DEFAULT_DISPLAY_RADIUS

public static final boolean DEFAULT_DISPLAY_RADIUS

default should display longitude lines

経線を表示する

默认是否显示经线

See Also:
Constant Field Values

DEFAULT_RADIUS_LENGTH

public static final int DEFAULT_RADIUS_LENGTH

default radius length

半径の長さのデフォルト値

默认半径长度

See Also:
Constant Field Values

DEFAULT_RADIUS_COLOR

public static final int DEFAULT_RADIUS_COLOR

default color for longitude lines

経線の色のデフォルト値

默认经线颜色

See Also:
Constant Field Values

DEFAULT_CIRCLE_BORDER_COLOR

public static final int DEFAULT_CIRCLE_BORDER_COLOR

default color for circle's border

円弧の色のデフォルト値

默认圆弧的颜色

See Also:
Constant Field Values

DEFAULT_POSITION

public static final android.graphics.Point DEFAULT_POSITION

default position

中心の位置のデフォルト値

默认绘图中心位置

Constructor Detail

PieChart

public PieChart(android.content.Context context)

PieChart

public PieChart(android.content.Context context,
                android.util.AttributeSet attrs,
                int defStyle)

PieChart

public PieChart(android.content.Context context,
                android.util.AttributeSet attrs)
Method Detail

getData

public java.util.List<TitleValueColorEntity> getData()
Returns:
the data

setData

public void setData(java.util.List<TitleValueColorEntity> data)
Parameters:
data - the data to set

getTitle

public java.lang.String getTitle()
Returns:
the title

setTitle

public void setTitle(java.lang.String title)
Parameters:
title - the title to set

getPosition

public android.graphics.Point getPosition()
Returns:
the position

setPosition

public void setPosition(android.graphics.Point position)
Parameters:
position - the position to set

getRadiusLength

public int getRadiusLength()
Returns:
the radiusLength

setRadiusLength

public void setRadiusLength(int radiusLength)
Parameters:
radiusLength - the radiusLength to set

getRadiusColor

public int getRadiusColor()
Returns:
the radiusColor

setRadiusColor

public void setRadiusColor(int radiusColor)
Parameters:
radiusColor - the radiusColor to set

getCircleBorderColor

public int getCircleBorderColor()
Returns:
the circleBorderColor

setCircleBorderColor

public void setCircleBorderColor(int circleBorderColor)
Parameters:
circleBorderColor - the circleBorderColor to set

isDisplayRadius

public boolean isDisplayRadius()
Returns:
the displayRadius

setDisplayRadius

public void setDisplayRadius(boolean displayRadius)
Parameters:
displayRadius - the displayRadius to set