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.drag
andpoint.drop
.- Since:
- 7.2.1.0
- Author:
- rudyhuang
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DragDrop.DragHandle
Options for the drag handles.static class
DragDrop.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.DragHandle
getDragHandle()
Returns the options for the drag handles, if any.Number
getDragMaxX()
Returns the maximum X value the points can be moved to.Number
getDragMaxY()
Returns the maximum Y value the points can be moved to.Number
getDragMinX()
Returns the minimum X value the points can be moved to.Number
getDragMinY()
Returns the minimum Y value the points can be moved to.Number
getDragPrecisionX()
Returns the X precision value to drag to for this series.Number
getDragPrecisionY()
Returns the Y precision value to drag to for this series.Number
getDragSensitivity()
Returns the amount of pixels to drag the pointer before it counts as a drag operation.String
getGroupBy()
Returns a property to group the points.DragDrop.GuideBox
getGuideBox()
Returns the style options for the guide box, if any.boolean
isDraggableX()
Returns if enable dragging in the X dimension.boolean
isDraggableX1()
(X-Range) Returns if enable dragging x value individually.boolean
isDraggableX2()
(X-Range) Returns if enable dragging x2 value individually.boolean
isDraggableY()
Returns if enable dragging in the Y dimension.boolean
isLiveRedraw()
Returns if updates points as they are dragged.void
setDraggableX(boolean draggableX)
Sets if enable dragging in the X dimension.void
setDraggableX1(boolean draggableX1)
(X-Range) Sets if enable dragging x value individually.void
setDraggableX2(boolean draggableX2)
(X-Range) Sets if enable dragging x2 value individually.void
setDraggableY(boolean draggableY)
Sets if enable dragging in the Y dimension.void
setDragHandle(DragDrop.DragHandle dragHandle)
Sets the options for the drag handles.void
setDragMaxX(Number dragMaxX)
Sets the maximum X value the points can be moved to.void
setDragMaxY(Number dragMaxY)
Sets the maximum Y value the points can be moved to.void
setDragMinX(Number dragMinX)
Sets the minimum X value the points can be moved to.void
setDragMinY(Number dragMinY)
Sets the minimum Y value the points can be moved to.void
setDragPrecisionX(Number dragPrecisionX)
Sets the X precision value to drag to for this series.void
setDragPrecisionY(Number dragPrecisionY)
Sets the Y precision value to drag to for this series.void
setDragSensitivity(Number dragSensitivity)
Sets the amount of pixels to drag the pointer before it counts as a drag operation.void
setGroupBy(String groupBy)
Sets a property to group the points.void
setGuideBox(DragDrop.GuideBox guideBox)
Sets the style options for the guide box.void
setLiveRedraw(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.
-
-