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

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

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

Device.destroy介绍

[英]Destroys the device in the operating system and releases the device's handle. If the device does not have a handle, this method may do nothing depending on the device.

This method is called after release.

Subclasses are supposed to reimplement this method and not call the super implementation.
[中]销毁操作系统中的设备并释放设备的句柄。如果设备没有句柄,此方法可能不会根据设备执行任何操作。
此方法在release之后调用。
子类应该重新实现这个方法,而不是调用super实现。

代码示例

代码示例来源: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.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.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.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.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;
      }
    }
  }
}

相关文章