public class Zoom extends ZoomScroll
Title: Zoom class
Description: Used at tChart1.Zoom property, determines mouse zoom attributes.
Copyright (c) 2005-2019 by Steema Software SL. All Rights Reserved.
Company: Steema Software
Modifier and Type | Class and Description |
---|---|
static class |
Zoom.ZoomResetStyle
Active for use when ZoomStyle = ZoomStyle.INCHART_MULTI
Use with ZoomReset property to control which touch action that resets chart zoom |
static class |
Zoom.ZoomStyle |
ZoomScroll.ZoomSnapshot
Modifier and Type | Field and Description |
---|---|
double |
animatedFactor
Controls the animated zoom "speed" (inertia)
|
protected ChartPen |
pen |
protected java.util.Vector<ZoomScroll.ZoomSnapshot> |
zoomAxesHist |
protected int |
zoomCounter |
protected boolean |
zoomed |
x0, x1, y0, y1
chart, InternalUse
Constructor and Description |
---|
Zoom(IBaseChart c)
Creates a new Zoom instance.
|
Modifier and Type | Method and Description |
---|---|
java.util.Vector<ZoomScroll.ZoomSnapshot> |
addZoomSnapshot() |
protected void |
calcZoomPoints() |
void |
clearZoomHistory() |
Rectangle |
ClipZoomReversibleRectangle() |
void |
draw()
Displays rectangle while dragging Chart for zoom operation.
|
boolean |
getAllow()
Allows runtime Zoom by dragging the mouse when true.
Default value: true |
boolean |
getAnimated()
Animates Zoom in sequenced steps when true.
Default value: false |
int |
getAnimatedSteps()
Determines the number of steps of the animated zooming sequence.
Large number of steps can delay zooming. |
ChartBrush |
getBrush()
Brush used to fill mousedragged zoom area.
|
ZoomDirections |
getDirection()
The direction of the zoom on a selected area.
Example. |
boolean |
getFullRepaint()
Gets whether the zoom Rectangle is painted using the ControlPaint XOR methods.
|
boolean |
getHistory() |
java.util.Vector<ZoomScroll.ZoomSnapshot> |
getHistorySteps() |
int |
getKeyMask()
The keyboard button as an extra condition to initiate the zoom.
Default value: None |
int |
getMinPixels()
The minimum number of pixels to actuate zoom action.
Default value: 16 |
int |
getMouseButton()
The mousebutton to use for the zoom action.
Note that Scroll action uses the right (Right) mousebutton as default. Default value: Left |
ChartPen |
getPen()
Pen used to draw surrounding rectangle of zoom area.
|
boolean |
getZoomed()
Determines if Chart axis scales fit all Chart points or not.
Run-time only. |
Zoom.ZoomResetStyle |
getZoomReset()
Active for use when ZoomStyle = ZoomStyle.INCHART_MULTI
Gets/Sets the touch action that resets the chart zoom/scroll. Default value: ZoomResetStyle.DOUBLETAP |
Zoom.ZoomStyle |
getZoomStyle() |
java.util.Vector<ZoomScroll.ZoomSnapshot> |
removeZoomSnapshot() |
void |
setAllow(boolean value)
Allows runtime Zoom by dragging the mouse when true.
Default value: true |
void |
setAnimated(boolean value)
Animates Zoom in sequenced steps when true.
Default value: false |
void |
setAnimatedSteps(int value)
Sets the number of steps of the animated zooming sequence.
Large number of steps can delay zooming. |
void |
setChart(IBaseChart c)
Overrides base SetChart method to adjust pen and brush chart properties.
|
void |
setDirection(ZoomDirections value)
Sets the direction of the zoom on a selected area.
Default value: Both |
void |
setFullRepaint(boolean value)
Sets whether the zoom Rectangle is painted using the ControlPaint XOR methods.
|
void |
setHistory(boolean value) |
void |
setHistorySteps(java.util.Vector<ZoomScroll.ZoomSnapshot> value) |
void |
setKeyMask(int value)
Sets a keyboard button as an extra condition to initiate the zoom.
Default value: None |
void |
setMinPixels(int value)
Sets minimum number of pixels to actuate zoom action.
Default value: 16 |
void |
setMouseButton(int value)
Sets the mousebutton to use for the zoom action.
Default value: Left |
void |
setZoomed(boolean value)
Set the Chart axis scales to fit all Chart points when true.
Default value: false |
void |
setZoomReset(Zoom.ZoomResetStyle value) |
void |
setZoomStyle(Zoom.ZoomStyle value) |
void |
undo()
Rescales the Chart Axis to their Maximum and Minimum values.
|
void |
zoomBackOne() |
void |
zoomPercent(double percentZoom)
Applies the specified PercentZoom Zoom In/Out to the current Axis
scales.
When PercentZoom is greater than 100%, Zoom Out is performed. |
void |
zoomRect(Rectangle r)
Zooms the Chart rectangle.
|
activate, activate, activate, check, getActive, setActive
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
protected ChartPen pen
protected boolean zoomed
protected java.util.Vector<ZoomScroll.ZoomSnapshot> zoomAxesHist
protected int zoomCounter
public double animatedFactor
public Zoom(IBaseChart c)
c
- IBaseChartpublic java.util.Vector<ZoomScroll.ZoomSnapshot> addZoomSnapshot()
public void clearZoomHistory()
public java.util.Vector<ZoomScroll.ZoomSnapshot> removeZoomSnapshot()
public void zoomBackOne()
public boolean getHistory()
public void setHistory(boolean value)
public java.util.Vector<ZoomScroll.ZoomSnapshot> getHistorySteps()
public void setHistorySteps(java.util.Vector<ZoomScroll.ZoomSnapshot> value)
public boolean getAllow()
public void setAllow(boolean value)
value
- booleanpublic boolean getAnimated()
public void setAnimated(boolean value)
value
- booleanpublic ChartBrush getBrush()
public ZoomDirections getDirection()
public void setDirection(ZoomDirections value)
value
- ZoomDirectionspublic int getAnimatedSteps()
public void setAnimatedSteps(int value)
value
- intpublic int getKeyMask()
public void setKeyMask(int value)
value
- intpublic int getMinPixels()
public void setMinPixels(int value)
value
- intpublic int getMouseButton()
public void setMouseButton(int value)
value
- intpublic Zoom.ZoomResetStyle getZoomReset()
public void setZoomReset(Zoom.ZoomResetStyle value)
public ChartPen getPen()
public void zoomRect(Rectangle r)
r
- Rectanglepublic Rectangle ClipZoomReversibleRectangle()
protected void calcZoomPoints()
public void draw()
public void setChart(IBaseChart c)
public boolean getFullRepaint()
public void setFullRepaint(boolean value)
value
- booleanpublic void undo()
public boolean getZoomed()
public void setZoomed(boolean value)
value
- booleanpublic void zoomPercent(double percentZoom)
percentZoom
- doublepublic Zoom.ZoomStyle getZoomStyle()
public void setZoomStyle(Zoom.ZoomStyle value)