y.view.hierarchy
Class HierarchyCreateEdgeMode

java.lang.Object
  |
  +--y.view.ViewMode
        |
        +--y.view.CreateEdgeMode
              |
              +--y.view.hierarchy.HierarchyCreateEdgeMode
All Implemented Interfaces:
EventListener, MouseInputListener, MouseListener, MouseMotionListener

public class HierarchyCreateEdgeMode
extends CreateEdgeMode

A specialized CreateEdgeMode suitable for graphs that contain groups nodes.


Field Summary
 
Fields inherited from class y.view.ViewMode
lastClickEvent, lastDragEvent, lastPressEvent, lastReleaseEvent, originalX, originalY, view
 
Constructor Summary
HierarchyCreateEdgeMode()
           
 
Method Summary
protected  boolean acceptBend(Node start, Node hitNode, double x, double y)
          Apart from the default behaviour, also accept a bend if its coordinate lies within the inner region of a group node.
 
Methods inherited from class y.view.CreateEdgeMode
acceptSourceNode, acceptTargetNode, allowBendCreation, allowSelfloopCreation, cancelEdgeCreation, createDummyEdgeRealizer, createDummySourceNodeRealizer, createDummyTargetNodeRealizer, doAllowBendCreation, doAllowSelfloopCreation, edgeCreated, edgeMoved, getCancelKeyCode, getDummyEdgeRealizer, getDummySourceNodeRealizer, getDummyTargetNodeRealizer, init, mouseDraggedLeft, mouseMoved, mousePressedLeft, mouseReleasedLeft, mouseReleasedRight, mouseShiftPressedLeft, mouseShiftReleasedLeft, reactivateParent, setCancelKeyCode, sourceNodeDeclined, targetNodeDeclined
 
Methods inherited from class y.view.ViewMode
activate, getGraph2D, getGridX, getGridY, getHitInfo, getHitInfo, getLastHitInfo, getName, isGrabFocusEnabled, isGridMode, mouseClicked, mouseClicked, mouseDragged, mouseDraggedMiddle, mouseDraggedRight, mouseEntered, mouseExited, mouseMoved, mousePressed, mousePressedMiddle, mousePressedRight, mouseReleased, mouseReleased, mouseReleasedMiddle, mouseShiftPressedMiddle, mouseShiftPressedRight, mouseShiftReleasedMiddle, mouseShiftReleasedRight, setActiveView, setChild, setChild, setGrabFocusEnabled, setGridMode, setLastHitInfo, setName, setParent, translateX, translateY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchyCreateEdgeMode

public HierarchyCreateEdgeMode()
Method Detail

acceptBend

protected boolean acceptBend(Node start,
                             Node hitNode,
                             double x,
                             double y)
Apart from the default behaviour, also accept a bend if its coordinate lies within the inner region of a group node. A coordinate that lies on the border of the group node will not be accepted.

Overrides:
acceptBend in class CreateEdgeMode
Parameters:
start - the node from where edge creation started
hitNode - the node that was hit at the given location
x - the x-coordinate of the current location
y - the y-coordinate of the current location

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

2003