edu.wpi.ebob.internal.gui
Class ICMouseListener

java.lang.Object
  extended by org.eclipse.swt.events.MouseAdapter
      extended by edu.wpi.ebob.internal.gui.ICMouseListener
All Implemented Interfaces:
java.util.EventListener, org.eclipse.swt.events.MouseListener, org.eclipse.swt.internal.SWTEventListener

 class ICMouseListener
extends org.eclipse.swt.events.MouseAdapter

Listens to mouseDown events for the purpose of registering selection.

Author:
Liam Morley

Field Summary
private  InstanceContainer container
           
private static int DEFAULT_LAST_TIME
           
private  int lastTime
          the last time mouseDown was fired
 
Constructor Summary
ICMouseListener(InstanceContainer container)
           
 
Method Summary
private  Instance getInstance(org.eclipse.swt.widgets.Control source)
          obtains the Instance that contains this control if the control itself is an Instance, or if a parent of the control is an Instance.
 void mouseDown(org.eclipse.swt.events.MouseEvent e)
           
 
Methods inherited from class org.eclipse.swt.events.MouseAdapter
mouseDoubleClick, mouseUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

private InstanceContainer container

lastTime

private int lastTime
the last time mouseDown was fired


DEFAULT_LAST_TIME

private static final int DEFAULT_LAST_TIME
See Also:
Constant Field Values
Constructor Detail

ICMouseListener

ICMouseListener(InstanceContainer container)
Method Detail

mouseDown

public void mouseDown(org.eclipse.swt.events.MouseEvent e)
Specified by:
mouseDown in interface org.eclipse.swt.events.MouseListener
Overrides:
mouseDown in class org.eclipse.swt.events.MouseAdapter

getInstance

private Instance getInstance(org.eclipse.swt.widgets.Control source)
obtains the Instance that contains this control if the control itself is an Instance, or if a parent of the control is an Instance.

Parameters:
source - the Control for which you desire an Instance.
Returns:
the Instance that contains this control, or null if no such Instance contains this control.