/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
checkSubclass (); if (display == null) { display = Display.getCurrent();