Modifier and Type | Class and Description |
---|---|
protected static class |
PanZoom.DragState |
static class |
PanZoom.Pan |
static class |
PanZoom.Zoom |
Modifier | Constructor and Description |
---|---|
protected |
PanZoom(XYPlot plot,
PanZoom.Pan pan,
PanZoom.Zoom zoom) |
Modifier and Type | Method and Description |
---|---|
static PanZoom |
attach(XYPlot plot)
Convenience method for enabling pan/zoom behavior on an instance of
XYPlot , using
a default behavior of PanZoom.Pan.BOTH and PanZoom.Zoom.SCALE . |
static PanZoom |
attach(XYPlot plot,
PanZoom.Pan pan,
PanZoom.Zoom zoom) |
protected void |
calculatePan(android.graphics.PointF oldFirstFinger,
android.graphics.PointF newX,
boolean horizontal) |
protected void |
calculateZoom(android.graphics.RectF newRect,
float scale,
boolean isHorizontal) |
android.view.View.OnTouchListener |
getDelegate() |
protected float |
getLastMaxX() |
protected float |
getLastMinX() |
protected float |
getLastMinY() |
protected float |
getMaxXLimit() |
protected float |
getMaxYLimit() |
protected float |
getMinYLimit() |
PanZoom.Pan |
getPan() |
PanZoom.Zoom |
getZoom() |
boolean |
isEnabled() |
protected boolean |
isValidScale(float scale) |
boolean |
onTouch(android.view.View view,
android.view.MotionEvent event) |
protected void |
pan(android.view.MotionEvent motionEvent) |
void |
setDelegate(android.view.View.OnTouchListener delegate)
Set a delegate to receive onTouch calls before this class does.
|
protected void |
setDomainBoundaries(Number lowerBoundary,
BoundaryMode lowerBoundaryMode,
Number upperBoundary,
BoundaryMode upperBoundaryMode) |
protected void |
setDomainBoundaries(Number lowerBoundary,
Number upperBoundary,
BoundaryMode mode) |
void |
setEnabled(boolean enabled) |
void |
setPan(PanZoom.Pan pan) |
protected void |
setRangeBoundaries(Number lowerBoundary,
BoundaryMode lowerBoundaryMode,
Number upperBoundary,
BoundaryMode upperBoundaryMode) |
protected void |
setRangeBoundaries(Number lowerBoundary,
Number upperBoundary,
BoundaryMode mode) |
void |
setZoom(PanZoom.Zoom zoom) |
protected void |
zoom(android.view.MotionEvent motionEvent) |
protected PanZoom(XYPlot plot, PanZoom.Pan pan, PanZoom.Zoom zoom)
public static PanZoom attach(XYPlot plot)
XYPlot
, using
a default behavior of PanZoom.Pan.BOTH
and PanZoom.Zoom.SCALE
.
Use attach(XYPlot, Pan, Zoom)
for finer grain control of this behavior.plot
- public static PanZoom attach(XYPlot plot, PanZoom.Pan pan, PanZoom.Zoom zoom)
public boolean isEnabled()
public void setEnabled(boolean enabled)
protected void setDomainBoundaries(Number lowerBoundary, BoundaryMode lowerBoundaryMode, Number upperBoundary, BoundaryMode upperBoundaryMode)
protected void setRangeBoundaries(Number lowerBoundary, BoundaryMode lowerBoundaryMode, Number upperBoundary, BoundaryMode upperBoundaryMode)
protected void setDomainBoundaries(Number lowerBoundary, Number upperBoundary, BoundaryMode mode)
protected void setRangeBoundaries(Number lowerBoundary, Number upperBoundary, BoundaryMode mode)
public boolean onTouch(android.view.View view, android.view.MotionEvent event)
onTouch
in interface android.view.View.OnTouchListener
protected float getMaxXLimit()
protected float getMinYLimit()
protected float getMaxYLimit()
protected float getLastMinX()
protected float getLastMaxX()
protected float getLastMinY()
protected void pan(android.view.MotionEvent motionEvent)
protected void calculatePan(android.graphics.PointF oldFirstFinger, android.graphics.PointF newX, boolean horizontal)
protected boolean isValidScale(float scale)
protected void zoom(android.view.MotionEvent motionEvent)
protected void calculateZoom(android.graphics.RectF newRect, float scale, boolean isHorizontal)
public PanZoom.Pan getPan()
public void setPan(PanZoom.Pan pan)
public PanZoom.Zoom getZoom()
public void setZoom(PanZoom.Zoom zoom)
public android.view.View.OnTouchListener getDelegate()
public void setDelegate(android.view.View.OnTouchListener delegate)
View
.delegate
-