org.eclipse.swt.dnd.Clipboard.checkSubclass()方法的使用及代码示例

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

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

Clipboard.checkSubclass介绍

[英]Checks that this class can be subclassed.

The SWT class library is intended to be subclassed only at specific, controlled points. This method enforces this rule unless it is overridden.

IMPORTANT: By providing an implementation of this method that allows a subclass of a class which does not normally allow subclassing to be created, the implementer agrees to be fully responsible for the fact that any such subclass will likely fail between SWT releases and will be strongly platform specific. No support is provided for user-written classes which are implemented in this fashion.

The ability to subclass outside of the allowed SWT classes is intended purely to enable those not on the SWT development team to implement patches in order to get around specific limitations in advance of when those limitations can be addressed by the team. Subclassing should not be attempted without an intimate and detailed understanding of the hierarchy.
[中]检查该类是否可以被子类化。
SWT类库仅在特定的受控点上进行子类化。除非重写此规则,否则此方法将强制执行此规则。
*重要提示:*通过提供此方法的实现,允许创建通常不允许创建子类的类的子类,实现者同意对任何此类子类可能在SWT版本之间失败这一事实负完全责任,并且将是非常特定于平台的。不支持以这种方式实现的用户编写的类。
在允许的SWT类之外进行子类化的能力纯粹是为了使那些不在SWT开发团队中的人能够实现补丁,以便在团队能够解决这些限制之前绕过特定的限制。如果没有对层次结构的深入和详细理解,就不应该尝试子类化。

代码示例

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

/**
 * Constructs a new instance of this class.  Creating an instance of a Clipboard
 * may cause system resources to be allocated depending on the platform.  It is therefore
 * mandatory that the Clipboard instance be disposed when no longer required.
 *
 * @param display the display on which to allocate the clipboard
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
 *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
 * </ul>
 *
 * @see Clipboard#dispose
 * @see Clipboard#checkSubclass
 */
public Clipboard(Display display) {
  checkSubclass ();
  if (display == null) {
    display = Display.getCurrent();
    if (display == null) {
      display = Display.getDefault();
    }
  }
  if (display.getThread() != Thread.currentThread()) {
    DND.error(SWT.ERROR_THREAD_INVALID_ACCESS);
  }
  this.display = display;
}

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

/**
 * Constructs a new instance of this class.  Creating an instance of a Clipboard
 * may cause system resources to be allocated depending on the platform.  It is therefore
 * mandatory that the Clipboard instance be disposed when no longer required.
 *
 * @param display the display on which to allocate the clipboard
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
 *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
 * </ul>
 *
 * @see Clipboard#dispose
 * @see Clipboard#checkSubclass
 */
public Clipboard(Display display) {	
  checkSubclass ();
  if (display == null) {
    display = Display.getCurrent();
    if (display == null) {
      display = Display.getDefault();
    }
  }
  if (display.getThread() != Thread.currentThread()) {
    DND.error(SWT.ERROR_THREAD_INVALID_ACCESS);
  }
  this.display = display;
}

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

/**
 * Constructs a new instance of this class.  Creating an instance of a Clipboard
 * may cause system resources to be allocated depending on the platform.  It is therefore
 * mandatory that the Clipboard instance be disposed when no longer required.
 *
 * @param display the display on which to allocate the clipboard
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
 *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
 * </ul>
 *
 * @see Clipboard#dispose
 * @see Clipboard#checkSubclass
 */
public Clipboard(Display display) {
  checkSubclass ();
  if (display == null) {
    display = Display.getCurrent();
    if (display == null) {
      display = Display.getDefault();
    }
  }
  if (display.getThread() != Thread.currentThread()) {
    DND.error(SWT.ERROR_THREAD_INVALID_ACCESS);
  }
  this.display = display;
}

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

/**
 * Constructs a new instance of this class.  Creating an instance of a Clipboard
 * may cause system resources to be allocated depending on the platform.  It is therefore
 * mandatory that the Clipboard instance be disposed when no longer required.
 *
 * @param display the display on which to allocate the clipboard
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
 *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
 * </ul>
 *
 * @see Clipboard#dispose
 * @see Clipboard#checkSubclass
 */
public Clipboard(Display display) {
  checkSubclass ();
  if (display == null) {
    display = Display.getCurrent();
    if (display == null) {
      display = Display.getDefault();
    }
  }
  if (display.getThread() != Thread.currentThread()) {
    DND.error(SWT.ERROR_THREAD_INVALID_ACCESS);
  }
  this.display = display;
}

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

checkSubclass ();
if (display == null) {
  display = Display.getCurrent();

相关文章