/** * Returns the widget text. * <p> * The text for a text widget is the characters in the widget, or * an empty string if this has never been set. * </p> * * @return the widget text * * @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 String getText () { return new String (getTextChars()); }
/** * Returns the widget text. * <p> * The text for a text widget is the characters in the widget, or * an empty string if this has never been set. * </p> * * @return the widget text * * @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 String getText () { return new String (getTextChars()); }
/** * Returns the widget text. * <p> * The text for a text widget is the characters in the widget, or * an empty string if this has never been set. * </p> * * @return the widget text * * @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 String getText () { return new String (getTextChars()); }
if ((style & SWT.PASSWORD) == 0) { Point selection = getSelection (); char [] text = getTextChars (); echoCharacter = echo; setEditText (text);