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

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

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

Device.isDisposed介绍

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

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

代码示例

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

/**
 * Disposes of the operating system resources associated with
 * this resource. Applications must dispose of all resources
 * which they allocate.
 * This method does nothing if the resource is already disposed.
 */
public void dispose() {
  if (device == null) return;
  if (device.isDisposed()) return;
  destroy();
  if (device.tracking) device.dispose_Object(this);
  device = null;
}

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

/**
 * Disposes of the operating system resources associated with
 * this resource. Applications must dispose of all resources
 * which they allocate.
 * This method does nothing if the resource is already disposed.
 */
public void dispose() {
  if (device == null) return;
  if (device.isDisposed()) return;
  destroy();
  if (device.tracking) device.dispose_Object(this);
  device = null;
}

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

/**
 * Disposes of the operating system resources associated with
 * this resource. Applications must dispose of all resources
 * which they allocate.
 * This method does nothing if the resource is already disposed.
 */
public void dispose() {
  if (device == null) return;
  if (device.isDisposed()) return;
  destroy();
  if (device.tracking) device.dispose_Object(this);
  device = null;
}

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

/**
 * Disposes of the operating system resources associated with
 * this resource. Applications must dispose of all resources
 * which they allocate.
 * This method does nothing if the resource is already disposed.
 */
public void dispose() {
  if (device == null) return;
  if (device.isDisposed()) return;
  destroy();
  if (device.tracking) device.dispose_Object(this);
  device = null;
}

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

/**
 * Disposes of the operating system resources associated with
 * this resource. Applications must dispose of all resources
 * which they allocate.
 * This method does nothing if the resource is already disposed.
 */
public void dispose() {
  if (device == null) return;
  if (device.isDisposed()) return;
  destroy();
  if (device.tracking) device.dispose_Object(this);
  device = null;
}

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

for (int i = 0; i < systemColorNames.length; i++) {
  String name = systemColorNames[i];
  if (name.equals(u_value) && device != null && !device.isDisposed()) {
    return device.getSystemColor(i + SYSTEMCOLOR_INDEXSTART);

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

/**
 * Disposes of the operating system resources associated with
 * the receiver. After this method has been invoked, the receiver
 * will answer <code>true</code> when sent the message
 * <code>isDisposed()</code>.
 *
 * @see #release
 * @see #destroy
 * @see #checkDevice
 */
public void dispose() {
 synchronized( deviceLock ) {
  if( !isDisposed() ) {
   checkDevice();
   release();
   destroy();
   disposed = true;
  }
 }
}

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

/**
 * Disposes of the operating system resources associated with
 * the receiver. After this method has been invoked, the receiver
 * will answer <code>true</code> when sent the message
 * <code>isDisposed()</code>.
 *
 * @see #release
 * @see #destroy
 * @see #checkDevice
 */
public void dispose () {
  synchronized (Device.class) {
    if (isDisposed()) return;
    checkDevice ();
    release ();
    destroy ();
    disposed = true;
    if (tracking) {
      synchronized (trackingLock) {
        printErrors ();
        objects = null;
        errors = null;
        trackingLock = null;
      }
    }
  }
}

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

/**
 * Disposes of the operating system resources associated with
 * the receiver. After this method has been invoked, the receiver
 * will answer <code>true</code> when sent the message
 * <code>isDisposed()</code>.
 *
 * @see #release
 * @see #destroy
 * @see #checkDevice
 */
public void dispose () {
  synchronized (Device.class) {
    if (isDisposed()) return;
    checkDevice ();
    release ();
    destroy ();
    deregister (this);
    xDisplay = 0;
    disposed = true;
    if (tracking) {
      synchronized (trackingLock) {
        objects = null;
        errors = null;
        trackingLock = null;
      }
    }
  }
}

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

/**
 * Disposes of the operating system resources associated with
 * the receiver. After this method has been invoked, the receiver
 * will answer <code>true</code> when sent the message
 * <code>isDisposed()</code>.
 *
 * @see #release
 * @see #destroy
 * @see #checkDevice
 */
public void dispose () {
  synchronized (Device.class) {
    if (isDisposed()) return;
    checkDevice ();
    release ();
    destroy ();
    deregister (this);
    xDisplay = 0;
    disposed = true;
    if (tracking) {
      synchronized (trackingLock) {
        objects = null;
        errors = null;
        trackingLock = null;
      }
    }
  }
}

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

private static void ensureMapColorsInitialized(Device device) {
  if (device == null || device.isDisposed()) {
    return;

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

/**
 * Disposes of the operating system resources associated with
 * the receiver. After this method has been invoked, the receiver
 * will answer <code>true</code> when sent the message
 * <code>isDisposed()</code>.
 *
 * @see #release
 * @see #destroy
 * @see #checkDevice
 */
public void dispose () {
  synchronized (Device.class) {
    if (isDisposed()) return;
    checkDevice ();
    release ();
    destroy ();
    disposed = true;
    if (tracking) {
      synchronized (trackingLock) {
        printErrors ();
        objects = null;
        errors = null;
        trackingLock = null;
      }
    }
  }
}

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

/**
 * Disposes of the operating system resources associated with
 * the receiver. After this method has been invoked, the receiver
 * will answer <code>true</code> when sent the message
 * <code>isDisposed()</code>.
 *
 * @see #release
 * @see #destroy
 * @see #checkDevice
 */
public void dispose () {
  synchronized (Device.class) {
    if (isDisposed()) return;
    checkDevice ();
    release ();
    destroy ();
    deregister (this);
    xDisplay = 0;
    disposed = true;
    if (tracking) {
      synchronized (trackingLock) {
        objects = null;
        errors = null;
        trackingLock = null;
      }
    }
  }
}

代码示例来源:origin: org.xworker/xworker_swt

if(registor.resource.isDisposed() || registor.resource.getDevice().isDisposed()){
  resources.put(path, null);
}else{

相关文章