diff options
author | Carolyn MacLeod <carolyn> | 2007-05-31 20:34:20 +0000 |
---|---|---|
committer | Carolyn MacLeod <carolyn> | 2007-05-31 20:34:20 +0000 |
commit | 20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9 (patch) | |
tree | 39bd3703cea1020d3f848e884fffd09cef858c42 /bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse | |
parent | 29ed0b9d892e5929f54e524e3dc1c92d73ee99db (diff) | |
download | eclipse.platform.swt-20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9.tar.gz eclipse.platform.swt-20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9.tar.xz eclipse.platform.swt-20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9.zip |
After javadoc bash for 3.3 RC3BEFORE_COPYRIGHT_BASH_FOR_33RC3AFTER_JAVADOC_BASH_FOR_33RC3
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse')
38 files changed, 915 insertions, 145 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java index 654bb2273e..39ac3d756a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java @@ -624,6 +624,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/carbon/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java index e0da5d3ab0..8cdcd89645 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java @@ -92,7 +92,7 @@ public final class FontData { String lang, country, variant; /** - * Constructs a new un-initialized font data. + * Constructs a new uninitialized font data. */ public FontData () { this("", 12, SWT.NORMAL); @@ -222,7 +222,7 @@ public boolean equals (Object object) { * * @return the height of this FontData * - * @see #setHeight + * @see #setHeight(int) */ public int getHeight() { return (int)height; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java index f42d211901..18be591589 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java @@ -89,8 +89,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> @@ -114,8 +114,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> @@ -992,7 +992,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> @@ -1001,6 +1006,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 @@ -1366,7 +1372,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> @@ -1618,6 +1624,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 * @@ -1627,6 +1638,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 @@ -1897,6 +1909,7 @@ public Pattern getBackgroundPattern() { * </ul> * * @see #setAdvanced + * * @since 3.1 */ public boolean getAdvanced() { @@ -2235,6 +2248,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; @@ -2267,7 +2291,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> @@ -2514,8 +2538,7 @@ boolean isIdentity(float[] transform) { * 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 @@ -2535,6 +2558,7 @@ boolean isIdentity(float[] transform) { * @see #setBackgroundPattern * @see #setClipping(Path) * @see #setForegroundPattern + * @see #setLineAttributes * @see #setInterpolation * @see #setTextAntialias * @see #setTransform @@ -2558,13 +2582,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) { @@ -2578,6 +2610,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 * @@ -2587,8 +2624,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 @@ -2638,7 +2678,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> @@ -2646,9 +2691,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 */ @@ -2714,8 +2762,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> @@ -2723,9 +2776,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 */ @@ -2934,7 +2990,11 @@ public void setForeground(Color color) { /** * 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> @@ -2942,9 +3002,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 Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2962,7 +3025,12 @@ public void setForegroundPattern(Pattern pattern) { * 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> @@ -2971,8 +3039,12 @@ public void setForegroundPattern(Pattern pattern) { * </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) { @@ -2989,6 +3061,30 @@ public void setInterpolation(int interpolation) { OS.CGContextSetInterpolationQuality(handle, quality); } +/** + * 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); @@ -3346,7 +3442,12 @@ public void setXORMode(boolean xor) { * 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> @@ -3355,8 +3456,11 @@ public void setXORMode(boolean xor) { * </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 @@ -3374,11 +3478,16 @@ public void setTextAntialias(int antialias) { data.textAntialias = 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> @@ -3386,9 +3495,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 */ @@ -3486,7 +3598,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/carbon/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java index 841c433997..d105bf436d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java @@ -24,6 +24,10 @@ import org.eclipse.swt.internal.carbon.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -45,14 +49,22 @@ public class Path extends Resource { /** * Constructs a new empty Path. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the path * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained</li> * </ul> * * @see #dispose() diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java index f47a6b8ec1..70aafdc98a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java @@ -21,6 +21,10 @@ import org.eclipse.swt.internal.carbon.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -36,6 +40,11 @@ public class Pattern extends Resource { /** * Constructs a new Pattern given an image. Drawing with the resulting * pattern will cause the image to be tiled over the resulting area. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param image the image that the pattern will draw @@ -44,8 +53,11 @@ public class Pattern extends Resource { * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device, or the image is null</li> * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() @@ -67,6 +79,11 @@ public Pattern(Device device, Image image) { * Constructs a new Pattern that represents a linear, two color * gradient. Drawing with the pattern will cause the resulting area to be * tiled with the gradient specified by the arguments. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param x1 the x coordinate of the starting corner of the gradient @@ -81,8 +98,11 @@ public Pattern(Device device, Image image) { * or if either color1 or color2 is null</li> * <li>ERROR_INVALID_ARGUMENT - if either color1 or color2 has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() @@ -94,6 +114,11 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo * Constructs a new Pattern that represents a linear, two color * gradient. Drawing with the pattern will cause the resulting area to be * tiled with the gradient specified by the arguments. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param x1 the x coordinate of the starting corner of the gradient @@ -110,8 +135,11 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo * or if either color1 or color2 is null</li> * <li>ERROR_INVALID_ARGUMENT - if either color1 or color2 has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java index 04b23f8d1b..a625be299c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java @@ -431,6 +431,33 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo draw(gc, x, y, selectionStart, selectionEnd, selectionForeground, selectionBackground, 0); } +/** + * Draws the receiver's text using the specified GC at the specified + * point. + * <p> + * The parameter <code>flags</code> can include one of <code>SWT.DELIMITER_SELECTION</code> + * or <code>SWT.FULL_SELECTION</code> to specify the selection behavior on all lines except + * for the last line, and can also include <code>SWT.LAST_LINE_SELECTION</code> to extend + * the specified selection behavior to the last line. + * </p> + * @param gc the GC to draw + * @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 selectionStart the offset where the selections starts, or -1 indicating no selection + * @param selectionEnd the offset where the selections ends, or -1 indicating no selection + * @param selectionForeground selection foreground, or NULL to use the system default color + * @param selectionBackground selection background, or NULL to use the system default color + * @param flags drawing options + * + * @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> + * + * @since 3.3 + */ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout (); computeRuns(); @@ -779,7 +806,7 @@ public boolean getJustify () { * embedding level is usually used to determine the directionality of a * character in bidirectional text. * - * @param offset the charecter offset + * @param offset the character offset * @return the embedding level * * @exception IllegalArgumentException <ul> @@ -974,7 +1001,8 @@ public Point getLocation(int offset, boolean trailing) { /** * Returns the next offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code>, <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type @@ -1154,7 +1182,8 @@ public int getOrientation() { /** * Returns the previous offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java index e7bdc56b4d..d224d159cd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java @@ -22,6 +22,10 @@ import org.eclipse.swt.internal.carbon.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -40,14 +44,22 @@ public class Transform extends Resource { /** * Constructs a new identity Transform. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -59,6 +71,11 @@ public Transform (Device device) { /** * Constructs a new Transform given an array of elements that represent the * matrix that describes the transformation. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * @param elements an array of floats that describe the transformation matrix @@ -67,8 +84,11 @@ public Transform (Device device) { * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device, or the elements array is null</li> * <li>ERROR_INVALID_ARGUMENT - if the elements array is too small to hold the matrix values</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -80,6 +100,11 @@ public Transform(Device device, float[] elements) { /** * Constructs a new Transform given all of the elements that represent the * matrix that describes the transformation. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * @param m11 the first element of the first row of the matrix @@ -92,8 +117,11 @@ public Transform(Device device, float[] elements) { * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -154,7 +182,7 @@ public void getElements(float[] elements) { * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> - * <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertable</li> + * <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertible</li> * </ul> */ public void invert() { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java index cd1e4a111a..98f0a5d6a1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java @@ -92,11 +92,11 @@ public Button (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> * @@ -437,7 +437,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 * @@ -570,7 +570,12 @@ void setDefault (boolean value) { /** * 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> @@ -667,12 +672,16 @@ public void setSelection (boolean selected) { * 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 '&' can be * escaped by doubling it in the string, causing a single * '&' 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/carbon/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java index 15c460252a..f3e9ca1b1e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java @@ -45,7 +45,7 @@ import org.eclipse.swt.internal.carbon.Rect; * <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. @@ -213,11 +213,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> * @@ -1237,7 +1237,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 * @@ -1396,9 +1396,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/carbon/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java index 40d2654542..d45a235729 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java @@ -645,7 +645,13 @@ boolean isTabGroup () { * <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> @@ -671,7 +677,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 * @@ -702,7 +715,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 @@ -729,6 +749,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/carbon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java index f34ab996e1..5ef046bc13 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java @@ -34,9 +34,8 @@ import org.eclipse.swt.accessibility.Accessible; * <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. @@ -144,6 +143,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); @@ -209,7 +229,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> @@ -630,12 +661,84 @@ void destroyWidget () { } } +/** + * 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); @@ -977,6 +1080,19 @@ public Rectangle getBounds () { return getControlBounds (topHandle ()); } +/** + * 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 (); return (state & DRAG_DETECT) != 0; @@ -987,6 +1103,20 @@ int getDrawCount (int control) { return parent.getDrawCount (control); } +/** + * 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; @@ -2080,12 +2210,13 @@ public void pack (boolean changed) { * <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(); @@ -2119,12 +2250,13 @@ void redraw (boolean children) { * <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 all) { checkWidget (); @@ -2186,6 +2318,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); @@ -2671,7 +2822,10 @@ void setBackground () { * 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> @@ -2699,7 +2853,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> @@ -2898,6 +3055,20 @@ void setDefaultFont () { if (display.smallFonts) setFontStyle (defaultFont ()); } +/** + * 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 (); if (dragDetect) { @@ -3008,7 +3179,9 @@ void setFontStyle (int control, Font 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> @@ -3202,7 +3375,7 @@ public boolean setParent (Composite parent) { * </ul> * * @see #redraw(int, int, int, int, boolean) - * @see #update + * @see #update() */ public void setRedraw (boolean redraw) { checkWidget(); @@ -3727,13 +3900,19 @@ boolean traverseMnemonic (Event event) { /** * 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/carbon/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java index ad7d118d2e..2a68c18b14 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java @@ -20,6 +20,29 @@ import org.eclipse.swt.internal.carbon.LongDateRec; import org.eclipse.swt.internal.carbon.OS; import org.eclipse.swt.internal.carbon.Rect; +/** + * Instances of this class are selectable user interface + * objects that allow the user to enter and modify date + * or time 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> + * <dl> + * <dt><b>Styles:</b></dt> + * <dd>DATE, TIME, CALENDAR, SHORT, MEDIUM, LONG</dd> + * <dt><b>Events:</b></dt> + * <dd>Selection</dd> + * </dl> + * <p> + * Note: Only one of the styles DATE, TIME, or CALENDAR may be specified, + * and only one of the styles SHORT, MEDIUM, or LONG may be specified. + * </p><p> + * IMPORTANT: This class is <em>not</em> intended to be subclassed. + * </p> + * + * @since 3.3 + */ public class DateTime extends Composite { LongDateRec dateRec; @@ -34,6 +57,36 @@ public class DateTime extends Composite { static final int MARGIN_WIDTH = 2; static final int MARGIN_HEIGHT = 1; +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + * <p> + * The style value is either one of the style constants defined in + * class <code>SWT</code> which is applicable to instances of this + * class, or must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>SWT</code> style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + * </p> + * + * @param parent a composite control which will be the parent of the new instance (cannot be null) + * @param style the style of control to construct + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> + * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> + * </ul> + * + * @see SWT#DATE + * @see SWT#TIME + * @see SWT#CALENDAR + * @see Widget#checkSubclass + * @see Widget#getStyle + */ public DateTime (Composite parent, int style) { super (parent, checkStyle (style) | ((style & SWT.CALENDAR) != 0 ? SWT.NO_REDRAW_RESIZE : 0)); if ((this.style & SWT.CALENDAR) != 0) { @@ -94,6 +147,30 @@ protected void checkSubclass () { if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS); } +/** + * Adds the listener to the collection of listeners who will + * 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 user changes the control's value. + * <code>widgetDefaultSelected</code> is not called. + * </p> + * + * @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 SelectionListener + * @see #removeSelectionListener + * @see SelectionEvent + */ public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -344,6 +421,19 @@ public Color getForeground() { return fg; } +/** + * Returns the receiver's date, or day of the month. + * <p> + * The first day of the month is 1, and the last day depends on the month and year. + * </p> + * + * @return a positive integer beginning with 1 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getDay () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -353,6 +443,19 @@ public int getDay () { return dateRec.day; } +/** + * Returns the receiver's hours. + * <p> + * Hours is an integer between 0 and 23. + * </p> + * + * @return an integer between 0 and 23 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getHours () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -362,6 +465,19 @@ public int getHours () { return dateRec.hour; } +/** + * Returns the receiver's minutes. + * <p> + * Minutes is an integer between 0 and 59. + * </p> + * + * @return an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getMinutes () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -371,6 +487,19 @@ public int getMinutes () { return dateRec.minute; } +/** + * Returns the receiver's month. + * <p> + * The first month of the year is 0, and the last month is 11. + * </p> + * + * @return an integer between 0 and 11 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getMonth () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -380,6 +509,19 @@ public int getMonth () { return dateRec.month - 1; } +/** + * Returns the receiver's seconds. + * <p> + * Seconds is an integer between 0 and 59. + * </p> + * + * @return an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getSeconds () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -389,6 +531,19 @@ public int getSeconds () { return dateRec.second; } +/** + * Returns the receiver's year. + * <p> + * The first year is 1752 and the last year is 9999. + * </p> + * + * @return an integer between 1752 and 9999 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getYear () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -448,6 +603,23 @@ void releaseWidget () { dateRec = null; } +/** + * Removes the listener from the collection of listeners who will + * be notified when the control is selected by the user. + * + * @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 SelectionListener + * @see #addSelectionListener + */ public void removeSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -493,6 +665,19 @@ void setDay(int newDay, boolean notify) { if (notify) notifyListeners(SWT.Selection, new Event()); } +/** + * Sets the receiver's date, or day of the month, to the specified day. + * <p> + * The first day of the month is 1, and the last day depends on the month and year. + * </p> + * + * @param day a positive integer beginning with 1 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setDay (int day) { checkWidget (); if (!isValid(Calendar.DAY_OF_MONTH, day)) return; @@ -506,6 +691,19 @@ public void setDay (int day) { } } +/** + * Sets the receiver's hours. + * <p> + * Hours is an integer between 0 and 23. + * </p> + * + * @param hours an integer between 0 and 23 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setHours (int hours) { checkWidget (); if (!isValid(Calendar.HOUR_OF_DAY, hours)) return; @@ -519,6 +717,19 @@ public void setHours (int hours) { redraw(); } +/** + * Sets the receiver's minutes. + * <p> + * Minutes is an integer between 0 and 59. + * </p> + * + * @param minutes an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setMinutes (int minutes) { checkWidget (); if (!isValid(Calendar.MINUTE, minutes)) return; @@ -532,6 +743,19 @@ public void setMinutes (int minutes) { redraw(); } +/** + * Sets the receiver's month. + * <p> + * The first month of the year is 0, and the last month is 11. + * </p> + * + * @param month an integer between 0 and 11 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setMonth (int month) { checkWidget (); if (!isValid(Calendar.MONTH, month)) return; @@ -545,6 +769,19 @@ public void setMonth (int month) { redraw(); } +/** + * Sets the receiver's seconds. + * <p> + * Seconds is an integer between 0 and 59. + * </p> + * + * @param seconds an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setSeconds (int seconds) { checkWidget (); if (!isValid(Calendar.SECOND, seconds)) return; @@ -558,6 +795,19 @@ public void setSeconds (int seconds) { redraw(); } +/** + * Sets the receiver's year. + * <p> + * The first year is 1752 and the last year is 9999. + * </p> + * + * @param year an integer between 1752 and 9999 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setYear (int year) { checkWidget (); //if (!isValid(Calendar.YEAR, year)) return; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java index 386b3bb407..8c8f745a19 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java @@ -219,7 +219,7 @@ void fixDecorations (Decorations newDecorations, Control control, Menu [] menus) * <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/carbon/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java index 2b938cbb2d..a4e9469b92 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java @@ -90,7 +90,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. @@ -3781,7 +3781,7 @@ int sourceProc (int info) { * @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/carbon/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java index cdff095ce8..7be5a9c06d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java @@ -81,11 +81,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> * @@ -349,7 +349,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/carbon/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java index 11493b812e..0d5a51c9bb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java @@ -153,7 +153,7 @@ public void add (String string, int index) { /** * 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> @@ -161,7 +161,7 @@ public void add (String string, int index) { * <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> @@ -878,7 +878,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> @@ -1023,7 +1023,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 * @@ -1218,9 +1218,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 <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/carbon/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java index 194d074826..af4d175150 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java @@ -787,7 +787,7 @@ int kEventMenuTargetItem (int nextHandler, int theEvent, int userData) { * @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/carbon/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java index 9426907a78..fdb90e3b4c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java @@ -173,7 +173,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> @@ -181,7 +181,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> @@ -507,7 +507,7 @@ public void removeHelpListener (HelpListener 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/carbon/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java index 7584ed55c7..be007ba70d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java @@ -117,7 +117,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/carbon/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java index 4ca60daf41..1aa2554238 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java @@ -17,7 +17,7 @@ import org.eclipse.swt.internal.carbon.OS; import org.eclipse.swt.*; /** - * 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/carbon/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java index 5d2873e6e0..718b6ece28 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java @@ -79,7 +79,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> @@ -88,7 +88,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> @@ -250,7 +250,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/carbon/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java index 34d7224636..aed6a5757d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java @@ -81,11 +81,11 @@ int actionProc (int theControl, int partCode) { /** * 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> * @@ -253,7 +253,7 @@ int kEventMouseDown (int nextHandler, int theEvent, int userData) { /** * 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/carbon/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java index b0aa5ae759..025bc2c460 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java @@ -100,7 +100,7 @@ ScrollBar (Scrollable 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> @@ -116,7 +116,7 @@ ScrollBar (Scrollable 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 user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -517,7 +517,7 @@ void redraw () { /** * 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/carbon/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java index 70ae13c144..d6a784d7a4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java @@ -652,7 +652,7 @@ void fixShell (Shell newShell, Control control) { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ @@ -772,7 +772,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 * @@ -1140,7 +1140,7 @@ void resizeBounds () { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#setActive * @see Shell#forceActive */ @@ -1237,7 +1237,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/carbon/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java index 2b242ac6bf..d286976373 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java @@ -105,7 +105,7 @@ public Slider (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> @@ -121,7 +121,7 @@ public Slider (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 user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -323,7 +323,7 @@ int kEventMouseDown (int nextHandler, int theEvent, int userData) { /** * 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/carbon/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java index e2b54f95a0..0facf49c7b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java @@ -24,11 +24,14 @@ import org.eclipse.swt.graphics.*; * 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. @@ -132,7 +135,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> @@ -140,7 +143,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> @@ -647,7 +650,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/carbon/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java index 80910fc6a5..e6fa32b2e5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java @@ -82,7 +82,7 @@ public TabFolder (Composite parent, 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> @@ -90,7 +90,7 @@ public TabFolder (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 user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -386,7 +386,7 @@ float getThemeAlpha () { * @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> @@ -503,7 +503,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/carbon/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java index 6066c264d6..a372627478 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java @@ -125,18 +125,18 @@ public Table (Composite parent, 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> * When <code>widgetSelected</code> is called, the item field of the event object is valid. - * If the receiver has <code>SWT.CHECK</code> style set and the check selection changes, + * If the receiver has the <code>SWT.CHECK</code> style and the check selection changes, * the event object detail field contains the value <code>SWT.CHECK</code>. * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * The item field of the event object is valid for default selection, but the detail field is not used. * </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> @@ -1934,7 +1934,7 @@ void hookEvents () { * @return the index of the column * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1960,7 +1960,7 @@ public int indexOf (TableColumn column) { * @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> @@ -1993,7 +1993,7 @@ public int indexOf (TableItem item) { * 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> @@ -2397,7 +2397,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 * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableColumn.java index 8be0425956..6a98ba81a5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableColumn.java @@ -147,7 +147,7 @@ public void addControlListener(ControlListener 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> @@ -155,7 +155,7 @@ public void addControlListener(ControlListener 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 control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -381,7 +381,7 @@ public void removeControlListener (ControlListener 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/carbon/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java index b8663a2047..2b814b670a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java @@ -556,6 +556,22 @@ public String getText (int index) { return ""; } +/** + * Returns a rectangle describing the size and location + * relative to its parent of the text at a column in the + * table. An empty rectangle is returned if index exceeds + * the index of the table's last column. + * + * @param index the index that specifies the column + * @return the receiver's bounding text rectangle + * + * @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 Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java index 916306256f..f0390369c1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java @@ -34,12 +34,13 @@ import org.eclipse.swt.graphics.*; * <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> @@ -155,15 +156,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> @@ -891,6 +894,25 @@ public int getOrientation () { return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT); } +/** + * 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; @@ -1440,7 +1462,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 * @@ -1813,6 +1835,28 @@ public void setOrientation (int orientation) { checkWidget(); } +/** + * 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/carbon/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java index c2cfcfc439..68a737fee7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java @@ -169,7 +169,7 @@ int actionProc (int theControl, int partCode) { /** * 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> @@ -178,7 +178,7 @@ int actionProc (int theControl, int partCode) { * <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> @@ -848,7 +848,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 * @@ -1010,7 +1010,7 @@ void setForeground (float [] color) { * 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/carbon/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java index 8cc905da97..984403102c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java @@ -28,6 +28,9 @@ import org.eclipse.swt.events.*; * <dd>Selection</dd> * </dl> * </p><p> + * Note: Only one of the styles ICON_ERROR, ICON_INFORMATION, + * and ICON_WARNING may be specified. + * </p><p> * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> @@ -97,11 +100,15 @@ 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 receiver 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 receiver is selected. + * <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 receiver is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -401,7 +408,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the receiver is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java index dfe08dca4d..41c41cb9bc 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java @@ -110,7 +110,7 @@ public void addMenuDetectListener (MenuDetectListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver is selected, by sending + * be notified when the receiver is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -118,7 +118,7 @@ public void addMenuDetectListener (MenuDetectListener listener) { * <code>widgetDefaultSelected</code> is called when the receiver is double-clicked * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the receiver is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -282,7 +282,7 @@ public void removeMenuDetectListener (MenuDetectListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver is selected. + * be notified when the receiver is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java index 85a0f94544..c2efe8ba9e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java @@ -255,18 +255,18 @@ TreeItem _getItem (TreeItem parentItem, int index) { /** * 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> * When <code>widgetSelected</code> is called, the item field of the event object is valid. - * If the receiver has <code>SWT.CHECK</code> style set and the check selection changes, + * If the receiver has the <code>SWT.CHECK</code> style and the check selection changes, * the event object detail field contains the value <code>SWT.CHECK</code>. * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * The item field of the event object is valid for default selection, but the detail field is not used. * </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> @@ -1996,7 +1996,7 @@ void hookEvents () { * @return the index of the column * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -2025,8 +2025,8 @@ public int indexOf (TreeColumn column) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the tool item is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the tool item has been disposed</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -2496,7 +2496,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 * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeColumn.java index 229538d610..5802a441be 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeColumn.java @@ -149,7 +149,7 @@ public void addControlListener(ControlListener 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> @@ -157,7 +157,7 @@ public void addControlListener(ControlListener 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 control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -394,7 +394,7 @@ public void removeControlListener (ControlListener 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/carbon/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java index 2a50d0c7b1..bc014fec8f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java @@ -789,6 +789,21 @@ public String getText (int index) { return ""; } +/** + * Returns a rectangle describing the size and location + * relative to its parent of the text at a column in the + * tree. + * + * @param index the index that specifies the column + * @return the receiver's bounding text rectangle + * + * @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 Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); @@ -840,8 +855,8 @@ public Rectangle getTextBounds (int index) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the tool item is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the tool item has been disposed</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item 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/carbon/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java index 75055c0220..cb529d6c37 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java @@ -155,7 +155,7 @@ int actionProc (int theControl, int partCode) { * * @see Listener * @see SWT - * @see #removeListener + * @see #removeListener(int, Listener) * @see #notifyListeners */ public void addListener (int eventType, Listener listener) { @@ -630,13 +630,13 @@ int drawItemProc (int browser, int item, int property, int itemState, int theRec /** * 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> @@ -1287,7 +1287,7 @@ int mouseProc (int nextHandler, int theEvent, int userData) { * * @see SWT * @see #addListener - * @see #removeListener + * @see #removeListener(int, Listener) */ public void notifyListeners (int eventType, Event event) { checkWidget(); |