org.eclipse.swt.widgets.ScrollBar.sendSelectionEvent()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中org.eclipse.swt.widgets.ScrollBar.sendSelectionEvent()方法的一些代码示例,展示了ScrollBar.sendSelectionEvent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScrollBar.sendSelectionEvent()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.ScrollBar
类名称:ScrollBar
方法名:sendSelectionEvent

ScrollBar.sendSelectionEvent介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {

  /* Do nothing when scrolling is ending */
  int code = OS.LOWORD (wParam);
  if (code == OS.SB_ENDSCROLL) return null;

  /*
  * Send the event because WM_HSCROLL and
  * WM_VSCROLL are sent from a modal message
  * loop in Windows that is active when the
  * user is scrolling.
  */
  Event event = new Event ();
  switch (code) {
    case OS.SB_THUMBPOSITION:	event.detail = SWT.NONE;  break;
    case OS.SB_THUMBTRACK:		event.detail = SWT.DRAG;  break;
    case OS.SB_TOP: 			event.detail = SWT.HOME;  break;
    case OS.SB_BOTTOM:			event.detail = SWT.END;  break;
    case OS.SB_LINEDOWN:		event.detail = SWT.ARROW_DOWN;  break;
    case OS.SB_LINEUP: 			event.detail = SWT.ARROW_UP;  break;
    case OS.SB_PAGEDOWN:		event.detail = SWT.PAGE_DOWN;  break;
    case OS.SB_PAGEUP:			event.detail = SWT.PAGE_UP;  break;
  }
  sendSelectionEvent  (SWT.Selection, event, true);
  // the widget could be destroyed at this point
  return null;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
  GdkEvent gtkEvent = new GdkEvent ();
  OS.memmove (gtkEvent, gdkEvent, GdkEvent.sizeof);
  switch (gtkEvent.type) {
    case OS.GDK_BUTTON_RELEASE: {
      GdkEventButton gdkEventButton = new GdkEventButton ();
      OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof);
      if (gdkEventButton.button == 1 && detail == OS.GTK_SCROLL_JUMP) {
        if (!dragSent) {
          Event event = new Event ();
          event.detail = SWT.DRAG;
          sendSelectionEvent (SWT.Selection, event, false);
        }
        sendSelectionEvent (SWT.Selection);
      }
      detail = OS.GTK_SCROLL_NONE;
      dragSent = false;
      break;
    }
  }
  return super.gtk_event_after (widget, gdkEvent);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
  GdkEvent gtkEvent = new GdkEvent ();
  OS.memmove (gtkEvent, gdkEvent, GdkEvent.sizeof);
  switch (gtkEvent.type) {
    case OS.GDK_BUTTON_RELEASE: {
      GdkEventButton gdkEventButton = new GdkEventButton ();
      OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof);
      if (gdkEventButton.button == 1 && detail == OS.GTK_SCROLL_JUMP) {
        if (!dragSent) {
          Event event = new Event ();
          event.detail = SWT.DRAG;
          sendSelectionEvent (SWT.Selection, event, false);
        }
        sendSelectionEvent (SWT.Selection);
      }
      detail = OS.GTK_SCROLL_NONE;
      dragSent = false;
      break;
    }
  }
  return super.gtk_event_after (widget, gdkEvent);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) {
  GdkEvent gtkEvent = new GdkEvent ();
  OS.memmove (gtkEvent, gdkEvent, GdkEvent.sizeof);
  switch (gtkEvent.type) {
    case OS.GDK_BUTTON_RELEASE: {
      GdkEventButton gdkEventButton = new GdkEventButton ();
      OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof);
      if (gdkEventButton.button == 1 && detail == OS.GTK_SCROLL_JUMP) {
        if (!dragSent) {
          Event event = new Event ();
          event.detail = SWT.DRAG;
          sendSelectionEvent (SWT.Selection, event, false);
        }
        sendSelectionEvent (SWT.Selection);
      }
      detail = OS.GTK_SCROLL_NONE;
      dragSent = false;
      break;
    }
  }
  return super.gtk_event_after (widget, gdkEvent);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

sendSelectionEvent (SWT.Selection, event, false);
parent.updateScrollBarValue (this);
if (OS.GTK3) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

sendSelectionEvent (SWT.Selection, event, false);
parent.updateScrollBarValue (this);
if (OS.GTK3) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

sendSelectionEvent (SWT.Selection, event, false);
parent.updateScrollBarValue (this);
if (OS.GTK3) {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

Event event = new Event ();
event.detail = position < vPosition ? SWT.PAGE_UP : SWT.PAGE_DOWN;
verticalBar.sendSelectionEvent (SWT.Selection, event, true);
Event event = new Event ();
event.detail = position < hPosition ? SWT.PAGE_UP : SWT.PAGE_DOWN;
horizontalBar.sendSelectionEvent (SWT.Selection, event, true);

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

Event event = new Event ();
event.detail = deltaY > 0 ? SWT.PAGE_UP : SWT.PAGE_DOWN;	
bar.sendSelectionEvent (SWT.Selection, event, true);
handled = true;
Event event = new Event ();
event.detail = deltaX > 0 ? SWT.PAGE_UP : SWT.PAGE_DOWN;	
bar.sendSelectionEvent (SWT.Selection, event, true);
handled = true;

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

sendSelectionEvent(SWT.Selection, event, true);

相关文章