本文整理了Java中org.eclipse.swt.events.MouseEvent.<init>()
方法的一些代码示例,展示了MouseEvent.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MouseEvent.<init>()
方法的具体详情如下:
包路径:org.eclipse.swt.events.MouseEvent
类名称:MouseEvent
方法名:<init>
[英]Constructs a new instance of this class based on the information in the given untyped event.
[中]基于给定的非类型化事件中的信息构造此类的新实例。
代码示例来源:origin: Renanse/Ardor3D
@Before
public void setup() throws Exception {
control = createMock("control", SwtCanvas.class);
wrapper = new SwtMouseWrapper(control);
final Event event = new Event();
event.widget = control;
e1 = new MouseEvent(event);
e2 = new MouseEvent(event);
mocks = new Object[] { control };
}
代码示例来源:origin: com.metsci.glimpse/glimpse-extras-swt
protected MouseEvent toLocalCoords( MouseEvent e, GlimpseTargetStack stack )
{
if ( stack == null ) return null;
GlimpseBounds bounds = stack.getBounds( );
if ( bounds == null ) return null;
if ( ! ( e.getSource( ) instanceof Control ) ) return null;
Rectangle parentBounds = ( ( Control ) e.getSource( ) ).getBounds( );
int parentHeight = parentBounds.height;
Event localEvent = new Event( );
localEvent.x = e.x - bounds.getX( );
localEvent.y = e.y - ( parentHeight - ( bounds.getY( ) + bounds.getHeight( ) ) );
localEvent.button = e.button;
localEvent.count = e.count;
localEvent.display = e.display;
localEvent.stateMask = e.stateMask;
localEvent.time = e.time;
localEvent.widget = e.widget;
// store the GlimpseTargetStack in the data field (marked as for application use)
localEvent.data = stack;
return new MouseEvent( localEvent );
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
public static void processMouseEvents( Control control ) {
if( WidgetLCAUtil.wasEventSent( control, JSConst.EVENT_MOUSE_DOWN ) ) {
MouseEvent event = new MouseEvent( control, MouseEvent.MOUSE_DOWN );
event.button = readIntParam( JSConst.EVENT_MOUSE_DOWN_BUTTON );
Point point = readXYParams( control, JSConst.EVENT_MOUSE_DOWN_X, JSConst.EVENT_MOUSE_DOWN_Y );
MouseEvent event = new MouseEvent( control, MouseEvent.MOUSE_DOUBLE_CLICK );
event.button = readIntParam( JSConst.EVENT_MOUSE_DOUBLE_CLICK_BUTTON );
Point point = readXYParams( control,
MouseEvent event = new MouseEvent( control, MouseEvent.MOUSE_UP );
event.button = readIntParam( JSConst.EVENT_MOUSE_UP_BUTTON );
Point point = readXYParams( control, JSConst.EVENT_MOUSE_UP_X, JSConst.EVENT_MOUSE_UP_Y );
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
((MouseListener) eventListener).mouseDown(new MouseEvent(e));
break;
((MouseListener) eventListener).mouseDoubleClick(new MouseEvent(e));
break;
((MouseTrackListener) eventListener).mouseEnter (new MouseEvent (e));
break;
((MouseTrackListener) eventListener).mouseExit (new MouseEvent (e));
break;
((MouseTrackListener) eventListener).mouseHover (new MouseEvent (e));
break;
((MouseMoveListener) eventListener).mouseMove(new MouseEvent(e));
return;
((MouseWheelListener) eventListener).mouseScrolled(new MouseEvent(e));
return;
((MouseListener) eventListener).mouseUp(new MouseEvent(e));
break;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
((MouseListener) eventListener).mouseDown(new MouseEvent(e));
break;
((MouseListener) eventListener).mouseDoubleClick(new MouseEvent(e));
break;
((MouseTrackListener) eventListener).mouseEnter (new MouseEvent (e));
break;
((MouseTrackListener) eventListener).mouseExit (new MouseEvent (e));
break;
((MouseTrackListener) eventListener).mouseHover (new MouseEvent (e));
break;
((MouseMoveListener) eventListener).mouseMove(new MouseEvent(e));
return;
((MouseWheelListener) eventListener).mouseScrolled(new MouseEvent(e));
return;
((MouseListener) eventListener).mouseUp(new MouseEvent(e));
break;
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
((MouseListener) eventListener).mouseDown(new MouseEvent(e));
break;
((MouseListener) eventListener).mouseDoubleClick(new MouseEvent(e));
break;
((MouseTrackListener) eventListener).mouseEnter (new MouseEvent (e));
break;
((MouseTrackListener) eventListener).mouseExit (new MouseEvent (e));
break;
((MouseTrackListener) eventListener).mouseHover (new MouseEvent (e));
break;
((MouseMoveListener) eventListener).mouseMove(new MouseEvent(e));
return;
((MouseWheelListener) eventListener).mouseScrolled(new MouseEvent(e));
return;
((MouseListener) eventListener).mouseUp(new MouseEvent(e));
break;
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
((MouseListener) eventListener).mouseDown(new MouseEvent(e));
break;
((MouseListener) eventListener).mouseDoubleClick(new MouseEvent(e));
break;
((MouseTrackListener) eventListener).mouseEnter (new MouseEvent (e));
break;
((MouseTrackListener) eventListener).mouseExit (new MouseEvent (e));
break;
((MouseTrackListener) eventListener).mouseHover (new MouseEvent (e));
break;
((MouseMoveListener) eventListener).mouseMove(new MouseEvent(e));
return;
((MouseWheelListener) eventListener).mouseScrolled(new MouseEvent(e));
return;
((MouseListener) eventListener).mouseUp(new MouseEvent(e));
break;
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
((MouseListener) eventListener).mouseDown(new MouseEvent(e));
break;
((MouseListener) eventListener).mouseDoubleClick(new MouseEvent(e));
break;
((MouseTrackListener) eventListener).mouseEnter (new MouseEvent (e));
break;
((MouseTrackListener) eventListener).mouseExit (new MouseEvent (e));
break;
((MouseTrackListener) eventListener).mouseHover (new MouseEvent (e));
break;
((MouseMoveListener) eventListener).mouseMove(new MouseEvent(e));
return;
((MouseWheelListener) eventListener).mouseScrolled(new MouseEvent(e));
return;
((MouseListener) eventListener).mouseUp(new MouseEvent(e));
break;
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
((MouseListener) eventListener).mouseDown(new MouseEvent(e));
break;
((MouseListener) eventListener).mouseDoubleClick(new MouseEvent(e));
break;
((MouseListener) eventListener).mouseUp(new MouseEvent(e));
break;
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
case SWT.MouseDoubleClick:
case SWT.MouseWheel:
case SWT.MouseHover: toString += new MouseEvent (event).toString (); break;
case SWT.Paint: toString += new PaintEvent (event).toString (); break;
case SWT.Move:
内容来源于网络,如有侵权,请联系作者删除!