com.cosylab.vdct.graphics.objects
Class LinkMoverUtilities

java.lang.Object
  extended by com.cosylab.vdct.graphics.objects.LinkMoverUtilities

public class LinkMoverUtilities
extends java.lang.Object

LinkMoverUtilities supplies the tools for moving the links.

Since:
VERSION
Version:
$Id: LinkMoverUtilities.java,v 1.4 2008-06-10 15:07:45 ssah Exp $
Author:
Jaka Bobnar

Field Summary
static int LINK_AREA_WIDTH
          The area around each link which is still sensitive and enables link move
static LinkMoverUtilities linkMoverUtilities
           
 
Method Summary
static java.util.Vector getAllConnectors(Group group)
          Returns a vector of all connectors in the group.
 java.awt.Cursor getCursorForMove()
          Returns the mouse cursor for the move that was last processed.
static LinkMoverUtilities getLinkMoverUtilities()
           
 java.util.Vector isMousePositionLinkMovable(int x, int y, Group viewGroup)
          Returns the vector containing the connectors which are moved when the links are dragged.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINK_AREA_WIDTH

public static final int LINK_AREA_WIDTH
The area around each link which is still sensitive and enables link move

See Also:
Constant Field Values

linkMoverUtilities

public static LinkMoverUtilities linkMoverUtilities
Method Detail

getLinkMoverUtilities

public static LinkMoverUtilities getLinkMoverUtilities()

getAllConnectors

public static java.util.Vector getAllConnectors(Group group)
Returns a vector of all connectors in the group. Method uses a recursive formula to search all the ContainerObjects inside the group given as a parameter.

Parameters:
group - the group to be searched for the connectors
Returns:
a Vector of all connectors

isMousePositionLinkMovable

public java.util.Vector isMousePositionLinkMovable(int x,
                                                   int y,
                                                   Group viewGroup)
Returns the vector containing the connectors which are moved when the links are dragged. This metod returns a Vector containing one Connector if parameters define area around a line or two Connectors if they define the area around the knee.

Parameters:
x - the absolute horizontal position of the pointer
y - the absolute vertical position of the pointer
Returns:
a Vector of the connectors that are affected by the move started at the point (x,y)

getCursorForMove

public java.awt.Cursor getCursorForMove()
Returns the mouse cursor for the move that was last processed.

Returns:
the appropriate cursor.