com.ibm.dse.tools.workbench.gui
Class MouseEventRouter

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.gui.MouseEventRouter

public class MouseEventRouter
extends java.lang.Object
implements java.awt.event.MouseListener

This class post mouse events in the event queue changing the source of the original.


Field Summary
protected  java.awt.Component routedComponent
           
 
Constructor Summary
MouseEventRouter()
          This constructor creates a MouseEventRouter object.
MouseEventRouter(java.awt.Component routedComponent)
          This constructor creates a MouseEventRouter object with the given Component.
 
Method Summary
 java.awt.Component getRoutedComponent()
          This method gets the component that will handle the mouse events.
 void mouseClicked(java.awt.event.MouseEvent e)
          This method handles mouse clicks.
 void mouseEntered(java.awt.event.MouseEvent e)
          This method handles an event when the mouse enters in the component.
 void mouseExited(java.awt.event.MouseEvent e)
          This method handles an event when the mouse exits the component.
 void mousePressed(java.awt.event.MouseEvent e)
          This method handles an event when the mouse is pressed in the component.
 void mouseReleased(java.awt.event.MouseEvent e)
          This method handles an event when the mouse is released in the component.
 void setRoutedComponent(java.awt.Component newRoutedComponent)
          This method sets the component that will handle the mouse event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

routedComponent

protected java.awt.Component routedComponent
Constructor Detail

MouseEventRouter

public MouseEventRouter()
This constructor creates a MouseEventRouter object.

MouseEventRouter

public MouseEventRouter(java.awt.Component routedComponent)
This constructor creates a MouseEventRouter object with the given Component.
Parameters:
routedComponent - java.awt.Component
Method Detail

getRoutedComponent

public java.awt.Component getRoutedComponent()
This method gets the component that will handle the mouse events.
Returns:
java.awt.Component

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
This method handles mouse clicks.
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
e - java.awt.event.MouseEvent

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
This method handles an event when the mouse enters in the component.
Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
e - java.awt.event.MouseEvent

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
This method handles an event when the mouse exits the component.
Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
e - java.awt.event.MouseEvent

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
This method handles an event when the mouse is pressed in the component.
Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
e - java.awt.event.MouseEvent

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
This method handles an event when the mouse is released in the component.
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
e - java.awt.event.MouseEvent

setRoutedComponent

public void setRoutedComponent(java.awt.Component newRoutedComponent)
This method sets the component that will handle the mouse event.
Parameters:
newRoutedComponent - java.awt.Component