com.java4less.rchart.android
Class ChartPanel

java.lang.Object
  extended by View
      extended by com.java4less.rchart.android.ChartPanel
All Implemented Interfaces:
ChartListener

public class ChartPanel
extends View
implements ChartListener

View that renders a chart. It also captures the mouse events and sends them to the Chart object. You will normally use the ChartViewer class instead of this canvas.


Field Summary
static java.lang.String TAG
           
 
Fields inherited from interface com.java4less.rchart.ChartListener
EVENT_AFTER_UPDATE, EVENT_BEFORE_UPDATE, EVENT_CHART_CLICKED, EVENT_ENTER_POINT, EVENT_LEAVE_POINT, EVENT_POINT_CLICKED, EVENT_TIP_UPDATE
 
Constructor Summary
ChartPanel(Context context)
          create panel
 
Method Summary
 void chartEvent(Chart c, int type)
          chart listener
 Chart getChart()
          get chart to display
 void onClick(View v)
           
 void onDraw(Canvas g)
          paint chart here
 boolean onTouch(View v, MotionEvent e)
           
 void paintUserExit(Chart c, ChartGraphics g)
          chart listener
 void setChart(Chart c)
          set chart to display
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG

public static java.lang.String TAG
Constructor Detail

ChartPanel

public ChartPanel(Context context)
create panel

Method Detail

getChart

public Chart getChart()
get chart to display

Returns:

setChart

public void setChart(Chart c)
set chart to display

Parameters:
c -

onDraw

public void onDraw(Canvas g)
paint chart here


paintUserExit

public void paintUserExit(Chart c,
                          ChartGraphics g)
chart listener

Specified by:
paintUserExit in interface ChartListener
Parameters:
c -
g -

chartEvent

public void chartEvent(Chart c,
                       int type)
chart listener

Specified by:
chartEvent in interface ChartListener
Parameters:
c -
type -

onClick

public void onClick(View v)

onTouch

public boolean onTouch(View v,
                       MotionEvent e)