org.eclipse.swt.graphics.GC.isDisposed()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(139)

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

GC.isDisposed介绍

[英]Returns true if the GC has been disposed, and false otherwise.

This method gets the dispose state for the GC. When a GC has been disposed, it is an error to invoke any other method (except #dispose()) using the GC.
[中]如果GC已被释放,则返回true,否则返回false
此方法获取GC的dispose状态。当GC已被释放时,使用GC调用任何其他方法(除了#dispose())都是错误的。

代码示例

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

/**
 * Returns a string containing a concise, human-readable
 * description of the receiver.
 *
 * @return a string representation of the receiver
 */
@Override
public String toString () {
  if (isDisposed()) return "GC {*DISPOSED*}";
  return "GC {" + handle + "}";
}

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

/**
 * Returns a string containing a concise, human-readable
 * description of the receiver.
 *
 * @return a string representation of the receiver
 */
@Override
public String toString () {
  if (isDisposed()) return "GC {*DISPOSED*}";
  return "GC {" + handle + "}";
}

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

/**
 * Returns a string containing a concise, human-readable
 * description of the receiver.
 *
 * @return a string representation of the receiver
 */
@Override
public String toString () {
  if (isDisposed()) return "GC {*DISPOSED*}";
  return "GC {" + handle + "}";
}

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

@Override
public boolean print (GC gc) {
  checkWidget ();
  if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  return false;
}

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

public boolean print (GC gc) {
  checkWidget ();
  if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  return false;
}

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

@Override
public boolean print (GC gc) {
  checkWidget ();
  if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  return false;
}

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

public Rectangle computeTrim(GC gc, DrawData data) {
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  return data.computeTrim(this, gc);
}

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

public Rectangle computeTrim(GC gc, DrawData data) {
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  return data.computeTrim(this, gc);
}

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

public Rectangle computeTrim(GC gc, DrawData data) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  return data.computeTrim(this, gc);
}

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

public void drawFocus(GC gc, Rectangle bounds, DrawData data) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  gc.drawFocus(bounds.x, bounds.y, bounds.width, bounds.height);
}

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

public Rectangle measureText(GC gc, Rectangle bounds, DrawData data, String text, int flags) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (text == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  return data.measureText(this, text, flags, gc, bounds);
}
}

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

public void drawBackground(GC gc, Rectangle bounds, DrawData data) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  data.draw(this, gc, bounds);
}

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

public void drawBackground(GC gc, Rectangle bounds, DrawData data) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  data.draw(this, gc, bounds);
}

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

public void drawFocus(GC gc, Rectangle bounds, DrawData data) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  gc.drawFocus(bounds.x, bounds.y, bounds.width, bounds.height);
}

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

public Rectangle measureText(GC gc, Rectangle bounds, DrawData data, String text, int flags) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (text == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  return data.measureText(this, text, flags, gc, bounds);
}
}

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

public void drawBackground(GC gc, Rectangle bounds, DrawData data) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  data.draw(this, gc, bounds);
}

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

public Rectangle measureText(GC gc, Rectangle bounds, DrawData data, String text, int flags) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (text == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  return data.measureText(this, text, flags, gc, bounds);
}

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

void drawBackgroundInPixels(GC gc, int x, int y, int width, int height, int offsetX, int offsetY) {
  if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  RECT rect = new RECT ();
  OS.SetRect (rect, x, y, x + width, y + height);
  int /*long*/ hDC = gc.handle;
  int pixel = background == -1 ? gc.getBackground ().handle : -1;
  drawBackground (hDC, rect, pixel, offsetX, offsetY);
}

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

public void drawImage(GC gc, Rectangle bounds, DrawData data, Image image, int flags) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  data.drawImage(this, image, gc, bounds);
}

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

public void drawText(GC gc, Rectangle bounds, DrawData data, String text, int flags) {
  checkTheme();
  if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (text == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
  data.drawText(this, text, flags, gc, bounds);
}

相关文章

GC类方法