Package org.zkoss.chart.plotOptions
Class DragDrop
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.plotOptions.DragDrop
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
public class DragDrop extends Optionable
The draggable-points module allows points to be moved around or modified in the chart. In addition to the options mentioned under the dragDrop API structure, the module fires three events,point.dragStart,point.dragandpoint.drop.- Since:
- 7.2.1.0
- Author:
- rudyhuang
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDragDrop.DragHandleOptions for the drag handles.static classDragDrop.GuideBox
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description DragDrop()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DragDrop.DragHandlegetDragHandle()Returns the options for the drag handles, if any.NumbergetDragMaxX()Returns the maximum X value the points can be moved to.NumbergetDragMaxY()Returns the maximum Y value the points can be moved to.NumbergetDragMinX()Returns the minimum X value the points can be moved to.NumbergetDragMinY()Returns the minimum Y value the points can be moved to.NumbergetDragPrecisionX()Returns the X precision value to drag to for this series.NumbergetDragPrecisionY()Returns the Y precision value to drag to for this series.NumbergetDragSensitivity()Returns the amount of pixels to drag the pointer before it counts as a drag operation.StringgetGroupBy()Returns a property to group the points.DragDrop.GuideBoxgetGuideBox()Returns the style options for the guide box, if any.booleanisDraggableX()Returns if enable dragging in the X dimension.booleanisDraggableX1()(X-Range) Returns if enable dragging x value individually.booleanisDraggableX2()(X-Range) Returns if enable dragging x2 value individually.booleanisDraggableY()Returns if enable dragging in the Y dimension.booleanisLiveRedraw()Returns if updates points as they are dragged.voidsetDraggableX(boolean draggableX)Sets if enable dragging in the X dimension.voidsetDraggableX1(boolean draggableX1)(X-Range) Sets if enable dragging x value individually.voidsetDraggableX2(boolean draggableX2)(X-Range) Sets if enable dragging x2 value individually.voidsetDraggableY(boolean draggableY)Sets if enable dragging in the Y dimension.voidsetDragHandle(DragDrop.DragHandle dragHandle)Sets the options for the drag handles.voidsetDragMaxX(Number dragMaxX)Sets the maximum X value the points can be moved to.voidsetDragMaxY(Number dragMaxY)Sets the maximum Y value the points can be moved to.voidsetDragMinX(Number dragMinX)Sets the minimum X value the points can be moved to.voidsetDragMinY(Number dragMinY)Sets the minimum Y value the points can be moved to.voidsetDragPrecisionX(Number dragPrecisionX)Sets the X precision value to drag to for this series.voidsetDragPrecisionY(Number dragPrecisionY)Sets the Y precision value to drag to for this series.voidsetDragSensitivity(Number dragSensitivity)Sets the amount of pixels to drag the pointer before it counts as a drag operation.voidsetGroupBy(String groupBy)Sets a property to group the points.voidsetGuideBox(DragDrop.GuideBox guideBox)Sets the style options for the guide box.voidsetLiveRedraw(boolean liveRedraw)Sets if updates points as they are dragged.-
Methods inherited from class org.zkoss.chart.Optionable
addExtraAttr, addOptionDataListener, clearOptonDataListener, clone, containsKey, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getAttr, getAttr, getClientState, getExtraAttr, merge, onChange, removeExtraAttr, removeKey, removeOptionDataListener, setAttr, setAttr, setAttr, setAttr, toJSONString, toString
-
-
-
-
Method Detail
-
isDraggableX
public boolean isDraggableX()
Returns if enable dragging in the X dimension. Note that this is not supported for TreeGrid axes (the default axis type in Gantt charts).Default: false
-
setDraggableX
public void setDraggableX(boolean draggableX)
Sets if enable dragging in the X dimension. Note that this is not supported for TreeGrid axes (the default axis type in Gantt charts).
-
isDraggableX1
public boolean isDraggableX1()
(X-Range) Returns if enable dragging x value individually.Default: true
-
setDraggableX1
public void setDraggableX1(boolean draggableX1)
(X-Range) Sets if enable dragging x value individually.
-
isDraggableX2
public boolean isDraggableX2()
(X-Range) Returns if enable dragging x2 value individually.Default: true
-
setDraggableX2
public void setDraggableX2(boolean draggableX2)
(X-Range) Sets if enable dragging x2 value individually.
-
isDraggableY
public boolean isDraggableY()
Returns if enable dragging in the Y dimension. Note that this is not supported for TreeGrid axes (the default axis type in Gantt charts).Default: false
-
setDraggableY
public void setDraggableY(boolean draggableY)
Sets if enable dragging in the Y dimension. Note that this is not supported for TreeGrid axes (the default axis type in Gantt charts).
-
getDragHandle
public DragDrop.DragHandle getDragHandle()
Returns the options for the drag handles, if any. Otherwise, create a new one.
-
setDragHandle
public void setDragHandle(DragDrop.DragHandle dragHandle)
Sets the options for the drag handles.
-
getDragMaxX
public Number getDragMaxX()
Returns the maximum X value the points can be moved to.Default: null
-
setDragMaxX
public void setDragMaxX(Number dragMaxX)
Sets the maximum X value the points can be moved to.
-
getDragMaxY
public Number getDragMaxY()
Returns the maximum Y value the points can be moved to.Default: null
-
setDragMaxY
public void setDragMaxY(Number dragMaxY)
Sets the maximum Y value the points can be moved to.
-
getDragMinX
public Number getDragMinX()
Returns the minimum X value the points can be moved to.Default: null
-
setDragMinX
public void setDragMinX(Number dragMinX)
Sets the minimum X value the points can be moved to.
-
getDragMinY
public Number getDragMinY()
Returns the minimum Y value the points can be moved to.Default: null
-
setDragMinY
public void setDragMinY(Number dragMinY)
Sets the minimum Y value the points can be moved to.
-
getDragPrecisionX
public Number getDragPrecisionX()
Returns the X precision value to drag to for this series. Set to 0 to disable. By default this is disabled, except for category axes, where the default is 1.Default: 0
-
setDragPrecisionX
public void setDragPrecisionX(Number dragPrecisionX)
Sets the X precision value to drag to for this series. Set to 0 to disable. By default this is disabled, except for category axes, where the default is 1.
-
getDragPrecisionY
public Number getDragPrecisionY()
Returns the Y precision value to drag to for this series. Set to 0 to disable. By default this is disabled, except for category axes, where the default is 1.Default: 0
-
setDragPrecisionY
public void setDragPrecisionY(Number dragPrecisionY)
Sets the Y precision value to drag to for this series. Set to 0 to disable. By default this is disabled, except for category axes, where the default is 1.
-
getDragSensitivity
public Number getDragSensitivity()
Returns the amount of pixels to drag the pointer before it counts as a drag operation. This prevents drag/drop to fire when just clicking or selecting points.Default: 2
-
setDragSensitivity
public void setDragSensitivity(Number dragSensitivity)
Sets the amount of pixels to drag the pointer before it counts as a drag operation. This prevents drag/drop to fire when just clicking or selecting points.
-
getGroupBy
public String getGroupBy()
Returns a property to group the points. Points with the same property value will be grouped together when moving.Default: null
-
setGroupBy
public void setGroupBy(String groupBy)
Sets a property to group the points. Points with the same property value will be grouped together when moving.
-
getGuideBox
public DragDrop.GuideBox getGuideBox()
Returns the style options for the guide box, if any. Otherwise, create a new one. The guide box has one state by default, the default state.
-
setGuideBox
public void setGuideBox(DragDrop.GuideBox guideBox)
Sets the style options for the guide box. The guide box has one state by default, the default state.
-
isLiveRedraw
public boolean isLiveRedraw()
Returns if updates points as they are dragged. If false, a guide box is drawn to illustrate the new point size.Default: true
-
setLiveRedraw
public void setLiveRedraw(boolean liveRedraw)
Sets if updates points as they are dragged. If false, a guide box is drawn to illustrate the new point size.
-
-