Search this API

y.view
Interface MoveLabelMode.MoveLabelHelper

Enclosing class:
MoveLabelMode

public static interface MoveLabelMode.MoveLabelHelper

Handles mouse pressed, dragged, and released events to provide label specific interactive behavior for moving labels.

 
Your browser does not support SVG content.

Method Summary
 void cancel()
          Invoked when label move was aborted.
 void finished(MoveLabelMode.MoveLabelEvent e)
          Invoked when label move is done.
 void handleMove(MoveLabelMode.MoveLabelEvent e)
          Invoked when a label is moved in response to a mouse event.
 void initialize(MoveLabelMode.MoveLabelEvent e)
          Invoked when a label move is about to be started.
 

Method Detail

initialize

void initialize(MoveLabelMode.MoveLabelEvent e)
Invoked when a label move is about to be started. Will be followed by zero or more calls to handleMove and a final call to finished or cancel.

Called from MoveLabelMode's mousePressedLeft method.

Parameters:
e - the MoveLabelEvent providing context information.
See Also:
handleMove(y.view.MoveLabelMode.MoveLabelEvent), finished(y.view.MoveLabelMode.MoveLabelEvent), cancel(), MoveLabelMode.mousePressedLeft(double, double)

handleMove

void handleMove(MoveLabelMode.MoveLabelEvent e)
Invoked when a label is moved in response to a mouse event. May be called more than once after an initial call to initialize and before the final call to finished or cancel.

Called from MoveLabelMode's mouseDraggedLeft method.

Parameters:
e - the MoveLabelEvent providing context information.
See Also:
initialize(y.view.MoveLabelMode.MoveLabelEvent), finished(y.view.MoveLabelMode.MoveLabelEvent), cancel(), MoveLabelMode.mouseDraggedLeft(double, double)

finished

void finished(MoveLabelMode.MoveLabelEvent e)
Invoked when label move is done. May be called after an initial call to initialize and zero or more calls to handleMove.

Called from MoveLabelMode's mouseReleasedLeft method.

Parameters:
e - the MoveLabelEvent providing context information.
See Also:
initialize(y.view.MoveLabelMode.MoveLabelEvent), handleMove(y.view.MoveLabelMode.MoveLabelEvent), MoveLabelMode.mouseReleasedLeft(double, double)

cancel

void cancel()
Invoked when label move was aborted. May be called after an initial call to initialize and zero or more calls to handleMove.

Called from MoveLabelMode's cancelEditing method.

See Also:
initialize(y.view.MoveLabelMode.MoveLabelEvent), handleMove(y.view.MoveLabelMode.MoveLabelEvent), MoveLabelMode.cancelEditing()

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.