diff options
author | Carolyn MacLeod <carolyn> | 2008-06-04 20:45:22 +0000 |
---|---|---|
committer | Carolyn MacLeod <carolyn> | 2008-06-04 20:45:22 +0000 |
commit | 45b394fe10eb1852268eed201cf431c4774b5428 (patch) | |
tree | 00ccb791c8930d127177c0034c8ee92863d9cedc /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets | |
parent | 5ccbc836d63be99bd6e1cf9e6c2cc8027488f31c (diff) | |
download | eclipse.platform.swt-45b394fe10eb1852268eed201cf431c4774b5428.tar.gz eclipse.platform.swt-45b394fe10eb1852268eed201cf431c4774b5428.tar.xz eclipse.platform.swt-45b394fe10eb1852268eed201cf431c4774b5428.zip |
After Javadoc Bash for 3.4RC4
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets')
46 files changed, 763 insertions, 33 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java index c989d8c2fc..503426ecfe 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java @@ -39,6 +39,10 @@ import org.eclipse.swt.events.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#button">Button snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Button extends Control { int /*long*/ boxHandle, labelHandle, imageHandle, arrowHandle, groupHandle; @@ -295,6 +299,20 @@ public int getAlignment () { return SWT.LEFT; } +/** + * Returns <code>true</code> if the receiver is grayed, + * and false otherwise. When the widget does not have + * the <code>CHECK</code> style, return false. + * + * @return the grayed state of the checkbox + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public boolean getGrayed () { checkWidget(); if ((style & SWT.CHECK) == 0) return false; @@ -641,6 +659,20 @@ void setForegroundColor (GdkColor color) { if (imageHandle != 0) setForegroundColor (imageHandle, color); } +/** + * Sets the grayed state of the receiver. This state change + * only applies if the control was created with the SWT.CHECK + * style. + * + * @param grayed the new grayed state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public void setGrayed (boolean grayed) { checkWidget(); if ((style & SWT.CHECK) == 0) return; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java index 3495504c96..5e0c306c3d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java @@ -33,6 +33,9 @@ import org.eclipse.swt.*; * </p> * * @see Composite + * @see <a href="http://www.eclipse.org/swt/snippets/#canvas">Canvas snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Canvas extends Composite { Caret caret; @@ -110,7 +113,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height) { * drawing in the window any other time. * </p> * - * @return the caret + * @return the caret for the receiver, may be null * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -127,6 +130,18 @@ Point getIMCaretPos () { return new Point (caret.x, caret.y); } +/** + * Returns the IME. + * + * @return the IME + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public IME getIME () { checkWidget (); return ime; @@ -357,6 +372,21 @@ public void setFont (Font font) { super.setFont (font); } +/** + * Sets the receiver's IME. + * + * @param ime the new IME for the receiver, may be null + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_INVALID_ARGUMENT - if the IME has been disposed</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public void setIME (IME ime) { checkWidget (); if (ime != null && ime.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java index bc5fd4a158..c82024607c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java @@ -28,6 +28,10 @@ import org.eclipse.swt.graphics.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#caret">Caret snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Canvas tab</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Caret extends Widget { Canvas parent; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java index 892e23b3ae..5b203618ef 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java @@ -29,6 +29,9 @@ import org.eclipse.swt.graphics.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Dialog tab</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class ColorDialog extends Dialog { RGB rgb; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java index 791caa81c5..e06a454c39 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java @@ -51,6 +51,9 @@ import org.eclipse.swt.events.*; * </p> * * @see List + * @see <a href="http://www.eclipse.org/swt/snippets/#combo">Combo snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Combo extends Composite { int /*long*/ buttonHandle, entryHandle, listHandle, textRenderer, cellHandle, popupHandle; @@ -886,6 +889,25 @@ public String [] getItems () { return result; } +/** + * Returns <code>true</code> if the receiver's list is visible, + * and <code>false</code> otherwise. + * <p> + * If one of the receiver's ancestors is not visible or some + * other condition makes the receiver not visible, this method + * may still indicate that it is considered visible even though + * it may not actually be showing. + * </p> + * + * @return the receiver's list's visibility state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public boolean getListVisible () { checkWidget (); if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) { @@ -1934,6 +1956,24 @@ public void setItems (String [] items) { } } +/** + * Marks the receiver's list as visible if the argument is <code>true</code>, + * and marks it invisible otherwise. + * <p> + * If one of the receiver's ancestors is not visible or some + * other condition makes the receiver not visible, marking + * it visible may not actually cause it to be displayed. + * </p> + * + * @param visible the new visibility state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public void setListVisible (boolean visible) { checkWidget (); if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java index 0cb7b22e8a..b92ae087d0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java @@ -44,6 +44,8 @@ import org.eclipse.swt.graphics.*; * </p> * * @see Canvas + * @see <a href="http://www.eclipse.org/swt/snippets/#composite">Composite snippets</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Composite extends Scrollable { public int /*long*/ embeddedHandle; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java index c4b622f900..6dfe23476b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java @@ -36,6 +36,10 @@ import org.eclipse.swt.accessibility.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#control">Control snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public abstract class Control extends Widget implements Drawable { int /*long*/ fixedHandle; @@ -279,6 +283,23 @@ int /*long*/ paintWindow () { return OS.GTK_WIDGET_WINDOW (paintHandle); } +/** + * Prints the receiver and all children. + * + * @param gc the gc where the drawing occurs + * @return <code>true</code> if the operation was successful and <code>false</code> otherwise + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the gc is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public boolean print (GC gc) { checkWidget (); if (gc == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -920,6 +941,23 @@ public void setSize (Point size) { setBounds (0, 0, Math.max (0, size.x), Math.max (0, size.y), false, true); } +/** + * Sets the shape of the control to the region specified + * by the argument. When the argument is null, the + * default shape of the control is restored. + * + * @param region the region that defines the shape of the control (or null) + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_INVALID_ARGUMENT - if the region has been disposed</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public void setRegion (Region region) { checkWidget (); if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); @@ -2162,7 +2200,9 @@ int getClientWidth () { * When the mouse pointer passes over a control its appearance * is changed to match the control's cursor. * </p> - * </ul> + * + * @return the receiver's cursor or <code>null</code> + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -2382,6 +2422,19 @@ Control [] getPath () { return result; } +/** + * Returns the region that defines the shape of the control, + * or null if the control has the default shape. + * + * @return the region that defines the shape of the shell (or null) + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public Region getRegion () { checkWidget (); return region; @@ -3414,7 +3467,8 @@ void setBackgroundPixmap (int /*long*/ pixmap) { /** * If the argument is <code>true</code>, causes the receiver to have * all mouse events delivered to it until the method is called with - * <code>false</code> as the argument. + * <code>false</code> as the argument. Note that on some platforms, + * a mouse button must currently be down for capture to be assigned. * * @param capture <code>true</code> to capture the mouse, and <code>false</code> to release it * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java index 9a99532e93..2ac7eddb96 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java @@ -38,6 +38,10 @@ import org.eclipse.swt.internal.gtk.OS; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#datetime">DateTime snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * * @since 3.3 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java index e7f981c6ee..879b2c0cdb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java @@ -90,6 +90,7 @@ import org.eclipse.swt.graphics.*; * @see #getMaximized * @see Shell * @see SWT + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Decorations extends Canvas { String text; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java index 88e38d7533..c64bdaa76f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java @@ -28,6 +28,10 @@ import org.eclipse.swt.internal.gtk.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#directorydialog">DirectoryDialog snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Dialog tab</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class DirectoryDialog extends Dialog { String message = "", filterPath = ""; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java index 0241d2015e..6d8fd2ecd9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java @@ -90,6 +90,8 @@ import org.eclipse.swt.graphics.*; * @see #readAndDispatch * @see #sleep * @see Device#dispose + * @see <a href="http://www.eclipse.org/swt/snippets/#display">Display snippets</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Display extends Device { @@ -1328,7 +1330,8 @@ public Shell getActiveShell () { } /** - * Returns a rectangle describing the receiver's size and location. + * Returns a rectangle describing the receiver's size and location. Note that + * on multi-monitor systems the origin can be negative. * * @return the bounding rectangle * @@ -3316,7 +3319,7 @@ void removeIdleProc () { * is one of the event constants defined in class <code>SWT</code>. * * @param eventType the type of event to listen for - * @param listener the listener which should no longer be notified when the event occurs + * @param listener the listener which should no longer be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java index bf57ea4dbe..3dcd2b4cb3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java @@ -36,6 +36,9 @@ import org.eclipse.swt.graphics.*; * @see ExpandEvent * @see ExpandListener * @see ExpandAdapter + * @see <a href="http://www.eclipse.org/swt/snippets/#expandbar">ExpandBar snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * * @since 3.2 */ @@ -661,6 +664,8 @@ void setScrollbar () { /** * Sets the receiver's spacing. Spacing specifies the number of pixels allocated around * each item. + * + * @param spacing the spacing around each item * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java index 94f8664413..afcc171853 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java @@ -30,6 +30,7 @@ import org.eclipse.swt.graphics.*; * </p> * * @see ExpandBar + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * * @since 3.2 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java index e277aa508f..24e28c7dcf 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java @@ -30,6 +30,10 @@ import org.eclipse.swt.internal.gtk.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#filedialog">FileDialog snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Dialog tab</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class FileDialog extends Dialog { String [] filterNames = new String [0]; @@ -610,8 +614,10 @@ public void setFileName (String string) { * which may be null. * <p> * The strings are platform specific. For example, on - * Windows, an extension filter string is typically of - * the form "*.extension", where "*.*" matches all files. + * some platforms, an extension filter string is typically + * of the form "*.extension", where "*.*" matches all files. + * For filters with multiple extensions, use semicolon as + * a separator, e.g. "*.jpg;*.png". * </p> * * @param extensions the file extension filter @@ -642,7 +648,7 @@ public void setFilterIndex (int index) { filterIndex = index; } /** - * Sets the the names that describe the filter extensions + * Sets the names that describe the filter extensions * which the dialog will use to filter the files it shows * to the argument, which may be null. * <p> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java index 6aa5c056c4..faeef8a224 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java @@ -29,6 +29,9 @@ import org.eclipse.swt.graphics.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Dialog tab</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class FontDialog extends Dialog { FontData fontData; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java index 94d265f0cc..51dc33aab2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java @@ -35,6 +35,9 @@ import org.eclipse.swt.graphics.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Group extends Composite { int /*long*/ clientHandle, labelHandle; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java index 750e1e0bb2..0daa1d3938 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java @@ -17,6 +17,26 @@ import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.gtk.*; +/** + * Instances of this class represent input method editors. + * These are typically in-line pre-edit text areas that allow + * the user to compose characters from Far Eastern languages + * such as Japanese, Chinese or Korean. + * + * <dl> + * <dt><b>Styles:</b></dt> + * <dd>(none)</dd> + * <dt><b>Events:</b></dt> + * <dd>ImeComposition</dd> + * </dl> + * <p> + * IMPORTANT: This class is <em>not</em> intended to be subclassed. + * </p> + * + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> + * + * @since 3.4 + */ public class IME extends Widget { Canvas parent; int caretOffset; @@ -34,8 +54,31 @@ IME () { } /** - * - * @see SWT + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + * <p> + * The style value is either one of the style constants defined in + * class <code>SWT</code> which is applicable to instances of this + * class, or must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>SWT</code> style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + * </p> + * + * @param parent a canvas control which will be the parent of the new instance (cannot be null) + * @param style the style of control to construct + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> + * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> + * </ul> + * + * @see Widget#checkSubclass + * @see Widget#getStyle */ public IME (Canvas parent, int style) { super (parent, style); @@ -51,21 +94,78 @@ void createWidget () { } } +/** + * Returns the offset of the caret from the start of the document. + * The caret is within the current composition. + * + * @return the caret offset + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getCaretOffset () { checkWidget (); return startOffset + caretOffset; } +/** + * Returns the commit count of the composition. This is the + * number of characters that have been composed. When the + * commit count is equal to the length of the composition + * text, then the in-line edit operation is complete. + * + * @return the commit count + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see IME#getText + */ public int getCommitCount () { checkWidget (); return commitCount; } +/** + * Returns the offset of the composition from the start of the document. + * This is the start offset of the composition within the document and + * in not changed by the input method editor itself during the in-line edit + * session. + * + * @return the offset of the composition + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getCompositionOffset () { checkWidget (); return startOffset; } +/** + * Returns the ranges for the style that should be applied during the + * in-line edit session. + * <p> + * The ranges array contains start and end pairs. Each pair refers to + * the corresponding style in the styles array. For example, the pair + * that starts at ranges[n] and ends at ranges[n+1] uses the style + * at styles[n/2] returned by <code>getStyles()</code>. + * </p> + * @return the ranges for the styles + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see IME#getStyles + */ public int [] getRanges () { checkWidget (); if (ranges == null) return new int [0]; @@ -76,6 +176,24 @@ public int [] getRanges () { return result; } +/** + * Returns the styles for the ranges. + * <p> + * The ranges array contains start and end pairs. Each pair refers to + * the corresponding style in the styles array. For example, the pair + * that starts at ranges[n] and ends at ranges[n+1] uses the style + * at styles[n/2]. + * </p> + * + * @return the ranges for the styles + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see IME#getRanges + */ public TextStyle [] getStyles () { checkWidget (); if (styles == null) return new TextStyle [0]; @@ -84,11 +202,40 @@ public TextStyle [] getStyles () { return result; } +/** + * Returns the composition text. + * <p> + * The text for an IME is the characters in the widget that + * are in the current composition. When the commit count is + * equal to the length of the composition text, then the + * in-line edit operation is complete. + * </p> + * + * @return the widget text + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public String getText () { checkWidget (); return text; } +/** + * Returns <code>true</code> if the caret should be wide, and + * <code>false</code> otherwise. In some languages, for example + * Korean, the caret is typically widened to the width of the + * current character in the in-line edit session. + * + * @return the wide caret state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public boolean getWideCaret () { checkWidget (); return false; @@ -256,6 +403,22 @@ void releaseWidget () { ranges = null; } +/** + * Sets the offset of the composition from the start of the document. + * This is the start offset of the composition within the document and + * in not changed by the input method editor itself during the in-line edit + * session but may need to be changed by clients of the IME. For example, + * if during an in-line edit operation, a text editor inserts characters + * above the IME, then the IME must be informed that the composition + * offset has changed. + * + * @return the offset of the composition + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setCompositionOffset (int offset) { checkWidget (); if (offset < 0) return; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java index b5d082bc38..768d2064dd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java @@ -21,6 +21,12 @@ import org.eclipse.swt.graphics.*; * user interface object that displays a string or image. * When SEPARATOR is specified, displays a single * vertical or horizontal line. + * <p> + * Shadow styles are hints and may not be honoured + * by the platform. To create a separator label + * with the default shadow style for the platform, + * do not specify a shadow style. + * </p> * <dl> * <dt><b>Styles:</b></dt> * <dd>SEPARATOR, HORIZONTAL, VERTICAL</dd> @@ -37,6 +43,10 @@ import org.eclipse.swt.graphics.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#label">Label snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Label extends Control { int /*long*/ frameHandle, labelHandle, imageHandle; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java index cc97ce8963..6fab5705ef 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java @@ -30,6 +30,10 @@ import org.eclipse.swt.accessibility.*; * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#link">Link snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * * @since 3.1 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java index 4b366c82de..bc9935700c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java @@ -33,6 +33,10 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#list">List snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class List extends Scrollable { int /*long*/ modelHandle; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java index 82acacdbce..da84dcfe5d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java @@ -33,6 +33,10 @@ import org.eclipse.swt.graphics.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#menu">Menu snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Menu extends Widget { int x, y; @@ -46,6 +50,11 @@ public class Menu extends 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. + * <p> + * After constructing a menu, it can be set into its parent + * using <code>parent.setMenu(menu)</code>. In this case, the parent may + * be any control in the same widget tree as the parent. + * </p> * * @param parent a control which will be the parent of the new instance (cannot be null) * @@ -77,6 +86,9 @@ public Menu (Control parent) { * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. * Style bits are also inherited from superclasses. + * </p><p> + * After constructing a menu or menuBar, it can be set into its parent + * using <code>parent.setMenu(menu)</code> or <code>parent.setMenuBar(menuBar)</code>. * </p> * * @param parent a decorations control which will be the parent of the new instance (cannot be null) @@ -107,6 +119,10 @@ public Menu (Decorations parent, int style) { * (which must be a <code>Menu</code>) and sets the style * for the instance so that the instance will be a drop-down * menu on the given parent's parent. + * <p> + * After constructing a drop-down menu, it can be set into its parentMenu + * using <code>parentMenu.setMenu(menu)</code>. + * </p> * * @param parentMenu a menu which will be the parent of the new instance (cannot be null) * @@ -131,6 +147,10 @@ public Menu (Menu parentMenu) { * (which must be a <code>MenuItem</code>) and sets the style * for the instance so that the instance will be a drop-down * menu on the given parent's parent menu. + * <p> + * After constructing a drop-down menu, it can be set into its parentItem + * using <code>parentItem.setMenu(menu)</code>. + * </p> * * @param parentItem a menu item which will be the parent of the new instance (cannot be null) * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java index b3e04e7a19..95e8ece826 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java @@ -32,6 +32,8 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class MenuItem extends Item { Menu parent, menu; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java index 10d54fbd77..be6e964024 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java @@ -34,6 +34,9 @@ import org.eclipse.swt.internal.gtk.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Dialog tab</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class MessageBox extends Dialog { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java index 483b04e535..3ea95df354 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java @@ -30,6 +30,10 @@ import org.eclipse.swt.internal.gtk.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#progressbar">ProgressBar snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class ProgressBar extends Control { int timerId, minimum = 0, maximum = 100, selection = 0; @@ -134,6 +138,19 @@ public int getSelection () { return selection; } +/** + * Returns the state of the receiver. The value will be one of + * <code>NORMAL</code>, <code>ERROR</code> or <code>PAUSED</code>. + * + * @return the state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public int getState () { checkWidget (); return SWT.NORMAL; @@ -227,6 +244,19 @@ public void setSelection (int value) { updateBar (selection, minimum, maximum); } +/** + * Sets the state of the receiver. The state is be one of + * <code>NORMAL</code>, <code>ERROR</code> or <code>PAUSED</code>. + * + * @param state the new state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public void setState (int state) { checkWidget (); //NOT IMPLEMENTED diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java index 9ac40ee3a0..7bf5deb2e3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java @@ -32,6 +32,10 @@ import org.eclipse.swt.events.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#sash">Sash snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Sash extends Control { boolean dragging; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java index dcf9581a19..127ad5a78c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java @@ -33,6 +33,10 @@ import org.eclipse.swt.events.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#scale">Scale snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Scale extends Control { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java index 704d9cf811..1009fe6942 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java @@ -78,6 +78,8 @@ import org.eclipse.swt.events.*; * @see Scrollable * @see Scrollable#getHorizontalBar * @see Scrollable#getVerticalBar + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class ScrollBar extends Widget { Scrollable parent; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java index 70a7ebd11e..50873821d8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java @@ -28,6 +28,8 @@ import org.eclipse.swt.graphics.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public abstract class Scrollable extends Control { int /*long*/ scrolledHandle; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java index bdf101b3a2..1928283885 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java @@ -112,6 +112,9 @@ import org.eclipse.swt.events.*; * * @see Decorations * @see SWT + * @see <a href="http://www.eclipse.org/swt/snippets/#shell">Shell snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Shell extends Decorations { int /*long*/ shellHandle, tooltipsHandle, tooltipWindow, group, modalGroup; @@ -348,6 +351,23 @@ public static Shell gtk_new (Display display, int /*long*/ handle) { return new Shell (display, null, SWT.NO_TRIM, handle, true); } +/** + * Invokes platform specific functionality to allocate a new shell + * that is not embedded. + * <p> + * <b>IMPORTANT:</b> This method is <em>not</em> part of the public + * API for <code>Shell</code>. It is marked public only so that it + * can be shared within the packages provided by SWT. It is not + * available on all platforms, and should never be called from + * application code. + * </p> + * + * @param display the display for the shell + * @param handle the handle for the shell + * @return a new shell object containing the specified display and handle + * + * @since 3.3 + */ public static Shell internal_new (Display display, int /*long*/ handle) { return new Shell (display, null, SWT.NO_TRIM, handle, false); } @@ -783,6 +803,19 @@ void forceResize (int width, int height) { OS.gtk_widget_size_allocate (vboxHandle, allocation); } +/** + * Returns the receiver's alpha value. The alpha value + * is between 0 (transparent) and 255 (opaque). + * + * @return the alpha value + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public int getAlpha () { checkWidget (); if (OS.GTK_VERSION >= OS.VERSION (2, 12, 0)) { @@ -793,6 +826,20 @@ public int getAlpha () { return 255; } +/** + * Returns <code>true</code> if the receiver is currently + * in fullscreen state, and false otherwise. + * <p> + * + * @return the fullscreen state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public boolean getFullScreen () { checkWidget(); return fullScreen; @@ -1200,6 +1247,23 @@ void setActiveControl (Control control) { } } +/** + * Sets the receiver's alpha value which must be + * between 0 (transparent) and 255 (opaque). + * <p> + * This operation requires the operating system's advanced + * widgets subsystem which may not be available on some + * platforms. + * </p> + * @param alpha the alpha value + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public void setAlpha (int alpha) { checkWidget (); if (OS.GTK_VERSION >= OS.VERSION (2, 12, 0)) { @@ -1348,6 +1412,29 @@ public void setEnabled (boolean enabled) { } } +/** + * Sets the full screen state of the receiver. + * If the argument is <code>true</code> causes the receiver + * to switch to the full screen state, and if the argument is + * <code>false</code> and the receiver was previously switched + * into full screen state, causes the receiver to switch back + * to either the maximmized or normal states. + * <p> + * Note: The result of intermixing calls to <code>setFullScreen(true)</code>, + * <code>setMaximized(true)</code> and <code>setMinimized(true)</code> will + * vary by platform. Typically, the behavior will match the platform user's + * expectations, but not always. This should be avoided if possible. + * </p> + * + * @param fullScreen the new fullscreen state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public void setFullScreen (boolean fullScreen) { checkWidget(); if (fullScreen) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java index 89e3041ff5..02af33473d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java @@ -63,6 +63,9 @@ import org.eclipse.swt.events.*; * </p> * * @see ScrollBar + * @see <a href="http://www.eclipse.org/swt/snippets/#slider">Slider snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Slider extends Control { int detail; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java index 319b8512a6..d2e6bc4367 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java @@ -34,6 +34,10 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#spinner">Spinner snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * * @since 3.1 */ @@ -45,13 +49,11 @@ public class Spinner extends Composite { int fixStart = -1, fixEnd = -1; /** - * The maximum number of characters that can be entered - * into a text widget. - * <p> - * Note that this value is platform dependent, based upon - * the native widget implementation. - * </p> - */ + * the operating system limit for the number of characters + * that the text field in an instance of this class can hold + * + * @since 3.4 + */ public final static int LIMIT; /* * These values can be different on different platforms. @@ -483,6 +485,20 @@ public int getSelection () { return (int) (value > 0 ? value + 0.5 : value - 0.5); } +/** + * Returns a string containing a copy of the contents of the + * receiver's text field, or an empty string if there are no + * contents. + * + * @return the receiver's text + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public String getText () { checkWidget (); int /*long*/ str = OS.gtk_entry_get_text (handle); @@ -493,6 +509,23 @@ public String getText () { return new String (Converter.mbcsToWcs (null, buffer)); } +/** + * Returns the maximum number of characters that the receiver's + * text field is capable of holding. If this has not been changed + * by <code>setTextLimit()</code>, it will be the constant + * <code>Spinner.LIMIT</code>. + * + * @return the text limit + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see #LIMIT + * + * @since 3.4 + */ public int getTextLimit () { checkWidget (); int limit = OS.gtk_entry_get_max_length (handle); @@ -902,11 +935,11 @@ public void setMaximum (int value) { /** * Sets the minimum value that the receiver will allow. This new - * value will be ignored if it is negative or is not less than the receiver's + * value will be ignored if it is not less than the receiver's * current maximum value. If the new minimum is applied then the receiver's * selection value will be adjusted if necessary to fall within its new range. * - * @param value the new minimum, which must be nonnegative and less than the current maximum + * @param value the new minimum, which must be less than the current maximum * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -976,6 +1009,28 @@ public void setSelection (int value) { OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED); } +/** + * Sets the maximum number of characters that the receiver's + * text field is capable of holding to be the argument. + * <p> + * To reset this value to the default, use <code>setTextLimit(Spinner.LIMIT)</code>. + * Specifying a limit value larger than <code>Spinner.LIMIT</code> sets the + * receiver's limit to <code>Spinner.LIMIT</code>. + * </p> + * @param limit new text limit + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_CANNOT_BE_ZERO - if the limit is zero</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see #LIMIT + * + * @since 3.4 + */ public void setTextLimit (int limit) { checkWidget (); if (limit == 0) error (SWT.ERROR_CANNOT_BE_ZERO); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java index b9dac4d7ba..bfa67550f0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java @@ -40,6 +40,10 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#tabfolder">TabFolder, TabItem snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class TabFolder extends Composite { TabItem [] items; @@ -306,6 +310,24 @@ public TabItem getItem (int index) { return items [index]; } +/** + * Returns the tab item at the given point in the receiver + * or null if no such item exists. The point is in the + * coordinate system of the receiver. + * + * @param point the point used to locate the item + * @return the tab item at the given point, or null if the point is not in a tab item + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the point is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public TabItem getItem(Point point) { checkWidget(); if (point == null) error (SWT.ERROR_NULL_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java index f58b340c50..80097c574b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java @@ -28,6 +28,9 @@ import org.eclipse.swt.graphics.*; * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#tabfolder">TabFolder, TabItem snippets</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class TabItem extends Item { int /*long*/ labelHandle, imageHandle, pageHandle; @@ -131,6 +134,19 @@ void destroyWidget () { releaseHandle (); } +/** + * Returns a rectangle describing the receiver's size and location + * relative to its parent. + * + * @return the receiver's bounding rectangle + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public Rectangle getBounds () { checkWidget(); int x = OS.GTK_WIDGET_X (handle); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java index b6c196c52d..2458076b1b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java @@ -46,12 +46,13 @@ import org.eclipse.swt.events.*; * </pre></code> * </p><p> * Note that although this class is a subclass of <code>Composite</code>, - * it does not make sense to add <code>Control</code> children to it, - * or set a layout on it. + * it does not normally make sense to add <code>Control</code> children to + * it, or set a layout on it, unless implementing something like a cell + * editor. * </p><p> * <dl> * <dt><b>Styles:</b></dt> - * <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, HIDE_SELECTION, VIRTUAL</dd> + * <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, HIDE_SELECTION, VIRTUAL, NO_SCROLL</dd> * <dt><b>Events:</b></dt> * <dd>Selection, DefaultSelection, SetData, MeasureItem, EraseItem, PaintItem</dd> * </dl> @@ -60,6 +61,10 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#table">Table, TableItem, TableColumn snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Table extends Composite { int /*long*/ modelHandle, checkRenderer; @@ -118,6 +123,7 @@ public class Table extends Composite { * @see SWT#FULL_SELECTION * @see SWT#HIDE_SELECTION * @see SWT#VIRTUAL + * @see SWT#NO_SCROLL * @see Widget#checkSubclass * @see Widget#getStyle */ @@ -1454,7 +1460,7 @@ public int getItemCount () { /** * Returns the height of the area which would be used to - * display <em>one</em> of the items in the receiver's. + * display <em>one</em> of the items in the receiver. * * @return the height of one item * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java index 8e3f03d946..ff0e63bc24 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java @@ -30,6 +30,9 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#table">Table, TableItem, TableColumn snippets</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class TableColumn extends Item { int /*long*/ labelHandle, imageHandle, buttonHandle; @@ -90,7 +93,10 @@ public TableColumn (Table parent, int style) { * lists the style constants that are applicable to the class. * Style bits are also inherited from superclasses. * </p> - * + * <p> + * Note that due to a restriction on some platforms, the first column + * is always left aligned. + * </p> * @param parent a composite control which will be the parent of the new instance (cannot be null) * @param style the style of control to construct * @param index the zero-relative index to store the receiver in its parent @@ -498,7 +504,10 @@ public void removeSelectionListener(SelectionListener listener) { * Controls how text and images will be displayed in the receiver. * The argument should be one of <code>LEFT</code>, <code>RIGHT</code> * or <code>CENTER</code>. - * + * <p> + * Note that due to a restriction on some platforms, the first column + * is always left aligned. + * </p> * @param alignment the new alignment * * @exception SWTException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java index 5d4901f021..709c9c4271 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java @@ -28,6 +28,9 @@ import org.eclipse.swt.graphics.*; * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#table">Table, TableItem, TableColumn snippets</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class TableItem extends Item { Table parent; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java index 4a7286a43c..466728af88 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java @@ -20,6 +20,13 @@ import org.eclipse.swt.events.*; /** * Instances of this class are selectable user interface * objects that allow the user to enter and modify text. + * Text controls can be either single or multi-line. + * When a text control is created with a border, the + * operating system includes a platform specific inset + * around the contents of the control. When created + * without a border, an effort is made to remove the + * inset such that the preferred size of the control + * is the same size as the contents. * <p> * <dl> * <dt><b>Styles:</b></dt> @@ -33,6 +40,10 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#text">Text snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Text extends Scrollable { int /*long*/ bufferHandle; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java index c2070c9fc0..c1e317f464 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java @@ -38,6 +38,10 @@ import org.eclipse.swt.graphics.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#toolbar">ToolBar, ToolItem snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class ToolBar extends Composite { ToolItem lastFocus; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java index 4690d07003..4006eded66 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java @@ -32,6 +32,9 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#toolbar">ToolBar, ToolItem snippets</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class ToolItem extends Item { int /*long*/ boxHandle, arrowHandle, arrowBoxHandle, separatorHandle, labelHandle, imageHandle; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java index 3ca2808f74..c46e8ba999 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java @@ -34,6 +34,10 @@ import org.eclipse.swt.events.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#tooltips">Tool Tips snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * * @since 3.2 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java index f351803403..6aa50a6708 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java @@ -34,6 +34,9 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#tracker">Tracker snippets</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Tracker extends Widget { Composite parent; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java index b8aae18b7d..2a46f30545 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java @@ -29,6 +29,9 @@ import org.eclipse.swt.internal.gtk.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#tray">Tray, TrayItem snippets</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * * @since 3.0 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index c98cfe941a..ba034160ca 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java @@ -53,12 +53,13 @@ import org.eclipse.swt.events.*; * </pre></code> * </p><p> * Note that although this class is a subclass of <code>Composite</code>, - * it does not make sense to add <code>Control</code> children to it, - * or set a layout on it. + * it does not normally make sense to add <code>Control</code> children to + * it, or set a layout on it, unless implementing something like a cell + * editor. * </p><p> * <dl> * <dt><b>Styles:</b></dt> - * <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, VIRTUAL</dd> + * <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, VIRTUAL, NO_SCROLL</dd> * <dt><b>Events:</b></dt> * <dd>Selection, DefaultSelection, Collapse, Expand, SetData, MeasureItem, EraseItem, PaintItem</dd> * </dl> @@ -67,6 +68,10 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#tree">Tree, TreeItem, TreeColumn snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class Tree extends Composite { int /*long*/ modelHandle, checkRenderer; @@ -125,6 +130,9 @@ public class Tree extends Composite { * @see SWT#SINGLE * @see SWT#MULTI * @see SWT#CHECK + * @see SWT#FULL_SELECTION + * @see SWT#VIRTUAL + * @see SWT#NO_SCROLL * @see Widget#checkSubclass * @see Widget#getStyle */ @@ -935,6 +943,23 @@ void deregister () { if (checkRenderer != 0) display.removeWidget (checkRenderer); } +/** + * Deselects an item in the receiver. If the item was already + * deselected, it remains deselected. + * + * @param item the item to be deselected + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public void deselect (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -2704,6 +2729,23 @@ public void setItemCount (int count) { setItemCount (0, count); } +/** + * Selects an item in the receiver. If the item was already + * selected, it remains selected. + * + * @param item the item to be selected + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.4 + */ public void select (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java index f93071e2a3..95cf2c76b3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java @@ -30,6 +30,9 @@ import org.eclipse.swt.events.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#tree">Tree, TreeItem, TreeColumn snippets</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * * @since 3.1 */ @@ -92,7 +95,10 @@ public TreeColumn (Tree parent, int style) { * lists the style constants that are applicable to the class. * Style bits are also inherited from superclasses. * </p> - * + * <p> + * Note that due to a restriction on some platforms, the first column + * is always left aligned. + * </p> * @param parent a composite control which will be the parent of the new instance (cannot be null) * @param style the style of control to construct * @param index the zero-relative index to store the receiver in its parent @@ -495,7 +501,10 @@ public void removeSelectionListener(SelectionListener listener) { * Controls how text and images will be displayed in the receiver. * The argument should be one of <code>LEFT</code>, <code>RIGHT</code> * or <code>CENTER</code>. - * + * <p> + * Note that due to a restriction on some platforms, the first column + * is always left aligned. + * </p> * @param alignment the new alignment * * @exception SWTException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java index a38d8d07d5..4451d8c639 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java @@ -29,6 +29,9 @@ import org.eclipse.swt.graphics.*; * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#tree">Tree, TreeItem, TreeColumn snippets</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class TreeItem extends Item { Tree parent; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java index 9be367f7d6..3b66369873 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java @@ -41,6 +41,7 @@ import org.eclipse.swt.events.*; * </p> * * @see #checkSubclass + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public abstract class Widget { /** @@ -228,6 +229,7 @@ void _addListener (int eventType, Listener listener) { * * @see Listener * @see SWT + * @see #getListeners(int) * @see #removeListener(int, Listener) * @see #notifyListeners */ @@ -996,6 +998,7 @@ void modifyStyle (int /*long*/ handle, int /*long*/ style) { * * @see SWT * @see #addListener + * @see #getListeners(int) * @see #removeListener(int, Listener) */ public void notifyListeners (int eventType, Event event) { @@ -1063,7 +1066,7 @@ void releaseWidget () { * type is one of the event constants defined in class <code>SWT</code>. * * @param eventType the type of event to listen for - * @param listener the listener which should no longer be notified when the event occurs + * @param listener the listener which should no longer be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -1076,6 +1079,7 @@ void releaseWidget () { * @see Listener * @see SWT * @see #addListener + * @see #getListeners(int) * @see #notifyListeners */ public void removeListener (int eventType, Listener handler) { @@ -1096,7 +1100,7 @@ public void removeListener (int eventType, Listener handler) { * </p> * * @param eventType the type of event to listen for - * @param listener the listener which should no longer be notified when the event occurs + * @param listener the listener which should no longer be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -1128,7 +1132,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l * Removes the listener from the collection of listeners who will * be notified when the widget is disposed. * - * @param listener the listener which should no longer be notified when the receiver is disposed + * @param listener the listener which should no longer be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> |