public class DeferredZoomPresenter extends PropertyManager implements DrawListener
ChartZoomStrategy
of the
ChartPanAndZoomBehavior
is set to DEFERRED. It also calculates the new zoom and pan based
on the zoom rectangle.Modifier and Type | Field and Description |
---|---|
static int |
FILL_COLOR_PROPERTY_KEY |
static int |
STROKE_COLOR_PROPERTY_KEY |
static int |
STROKE_WIDTH_PROPERTY_KEY |
Constructor and Description |
---|
DeferredZoomPresenter()
Creates a new instance of the
DeferredZoomPresenter class. |
Modifier and Type | Method and Description |
---|---|
void |
applyPalette(ChartPalette palette)
Applies the provided palette if the canApplyPalette field is true.
|
boolean |
getCanApplyPalette()
Gets a value that determines if a palette can be applied.
|
int |
getFillColor() |
Paint |
getFillPaint()
Gets the fill paint;
|
ChartPanAndZoomBehavior |
getOwner()
Gets the
ChartPanAndZoomBehavior owner; |
int |
getPanX()
Gets the horizontal pan resulting from the last pinch gesture.
|
int |
getPanY()
Gets the vertical pan resulting from the last pinch gesture.
|
int |
getStrokeColor() |
Paint |
getStrokePaint()
Gets the stroke paint;
|
float |
getStrokeWidth() |
double |
getZoomX()
Gets the horizontal zoom resulting from the last pinch gesture.
|
double |
getZoomY()
Gets the vertical zoom resulting from the last pinch gesture.
|
void |
notifyDraw(Canvas canvas) |
void |
setCanApplyPalette(boolean value)
Sets a value that determines if a palette can be applied.
|
void |
setFillColor(int value) |
void |
setFillPaint(Paint value)
Sets the fill paint;
|
void |
setOwner(ChartPanAndZoomBehavior value)
Sets the
ChartPanAndZoomBehavior owner; |
void |
setPinchPoints(RadPoint p1,
RadPoint p2)
Sets the pinch points that determine the top left and bottom right of the zoom rectangle.
|
void |
setStrokeColor(int value) |
void |
setStrokePaint(Paint value)
Sets the stroke paint;
|
void |
setStrokeWidth(float value) |
getValue, resetPropertyValue, setValue, setValue
public static final int FILL_COLOR_PROPERTY_KEY
public static final int STROKE_COLOR_PROPERTY_KEY
public static final int STROKE_WIDTH_PROPERTY_KEY
public DeferredZoomPresenter()
DeferredZoomPresenter
class.public int getFillColor()
public void setFillColor(int value)
public int getStrokeColor()
public void setStrokeColor(int value)
public float getStrokeWidth()
public void setStrokeWidth(float value)
public boolean getCanApplyPalette()
public void setCanApplyPalette(boolean value)
public Paint getFillPaint()
public void setFillPaint(Paint value)
public Paint getStrokePaint()
public void setStrokePaint(Paint value)
public void setOwner(ChartPanAndZoomBehavior value)
ChartPanAndZoomBehavior
owner;public ChartPanAndZoomBehavior getOwner()
ChartPanAndZoomBehavior
owner;public void applyPalette(ChartPalette palette)
public void notifyDraw(Canvas canvas)
notifyDraw
in interface DrawListener
public void setPinchPoints(RadPoint p1, RadPoint p2)
p1
- The first corner point.p2
- The second corner point.public int getPanX()
public int getPanY()
public double getZoomX()
public double getZoomY()