teamdev.jxdesktop
Class Mouse

java.lang.Object
  extended byteamdev.jxdesktop.Mouse

public abstract class Mouse
extends java.lang.Object

Represents the system mouse that allows listening all mouse events.


Constructor Summary
protected Mouse()
           
 
Method Summary
 void addMouseListener(java.awt.event.MouseListener listener)
          Adds the specified mouse listener to receive system mouse events.
 void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
          Adds the specified mouse motion listener to receive system mouse events.
 void addMouseWheelListener(java.awt.event.MouseWheelListener listener)
          Adds the specified mouse wheel listener to receive mouse wheel events.
static Mouse createMouse()
          Creates a new instance of Mouse.
 void dispose()
          Disposes of the system mouse.
protected  void fireMouseClickedEvent(java.awt.event.MouseEvent event)
          Fires the MouseListener.mouseClicked event.
protected  void fireMouseDraggedEvent(java.awt.event.MouseEvent event)
          Fires the MouseMotionListener.mouseDragged event.
protected  void fireMouseMovedEvent(java.awt.event.MouseEvent event)
          Fires the MouseMotionListener.mouseMoved event.
protected  void fireMousePressedEvent(java.awt.event.MouseEvent event)
          Fires the MouseListener.mousePressed event.
protected  void fireMouseReleasedEvent(java.awt.event.MouseEvent event)
          Fires the MouseListener.mouseReleased event.
protected  void fireMouseWheelEvent(java.awt.event.MouseWheelEvent event)
          Fires the MouseWheelListener.mouseWheelMoved event.
 java.awt.event.MouseListener[] getMouseListeners()
          Returns an array of all the system mouse listeners registered.
 java.awt.event.MouseMotionListener[] getMouseMotionListeners()
          Returns an array of all the system mouse motion listeners registered.
 java.awt.event.MouseWheelListener[] getMouseWheelListeners()
          Returns an array of all the mouse wheel listeners.
protected  void processEvent(java.awt.event.MouseEvent e)
          Processes events for the current mouse object.
 void removeMouseListener(java.awt.event.MouseListener listener)
          Removes the specified mouse listener so that it no longer receives system mouse events.
 void removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
          Removes the specified mouse motion listener so that it no longer receives system mouse events.
 void removeMouseWheelListener(java.awt.event.MouseWheelListener listener)
          Removes the specified mouse wheel listener so that it no longer receives mouse wheel events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mouse

protected Mouse()
Method Detail

createMouse

public static Mouse createMouse()
Creates a new instance of Mouse.

Returns:
a new instance of Mouse.

addMouseListener

public void addMouseListener(java.awt.event.MouseListener listener)
Adds the specified mouse listener to receive system mouse events.

Parameters:
listener - the mouse listener.

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener listener)
Removes the specified mouse listener so that it no longer receives system mouse events.

Parameters:
listener - the mouse listener.

getMouseListeners

public java.awt.event.MouseListener[] getMouseListeners()
Returns an array of all the system mouse listeners registered.

Returns:
all of system's MouseListeners or an empty array if no mouse listeners are currently registered

addMouseMotionListener

public void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
Adds the specified mouse motion listener to receive system mouse events.

Parameters:
listener - the specified mouse motion listener

removeMouseMotionListener

public void removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
Removes the specified mouse motion listener so that it no longer receives system mouse events.

Parameters:
listener - the mouse motion listener.

getMouseMotionListeners

public java.awt.event.MouseMotionListener[] getMouseMotionListeners()
Returns an array of all the system mouse motion listeners registered.

Returns:
all of system's MouseMotionListeners or an empty array if no mouse motion listeners are currently registered

addMouseWheelListener

public void addMouseWheelListener(java.awt.event.MouseWheelListener listener)
Adds the specified mouse wheel listener to receive mouse wheel events.

Parameters:
listener - the mouse wheel listener.

removeMouseWheelListener

public void removeMouseWheelListener(java.awt.event.MouseWheelListener listener)
Removes the specified mouse wheel listener so that it no longer receives mouse wheel events.

Parameters:
listener - the mouse wheel listener.

getMouseWheelListeners

public java.awt.event.MouseWheelListener[] getMouseWheelListeners()
Returns an array of all the mouse wheel listeners.

Returns:
all of this component's MouseWheelListeners or an empty array if no mouse wheel listeners are currently registered

dispose

public void dispose()
Disposes of the system mouse.


fireMousePressedEvent

protected void fireMousePressedEvent(java.awt.event.MouseEvent event)
Fires the MouseListener.mousePressed event.

Parameters:
event - the MouseListener.mousePressed event.

fireMouseReleasedEvent

protected void fireMouseReleasedEvent(java.awt.event.MouseEvent event)
Fires the MouseListener.mouseReleased event.

Parameters:
event - the MouseListener.mouseReleased event.

fireMouseClickedEvent

protected void fireMouseClickedEvent(java.awt.event.MouseEvent event)
Fires the MouseListener.mouseClicked event.

Parameters:
event - the MouseListener.mouseClicked event.

fireMouseMovedEvent

protected void fireMouseMovedEvent(java.awt.event.MouseEvent event)
Fires the MouseMotionListener.mouseMoved event.

Parameters:
event - the MouseMotionListener.mouseMoved event.

fireMouseDraggedEvent

protected void fireMouseDraggedEvent(java.awt.event.MouseEvent event)
Fires the MouseMotionListener.mouseDragged event.

Parameters:
event - the MouseMotionListener.mouseDragged event.

fireMouseWheelEvent

protected void fireMouseWheelEvent(java.awt.event.MouseWheelEvent event)
Fires the MouseWheelListener.mouseWheelMoved event.

Parameters:
event - the MouseWheelListener.mouseWheelMoved event.

processEvent

protected void processEvent(java.awt.event.MouseEvent e)
Processes events for the current mouse object.

Parameters:
e - the event.