public class PlotView
extends View
Modifier and Type | Class and Description |
---|---|
static class |
PlotView.Flags
All available general option-flags.
|
static interface |
PlotView.PlotProgressListener
Progress Listener Interface to use with progress dialogs and e.g.
|
static class |
PlotView.PlotViewGroup
Links multiple PlotViews together so scrolling, etc is propagated to
every View in the group.
|
Constructor and Description |
---|
PlotView(Context context) |
PlotView(Context context,
AttributeSet attrs) |
PlotView(Context context,
AttributeSet attrs,
int defStyle) |
Modifier and Type | Method and Description |
---|---|
void |
addFlag(PlotView.Flags flag)
Adds an options-flag.
|
int |
attachPlot(Plot plot)
Adds an additional plot to the view and returns its id.
|
int |
attachPlot(Plot plot,
Plot.PlotChangedListener changeListener)
Adds an additional plot to the view and returns its id.
|
Plot |
getFirstVisiblePlot() |
long |
getMaxRedrawRate() |
int |
getNumPlots()
Returns the number of plots currently drawn in this view.
|
Plot |
getPlot(int idx)
Returns the plot with index idx
|
boolean |
hasFlag(PlotView.Flags flag)
Checks for the specified flag.
|
boolean |
onTouchEvent(MotionEvent event) |
void |
removeFlag(PlotView.Flags flag)
Removes an options-flag.
|
void |
removePlot(int idx)
Removes the given plot.
|
void |
requestRedraw(boolean usePost)
Should be called when plot changes occurred and a redraw is required.
|
void |
setMaxRedrawRate(long maxRedrawRate) |
public PlotView(Context context)
context
- public PlotView(Context context, AttributeSet attrs)
context
- attrs
- public PlotView(Context context, AttributeSet attrs, int defStyle)
context
- attrs
- defStyle
- public void addFlag(PlotView.Flags flag)
flag
- public int attachPlot(Plot plot)
plot
- public int attachPlot(Plot plot, Plot.PlotChangedListener changeListener)
plot
- changeListener
- public Plot getFirstVisiblePlot()
public long getMaxRedrawRate()
public int getNumPlots()
public Plot getPlot(int idx)
idx
- public boolean hasFlag(PlotView.Flags flag)
flag
- public void requestRedraw(boolean usePost)
usePost
- If true then postInvalidate() will be used instead of
invalidate()public boolean onTouchEvent(MotionEvent event)
public void removeFlag(PlotView.Flags flag)
flag
- public void removePlot(int idx)
idx
- public void setMaxRedrawRate(long maxRedrawRate)
m_maxRedrawRate
- the mRedrawFrequency to set