org.argouml.swingext
Class Splitter.MyMouseListener

java.lang.Object
  |
  +--org.argouml.swingext.Splitter.MyMouseListener
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Enclosing class:
Splitter

private class Splitter.MyMouseListener
extends java.lang.Object
implements java.awt.event.MouseMotionListener, java.awt.event.MouseListener

The mouse listener to detect mouse interaction with this splitter


Field Summary
private  int mousePositionOnSplitterWhenPressed
          A value is recorded here when the mouse is pressed on the splitter.
private  int positionOfSplitterWhenPressed
          When the mouse is pressed the splitter position is recorded so that the the difference in position can be calculated when the mouse is released.
 
Constructor Summary
private Splitter.MyMouseListener()
           
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent me)
          On a double click either hide or show the component selected for quick hide.
 void mouseDragged(java.awt.event.MouseEvent me)
          On a mouse drag attempt to reposition splitter.
 void mouseEntered(java.awt.event.MouseEvent me)
          Empty method to satisy interface only, there is no action when mouse enters splitter area
 void mouseExited(java.awt.event.MouseEvent me)
          Empty method to satisy interface only, there is no action when mouse leaves splitter area
 void mouseMoved(java.awt.event.MouseEvent me)
          Empty method to satisy interface only, there is no action when mouse moves through splitter area
 void mousePressed(java.awt.event.MouseEvent me)
          On a mouse press record the position of the splitter and the position of the mouse on the splitter.
 void mouseReleased(java.awt.event.MouseEvent me)
          On a mouse release make sure that components are repositioned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

positionOfSplitterWhenPressed

private int positionOfSplitterWhenPressed
When the mouse is pressed the splitter position is recorded so that the the difference in position can be calculated when the mouse is released.


mousePositionOnSplitterWhenPressed

private int mousePositionOnSplitterWhenPressed
A value is recorded here when the mouse is pressed on the splitter. This allows the position of the mouse on the splitter to remain consistent when the splitter is moved.

Constructor Detail

Splitter.MyMouseListener

private Splitter.MyMouseListener()
Method Detail

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
On a mouse release make sure that components are repositioned.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent me)
On a mouse drag attempt to reposition splitter.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
On a mouse press record the position of the splitter and the position of the mouse on the splitter.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent me)
On a double click either hide or show the component selected for quick hide.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent me)
Empty method to satisy interface only, there is no action when mouse enters splitter area

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent me)
Empty method to satisy interface only, there is no action when mouse leaves splitter area

Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent me)
Empty method to satisy interface only, there is no action when mouse moves through splitter area

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener


ArgoUML © 1996-2004 (20040306)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook