diff options
author | Lakshmi Shanmugam <lshanmug@in.ibm.com> | 2013-05-29 17:58:21 +0530 |
---|---|---|
committer | Lakshmi Shanmugam <lshanmug@in.ibm.com> | 2013-05-29 17:58:21 +0530 |
commit | 5db676d32485d409bd6752d94158940ce4f8df6e (patch) | |
tree | 55099992d6e07612b8a18af18de7449d3a91a260 /bundles/org.eclipse.swt | |
parent | 1850966458c42e34e713e8202df35507821be1db (diff) | |
download | eclipse.platform.swt-5db676d32485d409bd6752d94158940ce4f8df6e.tar.gz eclipse.platform.swt-5db676d32485d409bd6752d94158940ce4f8df6e.tar.xz eclipse.platform.swt-5db676d32485d409bd6752d94158940ce4f8df6e.zip |
Bug 408957 - Improve API doc for Text.getTextChars() and setTextChars()
Diffstat (limited to 'bundles/org.eclipse.swt')
3 files changed, 35 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java index a0999ea173..a4270d2bb2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -1211,7 +1211,12 @@ public String getText (int start, int end) { * The text for a text widget is the characters in the widget, or * a zero-length array if this has never been set. * </p> - * + * <p> + * Note: Use the API to protect the text, for example, when widget is used as + * a password field. However, the text can't be protected if Segment listener + * is added to the widget. + * </p> + * * @return a character array that contains the widget's text * * @exception SWTException <ul> @@ -2105,7 +2110,12 @@ public void setText (String string) { * Sets the contents of the receiver to the characters in the array. If the receiver * has style <code>SWT.SINGLE</code> and the argument contains multiple lines of text * then the result of this operation is undefined and may vary between platforms. - * + * <p> + * Note: Use the API to protect the text, for example, when widget is used as + * a password field. However, the text can't be protected if Verify or + * Segment listener is added to the widget. + * </p> + * * @param text a character array that contains the new text * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java index 458777ecfb..4aa53ead4a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java @@ -1264,6 +1264,11 @@ public String getText (int start, int end) { * The text for a text widget is the characters in the widget, or * a zero-length array if this has never been set. * </p> + * <p> + * Note: Use the API to protect the text, for example, when widget is used as + * a password field. However, the text can't be protected if Segment listener + * is added to the widget. + * </p> * * @return a character array that contains the widget's text * @@ -2437,7 +2442,12 @@ public void setText (String string) { * Sets the contents of the receiver to the characters in the array. If the receiver * has style <code>SWT.SINGLE</code> and the argument contains multiple lines of text * then the result of this operation is undefined and may vary between platforms. - * + * <p> + * Note: Use the API to protect the text, for example, when widget is used as + * a password field. However, the text can't be protected if Verify or + * Segment listener is added to the widget. + * </p> + * * @param text a character array that contains the new text * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java index dbd7539a9a..5d1ce852c9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java @@ -1360,7 +1360,12 @@ public String getText () { * The text for a text widget is the characters in the widget, or * a zero-length array if this has never been set. * </p> - * + * <p> + * Note: Use the API to protect the text, for example, when widget is used as + * a password field. However, the text can't be protected if Segment listener + * is added to the widget. + * </p> + * * @return a character array that contains the widget's text * * @exception SWTException <ul> @@ -2264,6 +2269,11 @@ public void setText (String string) { * Sets the contents of the receiver to the characters in the array. If the receiver * has style <code>SWT.SINGLE</code> and the argument contains multiple lines of text * then the result of this operation is undefined and may vary between platforms. + * <p> + * Note: Use the API to protect the text, for example, when the widget is used as + * a password field. However, the text can't be protected if Verify or + * Segment listener is added to the widget. + * </p> * * @param text a character array that contains the new text * |