edu.umd.cs.piccolox.swt
Class PSWTMouseEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.awt.AWTEvent
          extended by java.awt.event.ComponentEvent
              extended by java.awt.event.InputEvent
                  extended by java.awt.event.MouseEvent
                      extended by edu.umd.cs.piccolox.swt.PSWTMouseEvent
All Implemented Interfaces:
java.io.Serializable

public class PSWTMouseEvent
extends java.awt.event.MouseEvent

Mouse event overridden to wrap an SWT MouseEvent as a Swing MouseEvent.

Author:
Lance Good
See Also:
Serialized Form

Field Summary
protected  int clickCount
          Number times the mouse was clicked in relation to the wrapped event.
protected  org.eclipse.swt.events.MouseEvent swtEvent
          Event being wrapped.
 
Fields inherited from class java.awt.event.MouseEvent
BUTTON1, BUTTON2, BUTTON3, MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_FIRST, MOUSE_LAST, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_WHEEL, NOBUTTON
 
Fields inherited from class java.awt.event.InputEvent
ALT_DOWN_MASK, ALT_GRAPH_DOWN_MASK, ALT_GRAPH_MASK, ALT_MASK, BUTTON1_DOWN_MASK, BUTTON1_MASK, BUTTON2_DOWN_MASK, BUTTON2_MASK, BUTTON3_DOWN_MASK, BUTTON3_MASK, CTRL_DOWN_MASK, CTRL_MASK, META_DOWN_MASK, META_MASK, SHIFT_DOWN_MASK, SHIFT_MASK
 
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
 
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PSWTMouseEvent(org.eclipse.swt.events.MouseEvent me, int type, int clickCount)
          Constructs a PSWTMouseEvent that wraps the provided SWT MouseEvent as a Swing one.
 
Method Summary
 int getButton()
          
 int getClickCount()
          
 java.lang.Object getData()
          Return the associated SWT data for the event.
 org.eclipse.swt.widgets.Display getDisplay()
          Return the display on which the interaction occurred.
 int getModifiers()
          
 int getModifiersEx()
          
 java.lang.Object getSource()
          
 org.eclipse.swt.widgets.Widget getWidget()
          Returns the widget from which the event was emitted.
 boolean isAltDown()
          
 boolean isControlDown()
          
 boolean isShiftDown()
          
 
Methods inherited from class java.awt.event.MouseEvent
getLocationOnScreen, getMouseModifiersText, getPoint, getX, getXOnScreen, getY, getYOnScreen, isPopupTrigger, paramString, translatePoint
 
Methods inherited from class java.awt.event.InputEvent
consume, getModifiersExText, getWhen, isAltGraphDown, isConsumed, isMetaDown
 
Methods inherited from class java.awt.event.ComponentEvent
getComponent
 
Methods inherited from class java.awt.AWTEvent
getID, setSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

swtEvent

protected org.eclipse.swt.events.MouseEvent swtEvent
Event being wrapped.


clickCount

protected int clickCount
Number times the mouse was clicked in relation to the wrapped event.

Constructor Detail

PSWTMouseEvent

public PSWTMouseEvent(org.eclipse.swt.events.MouseEvent me,
                      int type,
                      int clickCount)
Constructs a PSWTMouseEvent that wraps the provided SWT MouseEvent as a Swing one.

Parameters:
me - Mouse Event being wrapped
type - event type
clickCount - number of times the mouse has been clicked
Method Detail

getSource

public java.lang.Object getSource()

Overrides:
getSource in class java.util.EventObject

getClickCount

public int getClickCount()

Overrides:
getClickCount in class java.awt.event.MouseEvent

getButton

public int getButton()

Overrides:
getButton in class java.awt.event.MouseEvent

isShiftDown

public boolean isShiftDown()

Overrides:
isShiftDown in class java.awt.event.InputEvent

isControlDown

public boolean isControlDown()

Overrides:
isControlDown in class java.awt.event.InputEvent

isAltDown

public boolean isAltDown()

Overrides:
isAltDown in class java.awt.event.InputEvent

getModifiers

public int getModifiers()

Overrides:
getModifiers in class java.awt.event.InputEvent

getModifiersEx

public int getModifiersEx()

Overrides:
getModifiersEx in class java.awt.event.InputEvent

getWidget

public org.eclipse.swt.widgets.Widget getWidget()
Returns the widget from which the event was emitted.

Returns:
source widget

getDisplay

public org.eclipse.swt.widgets.Display getDisplay()
Return the display on which the interaction occurred.

Returns:
display on which the interaction occurred

getData

public java.lang.Object getData()
Return the associated SWT data for the event.

Returns:
data associated to the SWT event


Copyright © 1995-2011 Piccolo2D. All Rights Reserved.