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

x33g5p2x  于2022-01-18 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(158)

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

Canvas.isVisible介绍

暂无

代码示例

代码示例来源:origin: BiglySoftware/BiglyBT

  1. @Override
  2. public void handleEvent(Event e) {
  3. if (refreshInfoCanvasQueued || !peerInfoCanvas.isVisible()) {
  4. return;
  5. }
  6. // wrap in asyncexec because sc.setMinWidth (called later) doesn't work
  7. // too well inside a resize (the canvas won't size isn't always updated)
  8. Utils.execSWTThreadLater(100, new AERunnable() {
  9. @Override
  10. public void runSupport() {
  11. if (refreshInfoCanvasQueued) {
  12. return;
  13. }
  14. refreshInfoCanvasQueued = true;
  15. if (img != null) {
  16. int iOldColCount = img.getBounds().width / BLOCK_SIZE;
  17. int iNewColCount = peerInfoCanvas.getClientArea().width / BLOCK_SIZE;
  18. if (iOldColCount != iNewColCount)
  19. refreshInfoCanvas();
  20. }
  21. }
  22. });
  23. }
  24. });

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

  1. /**
  2. * Returns <code>true</code> if the receiver is visible and all
  3. * of the receiver's ancestors are visible and <code>false</code>
  4. * otherwise.
  5. *
  6. * @return the receiver's visibility state
  7. *
  8. * @exception SWTException <ul>
  9. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  10. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  11. * </ul>
  12. *
  13. * @see #getVisible
  14. */
  15. public boolean isVisible () {
  16. checkWidget();
  17. return isVisible && parent.isVisible () && parent.hasFocus ();
  18. }

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

  1. /**
  2. * Returns <code>true</code> if the receiver is visible and all
  3. * of the receiver's ancestors are visible and <code>false</code>
  4. * otherwise.
  5. *
  6. * @return the receiver's visibility state
  7. *
  8. * @exception SWTException <ul>
  9. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  10. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  11. * </ul>
  12. *
  13. * @see #getVisible
  14. */
  15. public boolean isVisible () {
  16. checkWidget();
  17. return isVisible && parent.isVisible () && parent.hasFocus ();
  18. }

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

  1. /**
  2. * Returns <code>true</code> if the receiver is visible and all
  3. * of the receiver's ancestors are visible and <code>false</code>
  4. * otherwise.
  5. *
  6. * @return the receiver's visibility state
  7. *
  8. * @exception SWTException <ul>
  9. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  10. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  11. * </ul>
  12. *
  13. * @see #getVisible
  14. */
  15. public boolean isVisible () {
  16. checkWidget();
  17. return isVisible && parent.isVisible () && hasFocus ();
  18. }

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

  1. /**
  2. * Returns <code>true</code> if the receiver is visible and all
  3. * of the receiver's ancestors are visible and <code>false</code>
  4. * otherwise.
  5. *
  6. * @return the receiver's visibility state
  7. *
  8. * @exception SWTException <ul>
  9. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  10. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  11. * </ul>
  12. *
  13. * @see #getVisible
  14. */
  15. public boolean isVisible () {
  16. checkWidget();
  17. return isVisible && parent.isVisible () && parent.hasFocus ();
  18. }

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

  1. /**
  2. * Returns <code>true</code> if the receiver is visible and all
  3. * of the receiver's ancestors are visible and <code>false</code>
  4. * otherwise.
  5. *
  6. * @return the receiver's visibility state
  7. *
  8. * @exception SWTException <ul>
  9. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  10. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  11. * </ul>
  12. *
  13. * @see #getVisible
  14. */
  15. public boolean isVisible () {
  16. checkWidget();
  17. return isVisible && parent.isVisible () && parent.hasFocus ();
  18. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. horizontalOffset = selection;
  2. redraw ();
  3. if (header.isVisible () && drawCount <= 0) header.redraw ();

代码示例来源:origin: BiglySoftware/BiglyBT

  1. boolean sizeChanged)
  2. if ( drawCanvas == null || drawCanvas.isDisposed() || !drawCanvas.isVisible()){

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. void onScrollHorizontal (Event event) {
  2. ScrollBar hBar = getHorizontalBar ();
  3. if (hBar == null) return;
  4. int newSelection = hBar.getSelection ();
  5. update ();
  6. if (itemsCount > 0) {
  7. GC gc = new GC (this);
  8. gc.copyArea (
  9. 0, 0,
  10. clientArea.width, clientArea.height,
  11. horizontalOffset - newSelection, 0);
  12. gc.dispose ();
  13. } else {
  14. redraw (); /* ensure that static focus rectangle updates properly */
  15. }
  16. if (drawCount <= 0 && header.isVisible ()) {
  17. header.update ();
  18. Rectangle headerClientArea = header.getClientArea ();
  19. GC gc = new GC (header);
  20. gc.copyArea (
  21. 0, 0,
  22. headerClientArea.width, headerClientArea.height,
  23. horizontalOffset - newSelection, 0);
  24. gc.dispose ();
  25. }
  26. horizontalOffset = newSelection;
  27. }
  28. void onScrollVertical (Event event) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. if (hBar != null) hBar.setSelection (horizontalOffset);
  2. redraw ();
  3. if (drawCount <= 0 && header.isVisible ()) header.redraw ();

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. if (drawCount <= 0 && header.isVisible ()) header.redraw ();

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

  1. if (drawCount <= 0 && header.isVisible ()) header.redraw ();

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

  1. if (!isVisible ()) return;
  2. boolean isFocus = caret != null && caret.isFocusCaret ();
  3. if (isFocus) caret.killFocus ();

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

  1. if (!isVisible ()) return;
  2. boolean isFocus = caret != null && caret.isFocusCaret ();
  3. if (isFocus) caret.killFocus ();

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

  1. if (!isVisible ()) return;
  2. boolean isFocus = caret != null && caret.isFocusCaret ();
  3. if (isFocus) caret.killFocus ();

代码示例来源:origin: BiglySoftware/BiglyBT

  1. protected void drawScale(boolean sizeChanged) {
  2. if(drawCanvas == null || drawCanvas.isDisposed() || !drawCanvas.isVisible())
  3. return;

代码示例来源:origin: BiglySoftware/BiglyBT

  1. protected void drawChart(boolean sizeChanged) {
  2. if (drawCanvas == null || drawCanvas.isDisposed() || !drawCanvas.isVisible())

代码示例来源:origin: BiglySoftware/BiglyBT

  1. || !pieceInfoCanvas.isVisible()) {
  2. return( result );

相关文章

Canvas类方法