From 98291671f0ac038a156b64a1b905d21476612149 Mon Sep 17 00:00:00 2001 From: Carolyn MacLeod Date: Sat, 8 Jun 2002 20:47:11 +0000 Subject: JavadocBasher --- .../motif/org/eclipse/swt/widgets/Caret.java | 54 ++-- .../motif/org/eclipse/swt/widgets/ColorDialog.java | 54 ++-- .../motif/org/eclipse/swt/widgets/Combo.java | 56 ++-- .../motif/org/eclipse/swt/widgets/Composite.java | 94 +++--- .../motif/org/eclipse/swt/widgets/Control.java | 228 ++++++++------- .../motif/org/eclipse/swt/widgets/Decorations.java | 234 ++++++++------- .../org/eclipse/swt/widgets/DirectoryDialog.java | 58 ++-- .../motif/org/eclipse/swt/widgets/Display.java | 155 +++++----- .../motif/org/eclipse/swt/widgets/FileDialog.java | 98 ++++--- .../motif/org/eclipse/swt/widgets/FontDialog.java | 58 ++-- .../motif/org/eclipse/swt/widgets/Group.java | 58 ++-- .../motif/org/eclipse/swt/widgets/Label.java | 106 ++++--- .../motif/org/eclipse/swt/widgets/List.java | 55 ++-- .../motif/org/eclipse/swt/widgets/Menu.java | 174 ++++++++--- .../motif/org/eclipse/swt/widgets/MenuItem.java | 156 +++++----- .../motif/org/eclipse/swt/widgets/MessageBox.java | 58 ++-- .../motif/org/eclipse/swt/widgets/ProgressBar.java | 56 ++-- .../motif/org/eclipse/swt/widgets/Sash.java | 87 +++--- .../motif/org/eclipse/swt/widgets/Scale.java | 88 +++--- .../motif/org/eclipse/swt/widgets/ScrollBar.java | 124 ++++---- .../motif/org/eclipse/swt/widgets/Scrollable.java | 55 ++-- .../motif/org/eclipse/swt/widgets/Shell.java | 216 ++++++++------ .../motif/org/eclipse/swt/widgets/Slider.java | 55 ++-- .../motif/org/eclipse/swt/widgets/Text.java | 324 +++++++++++---------- .../motif/org/eclipse/swt/widgets/ToolBar.java | 123 ++++---- .../motif/org/eclipse/swt/widgets/ToolItem.java | 185 ++++++------ .../motif/org/eclipse/swt/widgets/Tracker.java | 143 ++++----- .../motif/org/eclipse/swt/widgets/Widget.java | 86 +++--- .../photon/org/eclipse/swt/graphics/Color.java | 4 +- .../photon/org/eclipse/swt/graphics/Cursor.java | 39 ++- .../photon/org/eclipse/swt/graphics/Device.java | 8 +- .../photon/org/eclipse/swt/graphics/Font.java | 2 + .../org/eclipse/swt/graphics/FontMetrics.java | 7 +- .../photon/org/eclipse/swt/graphics/GC.java | 4 + .../photon/org/eclipse/swt/graphics/Image.java | 55 +++- .../photon/org/eclipse/swt/graphics/Region.java | 4 + .../photon/org/eclipse/swt/widgets/Button.java | 93 +++--- 37 files changed, 1875 insertions(+), 1579 deletions(-) (limited to 'bundles/org.eclipse.swt/Eclipse SWT') diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Caret.java index 72d90cbe85..68f6ef76e9 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Caret.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Caret.java @@ -31,33 +31,33 @@ public class Caret extends Widget { boolean moved, resized; boolean isVisible, isShowing; int blinkRate = 500; -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Caret (Canvas parent, int style) { super (parent, style); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ColorDialog.java index 74ea1c6182..4cb8c0094b 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ColorDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ColorDialog.java @@ -67,33 +67,33 @@ public class ColorDialog extends Dialog { public ColorDialog(Shell parent) { this(parent, SWT.NULL); } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT + * @see Widget#checkSubclass + * @see Widget#getStyle */ public ColorDialog(Shell parent, int style) { super(parent, style | SWT.TITLE | SWT.BORDER | SWT.APPLICATION_MODAL); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java index dd66892c72..2957f4c0fb 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java @@ -64,33 +64,35 @@ public class Combo extends Composite { } boolean ignoreSelect; -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#DROP_DOWN + * @see SWT#READ_ONLY + * @see SWT#SIMPLE + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Combo (Composite parent, int style) { super (parent, checkStyle (style)); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java index 4059147fab..6e88504925 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java @@ -9,22 +9,28 @@ import org.eclipse.swt.internal.motif.*; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; -/** - * Instances of this class are controls which are capable - * of containing other controls. - *
- *
Styles:
- *
NO_BACKGROUND, NO_FOCUS, NO_MERGE_PAINTS, NO_REDRAW_RESIZE
- *
Events:
- *
(none)
- *
- *

- * This class may be subclassed by custom control implementors - * who are building controls that are constructed from aggregates - * of other controls. - *

- * - * @see Canvas +/** + * Instances of this class are controls which are capable + * of containing other controls. + *
+ *
Styles:
+ *
NO_BACKGROUND, NO_FOCUS, NO_MERGE_PAINTS, NO_REDRAW_RESIZE, NO_RADIO_GROUP
+ *
Events:
+ *
(none)
+ *
+ *

+ * Note: The NO_BACKGROUND, NO_FOCUS, NO_MERGE_PAINTS, + * and NO_REDRAW_RESIZE styles are intended for use with Canvas. + * They can be used with Composite if you are drawing your own, but their + * behavior is undefined if they are used with subclasses of Composite other + * than Canvas. + *

+ * This class may be subclassed by custom control implementors + * who are building controls that are constructed from aggregates + * of other controls. + *

+ * + * @see Canvas */ public class Composite extends Scrollable { Layout layout; @@ -34,33 +40,35 @@ public class Composite extends Scrollable { Composite () { /* Do nothing */ } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @param parent a widget which will be the parent of the new instance (cannot be null) - * @param style the style of widget to construct - * - * @exception IllegalArgumentException - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @param parent a widget which will be the parent of the new instance (cannot be null) + * @param style the style of widget to construct + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see SWT#NO_BACKGROUND + * @see SWT#NO_FOCUS + * @see SWT#NO_MERGE_PAINTS + * @see SWT#NO_REDRAW_RESIZE + * @see SWT#NO_RADIO_GROUP + * @see Widget#getStyle */ public Composite (Composite parent, int style) { super (parent, style); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java index d24ff359a5..1a282d4e7a 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java @@ -38,33 +38,33 @@ public abstract class Control extends Widget implements Drawable { Control () { /* Do nothing */ } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#BORDER + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Control (Composite parent, int style) { super (parent, style); @@ -123,24 +123,24 @@ public void addFocusListener(FocusListener listener) { addListener(SWT.FocusIn,typedListener); addListener(SWT.FocusOut,typedListener); } -/** - * Adds the listener to the collection of listeners who will - * be notified when the help events are generated for the control, by sending - * it one of the messages defined in the HelpListener - * interface. - * - * @param listener the listener which should be notified - * - * @exception IllegalArgumentException - * @exception SWTException - * - * @see HelpListener - * @see #removeHelpListener +/** + * Adds the listener to the collection of listeners who will + * be notified when help events are generated for the control, + * by sending it one of the messages defined in the + * HelpListener interface. + * + * @param listener the listener which should be notified + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see HelpListener + * @see #removeHelpListener */ public void addHelpListener (HelpListener listener) { checkWidget(); @@ -303,59 +303,69 @@ public void addTraverseListener (TraverseListener listener) { TypedListener typedListener = new TypedListener (listener); addListener (SWT.Traverse,typedListener); } -/** - * Returns the preferred size of the receiver. - *

- * The prefered size of a control is the size that it would - * best be displayed at. The width hint and height hint arguments - * allow the caller to ask a control questions such as "Given a particular - * width, how high does the control need to be to show all of the contents?" - * To indicate that the caller does not wish to constrain a particular - * dimension, the constant SWT.DEFAULT is passed for the hint. - *

- * - * @param wHint the width hint (can be SWT.DEFAULT) - * @param hHint the height hint (can be SWT.DEFAULT) - * @return the preferred size of the control - * - * @exception SWTException - * - * @see Layout +/** + * Returns the preferred size of the receiver. + *

+ * The preferred size of a control is the size that it would + * best be displayed at. The width hint and height hint arguments + * allow the caller to ask a control questions such as "Given a particular + * width, how high does the control need to be to show all of the contents?" + * To indicate that the caller does not wish to constrain a particular + * dimension, the constant SWT.DEFAULT is passed for the hint. + *

+ * + * @param wHint the width hint (can be SWT.DEFAULT) + * @param hHint the height hint (can be SWT.DEFAULT) + * @return the preferred size of the control + * + * @exception SWTException + * + * @see Layout + * @see #getBorderWidth + * @see #getBounds + * @see #getSize + * @see #pack + * @see "computeTrim, getClientArea for controls that implement them" */ public Point computeSize (int wHint, int hHint) { return computeSize (wHint, hHint, true); } -/** - * Returns the preferred size of the receiver. - *

- * The prefered size of a control is the size that it would - * best be displayed at. The width hint and height hint arguments - * allow the caller to ask a control questions such as "Given a particular - * width, how high does the control need to be to show all of the contents?" - * To indicate that the caller does not wish to constrain a particular - * dimension, the constant SWT.DEFAULT is passed for the hint. - *

- * If the changed flag is true, it indicates that the receiver's - * contents have changed, therefore any caches that a layout manager - * containing the control may have been keeping need to be flushed. When the - * control is resized, the changed flag will be false, so layout - * manager caches can be retained. - *

- * - * @param wHint the width hint (can be SWT.DEFAULT) - * @param hHint the height hint (can be SWT.DEFAULT) - * @param changed true if the control's contents have changed, and false otherwise - * @return the preferred size of the control. - * - * @exception SWTException - * - * @see Layout +/** + * Returns the preferred size of the receiver. + *

+ * The preferred size of a control is the size that it would + * best be displayed at. The width hint and height hint arguments + * allow the caller to ask a control questions such as "Given a particular + * width, how high does the control need to be to show all of the contents?" + * To indicate that the caller does not wish to constrain a particular + * dimension, the constant SWT.DEFAULT is passed for the hint. + *

+ * If the changed flag is true, it indicates that the receiver's + * contents have changed, therefore any caches that a layout manager + * containing the control may have been keeping need to be flushed. When the + * control is resized, the changed flag will be false, so layout + * manager caches can be retained. + *

+ * + * @param wHint the width hint (can be SWT.DEFAULT) + * @param hHint the height hint (can be SWT.DEFAULT) + * @param changed true if the control's contents have changed, and false otherwise + * @return the preferred size of the control. + * + * @exception SWTException + * + * @see Layout + * @see #getBorderWidth + * @see #getBounds + * @see #getSize + * @see #pack + * @see "computeTrim, getClientArea for controls that implement them" */ public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); @@ -512,20 +522,22 @@ public boolean forceFocus () { return OS.XmProcessTraversal (handle, OS.XmTRAVERSE_CURRENT); } -/** - * Returns the accessible object for the receiver. - * If this is the first time this object is requested, - * then the object is created and returned. - * - * @return the accessible object - * - * @exception SWTException - * - * @see addAccessibleListener - * @see addAccessibleControlListener +/** + * Returns the accessible object for the receiver. + * If this is the first time this object is requested, + * then the object is created and returned. + * + * @return the accessible object + * + * @exception SWTException + * + * @see Accessible#addAccessibleListener + * @see Accessible#addAccessibleControlListener + * + * @since 2.0 */ public Accessible getAccessible () { checkWidget (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java index a6bd1cf1ca..03ae48c8d9 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java @@ -9,77 +9,77 @@ import org.eclipse.swt.internal.motif.*; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; -/** - * Instances of this class provide the appearance and - * behavior of Shells, but are not top - * level shells or dialogs. Class Shell - * shares a significant amount of code with this class, - * and is a subclass. - *

- * Instances are always displayed in one of the maximized, - * minimized or normal states: - *

- *

- * Note: The styles supported by this class must be treated - * as HINTs, since the window manager for the - * desktop on which the instance is visible has ultimate - * control over the appearance and behavior of decorations. - * For example, some window managers only support resizable - * windows and will always assume the RESIZE style, even if - * it is not set. - *
- *
Styles:
- *
BORDER, CLOSE, MIN, MAX, NO_TRIM, RESIZE, TITLE
- *
Events:
- *
(none)
- *
- * Class SWT provides two "convenience constants" - * for the most commonly required style combinations: - *
- *
SHELL_TRIM
- *
- * the result of combining the constants which are required - * to produce a typical application top level shell: (that - * is, CLOSE | TITLE | MIN | MAX | RESIZE) - *
- *
DIALOG_TRIM
- *
- * the result of combining the constants which are required - * to produce a typical application dialog shell: (that - * is, TITLE | CLOSE | BORDER) - *
- *
- *

- * IMPORTANT: This class is intended to be subclassed only - * within the SWT implementation. - *

- * - * @see #getMinimized - * @see #getMaximized - * @see Shell - * @see SWT +/** + * Instances of this class provide the appearance and + * behavior of Shells, but are not top + * level shells or dialogs. Class Shell + * shares a significant amount of code with this class, + * and is a subclass. + *

+ * Instances are always displayed in one of the maximized, + * minimized or normal states: + *

+ *

+ * Note: The styles supported by this class must be treated + * as HINTs, since the window manager for the + * desktop on which the instance is visible has ultimate + * control over the appearance and behavior of decorations. + * For example, some window managers only support resizable + * windows and will always assume the RESIZE style, even if + * it is not set. + *
+ *
Styles:
+ *
BORDER, CLOSE, MIN, MAX, NO_TRIM, RESIZE, TITLE, ON_TOP, TOOL
+ *
Events:
+ *
(none)
+ *
+ * Class SWT provides two "convenience constants" + * for the most commonly required style combinations: + *
+ *
SHELL_TRIM
+ *
+ * the result of combining the constants which are required + * to produce a typical application top level shell: (that + * is, CLOSE | TITLE | MIN | MAX | RESIZE) + *
+ *
DIALOG_TRIM
+ *
+ * the result of combining the constants which are required + * to produce a typical application dialog shell: (that + * is, TITLE | CLOSE | BORDER) + *
+ *
+ *

+ * IMPORTANT: This class is intended to be subclassed only + * within the SWT implementation. + *

+ * + * @see #getMinimized + * @see #getMaximized + * @see Shell + * @see SWT */ public class Decorations extends Canvas { String label; @@ -93,33 +93,43 @@ public class Decorations extends Canvas { Decorations () { /* Do nothing */ } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#BORDER + * @see SWT#CLOSE + * @see SWT#MIN + * @see SWT#MAX + * @see SWT#RESIZE + * @see SWT#TITLE + * @see SWT#NO_TRIM + * @see SWT#SHELL_TRIM + * @see SWT#DIALOG_TRIM + * @see SWT#ON_TOP + * @see SWT#TOOL + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Decorations (Composite parent, int style) { super (parent, checkStyle (style)); @@ -495,20 +505,20 @@ public void setMaximized (boolean maximized) { checkWidget(); this.maximized = maximized; } -/** - * Sets the receiver's menu bar to the argument, which - * may be null. - * - * @param menu the new menu bar - * - * @exception IllegalArgumentException - * @exception SWTException +/** + * Sets the receiver's menu bar to the argument, which + * may be null. + * + * @param menu the new menu bar + * + * @exception IllegalArgumentException + * @exception SWTException */ public void setMenuBar (Menu menu) { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/DirectoryDialog.java index 30764b18e6..7aade792fb 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/DirectoryDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/DirectoryDialog.java @@ -47,35 +47,35 @@ public class DirectoryDialog extends Dialog { public DirectoryDialog (Shell parent) { this (parent, SWT.PRIMARY_MODAL); } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT dialog classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * Note: Currently, null can be passed in for the parent. - * This has the effect of creating the dialog on the currently active - * display if there is one. If there is no current display, the - * dialog is created on a "default" display. Passing in null as - * the parent is not considered to be good coding style, - * and may not be supported in a future release of SWT. - *

- * - * @param parent a shell which will be the parent of the new instance - * - * @exception IllegalArgumentException - * @exception SWTException +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * Note: Currently, null can be passed in for the parent. + * This has the effect of creating the dialog on the currently active + * display if there is one. If there is no current display, the + * dialog is created on a "default" display. Passing in null as + * the parent is not considered to be good coding style, + * and may not be supported in a future release of SWT. + *

+ * + * @param parent a shell which will be the parent of the new instance + * + * @exception IllegalArgumentException + * @exception SWTException */ public DirectoryDialog (Shell parent, int style) { super (parent, style); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java index 1a92498e12..c2cbb6e84d 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java @@ -10,81 +10,80 @@ import org.eclipse.swt.internal.motif.*; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; -/** - * Instances of this class are responsible for managing the - * connection between SWT and the underlying operating - * system. Their most important function is to implement - * the SWT event loop in terms of the platform event model. - * They also provide various methods for accessing information - * about the operating system, and have overall control over - * the operating system resources which SWT allocates. - *

- * Applications which are built with SWT will almost always - * require only a single display. In particular, some platforms - * which SWT supports will not allow more than one active - * display. In other words, some platforms do not support - * creating a new display if one already exists that has not been - * sent the dispose() message. - *

- * In SWT, the thread which creates a Display - * instance is distinguished as the user-interface thread - * for that display. - *

- * The user-interface thread for a particular display has the - * following special attributes: - * - * Enforcing these attributes allows SWT to be implemented directly - * on the underlying operating system's event model. This has - * numerous benefits including smaller footprint, better use of - * resources, safer memory management, clearer program logic, - * better performance, and fewer overall operating system threads - * required. The down side however, is that care must be taken - * (only) when constructing multi-threaded applications to use the - * inter-thread communication mechanisms which this class provides - * when required. - *

- *
- *
Styles:
- *
(none)
- *
Events:
- *
Close, Dispose
- *
- *

- * All SWT API methods which may only be called from the user-interface - * thread are distinguished in their documentation by indicating that - * they throw the "ERROR_THREAD_INVALID_ACCESS" - * SWT exception. - *

- * IMPORTANT: This class is not intended to be subclassed. - *

- * - * @see #syncExec - * @see #asyncExec - * @see #wake - * @see #readAndDispatch - * @see #sleep - * @see #dispose +/** + * Instances of this class are responsible for managing the + * connection between SWT and the underlying operating + * system. Their most important function is to implement + * the SWT event loop in terms of the platform event model. + * They also provide various methods for accessing information + * about the operating system, and have overall control over + * the operating system resources which SWT allocates. + *

+ * Applications which are built with SWT will almost always + * require only a single display. In particular, some platforms + * which SWT supports will not allow more than one active + * display. In other words, some platforms do not support + * creating a new display if one already exists that has not been + * sent the dispose() message. + *

+ * In SWT, the thread which creates a Display + * instance is distinguished as the user-interface thread + * for that display. + *

+ * The user-interface thread for a particular display has the + * following special attributes: + * + * Enforcing these attributes allows SWT to be implemented directly + * on the underlying operating system's event model. This has + * numerous benefits including smaller footprint, better use of + * resources, safer memory management, clearer program logic, + * better performance, and fewer overall operating system threads + * required. The down side however, is that care must be taken + * (only) when constructing multi-threaded applications to use the + * inter-thread communication mechanisms which this class provides + * when required. + *

+ * All SWT API methods which may only be called from the user-interface + * thread are distinguished in their documentation by indicating that + * they throw the "ERROR_THREAD_INVALID_ACCESS" + * SWT exception. + *

+ *
+ *
Styles:
+ *
(none)
+ *
Events:
+ *
Close, Dispose
+ *
+ *

+ * IMPORTANT: This class is not intended to be subclassed. + *

+ * @see #syncExec + * @see #asyncExec + * @see #wake + * @see #readAndDispatch + * @see #sleep + * @see #dispose */ public class Display extends Device { @@ -2069,6 +2068,12 @@ static int untranslateKey (int key) { } return 0; } +/** + * Forces all outstanding paint requests for the display + * to be processed before this method returns. + * + * @see Control#update + */ public void update () { checkDevice (); XAnyEvent event = new XAnyEvent (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java index 6062f7a460..1a6331aaa5 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java @@ -59,35 +59,35 @@ public FileDialog (Shell parent) { this (parent, SWT.PRIMARY_MODAL); } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT dialog classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * Note: Currently, null can be passed in for the parent. - * This has the effect of creating the dialog on the currently active - * display if there is one. If there is no current display, the - * dialog is created on a "default" display. Passing in null as - * the parent is not considered to be good coding style, - * and may not be supported in a future release of SWT. - *

- * - * @param parent a shell which will be the parent of the new instance - * - * @exception IllegalArgumentException - * @exception SWTException +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * Note: Currently, null can be passed in for the parent. + * This has the effect of creating the dialog on the currently active + * display if there is one. If there is no current display, the + * dialog is created on a "default" display. Passing in null as + * the parent is not considered to be good coding style, + * and may not be supported in a future release of SWT. + *

+ * + * @param parent a shell which will be the parent of the new instance + * + * @exception IllegalArgumentException + * @exception SWTException */ public FileDialog (Shell parent, int style) { super (parent, style); @@ -149,12 +149,12 @@ void extractValues() { fileName = fullPath.substring (index + 1, fullPath.length ()); } } -/** - * Returns the path of the first file that was - * selected in the dialog relative to the filter path, - * or null if none is available. - * - * @return the relative path of the file +/** + * Returns the path of the first file that was + * selected in the dialog relative to the filter path, + * or empty string if the dialog was cancelled. + * + * @return the relative path of the file */ public String getFileName () { return fileName; @@ -191,11 +191,14 @@ public String [] getFilterNames () { return filterNames; } -/** - * Returns the path which the dialog will use to filter - * the files it shows. - * - * @return the filter path +/** + * Returns the directory path that the dialog will use. + * File names in this path will appear in the dialog, + * filtered according to the filter extensions. + * + * @return the directory path string + * + * @see #setFilterExtensions */ public String getFilterPath () { return filterPath; @@ -384,12 +387,15 @@ public void setFilterNames (String [] names) { filterNames = names; } -/** - * Sets the path which the dialog will use to filter - * the files it shows to the argument, which may be - * null. - * - * @param string the filter path +/** + * Sets the directory path that the dialog will use + * to the argument, which may be null. File names in this + * path will appear in the dialog, filtered according + * to the filter extensions. + * + * @param string the directory path + * + * @see #setFilterExtensions */ public void setFilterPath (String string) { filterPath = string; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FontDialog.java index 5c747a0d4b..34a05d68b6 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FontDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FontDialog.java @@ -106,35 +106,35 @@ public FontDialog (Shell parent) { this (parent, SWT.NONE); } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT dialog classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * Note: Currently, null can be passed in for the parent. - * This has the effect of creating the dialog on the currently active - * display if there is one. If there is no current display, the - * dialog is created on a "default" display. Passing in null as - * the parent is not considered to be good coding style, - * and may not be supported in a future release of SWT. - *

- * - * @param parent a shell which will be the parent of the new instance - * - * @exception IllegalArgumentException - * @exception SWTException +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * Note: Currently, null can be passed in for the parent. + * This has the effect of creating the dialog on the currently active + * display if there is one. If there is no current display, the + * dialog is created on a "default" display. Passing in null as + * the parent is not considered to be good coding style, + * and may not be supported in a future release of SWT. + *

+ * + * @param parent a shell which will be the parent of the new instance + * + * @exception IllegalArgumentException + * @exception SWTException */ public FontDialog (Shell parent, int style) { super (parent, style | SWT.TITLE | SWT.BORDER | SWT.APPLICATION_MODAL); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Group.java index 92d65cce4f..e8a86a0ecf 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Group.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Group.java @@ -33,33 +33,37 @@ import org.eclipse.swt.*; public class Group extends Composite { int labelHandle; -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#SHADOW_ETCHED_IN + * @see SWT#SHADOW_ETCHED_OUT + * @see SWT#SHADOW_IN + * @see SWT#SHADOW_OUT + * @see SWT#SHADOW_NONE + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Group (Composite parent, int style) { super (parent, checkStyle (style)); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java index 302a2e23c4..3614fd14c6 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Label.java @@ -11,58 +11,68 @@ import org.eclipse.swt.internal.motif.*; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; -/** - * Instances of this class represent a non-selectable - * user interface object that displays a string or image. - * When SEPARATOR is specified, displays a single - * vertical or horizontal line. - *
- *
Styles:
- *
SEPARATOR, HORIZONTAL, SHADOW_IN, SHADOW_OUT, VERTICAL
- *
CENTER, LEFT, RIGHT, WRAP
- *
Events:
- *
(none)
- *
- *

- * Note: Only one of SHADOW_IN and SHADOW_OUT may be specified. Only - * one of HORIZONTAL and VERTICAL may be specified. Only one of CENTER, - * LEFT and RIGHT may be specified. - *

- * IMPORTANT: This class is intended to be subclassed only - * within the SWT implementation. - *

+/** + * Instances of this class represent a non-selectable + * user interface object that displays a string or image. + * When SEPARATOR is specified, displays a single + * vertical or horizontal line. + *
+ *
Styles:
+ *
SEPARATOR, HORIZONTAL, VERTICAL
+ *
SHADOW_IN, SHADOW_OUT, SHADOW_NONE
+ *
CENTER, LEFT, RIGHT, WRAP
+ *
Events:
+ *
(none)
+ *
+ *

+ * Note: Only one of SHADOW_IN, SHADOW_OUT and SHADOW_NONE may be specified. + * SHADOW_NONE is a HINT. Only one of HORIZONTAL and VERTICAL may be specified. + * Only one of CENTER, LEFT and RIGHT may be specified. + *

+ * IMPORTANT: This class is intended to be subclassed only + * within the SWT implementation. + *

*/ public class Label extends Control { String text = ""; Image image, bitmap, disabled; -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#SEPARATOR + * @see SWT#HORIZONTAL + * @see SWT#VERTICAL + * @see SWT#SHADOW_IN + * @see SWT#SHADOW_OUT + * @see SWT#SHADOW_NONE + * @see SWT#CENTER + * @see SWT#LEFT + * @see SWT#RIGHT + * @see SWT#WRAP + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Label (Composite parent, int style) { super (parent, checkStyle (style)); @@ -117,7 +127,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { height += result.height; } - /** + /* * Feature in Motif. If a label's labelType is XmSTRING but it * has no label set into it yet, recomputing the size will * not take into account the height of the font, as we would diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java index 22664a6a52..af7e585363 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java @@ -30,33 +30,34 @@ import org.eclipse.swt.events.*; *

*/ public class List extends Scrollable { -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#SINGLE + * @see SWT#MULTI + * @see Widget#checkSubclass + * @see Widget#getStyle */ public List (Composite parent, int style) { /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java index 7769b42096..1f103f9ea2 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java @@ -28,50 +28,128 @@ public class Menu extends Widget { boolean hasLocation; MenuItem cascade, defaultItem; Decorations parent; -/** -* Creates a new instance of the widget. -*/ +/** + * Constructs a new instance of this class given its parent, + * and sets the style for the instance so that the instance + * will be a popup menu on the given parent's shell. + * + * @param parent a control which will be the parent of the new instance (cannot be null) + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see SWT#POP_UP + * @see Widget#checkSubclass + * @see Widget#getStyle + */ public Menu (Control parent) { this (checkNull(parent).getShell (), SWT.POP_UP); } -/** -* Creates a new instance of the widget. -*/ +/** + * Constructs a new instance of this class given its parent + * (which must be a Decorations) and a style value + * describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @param parent a decorations control which will be the parent of the new instance (cannot be null) + * @param style the style of menu to construct + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see SWT#BAR + * @see SWT#DROP_DOWN + * @see SWT#POP_UP + * @see Widget#checkSubclass + * @see Widget#getStyle + */ public Menu (Decorations parent, int style) { super (parent, checkStyle (style)); this.parent = parent; createWidget (0); } -/** -* Creates a new instance of the widget. -*/ +/** + * Constructs a new instance of this class given its parent + * (which must be a Menu) and sets the style + * for the instance so that the instance will be a drop-down + * menu on the given parent's parent. + * + * @param parent a menu which will be the parent of the new instance (cannot be null) + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see SWT#DROP_DOWN + * @see Widget#checkSubclass + * @see Widget#getStyle + */ public Menu (Menu parentMenu) { this (checkNull(parentMenu).parent, SWT.DROP_DOWN); } -/** -* Creates a new instance of the widget. -*/ +/** + * Constructs a new instance of this class given its parent + * (which must be a MenuItem) and sets the style + * for the instance so that the instance will be a drop-down + * menu on the given parent's parent menu. + * + * @param parent a menu item which will be the parent of the new instance (cannot be null) + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see SWT#DROP_DOWN + * @see Widget#checkSubclass + * @see Widget#getStyle + */ public Menu (MenuItem parentItem) { this (checkNull(parentItem).parent); } -/** - * Adds the listener to the collection of listeners who will - * be notified when the help events are generated for the control, by sending - * it one of the messages defined in the HelpListener - * interface. - * - * @param listener the listener which should be notified - * - * @exception IllegalArgumentException - * @exception SWTException - * - * @see HelpListener - * @see #removeHelpListener +/** + * Adds the listener to the collection of listeners who will + * be notified when help events are generated for the control, + * by sending it one of the messages defined in the + * HelpListener interface. + * + * @param listener the listener which should be notified + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see HelpListener + * @see #removeHelpListener */ public void addHelpListener (HelpListener listener) { checkWidget(); @@ -79,24 +157,24 @@ public void addHelpListener (HelpListener listener) { TypedListener typedListener = new TypedListener (listener); addListener (SWT.Help, typedListener); } -/** - * Adds the listener to the collection of listeners who will - * be notified when the help events are generated for the control, by sending - * it one of the messages defined in the MenuListener - * interface. - * - * @param listener the listener which should be notified - * - * @exception IllegalArgumentException - * @exception SWTException - * - * @see MenuListener - * @see #removeMenuListener +/** + * Adds the listener to the collection of listeners who will + * be notified when menus are hidden or shown, by sending it + * one of the messages defined in the MenuListener + * interface. + * + * @param listener the listener which should be notified + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see MenuListener + * @see #removeMenuListener */ public void addMenuListener(MenuListener listener) { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java index 7f24e803c7..5f945c87db 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java @@ -11,55 +11,59 @@ import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.events.*; -/** - * Instances of this class represent a selectable user interface object - * that issues notification when pressed and released. - *
- *
Styles:
- *
CHECK, CASCADE, PUSH, RADIO, SEPARATOR
- *
Events:
- *
Arm, Help, Selection
- *
- *

- * Note: Only one of the styles CHECK, CASCADE, PUSH, RADIO, and SEPARATOR - * may be specified. - *

- * IMPORTANT: This class is not intended to be subclassed. - *

+/** + * Instances of this class represent a selectable user interface object + * that issues notification when pressed and released. + *
+ *
Styles:
+ *
CHECK, CASCADE, PUSH, RADIO, SEPARATOR
+ *
Events:
+ *
Arm, Help, Selection
+ *
+ *

+ * Note: Only one of the styles CHECK, CASCADE, PUSH, RADIO and SEPARATOR + * may be specified. + *

+ * IMPORTANT: This class is not intended to be subclassed. + *

*/ public class MenuItem extends Item { int accelerator; Menu parent, menu; -/** - * Constructs a new instance of this class given its parent - * (which must be a Menu) and a style value - * describing its behavior and appearance. The item is added - * to the end of the items maintained by its parent. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * (which must be a Menu) and a style value + * describing its behavior and appearance. The item is added + * to the end of the items maintained by its parent. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @param parent a menu control which will be the parent of the new instance (cannot be null) + * @param style the style of control to construct + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see SWT#CHECK + * @see SWT#CASCADE + * @see SWT#PUSH + * @see SWT#RADIO + * @see SWT#SEPARATOR + * @see Widget#checkSubclass + * @see Widget#getStyle */ public MenuItem (Menu parent, int style) { super (parent, checkStyle (style)); @@ -67,36 +71,40 @@ public MenuItem (Menu parent, int style) { createWidget (OS.XmLAST_POSITION); } -/** - * Constructs a new instance of this class given its parent - * (which must be a Menu), a style value - * describing its behavior and appearance, and the index - * at which to place it in the items maintained by its parent. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @param index the index to store the receiver in its parent - * - * @exception IllegalArgumentException - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * (which must be a Menu), a style value + * describing its behavior and appearance, and the index + * at which to place it in the items maintained by its parent. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @param parent a menu control which will be the parent of the new instance (cannot be null) + * @param style the style of control to construct + * @param index the index to store the receiver in its parent + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see SWT#CHECK + * @see SWT#CASCADE + * @see SWT#PUSH + * @see SWT#RADIO + * @see SWT#SEPARATOR + * @see Widget#checkSubclass + * @see Widget#getStyle */ public MenuItem (Menu parent, int style, int index) { super (parent, checkStyle (style)); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MessageBox.java index e2565dc1e7..5ed0e5efb1 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MessageBox.java @@ -61,35 +61,35 @@ public MessageBox (Shell parent) { this (parent, SWT.OK | SWT.ICON_INFORMATION | SWT.APPLICATION_MODAL); } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT dialog classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * Note: Currently, null can be passed in for the parent. - * This has the effect of creating the dialog on the currently active - * display if there is one. If there is no current display, the - * dialog is created on a "default" display. Passing in null as - * the parent is not considered to be good coding style, - * and may not be supported in a future release of SWT. - *

- * - * @param parent a shell which will be the parent of the new instance - * - * @exception IllegalArgumentException - * @exception SWTException +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * Note: Currently, null can be passed in for the parent. + * This has the effect of creating the dialog on the currently active + * display if there is one. If there is no current display, the + * dialog is created on a "default" display. Passing in null as + * the parent is not considered to be good coding style, + * and may not be supported in a future release of SWT. + *

+ * + * @param parent a shell which will be the parent of the new instance + * + * @exception IllegalArgumentException + * @exception SWTException */ public MessageBox (Shell parent, int style) { super (parent, checkStyle (style)); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java index 6c5c14ddde..4d6b7639c0 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java @@ -29,33 +29,35 @@ import org.eclipse.swt.graphics.*; public class ProgressBar extends Control { -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#SMOOTH + * @see SWT#HORIZONTAL + * @see SWT#VERTICAL + * @see Widget#checkSubclass + * @see Widget#getStyle */ public ProgressBar (Composite parent, int style) { /* diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java index 55411db4ba..9b2536df41 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java @@ -10,22 +10,22 @@ import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.events.*; -/** - * Instances of the receiver represent a selectable user interface object - * that allows the user to drag a rubber banded outline of the sash within - * the parent control. - *
- *
Styles:
- *
HORIZONTAL, VERTICAL
- *
Events:
- *
Selection
- *
- *

- * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. - *

- * IMPORTANT: This class is intended to be subclassed only - * within the SWT implementation. - *

+/** + * Instances of the receiver represent a selectable user interface object + * that allows the user to drag a rubber banded outline of the sash within + * the parent control. + *
+ *
Styles:
+ *
HORIZONTAL, VERTICAL
+ *
Events:
+ *
Selection
+ *
+ *

+ * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. + *

+ * IMPORTANT: This class is intended to be subclassed only + * within the SWT implementation. + *

*/ public class Sash extends Control { boolean dragging; @@ -36,33 +36,34 @@ public class Sash extends Control { private final static int INCREMENT = 1; private final static int PAGE_INCREMENT = 9; -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#HORIZONTAL + * @see SWT#VERTICAL + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Sash (Composite parent, int style) { super (parent, checkStyle (style)); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java index 52d3497502..3b6fd19b86 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java @@ -10,51 +10,53 @@ import org.eclipse.swt.*; import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; -/** - * Instances of the receiver represent a selectable user - * interface object that present a range of continuous - * numeric values. - *
- *
Styles:
- *
HORIZONTAL, VERTICAL
- *
Events:
- *
Selection
- *
- *

- * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. - *

- * IMPORTANT: This class is intended to be subclassed only - * within the SWT implementation. - *

+/** + * Instances of the receiver represent a selectable user + * interface object that present a range of continuous + * numeric values. + *
+ *
Styles:
+ *
HORIZONTAL, VERTICAL
+ *
Events:
+ *
Selection
+ *
+ *

+ * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. + *

+ *

+ * IMPORTANT: This class is intended to be subclassed only + * within the SWT implementation. + *

*/ public class Scale extends Control { -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#HORIZONTAL + * @see SWT#VERTICAL + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Scale (Composite parent, int style) { super (parent, checkStyle (style)); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java index 4bd371ec7c..d538e1b222 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java @@ -10,68 +10,68 @@ import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.events.*; -/** - * Instances of this class are selectable user interface - * objects that represent a range of positive, numeric values. - *

- * At any given moment, a given scroll bar will have a - * single selection that is considered to be its - * value, which is constrained to be within the range of - * values the scroll bar represents (that is, between its - * minimum and maximum values). - *

- * Typically, scroll bars will be made up of five areas: - *

    - *
  1. an arrow button for decrementing the value
  2. - *
  3. a page decrement area for decrementing the value by a larger amount
  4. - *
  5. a thumb for modifying the value by mouse dragging
  6. - *
  7. a page increment area for incrementing the value by a larger amount
  8. - *
  9. an arrow button for incrementing the value
  10. - *
- * Based on their style, scroll bars are either HORIZONTAL - * (which have a left facing button for decrementing the value and a - * right facing button for incrementing it) or VERTICAL - * (which have an upward facing button for decrementing the value - * and a downward facing buttons for incrementing it). - *

- * On some platforms, the size of the scroll bar's thumb can be - * varied relative to the magnitude of the range of values it - * represents (that is, relative to the difference between its - * maximum and minimum values). Typically, this is used to - * indicate some proportional value such as the ratio of the - * visible area of a document to the total amount of space that - * it would take to display it. SWT supports setting the thumb - * size even if the underlying platform does not, but in this - * case the appearance of the scroll bar will not change. - *

- * Scroll bars are created by specifying either H_SCROLL, - * V_SCROLL or both when creating a Scrollable. - * They are accessed from the Scrollable using - * getHorizontalBar and getVerticalBar. - *

- * Note: Scroll bars are not Controls. On some platforms, scroll bars - * that appear as part of some standard controls such as a text or list - * have no operating system resources and are not children of the control. - * For this reason, scroll bars are treated specially. To create a control - * that looks like a scroll bar but has operating system resources, use - * Slider. - *

- *
- *
Styles:
- *
HORIZONTAL, VERTICAL
- *
Events:
- *
Selection
- *
- *

- * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. - *

- * IMPORTANT: This class is not intended to be subclassed. - *

- * - * @see Slider - * @see Scrollable - * @see Scrollable#getHorizontalBar - * @see Scrollable#getVerticalBar +/** + * Instances of this class are selectable user interface + * objects that represent a range of positive, numeric values. + *

+ * At any given moment, a given scroll bar will have a + * single selection that is considered to be its + * value, which is constrained to be within the range of + * values the scroll bar represents (that is, between its + * minimum and maximum values). + *

+ * Typically, scroll bars will be made up of five areas: + *

    + *
  1. an arrow button for decrementing the value
  2. + *
  3. a page decrement area for decrementing the value by a larger amount
  4. + *
  5. a thumb for modifying the value by mouse dragging
  6. + *
  7. a page increment area for incrementing the value by a larger amount
  8. + *
  9. an arrow button for incrementing the value
  10. + *
+ * Based on their style, scroll bars are either HORIZONTAL + * (which have a left facing button for decrementing the value and a + * right facing button for incrementing it) or VERTICAL + * (which have an upward facing button for decrementing the value + * and a downward facing buttons for incrementing it). + *

+ * On some platforms, the size of the scroll bar's thumb can be + * varied relative to the magnitude of the range of values it + * represents (that is, relative to the difference between its + * maximum and minimum values). Typically, this is used to + * indicate some proportional value such as the ratio of the + * visible area of a document to the total amount of space that + * it would take to display it. SWT supports setting the thumb + * size even if the underlying platform does not, but in this + * case the appearance of the scroll bar will not change. + *

+ * Scroll bars are created by specifying either H_SCROLL, + * V_SCROLL or both when creating a Scrollable. + * They are accessed from the Scrollable using + * getHorizontalBar and getVerticalBar. + *

+ * Note: Scroll bars are not Controls. On some platforms, scroll bars + * that appear as part of some standard controls such as a text or list + * have no operating system resources and are not children of the control. + * For this reason, scroll bars are treated specially. To create a control + * that looks like a scroll bar but has operating system resources, use + * Slider. + *

+ *
+ *
Styles:
+ *
HORIZONTAL, VERTICAL
+ *
Events:
+ *
Selection
+ *
+ *

+ * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. + *

+ * IMPORTANT: This class is not intended to be subclassed. + *

+ * + * @see Slider + * @see Scrollable + * @see Scrollable#getHorizontalBar + * @see Scrollable#getVerticalBar */ public class ScrollBar extends Widget { Scrollable parent; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scrollable.java index 6f924b85ba..734901d870 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scrollable.java @@ -29,33 +29,34 @@ public abstract class Scrollable extends Control { Scrollable () { /* Do nothing */ } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#H_SCROLL + * @see SWT#V_SCROLL + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Scrollable (Composite parent, int style) { super (parent, style); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java index 2201d8e696..cb3b970a9b 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java @@ -113,26 +113,40 @@ public class Shell extends Decorations { public Shell () { this ((Display) null); } -/** - * Constructs a new instance of this class given only the style - * value describing its behavior and appearance. This is equivalent - * to calling Shell((Display) null, style). - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @param style the style of control to construct - * - * @exception SWTException +/** + * Constructs a new instance of this class given only the style + * value describing its behavior and appearance. This is equivalent + * to calling Shell((Display) null, style). + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @param style the style of control to construct + * + * @exception SWTException + * + * @see SWT#BORDER + * @see SWT#CLOSE + * @see SWT#MIN + * @see SWT#MAX + * @see SWT#RESIZE + * @see SWT#TITLE + * @see SWT#NO_TRIM + * @see SWT#SHELL_TRIM + * @see SWT#DIALOG_TRIM + * @see SWT#MODELESS + * @see SWT#PRIMARY_MODAL + * @see SWT#APPLICATION_MODAL + * @see SWT#SYSTEM_MODAL */ public Shell (int style) { this ((Display) null, style); @@ -159,34 +173,48 @@ public Shell (int style) { public Shell (Display display) { this (display, SWT.SHELL_TRIM); } -/** - * Constructs a new instance of this class given the display - * to create it on and a style value describing its behavior - * and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * Note: Currently, null can be passed in for the display argument. - * This has the effect of creating the shell on the currently active - * display if there is one. If there is no current display, the - * shell is created on a "default" display. Passing in null as - * the display argument is not considered to be good coding style, - * and may not be supported in a future release of SWT. - *

- * - * @param display the display to create the shell on - * @param style the style of control to construct - * - * @exception SWTException +/** + * Constructs a new instance of this class given the display + * to create it on and a style value describing its behavior + * and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * Note: Currently, null can be passed in for the display argument. + * This has the effect of creating the shell on the currently active + * display if there is one. If there is no current display, the + * shell is created on a "default" display. Passing in null as + * the display argument is not considered to be good coding style, + * and may not be supported in a future release of SWT. + *

+ * + * @param display the display to create the shell on + * @param style the style of control to construct + * + * @exception SWTException + * + * @see SWT#BORDER + * @see SWT#CLOSE + * @see SWT#MIN + * @see SWT#MAX + * @see SWT#RESIZE + * @see SWT#TITLE + * @see SWT#NO_TRIM + * @see SWT#SHELL_TRIM + * @see SWT#DIALOG_TRIM + * @see SWT#MODELESS + * @see SWT#PRIMARY_MODAL + * @see SWT#APPLICATION_MODAL + * @see SWT#SYSTEM_MODAL */ public Shell (Display display, int style) { this (display, null, style, 0); @@ -230,33 +258,47 @@ Shell (Display display, Shell parent, int style, int handle) { public Shell (Shell parent) { this (parent, SWT.DIALOG_TRIM); } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * Note: Currently, null can be passed in for the parent. - * This has the effect of creating the shell on the currently active - * display if there is one. If there is no current display, the - * shell is created on a "default" display. Passing in null as - * the parent is not considered to be good coding style, - * and may not be supported in a future release of SWT. - *

- * - * @param parent a shell which will be the parent of the new instance - * @param style the style of control to construct - * - * @exception SWTException +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * Note: Currently, null can be passed in for the parent. + * This has the effect of creating the shell on the currently active + * display if there is one. If there is no current display, the + * shell is created on a "default" display. Passing in null as + * the parent is not considered to be good coding style, + * and may not be supported in a future release of SWT. + *

+ * + * @param parent a shell which will be the parent of the new instance + * @param style the style of control to construct + * + * @exception SWTException + * + * @see SWT#BORDER + * @see SWT#CLOSE + * @see SWT#MIN + * @see SWT#MAX + * @see SWT#RESIZE + * @see SWT#TITLE + * @see SWT#NO_TRIM + * @see SWT#SHELL_TRIM + * @see SWT#DIALOG_TRIM + * @see SWT#MODELESS + * @see SWT#PRIMARY_MODAL + * @see SWT#APPLICATION_MODAL + * @see SWT#SYSTEM_MODAL */ public Shell (Shell parent, int style) { this (parent != null ? parent.getDisplay () : null, parent, style, 0); @@ -405,17 +447,19 @@ void adjustTrim () { return; } } -/** - * Requests that the window manager close the receiver in - * the same way it would be closed when the user clicks on - * the "close box" or performs some other platform specific - * key or mouse combination that indicates the window - * should be removed. - * - * @exception SWTException +/** + * Requests that the window manager close the receiver in + * the same way it would be closed when the user clicks on + * the "close box" or performs some other platform specific + * key or mouse combination that indicates the window + * should be removed. + * + * @exception SWTException + * + * @see #dispose */ public void close () { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java index 13ea60623a..1589e17f09 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java @@ -59,33 +59,34 @@ import org.eclipse.swt.graphics.*; * @see ScrollBar */ public class Slider extends Control { -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#HORIZONTAL + * @see SWT#VERTICAL + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Slider (Composite parent, int style) { super (parent, checkStyle (style)); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java index 6f5d4c07d4..367f301484 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java @@ -11,21 +11,21 @@ import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.events.*; -/** - * Instances of this class are selectable user interface - * objects that allow the user to enter and modify text. - *

- *

- *
Styles:
- *
MULTI, SINGLE, READ_ONLY, WRAP
- *
Events:
- *
DefaultSelection, Modify, Verify
- *
- *

- * Note: Only one of the styles MULTI and SINGLE may be specified. - *

- * IMPORTANT: This class is not intended to be subclassed. - *

+/** + * Instances of this class are selectable user interface + * objects that allow the user to enter and modify text. + *

+ *

+ *
Styles:
+ *
MULTI, SINGLE, READ_ONLY, WRAP
+ *
Events:
+ *
DefaultSelection, Modify, Verify
+ *
+ *

+ * Note: Only one of the styles MULTI and SINGLE may be specified. + *

+ * IMPORTANT: This class is not intended to be subclassed. + *

*/ public class Text extends Scrollable { char echoCharacter; @@ -47,33 +47,36 @@ public class Text extends Scrollable { DELIMITER = "\n"; } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#SINGLE + * @see SWT#MULTI + * @see SWT#READ_ONLY + * @see SWT#WRAP + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Text (Composite parent, int style) { super (parent, checkStyle (style)); @@ -1168,20 +1171,25 @@ public void setDoubleClickEnabled (boolean doubleClick) { int [] argList = {OS.XmNselectionArrayCount, doubleClick ? 4 : 1}; OS.XtSetValues (handle, argList, argList.length / 2); } -/** - * Sets the echo character. - *

- * The echo character is the character that is - * displayed when the user enters text or the - * text is changed by the programmer. - *

- * - * @param echo the new echo character - * - * @exception SWTException +/** + * Sets the echo character. + *

+ * The echo character is the character that is + * displayed when the user enters text or the + * text is changed by the programmer. Setting + * the echo character to '\0' clears the echo + * character and redraws the original text. + * If for any reason the echo character is invalid, + * the default echo character for the platform + * is used. + *

+ * + * @param echo the new echo character + * + * @exception SWTException */ public void setEchoChar (char echo) { checkWidget(); @@ -1232,31 +1240,28 @@ public void setRedraw (boolean redraw) { if (drawCount++ == 0) OS.XmTextDisableRedisplay(handle); } } -/** - * Sets the selection. - *

- * Indexing is zero based. The range of - * a selection is from 0..N where N is - * the number of characters in the widget. - *

- * Text selections are specified in terms of - * caret positions. In a text widget that - * contains N characters, there are N+1 caret - * positions, ranging from 0..N. This differs - * from other functions that address character - * position such as getText () that use the - * regular array indexing rules. - *

- * - * @param start new caret position - * - * @exception IllegalArgumentException - * @exception SWTException +/** + * Sets the selection. + *

+ * Indexing is zero based. The range of + * a selection is from 0..N where N is + * the number of characters in the widget. + *

+ * Text selections are specified in terms of + * caret positions. In a text widget that + * contains N characters, there are N+1 caret + * positions, ranging from 0..N. This differs + * from other functions that address character + * position such as getText () that use the + * regular array indexing rules. + *

+ * + * @param start new caret position + * + * @exception SWTException */ public void setSelection (int start) { checkWidget(); @@ -1275,32 +1280,29 @@ public void setSelection (int start) { OS.XmTextSetInsertionPosition (handle, nStart); display.setWarnings (warnings); } -/** - * Sets the selection. - *

- * Indexing is zero based. The range of - * a selection is from 0..N where N is - * the number of characters in the widget. - *

- * Text selections are specified in terms of - * caret positions. In a text widget that - * contains N characters, there are N+1 caret - * positions, ranging from 0..N. This differs - * from other functions that address character - * position such as getText () that use the - * usual array indexing rules. - *

- * - * @param start the start of the range - * @param end the end of the range - * - * @exception IllegalArgumentException - * @exception SWTException +/** + * Sets the selection. + *

+ * Indexing is zero based. The range of + * a selection is from 0..N where N is + * the number of characters in the widget. + *

+ * Text selections are specified in terms of + * caret positions. In a text widget that + * contains N characters, there are N+1 caret + * positions, ranging from 0..N. This differs + * from other functions that address character + * position such as getText () that use the + * usual array indexing rules. + *

+ * + * @param start the start of the range + * @param end the end of the range + * + * @exception SWTException */ public void setSelection (int start, int end) { checkWidget(); @@ -1332,31 +1334,31 @@ public void setSelection (int start, int end) { OS.XmTextSetInsertionPosition (handle, nEnd); display.setWarnings (warnings); } -/** - * Sets the selection. - *

- * Indexing is zero based. The range of - * a selection is from 0..N where N is - * the number of characters in the widget. - *

- * Text selections are specified in terms of - * caret positions. In a text widget that - * contains N characters, there are N+1 caret - * positions, ranging from 0..N. This differs - * from other functions that address character - * position such as getText () that use the - * usual array indexing rules. - *

- * - * @param selection the point - * - * @exception IllegalArgumentException - * @exception SWTException +/** + * Sets the selection. + *

+ * Indexing is zero based. The range of + * a selection is from 0..N where N is + * the number of characters in the widget. + *

+ * Text selections are specified in terms of + * caret positions. In a text widget that + * contains N characters, there are N+1 caret + * positions, ranging from 0..N. This differs + * from other functions that address character + * position such as getText () that use the + * usual array indexing rules. + *

+ * + * @param selection the point + * + * @exception IllegalArgumentException + * @exception SWTException */ public void setSelection (Point selection) { checkWidget(); @@ -1383,18 +1385,20 @@ public void setTabs (int tabs) { checkWidget(); /* Do nothing. Tabs are not supported in MOTIF. */ } -/** - * Sets the contents of the receiver to the given string. - * - * @param text the new text - * - * @exception IllegalArgumentException - * @exception SWTException +/** + * Sets the contents of the receiver to the given string. If the receiver has style + * SINGLE and the argument contains multiple lines of text, the result of this + * operation is undefined and may vary from platform to platform. + * + * @param text the new text + * + * @exception IllegalArgumentException + * @exception SWTException */ public void setText (String string) { checkWidget(); @@ -1413,19 +1417,25 @@ public void setText (String string) { */ if (OS.IsLinux && (style & SWT.MULTI) != 0) sendEvent (SWT.Modify); } -/** - * Sets the maximum number of characters that the receiver - * is capable of holding to be the argument. - * - * @param limit new text limit - * - * @exception IllegalArgumentException - * @exception SWTException +/** + * Sets the maximum number of characters that the receiver + * is capable of holding to be the argument. + *

+ * Instead of trying to set the text limit to zero, consider + * creating a read-only text widget. + *

+ * To reset this value to the default, use setTextLimit(Text.LIMIT). + *

+ * + * @param limit new text limit + * + * @exception IllegalArgumentException + * @exception SWTException */ public void setTextLimit (int limit) { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java index dfafaca1d6..40c5a653a1 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java @@ -9,80 +9,63 @@ import org.eclipse.swt.internal.motif.*; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; -/** - * Instances of this class support the layout of selectable - * tool bar items. - *

- * The item children that may be added to instances of this class - * must be of type ToolItem. - *

- * Note that although this class is a subclass of Composite, - * it does not make sense to add Control children to it, - * or set a layout on it. - *

- *

- *
Styles:
- *
FLAT, WRAP, RIGHT, HORIZONTAL, VERTICAL
- *
Events:
- *
(none)
- *
- *

- * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. - *

- * IMPORTANT: This class is not intended to be subclassed. - *

- */ -/** - * Instances of this class support the layout of selectable - * tool bar items. - *

- * The item children that may be added to instances of this class - * must be of type ToolItem. - *

- * Note that although this class is a subclass of Composite, - * it does not make sense to add Control children to it, - * or set a layout on it. - *

- *

- *
Styles:
- *
FLAT, WRAP, RIGHT, HORIZONTAL, VERTICAL
- *
Events:
- *
(none)
- *
- *

- * IMPORTANT: This class is not intended to be subclassed. - *

+/** + * Instances of this class support the layout of selectable + * tool bar items. + *

+ * The item children that may be added to instances of this class + * must be of type ToolItem. + *

+ * Note that although this class is a subclass of Composite, + * it does not make sense to add Control children to it, + * or set a layout on it. + *

+ *

+ *
Styles:
+ *
FLAT, WRAP, RIGHT, HORIZONTAL, VERTICAL
+ *
Events:
+ *
(none)
+ *
+ *

+ * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. + *

+ * IMPORTANT: This class is not intended to be subclassed. + *

*/ public class ToolBar extends Composite { int drawCount, itemCount; ToolItem [] items; -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#FLAT + * @see SWT#WRAP + * @see SWT#RIGHT + * @see SWT#HORIZONTAL + * @see SWT#VERTICAL + * @see Widget#checkSubclass + * @see Widget#getStyle */ public ToolBar (Composite parent, int style) { super (parent, checkStyle (style)); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java index f502a25b9e..feee1694c8 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java @@ -38,35 +38,39 @@ public class ToolItem extends Item { static final int DEFAULT_HEIGHT = 22; static final int DEFAULT_SEPARATOR_WIDTH = 8; -/** - * Constructs a new instance of this class given its parent - * (which must be a ToolBar) and a style value - * describing its behavior and appearance. The item is added - * to the end of the items maintained by its parent. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * (which must be a ToolBar) and a style value + * describing its behavior and appearance. The item is added + * to the end of the items maintained by its parent. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @exception SWTException + * + * @see SWT#PUSH + * @see SWT#CHECK + * @see SWT#RADIO + * @see SWT#SEPARATOR + * @see SWT#DROP_DOWN + * @see Widget#checkSubclass + * @see Widget#getStyle */ public ToolItem (ToolBar parent, int style) { super (parent, checkStyle (style)); @@ -75,36 +79,40 @@ public ToolItem (ToolBar parent, int style) { parent.relayout (); } -/** - * Constructs a new instance of this class given its parent - * (which must be a ToolBar), a style value - * describing its behavior and appearance, and the index - * at which to place it in the items maintained by its parent. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @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 - * @param index the index to store the receiver in its parent - * - * @exception IllegalArgumentException - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * (which must be a ToolBar), a style value + * describing its behavior and appearance, and the index + * at which to place it in the items maintained by its parent. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @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 + * @param index the index to store the receiver in its parent + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see SWT#PUSH + * @see SWT#CHECK + * @see SWT#RADIO + * @see SWT#SEPARATOR + * @see SWT#DROP_DOWN + * @see Widget#checkSubclass + * @see Widget#getStyle */ public ToolItem (ToolBar parent, int style, int index) { super (parent, checkStyle (style)); @@ -380,21 +388,22 @@ public ToolBar getParent () { checkWidget(); return parent; } -/** - * Returns true if the receiver is selected, - * and false otherwise. - *

- * When the receiver is of type CHECK or RADIO, - * it is selected when it is checked. When it is of type TOGGLE, - * it is selected when it is pushed. - *

- * - * @return the selection state - * - * @exception SWTException +/** + * Returns true if the receiver is selected, + * and false otherwise. + *

+ * When the receiver is of type CHECK or RADIO, + * it is selected when it is checked (which some platforms draw as a + * pushed in button). If the receiver is of any other type, this method + * returns false. + *

+ * + * @return the selection state + * + * @exception SWTException */ public boolean getSelection () { checkWidget(); @@ -687,20 +696,20 @@ public void setImage (Image image) { redraw (); } -/** - * Sets the selection state of the receiver. - *

- * When the receiver is of type CHECK or RADIO, - * it is selected when it is checked. When it is of type TOGGLE, - * it is selected when it is pushed. - *

- * - * @param selected the new selection state - * - * @exception SWTException +/** + * Sets the selection state of the receiver. + *

+ * When the receiver is of type CHECK or RADIO, + * it is selected when it is checked (which some platforms draw as a + * pushed in button). + *

+ * + * @param selected the new selection state + * + * @exception SWTException */ public void setSelection (boolean selected) { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java index 958cc4ec0b..07558d61cc 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java @@ -10,18 +10,18 @@ import org.eclipse.swt.graphics.*; import org.eclipse.swt.*; import org.eclipse.swt.events.*; -/** - * Instances of this class implement rubber banding rectangles. - * - *
- *
Styles:
- *
(none)
- *
Events:
- *
Move
- *
- *

- * IMPORTANT: This class is not intended to be subclassed. - *

+/** + * Instances of this class implement rubber banding rectangles. + * + *
+ *
Styles:
+ *
LEFT, RIGHT, UP, DOWN, RESIZE
+ *
Events:
+ *
Move
+ *
+ *

+ * IMPORTANT: This class is not intended to be subclassed. + *

*/ public class Tracker extends Widget { Composite parent; @@ -33,33 +33,37 @@ public class Tracker extends Widget { final static int STEPSIZE_SMALL = 1; final static int STEPSIZE_LARGE = 9; -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @param parent a widget which will be the parent of the new instance (cannot be null) - * @param style the style of widget to construct - * - * @exception IllegalArgumentException - * @exception SWTException - * - * @see SWT - * @see Widget#checkSubclass - * @see Widget#getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @param parent a widget which will be the parent of the new instance (cannot be null) + * @param style the style of widget to construct + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see SWT#LEFT + * @see SWT#RIGHT + * @see SWT#UP + * @see SWT#DOWN + * @see SWT#RESIZE + * @see Widget#checkSubclass + * @see Widget#getStyle */ public Tracker (Composite parent, int style) { super (parent, checkStyle (style)); @@ -67,34 +71,39 @@ public Tracker (Composite parent, int style) { display = parent.getDisplay (); } -/** - * Constructs a new instance of this class given the display - * to create it on and a style value describing its behavior - * and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * Note: Currently, null can be passed in for the display argument. - * This has the effect of creating the tracker on the currently active - * display if there is one. If there is no current display, the - * tracker is created on a "default" display. Passing in null as - * the display argument is not considered to be good coding style, - * and may not be supported in a future release of SWT. - *

- * - * @param display the display to create the tracker on - * @param style the style of control to construct - * - * @exception SWTException +/** + * Constructs a new instance of this class given the display + * to create it on and a style value describing its behavior + * and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * Note: Currently, null can be passed in for the display argument. + * This has the effect of creating the tracker on the currently active + * display if there is one. If there is no current display, the + * tracker is created on a "default" display. Passing in null as + * the display argument is not considered to be good coding style, + * and may not be supported in a future release of SWT. + *

+ * + * @param display the display to create the tracker on + * @param style the style of control to construct + * + * @exception SWTException + * + * @see SWT#LEFT + * @see SWT#RIGHT + * @see SWT#UP + * @see SWT#DOWN */ public Tracker (Display display, int style) { if (display == null) display = Display.getCurrent (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java index e60711fc17..00faf261a6 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java @@ -74,33 +74,33 @@ public abstract class Widget { Widget () { /* Do nothing */ } -/** - * Constructs a new instance of this class given its parent - * and a style value describing its behavior and appearance. - *

- * The style value is either one of the style constants defined in - * class SWT which is applicable to instances of this - * class, or must be built by bitwise OR'ing together - * (that is, using the int "|" operator) two or more - * of those SWT style constants. The class description - * for all SWT widget classes should include a comment which - * describes the style constants which are applicable to the class. - *

- * - * @param parent a widget which will be the parent of the new instance (cannot be null) - * @param style the style of widget to construct - * - * @exception IllegalArgumentException - * @exception SWTException - * - * @see SWT - * @see #checkSubclass - * @see #getStyle +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + *

+ * The style value is either one of the style constants defined in + * class SWT which is applicable to instances of this + * class, or must be built by bitwise OR'ing together + * (that is, using the int "|" operator) two or more + * of those SWT style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + *

+ * + * @param parent a widget which will be the parent of the new instance (cannot be null) + * @param style the style of widget to construct + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see SWT + * @see #checkSubclass + * @see #getStyle */ public Widget (Widget parent, int style) { checkSubclass (); @@ -689,22 +689,22 @@ protected void removeListener (int eventType, SWTEventListener handler) { if (eventTable == null) return; eventTable.unhook (eventType, handler); } -/** - * Removes the listener from the collection of listeners who will - * be notifed when the widget is disposed. - * - * @param listener the listener which should no longer be notified when the receiver is disposed - * - * @exception IllegalArgumentException - * @exception SWTException - * - * @see DisposeListener - * @see #removeDisposeListener +/** + * Removes the listener from the collection of listeners who will + * be notifed when the widget is disposed. + * + * @param listener the listener which should no longer be notified when the receiver is disposed + * + * @exception IllegalArgumentException + * @exception SWTException + * + * @see DisposeListener + * @see #addDisposeListener */ public void removeDisposeListener (DisposeListener listener) { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Color.java index dce4d319ec..57a39d6e75 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Color.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Color.java @@ -54,6 +54,7 @@ Color() { * @param blue the amount of blue in the color * * @exception IllegalArgumentException * @@ -81,8 +82,9 @@ public Color (Device device, int red, int green, int blue) { * @param RGB the RGB values of the desired color * * @exception IllegalArgumentException * * @see #dispose diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Cursor.java index 6a980496e9..77c5f8d828 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Cursor.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Cursor.java @@ -28,9 +28,9 @@ import org.eclipse.swt.*; * CURSOR_SIZESW, CURSOR_SIZENW, CURSOR_UPARROW, CURSOR_IBEAM, CURSOR_NO, CURSOR_HAND * * - *

- * Note: Only one of the above styles may be specified. - *

+ *

+ * Note: Only one of the above styles may be specified. + *

*/ public final class Cursor { @@ -65,10 +65,35 @@ Cursor() { * @param style the style of cursor to allocate * * @exception IllegalArgumentException + * @exception SWTError * - * @see Cursor for the supported style values + * @see SWT#CURSOR_ARROW + * @see SWT#CURSOR_WAIT + * @see SWT#CURSOR_CROSS + * @see SWT#CURSOR_APPSTARTING + * @see SWT#CURSOR_HELP + * @see SWT#CURSOR_SIZEALL + * @see SWT#CURSOR_SIZENESW + * @see SWT#CURSOR_SIZENS + * @see SWT#CURSOR_SIZENWSE + * @see SWT#CURSOR_SIZEWE + * @see SWT#CURSOR_SIZEN + * @see SWT#CURSOR_SIZES + * @see SWT#CURSOR_SIZEE + * @see SWT#CURSOR_SIZEW + * @see SWT#CURSOR_SIZENE + * @see SWT#CURSOR_SIZESE + * @see SWT#CURSOR_SIZESW + * @see SWT#CURSOR_SIZENW + * @see SWT#CURSOR_UPARROW + * @see SWT#CURSOR_IBEAM + * @see SWT#CURSOR_NO + * @see SWT#CURSOR_HAND */ public Cursor(Device device, int style) { if (device == null) device = Device.getDevice(); @@ -125,13 +150,15 @@ public Cursor(Device device, int style) { * @param hotspotY the y coordinate of the cursor's hotspot * * @exception IllegalArgumentException * @exception SWTError */ public Cursor(Device device, ImageData source, ImageData mask, int hotspotX, int hotspotY) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java index 63970040ef..ddafae46a3 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java @@ -9,6 +9,12 @@ import org.eclipse.swt.*; import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.photon.*; +/** + * This class is the abstract superclass of all device objects, + * such as the Display device and the Printer device. Devices + * can have a graphics context (GC) created for them, and they + * can be drawn on by sending messages to the associated GC. + */ public abstract class Device implements Drawable { /* Debugging */ @@ -229,7 +235,7 @@ public Point getDPI () { /** * Returns FontData objects which describe - * the fonts which match the given arguments. If the + * the fonts that match the given arguments. If the * faceName is null, all fonts will be returned. * * @param faceName the name of the font to look for, or null diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Font.java index ec4f93a710..ef08ee0fed 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Font.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Font.java @@ -57,6 +57,7 @@ Font() { * @param fd the FontData that describes the desired font (must not be null) * * @exception IllegalArgumentException * @exception SWTError