Treeviz 0.37 2010-10-17

ch.randelshofer.tree.hypertree
Class HTAction

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by ch.randelshofer.tree.hypertree.HTAction
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener

public class HTAction
extends java.awt.event.MouseAdapter
implements java.awt.event.MouseMotionListener

The HTAction class manage the action on the hypertree : drag of a node...


Method Summary
 void mouseClicked(java.awt.event.MouseEvent e)
          Called when a user clicked on the hyperbolic tree.
 void mouseDragged(java.awt.event.MouseEvent e)
          Called when a used drag the mouse on the hyperbolic tree.
 void mouseMoved(java.awt.event.MouseEvent e)
          Called when the mouse mouve into the hyperbolic tree.
 void mousePressed(java.awt.event.MouseEvent e)
          Called when a user pressed the mouse button on the hyperbolic tree.
 void mouseReleased(java.awt.event.MouseEvent e)
          Called when a user release the mouse button on the hyperbolic tree.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mouseWheelMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Called when a user pressed the mouse button on the hyperbolic tree. Used to get the starting point of the drag.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class java.awt.event.MouseAdapter
Parameters:
e - the MouseEvent generated when clicking

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Called when a user release the mouse button on the hyperbolic tree. Used to signal the end of the translation.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class java.awt.event.MouseAdapter
Parameters:
e - not used here

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Called when a user clicked on the hyperbolic tree. Used to put the corresponding node (if any) at the center of the hyperbolic tree.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class java.awt.event.MouseAdapter
Parameters:
e - the MouseEvent generated when clicking

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Called when a used drag the mouse on the hyperbolic tree. Used to translate the hypertree, thus moving the focus.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class java.awt.event.MouseAdapter
Parameters:
e - the MouseEvent generated when draging

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Called when the mouse mouve into the hyperbolic tree. Not used here.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class java.awt.event.MouseAdapter
Parameters:
e - the MouseEvent generated when mouving

Copyright 2007-2008 (c) Werner Randelshofer.
All rights reserved.