y.view.hierarchy
Class HierarchyHotSpotMode

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

public class HierarchyHotSpotMode
extends HotSpotMode

A specialized HotSpotMode suitable for editing hierarchically organized graphs. This modes uses a special resize policy for NodeRealizers that represent group nodes and consequentially implement AutoBoundsFeature. Such nodes may be resized to a limited degree by changing their auto bounds insets.


Field Summary
 
Fields inherited from class y.view.ViewMode
lastClickEvent, lastDragEvent, lastPressEvent, lastReleaseEvent, originalX, originalY, view
 
Constructor Summary
HierarchyHotSpotMode()
          Instantiates a new HierarchyHotSportMode.
HierarchyHotSpotMode(ViewContainer vc)
          Instantiates a new HierarchyHotSpotMode for a given ViewContainer
 
Method Summary
 void mousePressedLeft(double x, double y)
          Initiates resizing of selected nodes.
protected  void updateNodeRealizerBounds(NodeRealizer vr, double x, double y, double w, double h)
          Special handling of NodeRealizers that implement AutoBoundsFeature.
 
Methods inherited from class y.view.HotSpotMode
getCursor, mouseDraggedLeft, mouseReleasedLeft
 
Methods inherited from class y.view.ViewMode
activate, getGraph2D, getGridX, getGridY, getHitInfo, getHitInfo, getLastHitInfo, getName, init, isGrabFocusEnabled, isGridMode, mouseClicked, mouseClicked, mouseDragged, mouseDraggedMiddle, mouseDraggedRight, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mousePressedMiddle, mousePressedRight, mouseReleased, mouseReleased, mouseReleasedMiddle, mouseReleasedRight, mouseShiftPressedLeft, mouseShiftPressedMiddle, mouseShiftPressedRight, mouseShiftReleasedLeft, mouseShiftReleasedMiddle, mouseShiftReleasedRight, reactivateParent, 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

HierarchyHotSpotMode

public HierarchyHotSpotMode(ViewContainer vc)
Instantiates a new HierarchyHotSpotMode for a given ViewContainer


HierarchyHotSpotMode

public HierarchyHotSpotMode()
Instantiates a new HierarchyHotSportMode.

Method Detail

mousePressedLeft

public void mousePressedLeft(double x,
                             double y)
Initiates resizing of selected nodes.

Overrides:
mousePressedLeft in class HotSpotMode
Parameters:
x - the x-coordinate of the mouse event in world coordinates.
y - the y-coordinate of the mouse event in world coordinates.

updateNodeRealizerBounds

protected void updateNodeRealizerBounds(NodeRealizer vr,
                                        double x,
                                        double y,
                                        double w,
                                        double h)
Special handling of NodeRealizers that implement AutoBoundsFeature. The bounds of such realizers are modifed by changing their autobounds insets.

Overrides:
updateNodeRealizerBounds in class HotSpotMode
Parameters:
vr - the realizer of the node whose bounds shoud change.
x - the desired x-coordinate of the node bounds.
y - the desired y-coordinate of the node bounds.
w - the desired width of the node.
h - the desired height of the node.
See Also:
AutoBoundsFeature

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

2003