|
|||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
This widget displays an interactive line connecting a start position with the current mouse position until the user releases the mouse button.
| Method Summary | |
|---|---|
|
activate(/*GraphCanvas*/ canvas)
activates the drag line for the specified canvas. |
|
activateAt(/*GraphCanvas*/ canvas, /*Object*/ pos)
activates the drag line for the specified canvas at the given position. |
|
deactivate()
deactivates the drag line. |
|
onDeactivated()
is called when the drag line is deactivated (by deactivate() or after finishing a drag) |
|
onLineChange(/*Number*/ x1, /*Number*/ y1, /*Number*/ x2, /*Number*/ y2)
is called whenever the drag line changes |
|
onLineDone(/*Number*/ x1, /*Number*/ y1, /*Number*/ x2, /*Number*/ y2)
is called when the user finishes dragging the line |
| Method Detail |
|---|
activate(/*GraphCanvas*/ canvas)
activateAt(/*GraphCanvas*/ canvas, /*Object*/ pos)
deactivate()
onDeactivated()
onLineChange(/*Number*/ x1, /*Number*/ y1, /*Number*/ x2, /*Number*/ y2)
x1 - x-coordinate of the start point of the line
y1 - y-coordinate of the start point of the line
x2 - x-coordinate of the end point of the line
y2 - y-coordinate of the end point of the line
onLineDone(/*Number*/ x1, /*Number*/ y1, /*Number*/ x2, /*Number*/ y2)
x1 - x-coordinate of the start point of the line
y1 - y-coordinate of the start point of the line
x2 - x-coordinate of the end point of the line
y2 - y-coordinate of the end point of the line