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

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

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

Scale.sendSelectionEvent介绍

暂无

代码示例

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

@Override
long /*int*/ gtk_value_changed (long /*int*/ adjustment) {
  sendSelectionEvent  (SWT.Selection);
  return 0;
}

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

@Override
int /*long*/ gtk_value_changed (int /*long*/ adjustment) {
  sendSelectionEvent  (SWT.Selection);
  return 0;
}

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

@Override
int /*long*/ gtk_value_changed (int /*long*/ adjustment) {
  sendSelectionEvent  (SWT.Selection);
  return 0;
}

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

void sendSelection () {
  NSEvent currEvent = NSApplication.sharedApplication().currentEvent();
  
  if (currEvent.type() != OS.NSLeftMouseUp)
    sendSelectionEvent (SWT.Selection);
}

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

sendSelectionEvent (SWT.Selection, event, true);

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

@Override
LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
  LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam);
  if (result != null) return result;
  /*
  * Bug in Windows.  When a track bar slider is changed
  * from WM_MOUSEWHEEL, it does not always send either
  * a WM_VSCROLL or M_HSCROLL to notify the application
  * of the change.  The fix is to detect that the selection
  * has changed and that notification has not been issued
  * and send the selection event.
  */
  int oldPosition = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
  ignoreSelection = true;
  int /*long*/ code = callWindowProc (handle, OS.WM_MOUSEWHEEL, wParam, lParam);
  ignoreSelection = false;
  int newPosition = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
  if (oldPosition != newPosition) {
    /*
    * 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.
    */
    sendSelectionEvent (SWT.Selection, null, true);
    // widget could be disposed at this point
  }
  return new LRESULT (code);
}

相关文章