checkParent (parent); this.parent = parent; this.style = style;
/** * Sets the receiver's text, which is the string that the * window manager will typically display as the receiver's * <em>title</em>, to the argument, which must not be null. * * @param string the new text * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the text is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setText (String string) { if (string == null) error (SWT.ERROR_NULL_ARGUMENT); title = string; }
/** * Opens the given <code>dialog</code> in a non-blocking way and brings it to the front of the * display. If given, the <code>dialogCallback</code> is notified when the dialog is closed. * <p> * Use this method instead of the <code>open()</code> method from the respective * <code>Dialog</code> implementation when running in <em>JEE_COMPATIBILITY</em> mode. * </p> * * @param dialog the dialog to open, must not be <code>null</code>. * @param dialogCallback the callback to be notified when the dialog was closed or * <code>null</code> if no callback should be notified. * * @see Dialog * @see DialogCallback * @see org.eclipse.rap.rwt.application.Application.OperationMode * @deprecated Use <code>Dialog.open( DialogCallback )</code> instead */ @Deprecated public static void open( Dialog dialog, DialogCallback dialogCallback ) { ParamCheck.notNull( dialog, "dialog" ); dialog.open( dialogCallback ); }
/** * Opens this dialog in a non-blocking way and brings it to the front of the display. If given, * the <code>dialogCallback</code> is notified when the dialog is closed. * <p> * Use this method instead of the <code>open()</code> method from the respective * <code>Dialog</code> implementation when running in <em>JEE_COMPATIBILTY</em> mode. * </p> * * @param dialogCallback the callback to be notified when the dialog was closed or * <code>null</code> if no callback should be notified. * @see DialogCallback * @see org.eclipse.rap.rwt.application.Application.OperationMode * @rwtextension This method is not available in SWT. * @since 3.1 */ public void open( final DialogCallback dialogCallback ) { prepareOpen(); returnCode = SWT.CANCEL; shell.open(); shell.addShellListener( new ShellAdapter() { @Override public void shellClosed( ShellEvent event ) { if( dialogCallback != null ) { dialogCallback.dialogClosed( returnCode ); } } } ); }
/** * Sets the receiver's text, which is the string that the * window manager will typically display as the receiver's * <em>title</em>, to the argument, which must not be null. * * @param string the new text * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the text is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setText (String string) { if (string == null) error (SWT.ERROR_NULL_ARGUMENT); title = string; }
checkParent (parent); this.parent = parent; this.style = style;
/** * Sets the receiver's text, which is the string that the * window manager will typically display as the receiver's * <em>title</em>, to the argument, which must not be null. * * @param string the new text * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the text is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setText (String string) { if (string == null) error (SWT.ERROR_NULL_ARGUMENT); title = string; }
checkParent( parent ); this.parent = parent; this.style = style;
/** * Sets the receiver's text, which is the string that the * window manager will typically display as the receiver's * <em>title</em>, to the argument, which must not be null. * * @param string the new text * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the text is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setText (String string) { if (string == null) error (SWT.ERROR_NULL_ARGUMENT); title = string; }
checkParent (parent); this.parent = parent; this.style = style;
/** * Sets the receiver's text, which is the string that the * window manager will typically display as the receiver's * <em>title</em>, to the argument, which must not be null. * * @param string the new text * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the text is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setText (String string) { if (string == null) error (SWT.ERROR_NULL_ARGUMENT); title = string; }
checkParent (parent); this.parent = parent; this.style = style;
/** * Throws an exception if the specified widget can not be * used as a parent for the receiver. * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ void checkParent (Shell parent) { if (parent == null) error (SWT.ERROR_NULL_ARGUMENT); parent.checkWidget (); }
checkParent (parent); this.parent = parent; this.style = style;
/** * Throws an exception if the specified widget can not be * used as a parent for the receiver. * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ void checkParent (Shell parent) { if (parent == null) error (SWT.ERROR_NULL_ARGUMENT); parent.checkWidget (); }
/** * Checks that this class can be subclassed. * <p> * IMPORTANT: See the comment in <code>Widget.checkSubclass()</code>. * </p> * * @exception SWTException <ul> * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> * * @see Widget#checkSubclass */ protected void checkSubclass () { if (!Display.isValidClass (getClass ())) { error (SWT.ERROR_INVALID_SUBCLASS); } }
/** * Throws an exception if the specified widget can not be * used as a parent for the receiver. * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ void checkParent (Shell parent) { if (parent == null) error (SWT.ERROR_NULL_ARGUMENT); parent.checkWidget (); }
/** * Throws an exception if the specified widget can not be * used as a parent for the receiver. * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ void checkParent (Shell parent) { if (parent == null) error (SWT.ERROR_NULL_ARGUMENT); parent.checkWidget (); }
/** * Throws an exception if the specified widget can not be * used as a parent for the receiver. * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ void checkParent (Shell parent) { if (parent == null) error (SWT.ERROR_NULL_ARGUMENT); parent.checkWidget (); }
/** * Checks that this class can be subclassed. * <p> * IMPORTANT: See the comment in <code>Widget.checkSubclass()</code>. * </p> * * @exception SWTException <ul> * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> * * @see Widget#checkSubclass */ protected void checkSubclass () { if (!Display.isValidClass (getClass ())) { error (SWT.ERROR_INVALID_SUBCLASS); } }