Search this API

y.view
Class MoveSnapContext.MovingBendInfo

java.lang.Object
  extended by y.view.MoveSnapContext.MovingInfo
      extended by y.view.MoveSnapContext.MovingBendInfo
Enclosing class:
MoveSnapContext

public static final class MoveSnapContext.MovingBendInfo
extends MoveSnapContext.MovingInfo

Concrete subclass of MoveSnapContext.MovingInfo that describes the movement of a Bend.

 

Constructor Summary
MoveSnapContext.MovingBendInfo(Bend bend, YPoint originalLocation, byte mode)
          Creates a new instance for the given bend, location and mode
 
Method Summary
 void applyLocation(double dx, double dy)
          Calls Bend.setLocation(double, double) according to the movement constraints.
 Bend getBend()
          Yields the bend that is moved.
 
Methods inherited from class y.view.MoveSnapContext.MovingInfo
getOriginalLocation, isFreelyMovable, isHorizontallyFixed, isVerticallyFixed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoveSnapContext.MovingBendInfo

public MoveSnapContext.MovingBendInfo(Bend bend,
                                      YPoint originalLocation,
                                      byte mode)
Creates a new instance for the given bend, location and mode

Parameters:
bend - The bend to move
originalLocation - The location of the bend before the move started.
mode - The mode of the movement, which is a bitwise combination of MoveSnapContext.MOVE_X, MoveSnapContext.MOVE_Y, or MoveSnapContext.MOVE_XY.
Method Detail

getBend

public Bend getBend()
Yields the bend that is moved.


applyLocation

public void applyLocation(double dx,
                          double dy)
Calls Bend.setLocation(double, double) according to the movement constraints.

Specified by:
applyLocation in class MoveSnapContext.MovingInfo
Parameters:
dx - The delta in x coordinate direction of the move since the movement started.
dy - The delta in y coordinate direction of the move since the movement started.

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