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

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

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

Scrollable.sendEvent介绍

暂无

代码示例

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

  1. boolean setScrollBarVisible (ScrollBar bar, boolean visible) {
  2. if (scrollView == null) return false;
  3. if ((state & CANVAS) == 0) return false;
  4. if (visible) {
  5. if ((bar.state & HIDDEN) == 0) return false;
  6. bar.state &= ~HIDDEN;
  7. } else {
  8. if ((bar.state & HIDDEN) != 0) return false;
  9. bar.state |= HIDDEN;
  10. }
  11. if ((bar.style & SWT.HORIZONTAL) != 0) {
  12. scrollView.setHasHorizontalScroller (visible);
  13. } else {
  14. scrollView.setHasVerticalScroller (visible);
  15. }
  16. bar.sendEvent (visible ? SWT.Show : SWT.Hide);
  17. sendEvent (SWT.Resize);
  18. return true;
  19. }

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

  1. /**
  2. * Marks the receiver as visible if the argument is <code>true</code>,
  3. * and marks it invisible otherwise.
  4. * <p>
  5. * If one of the receiver's ancestors is not visible or some
  6. * other condition makes the receiver not visible, marking
  7. * it visible may not actually cause it to be displayed.
  8. * </p>
  9. *
  10. * @param visible the new visibility state
  11. *
  12. * @exception SWTException <ul>
  13. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  14. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  15. * </ul>
  16. */
  17. public void setVisible (boolean visible) {
  18. checkWidget ();
  19. if (parent.setScrollBarVisible (this, visible)) {
  20. sendEvent (visible ? SWT.Show : SWT.Hide);
  21. parent.sendEvent (SWT.Resize);
  22. }
  23. }

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

  1. /**
  2. * Marks the receiver as visible if the argument is <code>true</code>,
  3. * and marks it invisible otherwise.
  4. * <p>
  5. * If one of the receiver's ancestors is not visible or some
  6. * other condition makes the receiver not visible, marking
  7. * it visible may not actually cause it to be displayed.
  8. * </p>
  9. *
  10. * @param visible the new visibility state
  11. *
  12. * @exception SWTException <ul>
  13. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  14. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  15. * </ul>
  16. */
  17. public void setVisible (boolean visible) {
  18. checkWidget ();
  19. if (parent.setScrollBarVisible (this, visible)) {
  20. sendEvent (visible ? SWT.Show : SWT.Hide);
  21. parent.sendEvent (SWT.Resize);
  22. }
  23. }

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

  1. /**
  2. * Marks the receiver as visible if the argument is <code>true</code>,
  3. * and marks it invisible otherwise.
  4. * <p>
  5. * If one of the receiver's ancestors is not visible or some
  6. * other condition makes the receiver not visible, marking
  7. * it visible may not actually cause it to be displayed.
  8. * </p>
  9. *
  10. * @param visible the new visibility state
  11. *
  12. * @exception SWTException <ul>
  13. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  14. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  15. * </ul>
  16. */
  17. public void setVisible (boolean visible) {
  18. checkWidget ();
  19. if (parent.setScrollBarVisible (this, visible)) {
  20. sendEvent (visible ? SWT.Show : SWT.Hide);
  21. parent.sendEvent (SWT.Resize);
  22. }
  23. }

相关文章

Scrollable类方法