summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt
diff options
context:
space:
mode:
authorCarolyn MacLeod <carolyn>2007-05-31 20:34:20 +0000
committerCarolyn MacLeod <carolyn>2007-05-31 20:34:20 +0000
commit20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9 (patch)
tree39bd3703cea1020d3f848e884fffd09cef858c42 /bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt
parent29ed0b9d892e5929f54e524e3dc1c92d73ee99db (diff)
downloadeclipse.platform.swt-20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9.tar.gz
eclipse.platform.swt-20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9.tar.xz
eclipse.platform.swt-20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9.zip
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java16
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java4
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java150
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java21
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java12
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java32
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java201
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/List.java12
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MessageBox.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ProgressBar.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Sash.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scale.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java8
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java11
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java8
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java56
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java8
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java10
25 files changed, 491 insertions, 106 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java
index 8f12c23e24..30aa06b23b 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java
@@ -526,6 +526,22 @@ public boolean isDisposed () {
return disposed;
}
+/**
+ * Loads the font specified by a file. The font will be
+ * present in the list of fonts available to the application.
+ *
+ * @param path the font file path
+ * @return whether the font was successfully loaded
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if path is null</li>
+ * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @see Font
+ *
+ * @since 3.3
+ */
public boolean loadFont (String path) {
checkDevice();
if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java
index 784e3d5c6f..e2560952b5 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java
@@ -114,7 +114,7 @@ FontData(byte[] stem) {
}
/**
- * Constructs a new un-initialized font data.
+ * Constructs a new uninitialized font data.
*/
public FontData() {
this("", 12, SWT.NORMAL);
@@ -236,7 +236,7 @@ public boolean equals (Object object) {
*
* @return the height of this FontData
*
- * @see #setHeight
+ * @see #setHeight(int)
*/
public int getHeight() {
return height;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java
index c39bfca487..2707392300 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java
@@ -90,8 +90,8 @@ GC() {
/**
* Constructs a new instance of this class which has been
* configured to draw on the specified drawable. Sets the
- * foreground and background color in the GC to match those
- * in the drawable.
+ * foreground color, background color and font in the GC
+ * to match those in the drawable.
* <p>
* You must dispose the graphics context when it is no longer required.
* </p>
@@ -115,8 +115,8 @@ public GC(Drawable drawable) {
/**
* Constructs a new instance of this class which has been
* configured to draw on the specified drawable. Sets the
- * foreground and background color in the GC to match those
- * in the drawable.
+ * foreground color, background color and font in the GC
+ * to match those in the drawable.
* <p>
* You must dispose the graphics context when it is no longer required.
* </p>
@@ -1016,7 +1016,12 @@ public void drawOval (int x, int y, int width, int height) {
/**
* Draws the path described by the parameter.
- *
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
+ *
* @param path the path to draw
*
* @exception IllegalArgumentException <ul>
@@ -1025,6 +1030,7 @@ public void drawOval (int x, int y, int width, int height) {
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
* </ul>
*
* @see Path
@@ -1410,7 +1416,7 @@ public void drawText (String string, int x, int y, boolean isTransparent) {
* @param string the string to be drawn
* @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
* @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn
- * @param flags the flags specifing how to process the text
+ * @param flags the flags specifying how to process the text
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the string is null</li>
@@ -1711,6 +1717,11 @@ public void fillOval (int x, int y, int width, int height) {
/**
* Fills the path described by the parameter.
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
*
* @param path the path to fill
*
@@ -1720,6 +1731,7 @@ public void fillOval (int x, int y, int width, int height) {
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
* </ul>
*
* @see Path
@@ -1909,6 +1921,7 @@ public int getAdvanceWidth(char ch) {
* </ul>
*
* @see #setAdvanced
+ *
* @since 3.1
*/
public boolean getAdvanced() {
@@ -2239,6 +2252,17 @@ public int getInterpolation() {
return SWT.DEFAULT;
}
+/**
+ * Returns the receiver's line attributes.
+ *
+ * @return the line attributes used for drawing lines
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.3
+ */
public LineAttributes getLineAttributes() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
float[] dashes = null;
@@ -2273,7 +2297,7 @@ public int getLineCap() {
* Returns the receiver's line dash style. The default value is
* <code>null</code>.
*
- * @return the lin dash style used for drawing lines
+ * @return the line dash style used for drawing lines
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
@@ -2530,8 +2554,7 @@ public boolean isDisposed() {
* advanced and normal graphics operations. Because the two subsystems are
* different, their output may differ. Switching to advanced graphics before
* any graphics operations are performed ensures that the output is consistent.
- * </p>
- * <p>
+ * </p><p>
* Advanced graphics may not be installed for the operating system. In this
* case, this operation does nothing. Some operating system have only one
* graphics subsystem, so switching from normal to advanced graphics does
@@ -2551,6 +2574,7 @@ public boolean isDisposed() {
* @see #setBackgroundPattern
* @see #setClipping(Path)
* @see #setForegroundPattern
+ * @see #setLineAttributes
* @see #setInterpolation
* @see #setTextAntialias
* @see #setTransform
@@ -2574,13 +2598,21 @@ public void setAdvanced(boolean advanced) {
/**
* Sets the receiver's alpha value.
- *
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
* @param alpha the alpha value
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
* </ul>
*
+ * @see #getAdvanced
+ * @see #setAdvanced
+ *
* @since 3.1
*/
public void setAlpha(int alpha) {
@@ -2592,6 +2624,11 @@ public void setAlpha(int alpha) {
* which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code>
* or <code>SWT.ON</code>. Note that this controls anti-aliasing for all
* <em>non-text drawing</em> operations.
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
*
* @param antialias the anti-aliasing setting
*
@@ -2601,8 +2638,11 @@ public void setAlpha(int alpha) {
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
* </ul>
*
+ * @see #getAdvanced
+ * @see #setAdvanced
* @see #setTextAntialias
*
* @since 3.1
@@ -2644,7 +2684,12 @@ public void setBackground (Color color) {
/**
* Sets the background pattern. The default value is <code>null</code>.
- *
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
+ *
* @param pattern the new background pattern
*
* @exception IllegalArgumentException <ul>
@@ -2652,9 +2697,12 @@ public void setBackground (Color color) {
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
* </ul>
*
* @see Pattern
+ * @see #getAdvanced
+ * @see #setAdvanced
*
* @since 3.1
*/
@@ -2707,8 +2755,13 @@ public void setClipping (int x, int y, int width, int height) {
/**
* Sets the area of the receiver which can be changed
* by drawing operations to the path specified
- * by the argument.
- *
+ * by the argument.
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
+ *
* @param path the clipping path.
*
* @exception IllegalArgumentException <ul>
@@ -2716,9 +2769,12 @@ public void setClipping (int x, int y, int width, int height) {
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
* </ul>
*
* @see Path
+ * @see #getAdvanced
+ * @see #setAdvanced
*
* @since 3.1
*/
@@ -2868,7 +2924,12 @@ public void setForeground (Color color) {
* Sets the receiver's interpolation setting to the parameter, which
* must be one of <code>SWT.DEFAULT</code>, <code>SWT.NONE</code>,
* <code>SWT.LOW</code> or <code>SWT.HIGH</code>.
- *
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
+ *
* @param interpolation the new interpolation setting
*
* @exception IllegalArgumentException <ul>
@@ -2877,8 +2938,12 @@ public void setForeground (Color color) {
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
* </ul>
*
+ * @see #getAdvanced
+ * @see #setAdvanced
+ *
* @since 3.1
*/
public void setInterpolation(int interpolation) {
@@ -2896,7 +2961,11 @@ public void setInterpolation(int interpolation) {
/**
* Sets the foreground pattern. The default value is <code>null</code>.
- *
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
* @param pattern the new foreground pattern
*
* @exception IllegalArgumentException <ul>
@@ -2904,9 +2973,12 @@ public void setInterpolation(int interpolation) {
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
* </ul>
*
* @see Pattern
+ * @see #getAdvanced
+ * @see #setAdvanced
*
* @since 3.1
*/
@@ -2916,6 +2988,30 @@ public void setForegroundPattern (Pattern pattern) {
if (pattern.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
+/**
+ * Sets the receiver's line attributes.
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
+ * @param attributes the line attributes
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the attributes is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if any of the line attributes is not valid</li>
+ * </ul>
+ * @exception SWTException <ul>
+ * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
+ * </ul>
+ *
+ * @see LineAttributes
+ * @see #getAdvanced
+ * @see #setAdvanced
+ *
+ * @since 3.3
+ */
public void setLineAttributes(LineAttributes attributes) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
@@ -3244,7 +3340,12 @@ int getClipping(int widget, int topWidget, boolean clipChildren, boolean clipSib
* which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code>
* or <code>SWT.ON</code>. Note that this controls anti-aliasing only
* for all <em>text drawing</em> operations.
- *
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
+ *
* @param antialias the anti-aliasing setting
*
* @exception IllegalArgumentException <ul>
@@ -3253,8 +3354,11 @@ int getClipping(int widget, int topWidget, boolean clipChildren, boolean clipSib
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
* </ul>
*
+ * @see #getAdvanced
+ * @see #setAdvanced
* @see #setAntialias
*
* @since 3.1
@@ -3270,11 +3374,16 @@ public void setTextAntialias(int antialias) {
}
}
-/**
+/**
* Sets the transform that is currently being used by the receiver. If
* the argument is <code>null</code>, the current transform is set to
* the identity transform.
- *
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
+ *
* @param transform the transform to set
*
* @exception IllegalArgumentException <ul>
@@ -3282,9 +3391,12 @@ public void setTextAntialias(int antialias) {
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
* </ul>
*
* @see Transform
+ * @see #getAdvanced
+ * @see #setAdvanced
*
* @since 3.1
*/
@@ -3405,7 +3517,7 @@ public Point textExtent(String string) {
* </p>
*
* @param string the string to measure
- * @param flags the flags specifing how to process the text
+ * @param flags the flags specifying how to process the text
* @return a point containing the extent of the string
*
* @exception IllegalArgumentException <ul>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java
index 9f6379eb6e..f8e2996ba4 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java
@@ -101,11 +101,11 @@ static int checkStyle (int style) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the control is selected, by sending
+ * be notified when the control is selected by the user, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
- * <code>widgetSelected</code> is called when the control is selected.
+ * <code>widgetSelected</code> is called when the control is selected by the user.
* <code>widgetDefaultSelected</code> is not called.
* </p>
*
@@ -386,7 +386,7 @@ void releaseWidget () {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the control is selected.
+ * be notified when the control is selected by the user.
*
* @param listener the listener which should no longer be notified
*
@@ -508,7 +508,12 @@ public void setSelection (boolean selected) {
/**
* Sets the receiver's image to the argument, which may be
* <code>null</code> indicating that no image should be displayed.
- *
+ * <p>
+ * Note that a Button can display an image and text simultaneously
+ * on Windows (starting with XP), GTK+ and OSX. On other platforms,
+ * a Button that has an image and text set into it will display the
+ * image or text that was set most recently.
+ * </p>
* @param image the image to display on the receiver (may be <code>null</code>)
*
* @exception IllegalArgumentException <ul>
@@ -547,12 +552,16 @@ public void setImage (Image image) {
* character to be the mnemonic. When the user presses a
* key sequence that matches the mnemonic, a selection
* event occurs. On most platforms, the mnemonic appears
- * underlined but may be emphasised in a platform specific
+ * underlined but may be emphasized in a platform specific
* manner. The mnemonic indicator character '&amp;' can be
* escaped by doubling it in the string, causing a single
* '&amp;' to be displayed.
+ * </p><p>
+ * Note that a Button can display an image and text simultaneously
+ * on Windows (starting with XP), GTK+ and OSX. On other platforms,
+ * a Button that has an image and text set into it will display the
+ * image or text that was set most recently.
* </p>
- *
* @param string the new text
*
* @exception IllegalArgumentException <ul>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java
index 06333953a1..06ba20caf0 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java
@@ -42,7 +42,7 @@ import org.eclipse.swt.events.*;
* <dt><b>Styles:</b></dt>
* <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd>
* <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Selection</dd>
+ * <dd>DefaultSelection, Modify, Selection, Verify</dd>
* </dl>
* <p>
* Note: Only one of the styles DROP_DOWN and SIMPLE may be specified.
@@ -356,11 +356,11 @@ public void addModifyListener (ModifyListener listener) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the receiver's selection changes, by sending
+ * be notified when the user changes the receiver's selection, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
- * <code>widgetSelected</code> is called when the combo's list selection changes.
+ * <code>widgetSelected</code> is called when the user changes the combo's list selection.
* <code>widgetDefaultSelected</code> is typically called when ENTER is pressed the combo's text area.
* </p>
*
@@ -1051,7 +1051,7 @@ public void removeModifyListener (ModifyListener listener) {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the receiver's selection changes.
+ * be notified when the user changes the receiver's selection.
*
* @param listener the listener which should no longer be notified
*
@@ -1126,9 +1126,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
/**
* Sets the text of the item in the receiver's list at the given
- * zero-relative index to the string argument. This is equivalent
- * to removing the old item at the index, and then adding the new
- * item at that index.
+ * zero-relative index to the string argument.
*
* @param index the index for the item
* @param string the new text for the item
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java
index 7dd9d23a80..02a5a1d808 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java
@@ -624,7 +624,13 @@ public Control [] getTabList () {
* <p>
* This is equivalent to calling <code>layout(true)</code>.
* </p>
- *
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
+ *
* @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>
@@ -650,7 +656,14 @@ public void layout () {
* will cascade down through all child widgets in the receiver's widget
* tree until a child is encountered that does not resize. Note that
* a layout due to a resize will not flush any cached information
- * (same as <code>layout(false)</code>).</p>
+ * (same as <code>layout(false)</code>).
+ * </p>
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
*
* @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise
*
@@ -681,7 +694,14 @@ public void layout (boolean changed) {
* tree. However, if a child is resized as a result of a call to layout, the
* resize event will invoke the layout of the child. Note that
* a layout due to a resize will not flush any cached information
- * (same as <code>layout(false)</code>).</p>
+ * (same as <code>layout(false)</code>).
+ * </p>
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
*
* @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise
* @param all <code>true</code> if all children in the receiver's widget tree should be laid out, and <code>false</code> otherwise
@@ -708,6 +728,12 @@ public void layout (boolean changed, boolean all) {
* (potentially) optimize the work it is doing by assuming that none of the
* peers of the changed control have changed state since the last layout.
* If an ancestor does not have a layout, skip it.
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
*
* @param changed a control that has had a state change which requires a recalculation of its size
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java
index 1310090b4d..5b4eecfca9 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java
@@ -25,9 +25,8 @@ import org.eclipse.swt.accessibility.*;
* <dd>BORDER</dd>
* <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd>
* <dt><b>Events:</b>
- * <dd>FocusIn, FocusOut, Help, KeyDown, KeyUp, MouseDoubleClick, MouseDown, MouseEnter,
- * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse,
- * DragDetect, MenuDetect</dd>
+ * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter,
+ * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd>
* </dl>
* </p><p>
* Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified.
@@ -111,6 +110,27 @@ public void addControlListener(ControlListener listener) {
addListener (SWT.Move,typedListener);
}
+/**
+ * Adds the listener to the collection of listeners who will
+ * be notified when a drag gesture occurs, by sending it
+ * one of the messages defined in the <code>DragDetectListener</code>
+ * interface.
+ *
+ * @param listener the listener which should be notified
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the listener 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>
+ *
+ * @see DragDetectListener
+ * @see #removeDragDetectListener
+ *
+ * @since 3.3
+ */
public void addDragDetectListener (DragDetectListener listener) {
checkWidget ();
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
@@ -176,7 +196,18 @@ public void addHelpListener (HelpListener listener) {
* be notified when keys are pressed and released on the system keyboard, by sending
* it one of the messages defined in the <code>KeyListener</code>
* interface.
- *
+ * <p>
+ * When a key listener is added to a control, the control
+ * will take part in widget traversal. By default, all
+ * traversal keys (such as the tab key and so on) are
+ * delivered to the control. In order for a control to take
+ * part in traversal, it should listen for traversal events.
+ * Otherwise, the user can traverse into a control but not
+ * out. Note that native controls such as table and tree
+ * implement key traversal in the operating system. It is
+ * not necessary to add traversal listeners for these controls,
+ * unless you want to override the default traversal.
+ * </p>
* @param listener the listener which should be notified
*
* @exception IllegalArgumentException <ul>
@@ -552,12 +583,84 @@ boolean drawGripper (int x, int y, int width, int height, boolean vertical) {
return false;
}
+/**
+ * Detects a drag and drop gesture. This method is used
+ * to detect a drag gesture when called from within a mouse
+ * down listener.
+ *
+ * <p>By default, a drag is detected when the gesture
+ * occurs anywhere within the client area of a control.
+ * Some controls, such as tables and trees, override this
+ * behavior. In addition to the operating system specific
+ * drag gesture, they require the mouse to be inside an
+ * item. Custom widget writers can use <code>setDragDetect</code>
+ * to disable the default detection, listen for mouse down,
+ * and then call <code>dragDetect()</code> from within the
+ * listener to conditionally detect a drag.
+ * </p>
+ *
+ * @param event the mouse down event
+ *
+ * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT when the event 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>
+ *
+ * @see DragDetectListener
+ * @see #addDragDetectListener
+ *
+ * @see #getDragDetect
+ * @see #setDragDetect
+ *
+ * @since 3.3
+ */
public boolean dragDetect (Event event) {
checkWidget ();
if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
return dragDetect (event.button, event.count, event.stateMask, event.x, event.y);
}
+/**
+ * Detects a drag and drop gesture. This method is used
+ * to detect a drag gesture when called from within a mouse
+ * down listener.
+ *
+ * <p>By default, a drag is detected when the gesture
+ * occurs anywhere within the client area of a control.
+ * Some controls, such as tables and trees, override this
+ * behavior. In addition to the operating system specific
+ * drag gesture, they require the mouse to be inside an
+ * item. Custom widget writers can use <code>setDragDetect</code>
+ * to disable the default detection, listen for mouse down,
+ * and then call <code>dragDetect()</code> from within the
+ * listener to conditionally detect a drag.
+ * </p>
+ *
+ * @param event the mouse down event
+ *
+ * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT when the event 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>
+ *
+ * @see DragDetectListener
+ * @see #addDragDetectListener
+ *
+ * @see #getDragDetect
+ * @see #setDragDetect
+ *
+ * @since 3.3
+ */
public boolean dragDetect (MouseEvent event) {
checkWidget ();
if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
@@ -806,11 +909,38 @@ public Rectangle getBounds () {
return new Rectangle (area.pos_x, area.pos_y, area.size_w, area.size_h);
}
+/**
+ * Returns the receiver's cursor, or null if it has not been set.
+ * <p>
+ * When the mouse pointer passes over a control its appearance
+ * is changed to match the control's cursor.
+ * </p>
+ * </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>
+ *
+ * @since 3.3
+ */
public Cursor getCursor () {
checkWidget ();
return cursor;
}
+/**
+ * Returns <code>true</code> if the receiver is detecting
+ * drag gestures, and <code>false</code> otherwise.
+ *
+ * @return the receiver's drag detect state
+ *
+ * @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>
+ *
+ * @since 3.3
+ */
public boolean getDragDetect () {
checkWidget ();
//TODO - not implemented
@@ -1736,12 +1866,13 @@ void releaseWidget () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
- * @see #update
+ * @see #update()
* @see PaintListener
* @see SWT#Paint
* @see SWT#NO_BACKGROUND
* @see SWT#NO_REDRAW_RESIZE
* @see SWT#NO_MERGE_PAINTS
+ * @see SWT#DOUBLE_BUFFERED
*/
public void redraw () {
checkWidget();
@@ -1770,12 +1901,13 @@ public void redraw () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
- * @see #update
+ * @see #update()
* @see PaintListener
* @see SWT#Paint
* @see SWT#NO_BACKGROUND
* @see SWT#NO_REDRAW_RESIZE
* @see SWT#NO_MERGE_PAINTS
+ * @see SWT#DOUBLE_BUFFERED
*/
public void redraw (int x, int y, int width, int height, boolean allChildren) {
checkWidget ();
@@ -1813,6 +1945,25 @@ public void removeControlListener (ControlListener listener) {
eventTable.unhook (SWT.Resize, listener);
}
+/**
+ * Removes the listener from the collection of listeners who will
+ * be notified when a drag gesture occurs.
+ *
+ * @param listener the listener which should no longer be notified
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the listener 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>
+ *
+ * @see DragDetectListener
+ * @see #addDragDetectListener
+ *
+ * @since 3.3
+ */
public void removeDragDetectListener(DragDetectListener listener) {
checkWidget ();
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
@@ -2237,6 +2388,20 @@ public void setCursor (Cursor cursor) {
}
}
+/**
+ * Sets the receiver's drag detect state. If the argument is
+ * <code>true</code>, the receiver will detect drag gestures,
+ * otherwise these gestures will be ignored.
+ *
+ * @param dragDetect the new drag detect state
+ *
+ * @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>
+ *
+ * @since 3.3
+ */
public void setDragDetect (boolean dragDetect) {
checkWidget ();
//TODO - not implemented
@@ -2291,7 +2456,10 @@ public boolean setFocus () {
* Sets the receiver's background color to the color specified
* by the argument, or to the default system color for the control
* if the argument is null.
- *
+ * <p>
+ * Note: This operation is a hint and may be overridden by the platform.
+ * For example, on Windows the background of a Button cannot be changed.
+ * </p>
* @param color the new color (or null)
*
* @exception IllegalArgumentException <ul>
@@ -2319,7 +2487,10 @@ public void setBackground (Color color) {
* by the argument, or to the default system color for the control
* if the argument is null. The background image is tiled to fill
* the available space.
- *
+ * <p>
+ * Note: This operation is a hint and may be overridden by the platform.
+ * For example, on Windows the background of a Button cannot be changed.
+ * </p>
* @param image the new image (or null)
*
* @exception IllegalArgumentException <ul>
@@ -2399,7 +2570,9 @@ void setFont (int font) {
* Sets the receiver's foreground color to the color specified
* by the argument, or to the default system color for the control
* if the argument is null.
- *
+ * <p>
+ * Note: This operation is a hint and may be overridden by the platform.
+ * </p>
* @param color the new color (or null)
*
* @exception IllegalArgumentException <ul>
@@ -2598,7 +2771,7 @@ boolean setRadioSelection (boolean value) {
* </ul>
*
* @see #redraw(int, int, int, int, boolean)
- * @see #update
+ * @see #update()
*/
public void setRedraw (boolean redraw) {
checkWidget();
@@ -2981,13 +3154,19 @@ boolean traverseReturn () {
/**
* Forces all outstanding paint requests for the widget
- * to be processed before this method returns.
+ * to be processed before this method returns. If there
+ * are no outstanding paint request, this method does
+ * nothing.
+ * <p>
+ * Note: This method does not cause a redraw.
+ * </p>
*
* @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>
*
+ * @see #redraw()
* @see #redraw(int, int, int, int, boolean)
* @see PaintListener
* @see SWT#Paint
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java
index 6e9256633a..173f3b4264 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java
@@ -197,7 +197,7 @@ Control computeTabRoot () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
- * @see #setDefaultButton
+ * @see #setDefaultButton(Button)
*/
public Button getDefaultButton () {
checkWidget();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java
index d91cb7d08f..35ab3e36f6 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java
@@ -79,7 +79,7 @@ import org.eclipse.swt.graphics.*;
* <dt><b>Styles:</b></dt>
* <dd>(none)</dd>
* <dt><b>Events:</b></dt>
- * <dd>Close, Dispose</dd>
+ * <dd>Close, Dispose, Settings</dd>
* </dl>
* <p>
* IMPORTANT: This class is <em>not</em> intended to be subclassed.
@@ -2457,7 +2457,7 @@ public boolean sleep () {
* @param runnable code to run on the user-interface thread or <code>null</code>
*
* @exception SWTException <ul>
- * <li>ERROR_FAILED_EXEC - if an exception occured when executing the runnable</li>
+ * <li>ERROR_FAILED_EXEC - if an exception occurred when executing the runnable</li>
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
* </ul>
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java
index 2384f27c94..6f4694a468 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java
@@ -78,11 +78,11 @@ public Link (Composite parent, int style) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the control is selected, by sending
+ * be notified when the control is selected by the user, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
- * <code>widgetSelected</code> is called when the control is selected.
+ * <code>widgetSelected</code> is called when the control is selected by the user.
* <code>widgetDefaultSelected</code> is not called.
* </p>
*
@@ -541,7 +541,7 @@ void releaseWidget () {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the control is selected.
+ * be notified when the control is selected by the user.
*
* @param listener the listener which should no longer be notified
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/List.java
index 0a6f0c0582..85f7668da9 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/List.java
@@ -100,7 +100,7 @@ public void add (String string) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the receiver's selection changes, by sending
+ * be notified when the user changes the receiver's selection, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
@@ -108,7 +108,7 @@ public void add (String string) {
* <code>widgetDefaultSelected</code> is typically called when an item is double-clicked.
* </p>
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should be notified when the user changes the receiver's selection
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -679,7 +679,7 @@ public int indexOf (String string, int start) {
* range are ignored.
*
* @param index the index of the item
- * @return the visibility state of the item at the index
+ * @return the selection state of the item at the index
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -847,7 +847,7 @@ public void removeAll () {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the receiver's selection changes.
+ * be notified when the user changes the receiver's selection.
*
* @param listener the listener which should no longer be notified
*
@@ -1000,9 +1000,7 @@ public void selectAll () {
/**
* Sets the text of the item in the receiver's list at the given
- * zero-relative index to the string argument. This is equivalent
- * to <code>remove</code>'ing the old item at the index, and then
- * <code>add</code>'ing the new item at that index.
+ * zero-relative index to the string argument.
*
* @param index the index for the item
* @param string the new text for the item
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java
index 0dbe2f2d45..7d117fba2b 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java
@@ -503,7 +503,7 @@ void hookEvents () {
* @return the index of the item
*
* @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the string is null</li>
+ * <li>ERROR_NULL_ARGUMENT - if the item is null</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java
index 5d87854e1a..f39fa2e303 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java
@@ -187,7 +187,7 @@ public void addHelpListener (HelpListener listener) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the menu item is selected, by sending
+ * be notified when the menu item is selected by the user, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
@@ -195,7 +195,7 @@ public void addHelpListener (HelpListener listener) {
* <code>widgetDefaultSelected</code> is not called.
* </p>
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should be notified when the menu item is selected by the user
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -546,7 +546,7 @@ void removeAccelerator () {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the control is selected.
+ * be notified when the control is selected by the user.
*
* @param listener the listener which should no longer be notified
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MessageBox.java
index 18b8dc57cc..5cd16a587d 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MessageBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MessageBox.java
@@ -105,7 +105,7 @@ public String getMessage () {
* of the display.
*
* @return the ID of the button that was selected to dismiss the
- * message box (e.g. SWT.OK, SWT.CANCEL, etc...)
+ * message box (e.g. SWT.OK, SWT.CANCEL, etc.)
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the dialog has been disposed</li>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ProgressBar.java
index 965fc6fbc5..4840869621 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ProgressBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ProgressBar.java
@@ -16,7 +16,7 @@ import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
/**
- * Instances of the receiver represent is an unselectable
+ * Instances of the receiver represent an unselectable
* user interface object that is used to display progress,
* typically in the form of a bar.
* <dl>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Sash.java
index c302342d0d..0036fc90dd 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Sash.java
@@ -74,7 +74,7 @@ public Sash (Composite parent, int style) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the control is selected, by sending
+ * be notified when the control is selected by the user, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
@@ -83,7 +83,7 @@ public Sash (Composite parent, int style) {
* <code>widgetDefaultSelected</code> is not called.
* </p>
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should be notified when the control is selected by the user
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -311,7 +311,7 @@ void processMouse (int info) {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the control is selected.
+ * be notified when the control is selected by the user.
*
* @param listener the listener which should no longer be notified
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scale.java
index 040c50d992..a356fb3fd9 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scale.java
@@ -72,11 +72,11 @@ public Scale (Composite parent, int style) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the receiver's value changes, by sending
+ * be notified when the user changes the receiver's value, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
- * <code>widgetSelected</code> is called when the control's value changes.
+ * <code>widgetSelected</code> is called when the user changes the receiver's value.
* <code>widgetDefaultSelected</code> is not called.
* </p>
*
@@ -255,7 +255,7 @@ int Pt_CB_SLIDER_MOVE (int widget, int info) {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the receiver's value changes.
+ * be notified when the user changes the receiver's value.
*
* @param listener the listener which should no longer be notified
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java
index 9fbe8b8be3..a0547046bc 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java
@@ -102,7 +102,7 @@ static int checkStyle (int style) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the receiver's value changes, by sending
+ * be notified when the user changes the receiver's value, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
@@ -118,7 +118,7 @@ static int checkStyle (int style) {
* <code>widgetDefaultSelected</code> is not called.
* </p>
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should be notified when the user changes the receiver's value
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -439,7 +439,7 @@ int Pt_CB_SCROLL_MOVE (int widget, int info) {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the receiver's value changes.
+ * be notified when the user changes the receiver's value.
*
* @param listener the listener which should no longer be notified
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java
index ebcbb4a3bf..9c60d560ba 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java
@@ -541,7 +541,7 @@ Composite findDeferredControl () {
* @see Control#setFocus
* @see Control#setVisible
* @see Display#getActiveShell
- * @see Decorations#setDefaultButton
+ * @see Decorations#setDefaultButton(Button)
* @see Shell#open
* @see Shell#setActive
*/
@@ -674,7 +674,7 @@ public Shell getShell () {
/**
* Returns an array containing all shells which are
- * descendents of the receiver.
+ * descendants of the receiver.
* <p>
* @return the dialog shells
*
@@ -760,7 +760,7 @@ int hotkeyProc (int w, int data, int info) {
* @see Control#setFocus
* @see Control#setVisible
* @see Display#getActiveShell
- * @see Decorations#setDefaultButton
+ * @see Decorations#setDefaultButton(Button)
* @see Shell#setActive
* @see Shell#forceActive
*/
@@ -911,7 +911,7 @@ public void removeShellListener (ShellListener listener) {
* @see Control#setFocus
* @see Control#setVisible
* @see Display#getActiveShell
- * @see Decorations#setDefaultButton
+ * @see Decorations#setDefaultButton(Button)
* @see Shell#open
* @see Shell#setActive
*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java
index a5a7cc0ec5..ea202ecd19 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java
@@ -105,7 +105,7 @@ static int checkStyle (int style) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the receiver's value changes, by sending
+ * be notified when the user changes the receiver's value, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
@@ -121,7 +121,7 @@ static int checkStyle (int style) {
* <code>widgetDefaultSelected</code> is not called.
* </p>
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should be notified when the user changes the receiver's value
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -338,7 +338,7 @@ int Pt_CB_SCROLL_MOVE (int widget, int info) {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the receiver's value changes.
+ * be notified when the user changes the receiver's value.
*
* @param listener the listener which should no longer be notified
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java
index 6d3fe7684e..cb551f8788 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java
@@ -20,11 +20,14 @@ import org.eclipse.swt.*;
* objects that allow the user to enter and modify numeric
* values.
* <p>
+ * Note that although this class is a subclass of <code>Composite</code>,
+ * it does not make sense to add children to it, or set a layout on it.
+ * </p><p>
* <dl>
* <dt><b>Styles:</b></dt>
* <dd>READ_ONLY, WRAP</dd>
* <dt><b>Events:</b></dt>
- * <dd>Selection, Modify</dd>
+ * <dd>Selection, Modify, Verify</dd>
* </dl>
* </p><p>
* IMPORTANT: This class is <em>not</em> intended to be subclassed.
@@ -130,7 +133,7 @@ public void addModifyListener (ModifyListener listener) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the control is selected, by sending
+ * be notified when the control is selected by the user, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
@@ -138,7 +141,7 @@ public void addModifyListener (ModifyListener listener) {
* <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text.
* </p>
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should be notified when the control is selected by the user
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -514,7 +517,7 @@ public void removeModifyListener (ModifyListener listener) {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the control is selected.
+ * be notified when the control is selected by the user.
*
* @param listener the listener which should no longer be notified
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java
index 9681ffdd0e..6c7460a400 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java
@@ -93,7 +93,7 @@ static int checkStyle (int style) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the receiver's selection changes, by sending
+ * be notified when the user changes the receiver's selection, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
@@ -101,7 +101,7 @@ static int checkStyle (int style) {
* <code>widgetDefaultSelected</code> is not called.
* </p>
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should be notified when the user changes the receiver's selection
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -423,7 +423,7 @@ void hookEvents () {
* @return the index of the item
*
* @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the string is null</li>
+ * <li>ERROR_NULL_ARGUMENT - if the item is null</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -545,7 +545,7 @@ void removeControl (Control control) {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the receiver's selection changes.
+ * be notified when the user changes the receiver's selection.
*
* @param listener the listener which should no longer be notified
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java
index 8bb03c7752..434dd5d718 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java
@@ -23,12 +23,13 @@ import org.eclipse.swt.events.*;
* <p>
* <dl>
* <dt><b>Styles:</b></dt>
- * <dd>CENTER, LEFT, MULTI, PASSWORD, SINGLE, RIGHT, READ_ONLY, WRAP</dd>
+ * <dd>CANCEL, CENTER, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd>
* <dt><b>Events:</b></dt>
* <dd>DefaultSelection, Modify, Verify</dd>
* </dl>
* <p>
- * Note: Only one of the styles MULTI and SINGLE may be specified.
+ * Note: Only one of the styles MULTI and SINGLE may be specified,
+ * and only one of the styles LEFT, CENTER, and RIGHT may be specified.
* </p><p>
* IMPORTANT: This class is <em>not</em> intended to be subclassed.
* </p>
@@ -253,15 +254,17 @@ public void addModifyListener (ModifyListener listener) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the control is selected, by sending
+ * be notified when the control is selected by the user, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
* <code>widgetSelected</code> is not called for texts.
- * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text.
+ * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text,
+ * or when ENTER is pressed in a search text. If the receiver has the <code>SWT.SEARCH | SWT.CANCEL</code> style
+ * and the user cancels the search, the event object detail field contains the value <code>SWT.CANCEL</code>.
* </p>
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should be notified when the control is selected by the user
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -617,6 +620,25 @@ public int getLineHeight () {
return extent.lr_y - extent.ul_y + 1 + args [4];
}
+/**
+ * Returns the widget message. When the widget is created
+ * with the style <code>SWT.SEARCH</code>, the message text
+ * is displayed as a hint for the user, indicating the
+ * purpose of the field.
+ * <p>
+ * Note: This operation is a <em>HINT</em> and is not
+ * supported on platforms that do not have this concept.
+ * </p>
+ *
+ * @return the widget message
+ *
+ * @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>
+ *
+ * @since 3.3
+ */
public String getMessage () {
checkWidget ();
return message;
@@ -1107,7 +1129,7 @@ public void removeModifyListener (ModifyListener listener) {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the control is selected.
+ * be notified when the control is selected by the user.
*
* @param listener the listener which should no longer be notified
*
@@ -1254,6 +1276,28 @@ public void setFont (Font font) {
setTabStops (tabs);
}
+/**
+ * Sets the widget message. When the widget is created
+ * with the style <code>SWT.SEARCH</code>, the message text
+ * is displayed as a hint for the user, indicating the
+ * purpose of the field.
+ * <p>
+ * Note: This operation is a <em>HINT</em> and is not
+ * supported on platforms that do not have this concept.
+ * </p>
+ *
+ * @param message the new message
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the message 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>
+ *
+ * @since 3.3
+ */
public void setMessage (String message) {
checkWidget ();
if (message == null) error (SWT.ERROR_NULL_ARGUMENT);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java
index 9dadf357be..d60a23ec6e 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java
@@ -125,7 +125,7 @@ public ToolItem (ToolBar parent, int style, int index) {
/**
* Adds the listener to the collection of listeners who will
- * be notified when the control is selected, by sending
+ * be notified when the control is selected by the user, by sending
* it one of the messages defined in the <code>SelectionListener</code>
* interface.
* <p>
@@ -134,7 +134,7 @@ public ToolItem (ToolBar parent, int style, int index) {
* <code>widgetDefaultSelected</code> is not called.
* </p>
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should be notified when the control is selected by the user,
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -579,7 +579,7 @@ void releaseWidget () {
/**
* Removes the listener from the collection of listeners who will
- * be notified when the control is selected.
+ * be notified when the control is selected by the user.
*
* @param listener the listener which should no longer be notified
*
@@ -662,7 +662,7 @@ void setDefaultFont () {
* Sets the receiver's disabled image to the argument, which may be
* null indicating that no disabled image should be displayed.
* <p>
- * The disbled image is displayed when the receiver is disabled.
+ * The disabled image is displayed when the receiver is disabled.
* </p>
*
* @param image the disabled image to display on the receiver (may be null)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java
index 829cd567f7..ed186458bc 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java
@@ -273,7 +273,7 @@ int copyPhImage(int image) {
*
* @see Listener
* @see SWT
- * @see #removeListener
+ * @see #removeListener(int, Listener)
* @see #notifyListeners
*/
public void addListener (int eventType, Listener handler) {
@@ -409,13 +409,13 @@ void destroyWidget () {
/**
* Disposes of the operating system resources associated with
- * the receiver and all its descendents. After this method has
- * been invoked, the receiver and all descendents will answer
+ * the receiver and all its descendants. After this method has
+ * been invoked, the receiver and all descendants will answer
* <code>true</code> when sent the message <code>isDisposed()</code>.
* Any internal connections between the widgets in the tree will
* have been removed to facilitate garbage collection.
* <p>
- * NOTE: This method is not called recursively on the descendents
+ * NOTE: This method is not called recursively on the descendants
* of the receiver. This means that, widget implementers can not
* detect when a widget is being disposed of by re-implementing
* this method, but should instead listen for the <code>Dispose</code>
@@ -663,7 +663,7 @@ boolean isValidThread () {
*
* @see SWT
* @see #addListener
- * @see #removeListener
+ * @see #removeListener(int, Listener)
*/
public void notifyListeners (int eventType, Event event) {
checkWidget();