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

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

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

ScrollBar.sendEvent介绍

暂无

代码示例

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

boolean setScrollBarVisible (ScrollBar bar, boolean visible) {
  if (scrollView == null) return false;
  if ((state & CANVAS) == 0) return false;
  if (visible) {
    if ((bar.state & HIDDEN) == 0) return false;
    bar.state &= ~HIDDEN;
  } else {
    if ((bar.state & HIDDEN) != 0) return false;
    bar.state |= HIDDEN;
  }
  if ((bar.style & SWT.HORIZONTAL) != 0) {
    scrollView.setHasHorizontalScroller (visible);
  } else {
    scrollView.setHasVerticalScroller (visible);
  }
  bar.sendEvent (visible ? SWT.Show : SWT.Hide);
  sendEvent (SWT.Resize);
  return true;
}

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

/**
 * Marks the receiver as visible if the argument is <code>true</code>,
 * and marks it invisible otherwise.
 * <p>
 * If one of the receiver's ancestors is not visible or some
 * other condition makes the receiver not visible, marking
 * it visible may not actually cause it to be displayed.
 * </p>
 *
 * @param visible the new visibility state
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setVisible (boolean visible) {
  checkWidget ();
  if (parent.setScrollBarVisible (this, visible)) {
    sendEvent (visible ? SWT.Show : SWT.Hide);
    parent.sendEvent (SWT.Resize);
  }
}

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

/**
 * Marks the receiver as visible if the argument is <code>true</code>,
 * and marks it invisible otherwise.
 * <p>
 * If one of the receiver's ancestors is not visible or some
 * other condition makes the receiver not visible, marking
 * it visible may not actually cause it to be displayed.
 * </p>
 *
 * @param visible the new visibility state
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setVisible (boolean visible) {
  checkWidget ();
  if (parent.setScrollBarVisible (this, visible)) {
    sendEvent (visible ? SWT.Show : SWT.Hide);
    parent.sendEvent (SWT.Resize);
  }
}

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

/**
 * Marks the receiver as visible if the argument is <code>true</code>,
 * and marks it invisible otherwise.
 * <p>
 * If one of the receiver's ancestors is not visible or some
 * other condition makes the receiver not visible, marking
 * it visible may not actually cause it to be displayed.
 * </p>
 *
 * @param visible the new visibility state
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setVisible (boolean visible) {
  checkWidget ();
  if (parent.setScrollBarVisible (this, visible)) {
    sendEvent (visible ? SWT.Show : SWT.Hide);
    parent.sendEvent (SWT.Resize);
  }
}

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

sendEvent (visible ? SWT.Show : SWT.Hide);

相关文章