summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/motif/org
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/motif/org')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Cursor.java3
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java138
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java23
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Region.java25
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java11
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java53
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java38
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java29
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java82
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java23
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java55
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java4
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java4
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java1
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java67
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java37
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java4
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java4
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java4
24 files changed, 411 insertions, 220 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Cursor.java
index d9ef42029f..a08559851e 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Cursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Cursor.java
@@ -189,8 +189,7 @@ public Cursor (Device device, int style) {
* <li>ERROR_NULL_ARGUMENT - if the source is null</li>
* <li>ERROR_NULL_ARGUMENT - if the mask is null and the source does not have a mask</li>
* <li>ERROR_INVALID_ARGUMENT - if the source and the mask are not the same
- * size, or either is not of depth one, or if the hotspot is outside
- * the bounds of the image</li>
+ * size, or if the hotspot is outside the bounds of the image</li>
* </ul>
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES - if a handle could not be obtained for cursor creation</li>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
index 4529847792..42a47c5496 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
@@ -363,12 +363,12 @@ public void drawFocus (int x, int y, int width, int height) {
* <li>ERROR_NULL_ARGUMENT - if the image is null</li>
* <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li>
* <li>ERROR_INVALID_ARGUMENT - if the given coordinates are outside the bounds of the image</li>
- * @exception SWTError <ul>
- * <li>ERROR_NO_HANDLES - if no handles are available to perform the operation</li>
- * </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
+ * @exception SWTError <ul>
+ * <li>ERROR_NO_HANDLES - if no handles are available to perform the operation</li>
+ * </ul>
*/
public void drawImage(Image image, int x, int y) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -402,12 +402,12 @@ public void drawImage(Image image, int x, int y) {
* <li>ERROR_INVALID_ARGUMENT - if any of the width or height arguments are negative.
* <li>ERROR_INVALID_ARGUMENT - if the source rectangle is not contained within the bounds of the source image</li>
* </ul>
- * @exception SWTError <ul>
- * <li>ERROR_NO_HANDLES - if no handles are available to perform the operation</li>
- * </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
+ * @exception SWTError <ul>
+ * <li>ERROR_NO_HANDLES - if no handles are available to perform the operation</li>
+ * </ul>
*/
public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -796,6 +796,9 @@ public void drawOval(int x, int y, int width, int height) {
}
OS.XDrawArc(data.display, data.drawable, handle, x, y, width, height, 0, 23040);
}
+/**
+ * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE
+ */
public void drawPath(Path path) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -995,14 +998,16 @@ public void drawRectangle (Rectangle rect) {
* right edges of the rectangle are at <code>x</code> and <code>x + width</code>.
* The top and bottom edges are at <code>y</code> and <code>y + height</code>.
* The <em>roundness</em> of the corners is specified by the
- * <code>arcWidth</code> and <code>arcHeight</code> arguments.
+ * <code>arcWidth</code> and <code>arcHeight</code> arguments, which
+ * are respectively the width and height of the ellipse used to draw
+ * the corners.
*
* @param x the x coordinate of the rectangle to be drawn
* @param y the y coordinate of the rectangle to be drawn
* @param width the width of the rectangle to be drawn
* @param height the height of the rectangle to be drawn
- * @param arcWidth the horizontal diameter of the arc at the four corners
- * @param arcHeight the vertical diameter of the arc at the four corners
+ * @param arcWidth the width of the arc
+ * @param arcHeight the height of the arc
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
@@ -1546,6 +1551,9 @@ public void fillOval (int x, int y, int width, int height) {
OS.XFillArc (display, data.drawable, handle, x, y, width, height, 0, 23040);
OS.XSetForeground (display, handle, values.foreground);
}
+/**
+ * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE
+ */
public void fillPath (Path path) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -1679,8 +1687,8 @@ public void fillRectangle (Rectangle rect) {
* @param y the y coordinate of the rectangle to be filled
* @param width the width of the rectangle to be filled
* @param height the height of the rectangle to be filled
- * @param arcWidth the horizontal diameter of the arc at the four corners
- * @param arcHeight the vertical diameter of the arc at the four corners
+ * @param arcWidth the width of the arc
+ * @param arcHeight the height of the arc
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
@@ -1922,6 +1930,9 @@ public int getAdvanceWidth(char ch) {
OS.XmFontListFreeFontContext(context);
return 0;
}
+/**
+ * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE
+ */
public int getAlpha() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
initCairo();
@@ -2147,6 +2158,7 @@ public Rectangle getClipping() {
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the region is null</li>
+ * <li>ERROR_INVALID_ARGUMENT - if the region is disposed</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
@@ -2454,6 +2466,19 @@ public Color getForeground() {
return Color.motif_new(data.device, xColor);
}
+/**
+ * Returns the receiver's line cap style, which will be one
+ * of the constants <code>SWT.CAP_FLAT</code>, <code>SWT.CAP_ROUND</code>,
+ * or <code>SWT.CAP_SQUARE</code>.
+ *
+ * @return the cap style used for drawing lines
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.1
+ */
public int getLineCap() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
XGCValues values = new XGCValues();
@@ -2466,6 +2491,17 @@ public int getLineCap() {
}
return cap;
}
+/**
+ * Returns the receiver's line dash style.
+ *
+ * @return the lin dash style used for drawing lines
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.1
+ */
public int[] getLineDash() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
byte[] dash_list = data.dashes;
@@ -2476,6 +2512,19 @@ public int[] getLineDash() {
}
return dashes;
}
+/**
+ * Returns the receiver's line join style, which will be one
+ * of the constants <code>SWT.JOIN_MITER</code>, <code>SWT.JOIN_ROUND</code>,
+ * or <code>SWT.JOIN_BEVEL</code>.
+ *
+ * @return the join style used for drawing lines
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.1
+ */
public int getLineJoin() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
XGCValues values = new XGCValues();
@@ -2544,6 +2593,9 @@ public int getStyle () {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
return data.style;
}
+/**
+ * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE
+ */
public void getTransform(Transform transform) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (transform == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
@@ -2691,6 +2743,9 @@ boolean isIdentity(int /*long*/ matrix) {
Cairo.cairo_matrix_get_affine(matrix, a, b, c, d, tx, ty);
return a[0] == 1 && b[0] == 0 && c[0] == 0 && d[0] == 1 && tx[0] == 0 && ty[0] == 0;
}
+/**
+ * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE
+ */
public void setAlpha(int alpha) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
initCairo();
@@ -2846,6 +2901,9 @@ public void setClipping (int x, int y, int width, int height) {
setClipping(clipRgn);
OS.XDestroyRegion(clipRgn);
}
+/**
+ * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE
+ */
public void setClipping(Path path) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (path != null && path.isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -2883,10 +2941,10 @@ public void setClipping (Rectangle rect) {
* by the argument.
*
* @param region the clipping region.
- *
- * * @exception IllegalArgumentException <ul>
+ *
+ * @exception IllegalArgumentException <ul>
* <li>ERROR_INVALID_ARGUMENT - if the region has been disposed</li>
- * </ul>
+ * </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
@@ -2966,6 +3024,22 @@ public void setForeground (Color color) {
Cairo.cairo_set_rgb_color(cairo, (xColor.red & 0xFFFF) / (float)0xFFFF, (xColor.green & 0xFFFF) / (float)0xFFFF, (xColor.blue & 0xFFFF) / (float)0xFFFF);
}
}
+/**
+ * Sets the receiver's line cap style to the argument, which must be one
+ * of the constants <code>SWT.CAP_FLAT</code>, <code>SWT.CAP_ROUND</code>,
+ * or <code>SWT.CAP_SQUARE</code>.
+ *
+ * @param cap the cap style to be used for drawing lines
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the style is not valid</li>
+ * </ul>
+ * @exception SWTException <ul>
+ * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.1
+ */
public void setLineCap(int cap) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
int cap_style = 0, cairo_style = 0;
@@ -2995,6 +3069,20 @@ public void setLineCap(int cap) {
Cairo.cairo_set_line_cap(cairo, cairo_style);
}
}
+/**
+ * Sets the receiver's line dash style to the argument.
+ *
+ * @param dashes the dash style to be used for drawing lines
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if any of the values in the array is less than or equal 0</li>
+ * </ul>
+ * @exception SWTException <ul>
+ * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.1
+ */
public void setLineDash(int[] dashes) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
int xDisplay = data.display;
@@ -3029,6 +3117,22 @@ public void setLineDash(int[] dashes) {
}
}
}
+/**
+ * Sets the receiver's line join style to the argument, which must be one
+ * of the constants <code>SWT.JOIN_MITER</code>, <code>SWT.JOIN_ROUND</code>,
+ * or <code>SWT.JOIN_BEVEL</code>.
+ *
+ * @param join the join style to be used for drawing lines
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the style is not valid</li>
+ * </ul>
+ * @exception SWTException <ul>
+ * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.1
+ */
public void setLineJoin(int join) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
int join_style = 0, cairo_style = 0;
@@ -3066,6 +3170,9 @@ public void setLineJoin(int join) {
*
* @param lineStyle the style to be used for drawing lines
*
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the style is not valid</li>
+ * </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
@@ -3181,6 +3288,9 @@ void setText(String string, int flags) {
data.textWidth = data.textHeight = -1;
data.drawFlags = flags;
}
+/**
+ * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE
+ */
public void setTransform(Transform transform) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (transform == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java
index 3e90e524ce..2744c57bc3 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java
@@ -520,12 +520,12 @@ public Image(Device device, Rectangle bounds) {
* <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li>
* <li>ERROR_NULL_ARGUMENT - if the image data is null</li>
* </ul>
- * @exception SWTError <ul>
- * <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
- * </ul>
* @exception SWTException <ul>
* <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the ImageData is not supported</li>
* </ul>
+ * @exception SWTError <ul>
+ * <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
+ * </ul>
*/
public Image(Device device, ImageData image) {
if (device == null) device = Device.getDevice();
@@ -536,10 +536,8 @@ public Image(Device device, ImageData image) {
/**
* Constructs an instance of this class, whose type is
* <code>SWT.ICON</code>, from the two given <code>ImageData</code>
- * objects. The two images must be the same size, and the mask image
- * must have a color depth of 1. Pixel transparency in either image
- * will be ignored. If either image is an icon to begin with, an
- * exception is thrown.
+ * objects. The two images must be the same size. Pixel transparency
+ * in either image will be ignored.
* <p>
* The mask image should contain white wherever the icon is to be visible,
* and black wherever the icon is to be transparent. In addition,
@@ -554,9 +552,7 @@ public Image(Device device, ImageData image) {
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li>
* <li>ERROR_NULL_ARGUMENT - if either the source or mask is null </li>
- * <li>ERROR_INVALID_ARGUMENT - if source and mask are different sizes or
- * if the mask is not monochrome, or if either the source or mask
- * is already an icon</li>
+ * <li>ERROR_INVALID_ARGUMENT - if source and mask are different sizes</li>
* </ul>
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
@@ -581,7 +577,8 @@ public Image(Device device, ImageData source, ImageData mask) {
* Constructs an instance of this class by loading its representation
* from the specified input stream. Throws an error if an error
* occurs while loading the image, or if the result is an image
- * of an unsupported type.
+ * of an unsupported type. Application code is still responsible
+ * for closing the input stream.
* <p>
* This constructor is provided for convenience when loading a single
* image only. If the stream contains multiple images, only the first
@@ -605,7 +602,8 @@ public Image(Device device, ImageData source, ImageData mask) {
* <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li>
* <li>ERROR_IO - if an IO error occurs while reading data</li>
* <li>ERROR_UNSUPPORTED_DEPTH - if the InputStream describes an image with an unsupported depth</li>
- * </ul>
+ * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
+ * * </ul>
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
* </ul>
@@ -637,6 +635,7 @@ public Image(Device device, InputStream stream) {
* <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li>
* <li>ERROR_IO - if an IO error occurs while reading data</li>
* <li>ERROR_UNSUPPORTED_DEPTH - if the image file has an unsupported depth</li>
+ * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
* </ul>
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Region.java
index ebe8d69f0f..be128407fb 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Region.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Region.java
@@ -60,12 +60,12 @@ public Region () {
*
* @param device the device on which to allocate the region
*
-* @exception SWTError <ul>
- * <li>ERROR_NO_HANDLES if a handle could not be obtained for region creation</li>
- * </ul>
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li>
* </ul>
+ * @exception SWTError <ul>
+ * <li>ERROR_NO_HANDLES if a handle could not be obtained for region creation</li>
+ * </ul>
*
* @see #dispose
*
@@ -133,9 +133,13 @@ public void add (Rectangle rect) {
* Adds the given rectangle to the collection of polygons
* the receiver maintains to describe its area.
*
- * @param rect the rectangle to merge with the receiver
+ * @param x the x coordinate of the rectangle
+ * @param y the y coordinate of the rectangle
+ * @param width the width coordinate of the rectangle
+ * @param height the height coordinate of the rectangle
*
* @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
* <li>ERROR_INVALID_ARGUMENT - if the rectangle's width or height is negative</li>
* </ul>
* @exception SWTException <ul>
@@ -297,7 +301,10 @@ public void intersect (Rectangle rect) {
* Intersects the given rectangle to the collection of polygons
* the receiver maintains to describe its area.
*
- * @param rect the rectangle to intersect with the receiver
+ * @param x the x coordinate of the rectangle
+ * @param y the y coordinate of the rectangle
+ * @param width the width coordinate of the rectangle
+ * @param height the height coordinate of the rectangle
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_INVALID_ARGUMENT - if the rectangle's width or height is negative</li>
@@ -468,9 +475,13 @@ public void subtract (Rectangle rect) {
* Subtracts the given rectangle from the collection of polygons
* the receiver maintains to describe its area.
*
- * @param rect the rectangle to subtract from the receiver
+ * @param x the x coordinate of the rectangle
+ * @param y the y coordinate of the rectangle
+ * @param width the width coordinate of the rectangle
+ * @param height the height coordinate of the rectangle
*
* @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
* <li>ERROR_INVALID_ARGUMENT - if the rectangle's width or height is negative</li>
* </ul>
* @exception SWTException <ul>
@@ -536,7 +547,7 @@ public void translate (int x, int y) {
* Translate all of the polygons the receiver maintains to describe
* its area by the specified point.
*
- * @param point the point to translate
+ * @param pt the point to translate
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java
index 5074ce7d33..258c320eac 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java
@@ -276,6 +276,9 @@ public void dispose () {
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
+ * </ul>
*/
public void draw (GC gc, int x, int y) {
draw(gc, x, y, -1, -1, null, null);
@@ -296,6 +299,9 @@ public void draw (GC gc, int x, int y) {
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
+ * </ul>
*/
public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground) {
checkLayout();
@@ -869,6 +875,7 @@ public int getNextOffset (int offset, int movement) {
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_INVALID_ARGUMENT - if the trailing length is less than <code>1</code></li>
+ * <li>ERROR_NULL_ARGUMENT - if the point is null</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
@@ -1262,7 +1269,7 @@ public void setAlignment (int alignment) {
* </ul>
*
* @see #setDescent(int)
- * @see #getLineMetrics()
+ * @see #getLineMetrics(int)
*/
public void setAscent (int ascent) {
checkLayout();
@@ -1288,7 +1295,7 @@ public void setAscent (int ascent) {
* </ul>
*
* @see #setAscent(int)
- * @see #getLineMetrics()
+ * @see #getLineMetrics(int)
*/
public void setDescent (int descent) {
checkLayout();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java
index 04a18b36dd..18e05cae56 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java
@@ -469,7 +469,7 @@ void releaseWidget () {
* Removes the listener from the collection of listeners who will
* be notified when the control is selected.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java
index 9418671e9a..b9524a545c 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java
@@ -45,8 +45,7 @@ import org.eclipse.swt.events.*;
* <dd>DefaultSelection, Modify, Selection</dd>
* </dl>
* <p>
- * Note: Only one of the styles DROP_DOWN and SIMPLE
- * may be specified.
+ * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified.
* </p><p>
* IMPORTANT: This class is <em>not</em> intended to be subclassed.
* </p>
@@ -117,9 +116,6 @@ public Combo (Composite parent, int style) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_ADDED - if the operation fails because of an operating system failure</li>
- * </ul>
*
* @see #add(String,int)
*/
@@ -153,9 +149,6 @@ public void add (String string) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_ADDED - if the operation fails because of an operating system failure</li>
- * </ul>
*
* @see #add(String)
*/
@@ -501,9 +494,6 @@ public void deselectAll () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_ITEM - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public String getItem (int index) {
checkWidget();
@@ -542,9 +532,6 @@ public String getItem (int index) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_COUNT - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public int getItemCount () {
checkWidget();
@@ -562,9 +549,6 @@ public int getItemCount () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_ITEM_HEIGHT - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public int getItemHeight () {
checkWidget();
@@ -591,9 +575,6 @@ public int getItemHeight () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_ITEM - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public String [] getItems () {
checkWidget();
@@ -729,9 +710,6 @@ public String getText () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_ITEM_HEIGHT - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public int getTextHeight () {
checkWidget();
@@ -788,6 +766,10 @@ public int getTextLimit () {
/**
* Gets the number of items that are visible in the drop
* down portion of the receiver's list.
+ * <p>
+ * Note: This operation is a hint and is not supported on
+ * platforms that do not have this concept.
+ * </p>
*
* @return the number of items that are visible
*
@@ -935,9 +917,6 @@ public void paste () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_REMOVED - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public void remove (int index) {
checkWidget();
@@ -974,9 +953,6 @@ public void remove (int index) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_REMOVED - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public void remove (int start, int end) {
checkWidget();
@@ -1016,9 +992,6 @@ void register () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_REMOVED - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public void remove (String string) {
checkWidget();
@@ -1038,7 +1011,8 @@ public void remove (String string) {
}
}
/**
- * Removes all of the items from the receiver's list.
+ * Removes all of the items from the receiver's list and clear the
+ * contents of receiver's text field.
* <p>
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1109,7 +1083,7 @@ public void removeSelectionListener (SelectionListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the control is verified.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -1250,10 +1224,6 @@ void setForegroundPixel (int pixel) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_REMOVED - if the remove operation fails because of an operating system failure</li>
- * <li>ERROR_ITEM_NOT_ADDED - if the add operation fails because of an operating system failure</li>
- * </ul>
*/
public void setItem (int index, String string) {
checkWidget();
@@ -1285,9 +1255,6 @@ public void setItem (int index, String string) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_ADDED - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public void setItems (String [] items) {
checkWidget();
@@ -1476,6 +1443,10 @@ public void setTextLimit (int limit) {
/**
* Sets the number of items that are visible in the drop
* down portion of the receiver's list.
+ * <p>
+ * Note: This operation is a hint and is not supported on
+ * platforms that do not have this concept.
+ * </p>
*
* @param count the new number of items to be visible
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
index 22cebaebaf..b3830dc41e 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
@@ -345,6 +345,7 @@ boolean fowardKeyEvent (int event) {
}
/**
* Returns an array containing the receiver's children.
+ * Children are returned in the order that they are drawn.
* <p>
* Note: This is not the actual structure used by the receiver
* to maintain its list of children, so modifying the array will
@@ -352,6 +353,9 @@ boolean fowardKeyEvent (int event) {
* </p>
*
* @return an array of children
+ *
+ * @see Control#moveAbove
+ * @see Control#moveBelow
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -982,7 +986,7 @@ public void setLayout (Layout layout) {
* </ul>
*
* @see #layout(boolean)
- * @see #layout(Control)
+ * @see #layout(Control[])
*
* @since 3.1
*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java
index cf961bbf27..ec2294a475 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java
@@ -1146,9 +1146,10 @@ public void internal_dispose_GC (int xGC, GCData data) {
}
/**
* Returns <code>true</code> if the receiver is enabled and all
- * of the receiver's ancestors are enabled, and <code>false</code>
- * otherwise. A disabled control is typically not selectable from the
- * user interface and draws with an inactive or "grayed" look.
+ * ancestors up to and including the receiver's nearest ancestor
+ * shell are enabled. Otherwise, <code>false</code> is returned.
+ * A disabled control is typically not selectable from the user
+ * interface and draws with an inactive or "grayed" look.
*
* @return the receiver's enabled state
*
@@ -1238,8 +1239,8 @@ boolean isTabItem () {
}
/**
* Returns <code>true</code> if the receiver is visible and all
- * of the receiver's ancestors are visible and <code>false</code>
- * otherwise.
+ * ancestors up to and including the receiver's nearest ancestor
+ * shell are visible. Otherwise, <code>false</code> is returned.
*
* @return the receiver's visibility state
*
@@ -1291,7 +1292,8 @@ boolean mnemonicMatch (char key) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
- * @see #moveBelow
+ * @see Control#moveBelow
+ * @see Composite#getChildren
*/
public void moveAbove (Control control) {
checkWidget();
@@ -1318,7 +1320,8 @@ public void moveAbove (Control control) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
- * @see #moveAbove
+ * @see Control#moveAbove
+ * @see Composite#getChildren
*/
public void moveBelow (Control control) {
checkWidget();
@@ -1496,7 +1499,7 @@ void releaseWidget () {
* Removes the listener from the collection of listeners who will
* be notified when the control is moved or resized.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -1520,7 +1523,7 @@ public void removeControlListener (ControlListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the control gains or loses focus.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -1544,7 +1547,7 @@ public void removeFocusListener(FocusListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the help events are generated for the control.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -1567,7 +1570,7 @@ public void removeHelpListener (HelpListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when keys are pressed and released on the system keyboard.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -1591,7 +1594,7 @@ public void removeKeyListener(KeyListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when mouse buttons are pressed and released.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -1616,7 +1619,7 @@ public void removeMouseListener(MouseListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the mouse moves.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -1639,7 +1642,7 @@ public void removeMouseMoveListener(MouseMoveListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the mouse passes or hovers over controls.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -1664,7 +1667,7 @@ public void removeMouseTrackListener(MouseTrackListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the receiver needs to be painted.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -1686,7 +1689,7 @@ public void removePaintListener(PaintListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when traversal events occur.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -2258,7 +2261,8 @@ boolean setRadioSelection (boolean value) {
* can occur in the receiver until the flag is set to true.
* Graphics operations that occurred while the flag was
* <code>false</code> are lost. When the flag is set to <code>true</code>,
- * the entire widget is marked as needing to be redrawn.
+ * the entire widget is marked as needing to be redrawn. Nested calls
+ * to this method are stacked.
* <p>
* Note: This operation is a hint and may not be supported on some
* platforms or for some widgets.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java
index bd26cea07a..87442923ab 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java
@@ -274,6 +274,33 @@ public Image getImage () {
checkWidget();
return image;
}
+/**
+ * Returns the receiver's images if they had previously been
+ * set using <code>setImages()</code>. Images are typically
+ * displayed by the window manager when the instance is
+ * marked as iconified, and may also be displayed somewhere
+ * in the trim when the instance is in normal or maximized
+ * states. Depending where the icon is displayed, the platform
+ * chooses the icon with the "best" size. It is expected that
+ * the array will contain the same icon rendered at different
+ * resolutions.
+ *
+ * <p>
+ * Note: This method will return an empty array if called before
+ * <code>setImages()</code> is called. It does not provide
+ * access to a window manager provided, "default" image
+ * even if one exists.
+ * </p>
+ *
+ * @return the images
+ *
+ * @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.0
+ */
public Image [] getImages () {
checkWidget ();
if (images == null) return new Image [0];
@@ -495,7 +522,7 @@ public void setImage (Image image) {
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the array of images is null</li>
- * <li>ERROR_INVALID_ARGUMENT - if one of the images has been disposed</li>
+ * <li>ERROR_INVALID_ARGUMENT - if one of the images is null or has been disposed</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/motif/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java
index 19d70263e4..56e9261ed7 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java
@@ -455,9 +455,19 @@ void addWidget (int handle, Widget widget) {
/**
* Adds the listener to the collection of listeners who will
* be notifed when an event of the given type occurs anywhere
- * in this display. When the event does occur, the listener is
+ * in a widget. When the event does occur, the listener is
* notified by sending it the <code>handleEvent()</code> message.
- *
+ * <p>
+ * Setting the type of an event to <code>SWT.None</code> from
+ * within the <code>handleEvent()</code> method can be used to
+ * change the event type and stop subsequent Java listeners
+ * from running. Because event filters run before other listeners,
+ * event filters can both block other listeners and set arbitrary
+ * fields within an event. For this reason, event filters are both
+ * powerful and dangerous. They should generally be avoided for
+ * performance, debugging and code maintenance reasons.
+ * </p>
+ *
* @param eventType the type of event to listen for
* @param listener the listener which should be notified when the event occurs
*
@@ -955,6 +965,10 @@ boolean filterEvent (int event) {
* the instance of the <code>Widget</code> subclass which
* represents it in the currently running application, if
* such exists, or null if no matching widget can be found.
+ * <p>
+ * <b>IMPORTANT:</b> This method should not be called from
+ * application code. The arguments are platform-specific.
+ * </p>
*
* @param handle the handle for the widget
* @return the SWT widget that the handle represents
@@ -968,6 +982,28 @@ public Widget findWidget (int handle) {
checkDevice ();
return getWidget (handle);
}
+/**
+ * Given the operating system handle for a widget,
+ * and widget-specific id, returns the instance of
+ * the <code>Widget</code> subclass which represents
+ * the handle/id pair in the currently running application,
+ * if such exists, or null if no matching widget can be found.
+ * <p>
+ * <b>IMPORTANT:</b> This method should not be called from
+ * application code. The arguments are platform-specific.
+ * </p>
+ *
+ * @param handle the handle for the widget
+ * @param id the id for the subwidget (usually an item)
+ * @return the SWT widget that the handle/id pair represents
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.1
+ */
public Widget findWidget (int handle, int id) {
return null;
}
@@ -1248,8 +1284,8 @@ public static synchronized Display getDefault () {
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
* </ul>
*
- * @see #setData
- * @see #disposeExec
+ * @see #setData(String, Object)
+ * @see #disposeExec(Runnable)
*/
public Object getData (String key) {
checkDevice ();
@@ -1283,8 +1319,8 @@ public Object getData (String key) {
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
* </ul>
*
- * @see #setData
- * @see #disposeExec
+ * @see #setData(Object)
+ * @see #disposeExec(Runnable)
*/
public Object getData () {
checkDevice ();
@@ -1781,9 +1817,10 @@ public Image getSystemImage (int style) {
return Image.motif_new (this, SWT.ICON, imagePixmap, maskPixmap);
}
/**
- * Returns the single instance of the system tray.
+ * Returns the single instance of the system tray or null
+ * when there is no system tray available for the platform.
*
- * @return the receiver's user-interface thread
+ * @return the system tray or <code>null</code>
*
* @exception SWTException <ul>
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
@@ -2252,12 +2289,12 @@ void initializeWidgetTable () {
* @param data the platform specific GC data
* @return the platform specific GC handle
*
- * @exception SWTError <ul>
- * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
- * </ul>
* @exception SWTException <ul>
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
* </ul>
+ * @exception SWTError <ul>
+ * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
+ * </ul>
*/
public int internal_new_GC (GCData data) {
if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
@@ -2330,7 +2367,7 @@ static boolean isValidClass (Class clazz) {
* @return point with mapped coordinates
*
* @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the rectangle is null</li>
+ * <li>ERROR_NULL_ARGUMENT - if the point is null</li>
* <li>ERROR_INVALID_ARGUMENT - if the Control from or the Control to have been disposed</li>
* </ul>
* @exception SWTException <ul>
@@ -2511,7 +2548,12 @@ int mouseHoverProc (int handle, int id) {
* and mouse events. The intent is to enable automated UI
* testing by simulating the input from the user. Most
* SWT applications should never need to call this method.
- *
+ * <p>
+ * Note that this operation can fail when the operating system
+ * fails to generate the event for any reason. For example,
+ * this can happen when there is no such key or mouse button
+ * or when the system event queue is full.
+ * </p>
* <p>
* <b>Event Types:</b>
* <p>KeyDown, KeyUp
@@ -2635,6 +2677,7 @@ void postEvent (Event event) {
* @exception SWTException <ul>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_FAILED_EXEC - if an exception occurred while running an inter-thread message</li>
* </ul>
*
* @see #sleep
@@ -2883,7 +2926,7 @@ Widget removeWidget (int handle) {
/**
* Removes the listener from the collection of listeners who will
* be notifed when an event of the given type occurs anywhere in
- * this display.
+ * a widget.
*
* @param eventType the type of event to listen for
* @param listener the listener which should no longer be notified when the event occurs
@@ -3094,8 +3137,8 @@ void setCurrentCaret (Caret caret) {
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
* </ul>
*
- * @see #setData
- * @see #disposeExec
+ * @see #getData(String)
+ * @see #disposeExec(Runnable)
*/
public void setData (String key, Object value) {
checkDevice ();
@@ -3164,8 +3207,8 @@ public void setData (String key, Object value) {
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
* </ul>
*
- * @see #getData
- * @see #disposeExec
+ * @see #getData()
+ * @see #disposeExec(Runnable)
*/
public void setData (Object data) {
checkDevice ();
@@ -3183,6 +3226,7 @@ public void setData (Object data) {
* @exception SWTException <ul>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_FAILED_EXEC - if an exception occurred while running an inter-thread message</li>
* </ul>
*/
public void setSynchronizer (Synchronizer synchronizer) {
@@ -3448,7 +3492,7 @@ static int untranslateKey (int key) {
* <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
* </ul>
*
- * @see Control#update
+ * @see Control#update()
*/
public void update () {
checkDevice ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java
index 1380553a61..169ba05810 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java
@@ -16,6 +16,20 @@ import org.eclipse.swt.graphics.*;
import org.eclipse.swt.events.*;
/**
+ * Instances of this class represent a selectable
+ * user interface object that displays a text with
+ * links.
+ * <p>
+ * <dl>
+ * <dt><b>Styles:</b></dt>
+ * <dt><b>Events:</b></dt>
+ * <dd>Selection</dd>
+ * </dl>
+ * <p>
+ * IMPORTANT: This class is <em>not</em> intended to be subclassed.
+ * </p>
+ *
+ * @since 3.1
*/
public class Link extends Control {
String text;
@@ -391,6 +405,15 @@ void setForegroundPixel (int pixel) {
/**
* Sets the receiver's text.
* <p>
+ * The string can contain both regular text and hyperlinks. A hyperlink
+ * is delimited by an anchor tag, &lt;A&gt; and &lt;/A&gt;. Within an
+ * anchor, a single HREF attribute is supported. When a hyperlink is
+ * selected, the text field of the selection event contains either the
+ * text of hyperlink or the value of the HREF, if one was specified.
+ * In the rare case of identical hyperlinks within the same string, the
+ * HREF tag can be used to distinguish between them. The string may
+ * include the mnemonic character and line delimiters.
+ * </p>
*
* @param string the new text
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java
index a6cc903ea8..c9534e33a0 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java
@@ -87,9 +87,6 @@ public List (Composite parent, int style) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_ADDED - if the operation fails because of an operating system failure</li>
- * </ul>
*
* @see #add(String,int)
*/
@@ -122,9 +119,6 @@ public void add (String string) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_ADDED - if the operation fails because of an operating system failure</li>
- * </ul>
*
* @see #add(String)
*/
@@ -424,9 +418,6 @@ public int getFocusIndex () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_ITEM - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public String getItem (int index) {
checkWidget();
@@ -465,9 +456,6 @@ public String getItem (int index) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_COUNT - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public int getItemCount () {
checkWidget();
@@ -485,9 +473,6 @@ public int getItemCount () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_ITEM_HEIGHT - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public int getItemHeight () {
checkWidget();
@@ -516,10 +501,6 @@ public int getItemHeight () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_ITEM - if the operation fails because of an operating system failure while getting an item</li>
- * <li>ERROR_CANNOT_GET_COUNT - if the operation fails because of an operating system failure while getting the item count</li>
- * </ul>
*/
public String [] getItems () {
checkWidget();
@@ -566,10 +547,6 @@ public String [] getItems () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_SELECTION - if the operation fails because of an operating system failure while getting the selection</li>
- * <li>ERROR_CANNOT_GET_ITEM - if the operation fails because of an operating system failure while getting an item</li>
- * </ul>
*/
public String [] getSelection () {
checkWidget();
@@ -610,9 +587,6 @@ public String [] getSelection () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_COUNT - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public int getSelectionCount () {
checkWidget();
@@ -630,9 +604,6 @@ public int getSelectionCount () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_SELECTION - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public int getSelectionIndex () {
checkWidget();
@@ -661,9 +632,6 @@ public int getSelectionIndex () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_SELECTION - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public int [] getSelectionIndices () {
checkWidget();
@@ -748,10 +716,6 @@ public int indexOf (String string) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_COUNT - if the operation fails because of an operating system failure while getting the item count</li>
- * <li>ERROR_CANNOT_GET_ITEM - if the operation fails because of an operating system failure while getting an item</li>
- * </ul>
*/
public int indexOf (String string, int start) {
checkWidget();
@@ -809,9 +773,6 @@ void overrideTranslations () {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_REMOVED - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public void remove (int index) {
checkWidget();
@@ -844,9 +805,6 @@ public void remove (int index) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_REMOVED - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public void remove (int start, int end) {
checkWidget();
@@ -874,9 +832,6 @@ public void remove (int start, int end) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_REMOVED - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public void remove (String string) {
checkWidget();
@@ -903,9 +858,6 @@ public void remove (String string) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_REMOVED - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public void remove (int [] indices) {
checkWidget();
@@ -1271,10 +1223,6 @@ public void setFont (Font font) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_REMOVED - if the remove operation fails because of an operating system failure</li>
- * <li>ERROR_ITEM_NOT_ADDED - if the add operation fails because of an operating system failure</li>
- * </ul>
*/
public void setItem (int index, String string) {
checkWidget();
@@ -1306,9 +1254,6 @@ public void setItem (int index, String string) {
* <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>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_ADDED - if the operation fails because of an operating system failure</li>
- * </ul>
*/
public void setItems (String [] items) {
checkWidget();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java
index 81c1d0c331..48cc247152 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java
@@ -633,7 +633,7 @@ void removeAccelerators () {
* Removes the listener from the collection of listeners who will
* be notified when the help events are generated for the control.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -656,7 +656,7 @@ public void removeHelpListener (HelpListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the menu events are generated for the control.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java
index e9fe65207c..a2ba19f5bc 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java
@@ -535,7 +535,7 @@ void removeAccelerators () {
* Removes the listener from the collection of listeners who will
* be notified when the arm events are generated for the control.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -558,7 +558,7 @@ public void removeArmListener (ArmListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the help events are generated for the control.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -581,7 +581,7 @@ public void removeHelpListener (HelpListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the control is selected.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java
index 85306094a8..7d7e771063 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java
@@ -22,7 +22,7 @@ import org.eclipse.swt.events.*;
* the parent control.
* <dl>
* <dt><b>Styles:</b></dt>
- * <dd>HORIZONTAL, VERTICAL</dd>
+ * <dd>HORIZONTAL, VERTICAL, SMOOTH</dd>
* <dt><b>Events:</b></dt>
* <dd>Selection</dd>
* </dl>
@@ -188,7 +188,7 @@ void releaseWidget () {
* Removes the listener from the collection of listeners who will
* be notified when the control is selected.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java
index a82806d039..a84776d6be 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java
@@ -203,7 +203,7 @@ public int getPageIncrement () {
return argList [1];
}
/**
- * Returns the single <em>selection</em> that is the receiver's position.
+ * Returns the <em>selection</em>, which is the receiver's position.
*
* @return the selection
*
@@ -347,8 +347,8 @@ public void setPageIncrement (int pageIncrement) {
display.setWarnings (warnings);
}
/**
- * Sets the single <em>selection</em> that is the receiver's
- * value to the argument which must be greater than or equal
+ * Sets the <em>selection</em>, which is the receiver's
+ * value, to the argument which must be greater than or equal
* to zero.
*
* @param value the new selection (must be zero or greater)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java
index 76dfe87ac8..ac15c88d14 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java
@@ -96,7 +96,6 @@ ScrollBar (Scrollable parent, int style) {
* interface.
* <p>
* When <code>widgetSelected</code> is called, the event object detail field contains one of the following values:
- * <code>0</code> - for the end of a drag.
* <code>SWT.DRAG</code>.
* <code>SWT.HOME</code>.
* <code>SWT.END</code>.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java
index ea7a668233..0a503726b2 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java
@@ -735,11 +735,11 @@ void enableWidget (boolean enabled) {
enableHandle (enabled, shellHandle);
}
/**
- * Moves the receiver to the top of the drawing order for
- * the display on which it was created (so that all other
- * shells on that display, which are not the receiver's
- * children will be drawn behind it) and forces the window
- * manager to make the shell active.
+ * If the receiver is visible, moves it to the top of the
+ * drawing order for the display on which it was created
+ * (so that all other shells on that display, which are not
+ * the receiver's children will be drawn behind it) and forces
+ * the window manager to make the shell active.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -882,6 +882,21 @@ public boolean getMaximized () {
}
return super.getMaximized ();
}
+/**
+ * Returns a point describing the minimum receiver's size. The
+ * x coordinate of the result is the minimum width of the receiver.
+ * The y coordinate of the result is the minimum height of the
+ * receiver.
+ *
+ * @return the receiver's size
+ *
+ * @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.1
+ */
public Point getMinimumSize () {
checkWidget ();
int [] argList = {OS.XmNminWidth, 0, OS.XmNminHeight, 0};
@@ -1119,11 +1134,11 @@ public void removeShellListener(ShellListener listener) {
}
/**
- * Moves the receiver to the top of the drawing order for
- * the display on which it was created (so that all other
- * shells on that display, which are not the receiver's
- * children will be drawn behind it) and asks the window
- * manager to make the shell active.
+ * If the receiver is visible, moves it to the top of the
+ * drawing order for the display on which it was created
+ * (so that all other shells on that display, which are not
+ * the receiver's children will be drawn behind it) and asks
+ * the window manager to make the shell active
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1369,6 +1384,21 @@ public void setMinimized (boolean minimized) {
}
}
}
+/**
+ * Sets the receiver's minimum size to the point specified by the arguments.
+ * If the new minimum size is larger than the current size of the receiver,
+ * the receiver is resized to the new minimum size.
+ *
+ * @param width the new minimum width for the receiver
+ * @param height the new minimum height for the receiver
+ *
+ * @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.1
+ */
public void setMinimumSize (int width, int height) {
checkWidget ();
int [] argList = {
@@ -1377,6 +1407,23 @@ public void setMinimumSize (int width, int height) {
};
OS.XtSetValues (shellHandle, argList, argList.length / 2);
}
+/**
+ * Sets the receiver's minimum size to the point specified by the argument.
+ * If the new minimum size is larger than the current size of the receiver,
+ * the receiver is resized to the new minimum size.
+ *
+ * @param size the new minimum size for the receiver
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the point 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.1
+ */
public void setMinimumSize (Point size) {
checkWidget ();
if (size == null) error (SWT.ERROR_NULL_ARGUMENT);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java
index 01e27cf775..7da69fafb0 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java
@@ -238,7 +238,7 @@ public int getPageIncrement () {
return argList [1];
}
/**
- * Returns the single <em>selection</em> that is the receiver's value.
+ * Returns the <em>selection</em>, which is the receiver's value.
*
* @return the selection
*
@@ -416,8 +416,8 @@ public void setPageIncrement (int value) {
OS.XtSetValues (handle, argList, argList.length / 2);
}
/**
- * Sets the single <em>selection</em> that is the receiver's
- * value to the argument which must be greater than or equal
+ * Sets the <em>selection</em>, which is the receiver's
+ * value, to the argument which must be greater than or equal
* to zero.
*
* @param value the new selection (must be zero or greater)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java
index a2f59cd651..a7d3f15411 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java
@@ -19,7 +19,8 @@ import org.eclipse.swt.events.*;
/**
* Instances of this class are selectable user interface
- * objects that allow the user to enter and modify number
+ * objects that allow the user to enter and modify numeric
+ * values.
* <p>
* <dl>
* <dt><b>Styles:</b></dt>
@@ -30,6 +31,8 @@ import org.eclipse.swt.events.*;
* <p>
* IMPORTANT: This class is <em>not</em> intended to be subclassed.
* </p>
+ *
+ * @since 3.1
*/
public class Spinner extends Composite {
@@ -344,9 +347,8 @@ public int getMinimum () {
return argList [1];
}
/**
- * Returns the amount that the receiver's value will be
- * modified by when the page increment/decrement areas
- * are selected.
+ * Returns the amount that the receiver's position will be
+ * modified by when the page up/down keys are pressed.
*
* @return the page increment
*
@@ -360,7 +362,7 @@ public int getPageIncrement () {
return 1;
}
/**
- * Returns the single <em>selection</em> that is the receiver's position.
+ * Returns the <em>selection</em>, which is the receiver's position.
*
* @return the selection
*
@@ -447,7 +449,7 @@ public void removeModifyListener (ModifyListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the control is selected.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -532,11 +534,10 @@ void setForegroundPixel (int pixel) {
}
/**
* Sets the amount that the receiver's value will be
- * modified by when the up/down (or right/left) arrows
- * are pressed to the argument, which must be at least
- * one.
+ * modified by when the up/down arrows are pressed to
+ * the argument, which must be at least one.
*
- * @param increment the new increment (must be greater than zero)
+ * @param value the new increment (must be greater than zero)
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -598,12 +599,11 @@ public void setMinimum (int value) {
OS.XtSetValues (handle, argList2, argList2.length / 2);
}
/**
- * Sets the amount that the receiver's value will be
- * modified by when the page increment/decrement areas
- * are selected to the argument, which must be at least
- * one.
+ * Sets the amount that the receiver's position will be
+ * modified by when the page up/down keys are pressed
+ * to the argument, which must be at least one.
*
- * @param pageIncrement the page increment (must be greater than zero)
+ * @param value the page increment (must be greater than zero)
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -615,9 +615,10 @@ public void setPageIncrement (int value) {
if (value < 1) return;
}
/**
- * Sets the single <em>selection</em> that is the receiver's
- * value to the argument which must be greater than or equal
- * to zero.
+ * Sets the <em>selection</em>, which is the receiver's
+ * position, to the argument. If the argument is not within
+ * the range specified by minimum and maximum, it will be
+ * adjusted to fall within this range.
*
* @param value the new selection (must be zero or greater)
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java
index 5c425c5994..f35df0a7ff 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java
@@ -988,7 +988,7 @@ public void removeModifyListener (ModifyListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the control is selected.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -1012,7 +1012,7 @@ public void removeSelectionListener(SelectionListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when the control is verified.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java
index c852bd6565..1c32f1acae 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java
@@ -524,7 +524,7 @@ void releaseWidget () {
* Removes the listener from the collection of listeners who will
* be notified when the control is selected.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -803,7 +803,7 @@ void setVisible (boolean visible) {
OS.XtSetMappedWhenManaged (handle, visible);
}
/**
- * Sets the width of the receiver.
+ * Sets the width of the receiver, for <code>SEPARATOR</code> ToolItems.
*
* @param width the new width
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java
index 3b2dbc73a0..ad244a8a37 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java
@@ -479,7 +479,7 @@ public boolean open () {
* Removes the listener from the collection of listeners who will
* be notified when the control is moved or resized.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -503,7 +503,7 @@ public void removeControlListener (ControlListener listener) {
* Removes the listener from the collection of listeners who will
* be notified when keys are pressed and released on the system keyboard.
*
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li>