ks.common.controller
Class MouseManager

java.lang.Object
  extended byks.common.controller.MouseManager

public class MouseManager
extends java.lang.Object

Coordinates the response to both Mouse and MouseMotion events by composing two MouseAdapters together. Note that the dragging state must be propagated into the Container because no more than one widget at a time can be dragging and drag controllers may need to ask if anything is being dragged. Because Undo events are signaled through right clicks, they become another event type. Creation date: (10/2/01 11:17:54 PM)


Constructor Summary
MouseManager(Container c)
          MouseManager constructor comment.
 
Method Summary
 UndoAdapter getUndoAdapter()
          Returns the Undo Adapter already in place.
 void handleMouseEvent(java.awt.event.MouseEvent me)
          Deliver the event to the proper controller.
 void setMouseAdapter(java.awt.event.MouseAdapter ma)
          Deploy this Mouse Adapter to handle (Click, Press, Release, Entered, Exit) Creation date: (10/2/01 11:49:38 PM)
 void setMouseMotionAdapter(java.awt.event.MouseMotionAdapter ma)
          Deploy this Mouse Motion Adapter to handle (Move, Drag) Creation date: (10/2/01 11:50:25 PM)
 void setUndoAdapter(UndoAdapter newUndoAdapter)
          Sets the Undo Adapter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseManager

public MouseManager(Container c)
MouseManager constructor comment.

Method Detail

getUndoAdapter

public UndoAdapter getUndoAdapter()
Returns the Undo Adapter already in place. Creation date: (10/11/01 7:26:51 PM)

Returns:
ks.common.controller.UndoAdapter

handleMouseEvent

public void handleMouseEvent(java.awt.event.MouseEvent me)
Deliver the event to the proper controller.

Also maintain the state value of 'dragging'.

Mouse clicks with the Right button are converted into UNDO events; however, a right-click event is ignored if any other mouse button is down to prevent an undo from being requested as another move is currently in the middle of being made (since V1.6.12).

To enable troubleshooting, all Exceptions are caught here... Creation date: (10/2/01 11:21:07 PM)

Parameters:
me - java.awt.event.MouseEvent

setMouseAdapter

public void setMouseAdapter(java.awt.event.MouseAdapter ma)
Deploy this Mouse Adapter to handle (Click, Press, Release, Entered, Exit) Creation date: (10/2/01 11:49:38 PM)

Parameters:
ma - java.awt.event.MouseAdapter

setMouseMotionAdapter

public void setMouseMotionAdapter(java.awt.event.MouseMotionAdapter ma)
Deploy this Mouse Motion Adapter to handle (Move, Drag) Creation date: (10/2/01 11:50:25 PM)

Parameters:
ma - java.awt.event.MouseMotionAdapter

setUndoAdapter

public void setUndoAdapter(UndoAdapter newUndoAdapter)
Sets the Undo Adapter. Creation date: (10/11/01 7:26:51 PM)

Parameters:
newUndoAdapter - ks.common.controller.UndoAdapter