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

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

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

Canvas.checkWidget介绍

暂无

代码示例

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

  1. /**
  2. * Returns the IME.
  3. *
  4. * @return the IME
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 3.4
  12. */
  13. public IME getIME () {
  14. checkWidget ();
  15. return ime;
  16. }

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

  1. /**
  2. * Returns the IME.
  3. *
  4. * @return the IME
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 3.4
  12. */
  13. public IME getIME () {
  14. checkWidget();
  15. return ime;
  16. }

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

  1. /**
  2. * Returns the IME.
  3. *
  4. * @return the IME
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 3.4
  12. */
  13. public IME getIME () {
  14. checkWidget ();
  15. return ime;
  16. }

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

  1. /**
  2. * Returns the IME.
  3. *
  4. * @return the IME
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 3.4
  12. */
  13. public IME getIME () {
  14. checkWidget ();
  15. return ime;
  16. }

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

  1. /**
  2. * Returns the IME.
  3. *
  4. * @return the IME
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 3.4
  12. */
  13. public IME getIME () {
  14. checkWidget ();
  15. return ime;
  16. }

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

  1. /**
  2. * Returns the caret.
  3. * <p>
  4. * The caret for the control is automatically hidden
  5. * and shown when the control is painted or resized,
  6. * when focus is gained or lost and when an the control
  7. * is scrolled. To avoid drawing on top of the caret,
  8. * the programmer must hide and show the caret when
  9. * drawing in the window any other time.
  10. * </p>
  11. *
  12. * @return the caret for the receiver, may be null
  13. *
  14. * @exception SWTException <ul>
  15. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  16. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  17. * </ul>
  18. */
  19. public Caret getCaret () {
  20. checkWidget();
  21. return caret;
  22. }

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

  1. /**
  2. * Returns the caret.
  3. * <p>
  4. * The caret for the control is automatically hidden
  5. * and shown when the control is painted or resized,
  6. * when focus is gained or lost and when an the control
  7. * is scrolled. To avoid drawing on top of the caret,
  8. * the programmer must hide and show the caret when
  9. * drawing in the window any other time.
  10. * </p>
  11. *
  12. * @return the caret for the receiver, may be null
  13. *
  14. * @exception SWTException <ul>
  15. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  16. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  17. * </ul>
  18. */
  19. public Caret getCaret () {
  20. checkWidget();
  21. return caret;
  22. }

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

  1. /**
  2. * Returns the caret.
  3. * <p>
  4. * The caret for the control is automatically hidden
  5. * and shown when the control is painted or resized,
  6. * when focus is gained or lost and when an the control
  7. * is scrolled. To avoid drawing on top of the caret,
  8. * the programmer must hide and show the caret when
  9. * drawing in the window any other time.
  10. * </p>
  11. *
  12. * @return the caret for the receiver, may be null
  13. *
  14. * @exception SWTException <ul>
  15. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  16. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  17. * </ul>
  18. */
  19. public Caret getCaret () {
  20. checkWidget ();
  21. return caret;
  22. }

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

  1. public void setFont (Font font) {
  2. checkWidget ();
  3. if (caret != null) caret.setFont (font);
  4. super.setFont (font);
  5. }

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

  1. @Override
  2. public void setFont (Font font) {
  3. checkWidget();
  4. if (caret != null) caret.setFont (font);
  5. super.setFont (font);
  6. }

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

  1. @Override
  2. public void setFont (Font font) {
  3. checkWidget();
  4. if (caret != null) caret.setFont (font);
  5. super.setFont (font);
  6. }

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

  1. @Override
  2. public void setFont (Font font) {
  3. checkWidget ();
  4. if (caret != null) caret.setFont (font);
  5. super.setFont (font);
  6. }

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

  1. @Override
  2. public void setFont (Font font) {
  3. checkWidget();
  4. if (caret != null) caret.setFont (font);
  5. super.setFont (font);
  6. }

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

  1. /**
  2. * Sets the receiver's IME.
  3. *
  4. * @param ime the new IME for the receiver, may be null
  5. *
  6. * @exception IllegalArgumentException <ul>
  7. * <li>ERROR_INVALID_ARGUMENT - if the IME has been disposed</li>
  8. * </ul>
  9. * @exception SWTException <ul>
  10. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  11. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  12. * </ul>
  13. *
  14. * @since 3.4
  15. */
  16. public void setIME (IME ime) {
  17. checkWidget ();
  18. if (ime != null && ime.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
  19. this.ime = ime;
  20. }

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

  1. /**
  2. * Sets the receiver's IME.
  3. *
  4. * @param ime the new IME for the receiver, may be null
  5. *
  6. * @exception IllegalArgumentException <ul>
  7. * <li>ERROR_INVALID_ARGUMENT - if the IME has been disposed</li>
  8. * </ul>
  9. * @exception SWTException <ul>
  10. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  11. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  12. * </ul>
  13. *
  14. * @since 3.4
  15. */
  16. public void setIME (IME ime) {
  17. checkWidget ();
  18. if (ime != null && ime.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
  19. this.ime = ime;
  20. }

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

  1. /**
  2. * Sets the receiver's IME.
  3. *
  4. * @param ime the new IME for the receiver, may be null
  5. *
  6. * @exception IllegalArgumentException <ul>
  7. * <li>ERROR_INVALID_ARGUMENT - if the IME has been disposed</li>
  8. * </ul>
  9. * @exception SWTException <ul>
  10. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  11. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  12. * </ul>
  13. *
  14. * @since 3.4
  15. */
  16. public void setIME (IME ime) {
  17. checkWidget ();
  18. if (ime != null && ime.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
  19. this.ime = ime;
  20. }

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

  1. /**
  2. * Sets the receiver's IME.
  3. *
  4. * @param ime the new IME for the receiver, may be null
  5. *
  6. * @exception IllegalArgumentException <ul>
  7. * <li>ERROR_INVALID_ARGUMENT - if the IME has been disposed</li>
  8. * </ul>
  9. * @exception SWTException <ul>
  10. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  11. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  12. * </ul>
  13. *
  14. * @since 3.4
  15. */
  16. public void setIME (IME ime) {
  17. checkWidget ();
  18. if (ime != null && ime.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
  19. this.ime = ime;
  20. }

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

  1. /**
  2. * Sets the receiver's IME.
  3. *
  4. * @param ime the new IME for the receiver, may be null
  5. *
  6. * @exception IllegalArgumentException <ul>
  7. * <li>ERROR_INVALID_ARGUMENT - if the IME has been disposed</li>
  8. * </ul>
  9. * @exception SWTException <ul>
  10. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  11. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  12. * </ul>
  13. *
  14. * @since 3.4
  15. */
  16. public void setIME (IME ime) {
  17. checkWidget ();
  18. if (ime != null && ime.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
  19. this.ime = ime;
  20. }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

  1. /**
  2. * Removes the listener from the collection of listeners who will
  3. * be notified when the receiver needs to be painted.
  4. *
  5. * @param listener the listener which should no longer be notified
  6. *
  7. * @exception IllegalArgumentException <ul>
  8. * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
  9. * </ul>
  10. * @exception SWTException <ul>
  11. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  12. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  13. * </ul>
  14. *
  15. * @see PaintListener
  16. * @see #addPaintListener
  17. * @since 1.3
  18. */
  19. public void removePaintListener( PaintListener listener ) {
  20. checkWidget();
  21. if( listener == null ) {
  22. error( SWT.ERROR_NULL_ARGUMENT );
  23. }
  24. removeListener( SWT.Paint, listener );
  25. }

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

  1. void clearArea (int x, int y, int width, int height) {
  2. checkWidget ();
  3. if (OS.IsWindowVisible (handle)) {
  4. RECT rect = new RECT ();
  5. OS.SetRect (rect, x, y, x + width, y + height);
  6. int /*long*/ hDC = OS.GetDCEx (handle, 0, OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS);
  7. drawBackground (hDC, rect);
  8. OS.ReleaseDC (handle, hDC);
  9. }
  10. }

相关文章

Canvas类方法