diff options
author | Carolyn MacLeod <carolyn> | 2007-05-31 20:34:20 +0000 |
---|---|---|
committer | Carolyn MacLeod <carolyn> | 2007-05-31 20:34:20 +0000 |
commit | 20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9 (patch) | |
tree | 39bd3703cea1020d3f848e884fffd09cef858c42 /bundles/org.eclipse.swt | |
parent | 29ed0b9d892e5929f54e524e3dc1c92d73ee99db (diff) | |
download | eclipse.platform.swt-20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9.tar.gz eclipse.platform.swt-20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9.tar.xz eclipse.platform.swt-20a3f2c29e1d6bada2326bd04dcead2e1ae22ad9.zip |
After javadoc bash for 3.3 RC3BEFORE_COPYRIGHT_BASH_FOR_33RC3AFTER_JAVADOC_BASH_FOR_33RC3
Diffstat (limited to 'bundles/org.eclipse.swt')
239 files changed, 4373 insertions, 1018 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/Clipboard.java index 94a9a5ea1c..0ff9be5bb2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/Clipboard.java @@ -321,7 +321,7 @@ public boolean isDisposed () { * * <p>NOTE: On some platforms, the data is immediately copied to the system * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -359,7 +359,7 @@ public boolean isDisposed () { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> */ public void setContents(Object[] data, Transfer[] dataTypes) { setContents(data, dataTypes, DND.CLIPBOARD); @@ -373,7 +373,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * * <p>NOTE: On some platforms, the data is immediately copied to the specified * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -417,7 +417,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see DND#CLIPBOARD * @see DND#SELECTION_CLIPBOARD diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java index 2c39dfd6d7..bbff4667ef 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java @@ -134,7 +134,7 @@ public class DragSource extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DRAG should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DragSource#checkSubclass @@ -403,7 +403,7 @@ public Control getControl () { /** * Returns the drag effect that is registered for this DragSource. This drag - * effect will be used during a drag and drop event to display the drag source image. + * effect will be used during a drag and drop operation. * * @return the drag effect that is registered for this DragSource * @@ -498,7 +498,7 @@ public void removeDragListener(DragSourceListener listener) { /** * Specifies the drag effect for this DragSource. This drag effect will be - * used during a drag and drop to display the drag source image. + * used during a drag and drop operation. * * @param effect the drag effect that is registered for this DragSource * diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java index 3b142223a5..c854104897 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java @@ -132,7 +132,7 @@ public class DropTarget extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DROP should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DropTarget#checkSubclass @@ -524,7 +524,7 @@ public Control getControl () { * Returns the drop effect for this DropTarget. This drop effect will be * used during a drag and drop to display the drag under effect on the * target widget. - * + * * @return the drop effect that is registered for this DropTarget * * @since 3.3 diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TableDragSourceEffect.java index e2402bf730..416864d6f5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TableDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TableDragSourceEffect.java @@ -17,14 +17,14 @@ import org.eclipse.swt.widgets.*; * when a drag is initiated from a <code>Table</code>. * * <p>Classes that wish to provide their own source image for a <code>Table</code> can - * extend the <code>DragSourceAdapter</code> class, override the - * <code>DragSourceAdapter.dragStart</code> method and set the field + * extend the <code>TableDragSourceEffect</code> class, override the + * <code>TableDragSourceEffect.dragStart</code> method and set the field * <code>DragSourceEvent.image</code> with their own image.</p> * * Subclasses that override any methods of this class must call the corresponding * <code>super</code> method to get the default drag source effect implementation. * - * @see DragSourceAdapter + * @see DragSourceEffect * @see DragSourceEvent * * @since 3.3 @@ -35,7 +35,7 @@ public class TableDragSourceEffect extends DragSourceEffect { * from the specified <code>Table</code>. * * @param table the <code>Table</code> that the user clicks on to initiate the drag - **/ + */ public TableDragSourceEffect(Table table) { super(table); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TableDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TableDropTargetEffect.java index 9f1ae034cb..fc7c58b4a2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TableDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TableDropTargetEffect.java @@ -17,6 +17,35 @@ import org.eclipse.swt.internal.carbon.DataBrowserCallbacks; import org.eclipse.swt.internal.carbon.OS; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert and scroll) + * when a drag occurs over a <code>Table</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Table</code> + * can extend the <code>TableDropTargetEffect</code> and override any applicable methods + * in <code>TableDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_SCROLL</dd> + * </dl> + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TableDropTargetEffect extends DropTargetEffect { static final int SCROLL_HYSTERESIS = 150; // milli seconds diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/Transfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/Transfer.java index 3210a05494..8453de4ce8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/Transfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/Transfer.java @@ -50,19 +50,19 @@ abstract public TransferData[] getSupportedTypes(); abstract public boolean isSupportedType(TransferData transferData); /** - * Returns the platform specfic ids of the data types that can be converted using + * Returns the platform specific ids of the data types that can be converted using * this transfer agent. * - * @return the platform specfic ids of the data types that can be converted using + * @return the platform specific ids of the data types that can be converted using * this transfer agent */ abstract protected int[] getTypeIds(); /** - * Returns the platform specfic names of the data types that can be converted + * Returns the platform specific names of the data types that can be converted * using this transfer agent. * - * @return the platform specfic names of the data types that can be converted + * @return the platform specific names of the data types that can be converted * using this transfer agent. */ abstract protected String[] getTypeNames(); @@ -89,7 +89,7 @@ abstract protected String[] getTypeNames(); * </ul></p> * * @param object a java representation of the data to be converted; the type of - * Object that is passed in is dependant on the <code>Transfer</code> subclass. + * Object that is passed in is dependent on the <code>Transfer</code> subclass. * * @param transferData an empty TransferData object; this object will be * filled in on return with the platform specific representation of the data @@ -109,7 +109,7 @@ abstract protected void javaToNative (Object object, TransferData transferData); * @return a java representation of the converted data if the conversion was * successful; otherwise null. If transferData is <code>null</code> then * <code>null</code> is returned. The type of Object that is returned is - * dependant on the <code>Transfer</code> subclass. + * dependent on the <code>Transfer</code> subclass. */ abstract protected Object nativeToJava(TransferData transferData); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDragSourceEffect.java index d78790cbeb..97cd46f444 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDragSourceEffect.java @@ -16,14 +16,14 @@ import org.eclipse.swt.widgets.*; * This class provides default implementations to display a source image * when a drag is initiated from a <code>Tree</code>. * - * <p>Classes that wish to provide their own source image for a <code>Table</code> can - * extend <code>DragSourceAdapter</code> class and override the <code>DragSourceAdapter.dragStart</code> + * <p>Classes that wish to provide their own source image for a <code>Tree</code> can + * extend <code>TreeDragSourceEffect</code> class and override the <code>TreeDragSourceEffect.dragStart</code> * method and set the field <code>DragSourceEvent.image</code> with their own image.</p> * * Subclasses that override any methods of this class must call the corresponding * <code>super</code> method to get the default drag under effect implementation. * - * @see DragSourceAdapter + * @see DragSourceEffect * @see DragSourceEvent * * @since 3.3 @@ -33,8 +33,8 @@ public class TreeDragSourceEffect extends DragSourceEffect { * Creates a new <code>TreeDragSourceEffect</code> to handle drag effect * from the specified <code>Tree</code>. * - * @param table the <code>Tree</code> that the user clicks on to initiate the drag - **/ + * @param tree the <code>Tree</code> that the user clicks on to initiate the drag + */ public TreeDragSourceEffect(Tree tree) { super(tree); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDropTargetEffect.java index 32ceb2b383..0dc2931a30 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TreeDropTargetEffect.java @@ -17,6 +17,38 @@ import org.eclipse.swt.internal.carbon.DataBrowserCallbacks; import org.eclipse.swt.internal.carbon.OS; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert, scroll and expand) + * when a drag occurs over a <code>Tree</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Tree</code> + * can extend the <code>TreeDropTargetEffect</code> class and override any applicable methods + * in <code>TreeDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE, FEEDBACK_INSERT_AFTER, FEEDBACK_EXPAND, FEEDBACK_SCROLL</dd> + * </dl> + * </p><p> + * Note: Only one of the styles FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE or + * FEEDBACK_INSERT_AFTER may be specified. + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TreeDropTargetEffect extends DropTargetEffect { static final int SCROLL_HYSTERESIS = 150; // milli seconds static final int EXPAND_HYSTERESIS = 1000; // milli seconds diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/Clipboard.java index 4835e2f125..087bc9da56 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/Clipboard.java @@ -245,7 +245,7 @@ public boolean isDisposed () { * * <p>NOTE: On some platforms, the data is immediately copied to the system * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -283,7 +283,7 @@ public boolean isDisposed () { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> */ public void setContents(Object[] data, Transfer[] dataTypes) { setContents(data, dataTypes, DND.CLIPBOARD); @@ -297,7 +297,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * * <p>NOTE: On some platforms, the data is immediately copied to the specified * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -341,7 +341,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see DND#CLIPBOARD * @see DND#SELECTION_CLIPBOARD diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/DragSource.java index 1d90cb303e..3824c317d0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/DragSource.java @@ -121,7 +121,7 @@ public class DragSource extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DRAG should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DragSource#checkSubclass @@ -233,7 +233,7 @@ public Control getControl () { /** * Returns the drag effect that is registered for this DragSource. This drag - * effect will be used during a drag and drop event to display the drag source image. + * effect will be used during a drag and drop operation. * * @return the drag effect that is registered for this DragSource * @@ -291,7 +291,7 @@ public void removeDragListener(DragSourceListener listener) { /** * Specifies the drag effect for this DragSource. This drag effect will be - * used during a drag and drop to display the drag source image. + * used during a drag and drop operation. * * @param effect the drag effect that is registered for this DragSource * diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/DropTarget.java index 3f4be69397..830faaf08c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/DropTarget.java @@ -98,7 +98,7 @@ public class DropTarget extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DROP should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DropTarget#checkSubclass @@ -207,11 +207,11 @@ public Control getControl () { } /** - * Specifies the drop effect for this DropTarget. This drop effect will be + * Returns the drop effect for this DropTarget. This drop effect will be * used during a drag and drop to display the drag under effect on the * target widget. * - * @param effect the drop effect that is registered for this DropTarget + * @return the drop effect that is registered for this DropTarget * * @since 3.3 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDragSourceEffect.java index e2402bf730..416864d6f5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDragSourceEffect.java @@ -17,14 +17,14 @@ import org.eclipse.swt.widgets.*; * when a drag is initiated from a <code>Table</code>. * * <p>Classes that wish to provide their own source image for a <code>Table</code> can - * extend the <code>DragSourceAdapter</code> class, override the - * <code>DragSourceAdapter.dragStart</code> method and set the field + * extend the <code>TableDragSourceEffect</code> class, override the + * <code>TableDragSourceEffect.dragStart</code> method and set the field * <code>DragSourceEvent.image</code> with their own image.</p> * * Subclasses that override any methods of this class must call the corresponding * <code>super</code> method to get the default drag source effect implementation. * - * @see DragSourceAdapter + * @see DragSourceEffect * @see DragSourceEvent * * @since 3.3 @@ -35,7 +35,7 @@ public class TableDragSourceEffect extends DragSourceEffect { * from the specified <code>Table</code>. * * @param table the <code>Table</code> that the user clicks on to initiate the drag - **/ + */ public TableDragSourceEffect(Table table) { super(table); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDropTargetEffect.java index ecc2b83bc2..ab075d16b3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDropTargetEffect.java @@ -12,6 +12,35 @@ package org.eclipse.swt.dnd; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert and scroll) + * when a drag occurs over a <code>Table</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Table</code> + * can extend the <code>TableDropTargetEffect</code> and override any applicable methods + * in <code>TableDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_SCROLL</dd> + * </dl> + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TableDropTargetEffect extends DropTargetEffect { /** * Creates a new <code>TableDropTargetEffect</code> to handle the drag under effect on the specified diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/Transfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/Transfer.java index ad5ffd5835..a21f3aba26 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/Transfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/Transfer.java @@ -50,19 +50,19 @@ abstract public TransferData[] getSupportedTypes(); abstract public boolean isSupportedType(TransferData transferData); /** - * Returns the platform specfic names of the data types that can be converted + * Returns the platform specific names of the data types that can be converted * using this transfer agent. * - * @return the platform specfic names of the data types that can be converted + * @return the platform specific names of the data types that can be converted * using this transfer agent. */ abstract protected String[] getTypeNames(); /** - * Returns the platform specfic ids of the data types that can be converted using + * Returns the platform specific ids of the data types that can be converted using * this transfer agent. * - * @return the platform specfic ids of the data types that can be converted using + * @return the platform specific ids of the data types that can be converted using * this transfer agent */ abstract protected int[] getTypeIds(); @@ -89,7 +89,7 @@ abstract protected int[] getTypeIds(); * </ul></p> * * @param object a java representation of the data to be converted; the type of - * Object that is passed in is dependant on the <code>Transfer</code> subclass. + * Object that is passed in is dependent on the <code>Transfer</code> subclass. * * @param transferData an empty TransferData object; this object will be * filled in on return with the platform specific representation of the data @@ -109,7 +109,7 @@ abstract protected void javaToNative (Object object, TransferData transferData); * @return a java representation of the converted data if the conversion was * successful; otherwise null. If transferData is <code>null</code> then * <code>null</code> is returned. The type of Object that is returned is - * dependant on the <code>Transfer</code> subclass. + * dependent on the <code>Transfer</code> subclass. */ abstract protected Object nativeToJava(TransferData transferData); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TreeDragSourceEffect.java index d78790cbeb..97cd46f444 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TreeDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TreeDragSourceEffect.java @@ -16,14 +16,14 @@ import org.eclipse.swt.widgets.*; * This class provides default implementations to display a source image * when a drag is initiated from a <code>Tree</code>. * - * <p>Classes that wish to provide their own source image for a <code>Table</code> can - * extend <code>DragSourceAdapter</code> class and override the <code>DragSourceAdapter.dragStart</code> + * <p>Classes that wish to provide their own source image for a <code>Tree</code> can + * extend <code>TreeDragSourceEffect</code> class and override the <code>TreeDragSourceEffect.dragStart</code> * method and set the field <code>DragSourceEvent.image</code> with their own image.</p> * * Subclasses that override any methods of this class must call the corresponding * <code>super</code> method to get the default drag under effect implementation. * - * @see DragSourceAdapter + * @see DragSourceEffect * @see DragSourceEvent * * @since 3.3 @@ -33,8 +33,8 @@ public class TreeDragSourceEffect extends DragSourceEffect { * Creates a new <code>TreeDragSourceEffect</code> to handle drag effect * from the specified <code>Tree</code>. * - * @param table the <code>Tree</code> that the user clicks on to initiate the drag - **/ + * @param tree the <code>Tree</code> that the user clicks on to initiate the drag + */ public TreeDragSourceEffect(Tree tree) { super(tree); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TreeDropTargetEffect.java index 65a7009170..71536f846c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TreeDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TreeDropTargetEffect.java @@ -12,6 +12,38 @@ package org.eclipse.swt.dnd; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert, scroll and expand) + * when a drag occurs over a <code>Tree</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Tree</code> + * can extend the <code>TreeDropTargetEffect</code> class and override any applicable methods + * in <code>TreeDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE, FEEDBACK_INSERT_AFTER, FEEDBACK_EXPAND, FEEDBACK_SCROLL</dd> + * </dl> + * </p><p> + * Note: Only one of the styles FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE or + * FEEDBACK_INSERT_AFTER may be specified. + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TreeDropTargetEffect extends DropTargetEffect { /** * Creates a new <code>TreeDropTargetEffect</code> to handle the drag under effect on the specified diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java index 8c0675fb10..a64901c8ae 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java @@ -330,7 +330,7 @@ public boolean isDisposed () { * * <p>NOTE: On some platforms, the data is immediately copied to the system * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -368,7 +368,7 @@ public boolean isDisposed () { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> */ public void setContents(Object[] data, Transfer[] dataTypes) { setContents(data, dataTypes, DND.CLIPBOARD); @@ -382,7 +382,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * * <p>NOTE: On some platforms, the data is immediately copied to the specified * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -426,7 +426,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see DND#CLIPBOARD * @see DND#SELECTION_CLIPBOARD diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java index d5929aae8b..4daed7ec01 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java @@ -141,7 +141,7 @@ public class DragSource extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DRAG should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DragSource#checkSubclass @@ -386,7 +386,7 @@ public Control getControl () { /** * Returns the drag effect that is registered for this DragSource. This drag - * effect will be used during a drag and drop event to display the drag source image. + * effect will be used during a drag and drop operation. * * @return the drag effect that is registered for this DragSource * @@ -473,7 +473,7 @@ public void removeDragListener(DragSourceListener listener) { /** * Specifies the drag effect for this DragSource. This drag effect will be - * used during a drag and drop to display the drag source image. + * used during a drag and drop operation. * * @param effect the drag effect that is registered for this DragSource * diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java index 0a8af72e8a..db0868fa49 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java @@ -134,7 +134,7 @@ public class DropTarget extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DROP should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DropTarget#checkSubclass @@ -506,11 +506,11 @@ public Control getControl () { } /** - * Specifies the drop effect for this DropTarget. This drop effect will be + * Returns the drop effect for this DropTarget. This drop effect will be * used during a drag and drop to display the drag under effect on the * target widget. * - * @param effect the drop effect that is registered for this DropTarget + * @return the drop effect that is registered for this DropTarget * * @since 3.3 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java index 1c07621a50..6a44475e26 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java @@ -15,6 +15,23 @@ import org.eclipse.swt.graphics.*; import org.eclipse.swt.internal.gtk.*; import org.eclipse.swt.widgets.*; +/** + * This class provides default implementations to display a source image + * when a drag is initiated from a <code>Table</code>. + * + * <p>Classes that wish to provide their own source image for a <code>Table</code> can + * extend the <code>TableDragSourceEffect</code> class, override the + * <code>TableDragSourceEffect.dragStart</code> method and set the field + * <code>DragSourceEvent.image</code> with their own image.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag source effect implementation. + * + * @see DragSourceEffect + * @see DragSourceEvent + * + * @since 3.3 + */ public class TableDragSourceEffect extends DragSourceEffect { Image dragSourceImage = null; @@ -23,16 +40,16 @@ public class TableDragSourceEffect extends DragSourceEffect { * from the specified <code>Table</code>. * * @param table the <code>Table</code> that the user clicks on to initiate the drag - **/ + */ public TableDragSourceEffect(Table table) { super(table); } /** * This implementation of <code>dragFinished</code> disposes the image - * that was created in <code>TableDragSourceAdapter.dragStart</code>. + * that was created in <code>TableDragSourceEffect.dragStart</code>. * - * Subclasses that override this method should call <code>super.dragFinsihed(event)</code> + * Subclasses that override this method should call <code>super.dragFinished(event)</code> * to dispose the image in the default implementation. * * @param event the information associated with the drag finished event @@ -45,7 +62,7 @@ public class TableDragSourceEffect extends DragSourceEffect { /** * This implementation of <code>dragStart</code> will create a default * image that will be used during the drag. The image should be disposed - * when the drag is completed in the <code>TableDragSourceAdapter.dragFinished</code> + * when the drag is completed in the <code>TableDragSourceEffect.dragFinished</code> * method. * * Subclasses that override this method should call <code>super.dragStart(event)</code> diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java index 6bc8fb9eac..8b4951a213 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java @@ -14,6 +14,35 @@ import org.eclipse.swt.graphics.*; import org.eclipse.swt.internal.gtk.*; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert and scroll) + * when a drag occurs over a <code>Table</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Table</code> + * can extend the <code>TableDropTargetEffect</code> and override any applicable methods + * in <code>TableDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_SCROLL</dd> + * </dl> + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TableDropTargetEffect extends DropTargetEffect { static final int SCROLL_HYSTERESIS = 150; // milli seconds diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Transfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Transfer.java index 74b5b24195..c31e9dda2e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Transfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Transfer.java @@ -53,19 +53,19 @@ abstract public TransferData[] getSupportedTypes(); abstract public boolean isSupportedType(TransferData transferData); /** - * Returns the platform specfic names of the data types that can be converted + * Returns the platform specific names of the data types that can be converted * using this transfer agent. * - * @return the platform specfic names of the data types that can be converted + * @return the platform specific names of the data types that can be converted * using this transfer agent. */ abstract protected String[] getTypeNames(); /** - * Returns the platform specfic ids of the data types that can be converted using + * Returns the platform specific ids of the data types that can be converted using * this transfer agent. * - * @return the platform specfic ids of the data types that can be converted using + * @return the platform specific ids of the data types that can be converted using * this transfer agent */ abstract protected int[] getTypeIds(); @@ -92,7 +92,7 @@ abstract protected int[] getTypeIds(); * </ul></p> * * @param object a java representation of the data to be converted; the type of - * Object that is passed in is dependant on the <code>Transfer</code> subclass. + * Object that is passed in is dependent on the <code>Transfer</code> subclass. * * @param transferData an empty TransferData object; this object will be * filled in on return with the platform specific representation of the data @@ -112,7 +112,7 @@ abstract protected void javaToNative (Object object, TransferData transferData); * @return a java representation of the converted data if the conversion was * successful; otherwise null. If transferData is <code>null</code> then * <code>null</code> is returned. The type of Object that is returned is - * dependant on the <code>Transfer</code> subclass. + * dependent on the <code>Transfer</code> subclass. */ abstract protected Object nativeToJava(TransferData transferData); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java index f97ce8cd92..793c9962d4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java @@ -15,6 +15,22 @@ import org.eclipse.swt.graphics.*; import org.eclipse.swt.internal.gtk.*; import org.eclipse.swt.widgets.*; +/** + * This class provides default implementations to display a source image + * when a drag is initiated from a <code>Tree</code>. + * + * <p>Classes that wish to provide their own source image for a <code>Tree</code> can + * extend <code>TreeDragSourceEffect</code> class and override the <code>TreeDragSourceEffect.dragStart</code> + * method and set the field <code>DragSourceEvent.image</code> with their own image.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * @see DragSourceEffect + * @see DragSourceEvent + * + * @since 3.3 + */ public class TreeDragSourceEffect extends DragSourceEffect { Image dragSourceImage = null; @@ -22,17 +38,17 @@ public class TreeDragSourceEffect extends DragSourceEffect { * Creates a new <code>TreeDragSourceEffect</code> to handle drag effect * from the specified <code>Tree</code>. * - * @param table the <code>Tree</code> that the user clicks on to initiate the drag - **/ + * @param tree the <code>Tree</code> that the user clicks on to initiate the drag + */ public TreeDragSourceEffect(Tree tree) { super(tree); } /** * This implementation of <code>dragFinished</code> disposes the image - * that was created in <code>TableDragSourceAdapter.dragStart</code>. + * that was created in <code>TreeDragSourceEffect.dragStart</code>. * - * Subclasses that override this method should call <code>super.dragFinsihed(event)</code> + * Subclasses that override this method should call <code>super.dragFinished(event)</code> * to dispose the image in the default implementation. * * @param event the information associated with the drag finished event @@ -45,7 +61,7 @@ public class TreeDragSourceEffect extends DragSourceEffect { /** * This implementation of <code>dragStart</code> will create a default * image that will be used during the drag. The image should be disposed - * when the drag is completed in the <code>TableDragSourceAdapter.dragFinished</code> + * when the drag is completed in the <code>TreeDragSourceEffect.dragFinished</code> * method. * * Subclasses that override this method should call <code>super.dragStart(event)</code> diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDropTargetEffect.java index 5653bd8f26..294927c3cb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDropTargetEffect.java @@ -14,6 +14,38 @@ import org.eclipse.swt.graphics.*; import org.eclipse.swt.internal.gtk.*; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert, scroll and expand) + * when a drag occurs over a <code>Tree</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Tree</code> + * can extend the <code>TreeDropTargetEffect</code> class and override any applicable methods + * in <code>TreeDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE, FEEDBACK_INSERT_AFTER, FEEDBACK_EXPAND, FEEDBACK_SCROLL</dd> + * </dl> + * </p><p> + * Note: Only one of the styles FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE or + * FEEDBACK_INSERT_AFTER may be specified. + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TreeDropTargetEffect extends DropTargetEffect { static final int SCROLL_HYSTERESIS = 150; // milli seconds static final int EXPAND_HYSTERESIS = 1000; // milli seconds diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/Clipboard.java index 9abc57b643..6b2e629fc8 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/Clipboard.java @@ -421,7 +421,7 @@ public String[] getAvailableTypeNames() { * * <p>NOTE: On some platforms, the data is immediately copied to the system * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -459,7 +459,7 @@ public String[] getAvailableTypeNames() { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> */ public void setContents(Object[] data, Transfer[] dataTypes) { setContents(data, dataTypes, DND.CLIPBOARD); @@ -473,7 +473,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * * <p>NOTE: On some platforms, the data is immediately copied to the specified * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -517,7 +517,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see DND#CLIPBOARD * @see DND#SELECTION_CLIPBOARD diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DragSource.java index 1aa8df14fd..5630e9d083 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DragSource.java @@ -138,7 +138,7 @@ public class DragSource extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DRAG should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DragSource#checkSubclass @@ -469,7 +469,7 @@ public Control getControl () { } /** * Returns the drag effect that is registered for this DragSource. This drag - * effect will be used during a drag and drop event to display the drag source image. + * effect will be used during a drag and drop operation. * * @return the drag effect that is registered for this DragSource * @@ -548,7 +548,7 @@ public void removeDragListener(DragSourceListener listener) { } /** * Specifies the drag effect for this DragSource. This drag effect will be - * used during a drag and drop to display the drag source image. + * used during a drag and drop operation. * * @param effect the drag effect that is registered for this DragSource * diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DropTarget.java index 830432976f..578b6654c3 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DropTarget.java @@ -140,7 +140,7 @@ public class DropTarget extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DROP should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DropTarget#checkSubclass @@ -521,11 +521,11 @@ public Control getControl () { } /** - * Specifies the drop effect for this DropTarget. This drop effect will be + * Returns the drop effect for this DropTarget. This drop effect will be * used during a drag and drop to display the drag under effect on the * target widget. * - * @param effect the drop effect that is registered for this DropTarget + * @return the drop effect that is registered for this DropTarget * * @since 3.3 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TableDragSourceEffect.java index e2402bf730..416864d6f5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TableDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TableDragSourceEffect.java @@ -17,14 +17,14 @@ import org.eclipse.swt.widgets.*; * when a drag is initiated from a <code>Table</code>. * * <p>Classes that wish to provide their own source image for a <code>Table</code> can - * extend the <code>DragSourceAdapter</code> class, override the - * <code>DragSourceAdapter.dragStart</code> method and set the field + * extend the <code>TableDragSourceEffect</code> class, override the + * <code>TableDragSourceEffect.dragStart</code> method and set the field * <code>DragSourceEvent.image</code> with their own image.</p> * * Subclasses that override any methods of this class must call the corresponding * <code>super</code> method to get the default drag source effect implementation. * - * @see DragSourceAdapter + * @see DragSourceEffect * @see DragSourceEvent * * @since 3.3 @@ -35,7 +35,7 @@ public class TableDragSourceEffect extends DragSourceEffect { * from the specified <code>Table</code>. * * @param table the <code>Table</code> that the user clicks on to initiate the drag - **/ + */ public TableDragSourceEffect(Table table) { super(table); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TableDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TableDropTargetEffect.java index f6869371d0..baa89d7710 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TableDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TableDropTargetEffect.java @@ -14,6 +14,35 @@ import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert and scroll) + * when a drag occurs over a <code>Table</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Table</code> + * can extend the <code>TableDropTargetEffect</code> and override any applicable methods + * in <code>TableDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_SCROLL</dd> + * </dl> + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TableDropTargetEffect extends DropTargetEffect { static final int SCROLL_HYSTERESIS = 150; // milli seconds diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/Transfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/Transfer.java index c41a17c8d4..18da19a958 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/Transfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/Transfer.java @@ -54,19 +54,19 @@ abstract public TransferData[] getSupportedTypes(); abstract public boolean isSupportedType(TransferData transferData); /** - * Returns the platform specfic names of the data types that can be converted + * Returns the platform specific names of the data types that can be converted * using this transfer agent. * - * @return the platform specfic names of the data types that can be converted + * @return the platform specific names of the data types that can be converted * using this transfer agent. */ abstract protected String[] getTypeNames(); /** - * Returns the platform specfic ids of the data types that can be converted using + * Returns the platform specific ids of the data types that can be converted using * this transfer agent. * - * @return the platform specfic ids of the data types that can be converted using + * @return the platform specific ids of the data types that can be converted using * this transfer agent */ abstract protected int[] getTypeIds(); @@ -93,7 +93,7 @@ abstract protected int[] getTypeIds(); * </ul></p> * * @param object a java representation of the data to be converted; the type of - * Object that is passed in is dependant on the <code>Transfer</code> subclass. + * Object that is passed in is dependent on the <code>Transfer</code> subclass. * * @param transferData an empty TransferData object; this object will be * filled in on return with the platform specific representation of the data @@ -113,7 +113,7 @@ abstract protected void javaToNative (Object object, TransferData transferData); * @return a java representation of the converted data if the conversion was * successful; otherwise null. If transferData is <code>null</code> then * <code>null</code> is returned. The type of Object that is returned is - * dependant on the <code>Transfer</code> subclass. + * dependent on the <code>Transfer</code> subclass. */ abstract protected Object nativeToJava(TransferData transferData); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TreeDragSourceEffect.java index d78790cbeb..97cd46f444 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TreeDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TreeDragSourceEffect.java @@ -16,14 +16,14 @@ import org.eclipse.swt.widgets.*; * This class provides default implementations to display a source image * when a drag is initiated from a <code>Tree</code>. * - * <p>Classes that wish to provide their own source image for a <code>Table</code> can - * extend <code>DragSourceAdapter</code> class and override the <code>DragSourceAdapter.dragStart</code> + * <p>Classes that wish to provide their own source image for a <code>Tree</code> can + * extend <code>TreeDragSourceEffect</code> class and override the <code>TreeDragSourceEffect.dragStart</code> * method and set the field <code>DragSourceEvent.image</code> with their own image.</p> * * Subclasses that override any methods of this class must call the corresponding * <code>super</code> method to get the default drag under effect implementation. * - * @see DragSourceAdapter + * @see DragSourceEffect * @see DragSourceEvent * * @since 3.3 @@ -33,8 +33,8 @@ public class TreeDragSourceEffect extends DragSourceEffect { * Creates a new <code>TreeDragSourceEffect</code> to handle drag effect * from the specified <code>Tree</code>. * - * @param table the <code>Tree</code> that the user clicks on to initiate the drag - **/ + * @param tree the <code>Tree</code> that the user clicks on to initiate the drag + */ public TreeDragSourceEffect(Tree tree) { super(tree); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TreeDropTargetEffect.java index 0658f5158b..13e5f9e449 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TreeDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TreeDropTargetEffect.java @@ -15,6 +15,38 @@ import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert, scroll and expand) + * when a drag occurs over a <code>Tree</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Tree</code> + * can extend the <code>TreeDropTargetEffect</code> class and override any applicable methods + * in <code>TreeDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE, FEEDBACK_INSERT_AFTER, FEEDBACK_EXPAND, FEEDBACK_SCROLL</dd> + * </dl> + * </p><p> + * Note: Only one of the styles FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE or + * FEEDBACK_INSERT_AFTER may be specified. + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TreeDropTargetEffect extends DropTargetEffect { static final int SCROLL_HYSTERESIS = 150; // milli seconds static final int EXPAND_HYSTERESIS = 1000; // milli seconds diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/Clipboard.java index 30081e44ed..527874f2f2 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/Clipboard.java @@ -323,7 +323,7 @@ public boolean isDisposed () { * * <p>NOTE: On some platforms, the data is immediately copied to the system * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -361,7 +361,7 @@ public boolean isDisposed () { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> */ public void setContents(Object[] data, Transfer[] dataTypes) { setContents(data, dataTypes, DND.CLIPBOARD); @@ -375,7 +375,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * * <p>NOTE: On some platforms, the data is immediately copied to the specified * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -419,7 +419,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see DND#CLIPBOARD * @see DND#SELECTION_CLIPBOARD diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/DragSource.java index 1d90cb303e..3824c317d0 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/DragSource.java @@ -121,7 +121,7 @@ public class DragSource extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DRAG should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DragSource#checkSubclass @@ -233,7 +233,7 @@ public Control getControl () { /** * Returns the drag effect that is registered for this DragSource. This drag - * effect will be used during a drag and drop event to display the drag source image. + * effect will be used during a drag and drop operation. * * @return the drag effect that is registered for this DragSource * @@ -291,7 +291,7 @@ public void removeDragListener(DragSourceListener listener) { /** * Specifies the drag effect for this DragSource. This drag effect will be - * used during a drag and drop to display the drag source image. + * used during a drag and drop operation. * * @param effect the drag effect that is registered for this DragSource * diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/DropTarget.java index 3f4be69397..830faaf08c 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/DropTarget.java @@ -98,7 +98,7 @@ public class DropTarget extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DROP should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DropTarget#checkSubclass @@ -207,11 +207,11 @@ public Control getControl () { } /** - * Specifies the drop effect for this DropTarget. This drop effect will be + * Returns the drop effect for this DropTarget. This drop effect will be * used during a drag and drop to display the drag under effect on the * target widget. * - * @param effect the drop effect that is registered for this DropTarget + * @return the drop effect that is registered for this DropTarget * * @since 3.3 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TableDragSourceEffect.java index e2402bf730..416864d6f5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TableDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TableDragSourceEffect.java @@ -17,14 +17,14 @@ import org.eclipse.swt.widgets.*; * when a drag is initiated from a <code>Table</code>. * * <p>Classes that wish to provide their own source image for a <code>Table</code> can - * extend the <code>DragSourceAdapter</code> class, override the - * <code>DragSourceAdapter.dragStart</code> method and set the field + * extend the <code>TableDragSourceEffect</code> class, override the + * <code>TableDragSourceEffect.dragStart</code> method and set the field * <code>DragSourceEvent.image</code> with their own image.</p> * * Subclasses that override any methods of this class must call the corresponding * <code>super</code> method to get the default drag source effect implementation. * - * @see DragSourceAdapter + * @see DragSourceEffect * @see DragSourceEvent * * @since 3.3 @@ -35,7 +35,7 @@ public class TableDragSourceEffect extends DragSourceEffect { * from the specified <code>Table</code>. * * @param table the <code>Table</code> that the user clicks on to initiate the drag - **/ + */ public TableDragSourceEffect(Table table) { super(table); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TableDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TableDropTargetEffect.java index ecc2b83bc2..ab075d16b3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TableDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TableDropTargetEffect.java @@ -12,6 +12,35 @@ package org.eclipse.swt.dnd; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert and scroll) + * when a drag occurs over a <code>Table</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Table</code> + * can extend the <code>TableDropTargetEffect</code> and override any applicable methods + * in <code>TableDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_SCROLL</dd> + * </dl> + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TableDropTargetEffect extends DropTargetEffect { /** * Creates a new <code>TableDropTargetEffect</code> to handle the drag under effect on the specified diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/Transfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/Transfer.java index f7ab645e6a..5ec6000b43 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/Transfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/Transfer.java @@ -49,19 +49,19 @@ abstract public TransferData[] getSupportedTypes(); abstract public boolean isSupportedType(TransferData transferData); /** - * Returns the platform specfic names of the data types that can be converted + * Returns the platform specific names of the data types that can be converted * using this transfer agent. * - * @return the platform specfic names of the data types that can be converted + * @return the platform specific names of the data types that can be converted * using this transfer agent. */ abstract protected String[] getTypeNames(); /** - * Returns the platform specfic ids of the data types that can be converted using + * Returns the platform specific ids of the data types that can be converted using * this transfer agent. * - * @return the platform specfic ids of the data types that can be converted using + * @return the platform specific ids of the data types that can be converted using * this transfer agent */ abstract protected int[] getTypeIds(); @@ -88,7 +88,7 @@ abstract protected int[] getTypeIds(); * </ul></p> * * @param object a java representation of the data to be converted; the type of - * Object that is passed in is dependant on the <code>Transfer</code> subclass. + * Object that is passed in is dependent on the <code>Transfer</code> subclass. * * @param transferData an empty TransferData object; this object will be * filled in on return with the platform specific representation of the data @@ -108,7 +108,7 @@ abstract protected void javaToNative (Object object, TransferData transferData); * @return a java representation of the converted data if the conversion was * successful; otherwise null. If transferData is <code>null</code> then * <code>null</code> is returned. The type of Object that is returned is - * dependant on the <code>Transfer</code> subclass. + * dependent on the <code>Transfer</code> subclass. */ abstract protected Object nativeToJava(TransferData transferData); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TreeDragSourceEffect.java index d78790cbeb..97cd46f444 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TreeDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TreeDragSourceEffect.java @@ -16,14 +16,14 @@ import org.eclipse.swt.widgets.*; * This class provides default implementations to display a source image * when a drag is initiated from a <code>Tree</code>. * - * <p>Classes that wish to provide their own source image for a <code>Table</code> can - * extend <code>DragSourceAdapter</code> class and override the <code>DragSourceAdapter.dragStart</code> + * <p>Classes that wish to provide their own source image for a <code>Tree</code> can + * extend <code>TreeDragSourceEffect</code> class and override the <code>TreeDragSourceEffect.dragStart</code> * method and set the field <code>DragSourceEvent.image</code> with their own image.</p> * * Subclasses that override any methods of this class must call the corresponding * <code>super</code> method to get the default drag under effect implementation. * - * @see DragSourceAdapter + * @see DragSourceEffect * @see DragSourceEvent * * @since 3.3 @@ -33,8 +33,8 @@ public class TreeDragSourceEffect extends DragSourceEffect { * Creates a new <code>TreeDragSourceEffect</code> to handle drag effect * from the specified <code>Tree</code>. * - * @param table the <code>Tree</code> that the user clicks on to initiate the drag - **/ + * @param tree the <code>Tree</code> that the user clicks on to initiate the drag + */ public TreeDragSourceEffect(Tree tree) { super(tree); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TreeDropTargetEffect.java index 65a7009170..71536f846c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TreeDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TreeDropTargetEffect.java @@ -12,6 +12,38 @@ package org.eclipse.swt.dnd; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert, scroll and expand) + * when a drag occurs over a <code>Tree</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Tree</code> + * can extend the <code>TreeDropTargetEffect</code> class and override any applicable methods + * in <code>TreeDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE, FEEDBACK_INSERT_AFTER, FEEDBACK_EXPAND, FEEDBACK_SCROLL</dd> + * </dl> + * </p><p> + * Note: Only one of the styles FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE or + * FEEDBACK_INSERT_AFTER may be specified. + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TreeDropTargetEffect extends DropTargetEffect { /** * Creates a new <code>TreeDropTargetEffect</code> to handle the drag under effect on the specified diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/Clipboard.java index af1a7ff6d4..6eacb66081 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/Clipboard.java @@ -409,7 +409,7 @@ public boolean isDisposed () { * * <p>NOTE: On some platforms, the data is immediately copied to the system * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -447,7 +447,7 @@ public boolean isDisposed () { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> */ public void setContents(Object[] data, Transfer[] dataTypes) { setContents(data, dataTypes, DND.CLIPBOARD); @@ -461,7 +461,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * * <p>NOTE: On some platforms, the data is immediately copied to the specified * clipboard but on other platforms it is provided upon request. As a result, - * if the application modifes the data object it has set on the clipboard, that + * if the application modifies the data object it has set on the clipboard, that * modification may or may not be available when the data is subsequently * requested.</p> * @@ -505,7 +505,7 @@ public void setContents(Object[] data, Transfer[] dataTypes) { * </ul> * * <p>NOTE: ERROR_CANNOT_SET_CLIPBOARD should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see DND#CLIPBOARD * @see DND#SELECTION_CLIPBOARD diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/DragSource.java index d11dd27c22..85e25f398f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/DragSource.java @@ -128,7 +128,7 @@ public class DragSource extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DRAG should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DragSource#checkSubclass @@ -285,7 +285,7 @@ public Control getControl () { /** * Returns the drag effect that is registered for this DragSource. This drag - * effect will be used during a drag and drop event to display the drag source image. + * effect will be used during a drag and drop operation. * * @return the drag effect that is registered for this DragSource * @@ -379,7 +379,7 @@ public void removeDragListener(DragSourceListener listener) { /** * Specifies the drag effect for this DragSource. This drag effect will be - * used during a drag and drop to display the drag source image. + * used during a drag and drop operation. * * @param effect the drag effect that is registered for this DragSource * diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/DropTarget.java index 6d9b723e51..4177398668 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/DropTarget.java @@ -116,7 +116,7 @@ public class DropTarget extends Widget { * </ul> * * <p>NOTE: ERROR_CANNOT_INIT_DROP should be an SWTException, since it is a - * recoverable error, but can not be changed due to backward compatability.</p> + * recoverable error, but can not be changed due to backward compatibility.</p> * * @see Widget#dispose * @see DropTarget#checkSubclass @@ -441,11 +441,11 @@ int getData(int pDataObject, int type) { } /** - * Specifies the drop effect for this DropTarget. This drop effect will be + * Returns the drop effect for this DropTarget. This drop effect will be * used during a drag and drop to display the drag under effect on the * target widget. * - * @param effect the drop effect that is registered for this DropTarget + * @return the drop effect that is registered for this DropTarget * * @since 3.3 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TableDragSourceEffect.java index e2402bf730..416864d6f5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TableDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TableDragSourceEffect.java @@ -17,14 +17,14 @@ import org.eclipse.swt.widgets.*; * when a drag is initiated from a <code>Table</code>. * * <p>Classes that wish to provide their own source image for a <code>Table</code> can - * extend the <code>DragSourceAdapter</code> class, override the - * <code>DragSourceAdapter.dragStart</code> method and set the field + * extend the <code>TableDragSourceEffect</code> class, override the + * <code>TableDragSourceEffect.dragStart</code> method and set the field * <code>DragSourceEvent.image</code> with their own image.</p> * * Subclasses that override any methods of this class must call the corresponding * <code>super</code> method to get the default drag source effect implementation. * - * @see DragSourceAdapter + * @see DragSourceEffect * @see DragSourceEvent * * @since 3.3 @@ -35,7 +35,7 @@ public class TableDragSourceEffect extends DragSourceEffect { * from the specified <code>Table</code>. * * @param table the <code>Table</code> that the user clicks on to initiate the drag - **/ + */ public TableDragSourceEffect(Table table) { super(table); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TableDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TableDropTargetEffect.java index ecc2b83bc2..ab075d16b3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TableDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TableDropTargetEffect.java @@ -12,6 +12,35 @@ package org.eclipse.swt.dnd; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert and scroll) + * when a drag occurs over a <code>Table</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Table</code> + * can extend the <code>TableDropTargetEffect</code> and override any applicable methods + * in <code>TableDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_SCROLL</dd> + * </dl> + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TableDropTargetEffect extends DropTargetEffect { /** * Creates a new <code>TableDropTargetEffect</code> to handle the drag under effect on the specified diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/Transfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/Transfer.java index 7d03a0e129..51613c0ff2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/Transfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/Transfer.java @@ -72,19 +72,19 @@ abstract public TransferData[] getSupportedTypes(); abstract public boolean isSupportedType(TransferData transferData); /** - * Returns the platform specfic names of the data types that can be converted + * Returns the platform specific names of the data types that can be converted * using this transfer agent. * - * @return the platform specfic names of the data types that can be converted + * @return the platform specific names of the data types that can be converted * using this transfer agent. */ abstract protected String[] getTypeNames(); /** - * Returns the platform specfic ids of the data types that can be converted using + * Returns the platform specific ids of the data types that can be converted using * this transfer agent. * - * @return the platform specfic ids of the data types that can be converted using + * @return the platform specific ids of the data types that can be converted using * this transfer agent */ abstract protected int[] getTypeIds(); @@ -111,7 +111,7 @@ abstract protected int[] getTypeIds(); * </ul></p> * * @param object a java representation of the data to be converted; the type of - * Object that is passed in is dependant on the <code>Transfer</code> subclass. + * Object that is passed in is dependent on the <code>Transfer</code> subclass. * * @param transferData an empty TransferData object; this object will be * filled in on return with the platform specific representation of the data @@ -131,7 +131,7 @@ abstract protected void javaToNative (Object object, TransferData transferData); * @return a java representation of the converted data if the conversion was * successful; otherwise null. If transferData is <code>null</code> then * <code>null</code> is returned. The type of Object that is returned is - * dependant on the <code>Transfer</code> subclass. + * dependent on the <code>Transfer</code> subclass. */ abstract protected Object nativeToJava(TransferData transferData); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TreeDragSourceEffect.java index d78790cbeb..97cd46f444 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TreeDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TreeDragSourceEffect.java @@ -16,14 +16,14 @@ import org.eclipse.swt.widgets.*; * This class provides default implementations to display a source image * when a drag is initiated from a <code>Tree</code>. * - * <p>Classes that wish to provide their own source image for a <code>Table</code> can - * extend <code>DragSourceAdapter</code> class and override the <code>DragSourceAdapter.dragStart</code> + * <p>Classes that wish to provide their own source image for a <code>Tree</code> can + * extend <code>TreeDragSourceEffect</code> class and override the <code>TreeDragSourceEffect.dragStart</code> * method and set the field <code>DragSourceEvent.image</code> with their own image.</p> * * Subclasses that override any methods of this class must call the corresponding * <code>super</code> method to get the default drag under effect implementation. * - * @see DragSourceAdapter + * @see DragSourceEffect * @see DragSourceEvent * * @since 3.3 @@ -33,8 +33,8 @@ public class TreeDragSourceEffect extends DragSourceEffect { * Creates a new <code>TreeDragSourceEffect</code> to handle drag effect * from the specified <code>Tree</code>. * - * @param table the <code>Tree</code> that the user clicks on to initiate the drag - **/ + * @param tree the <code>Tree</code> that the user clicks on to initiate the drag + */ public TreeDragSourceEffect(Tree tree) { super(tree); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TreeDropTargetEffect.java index 65a7009170..71536f846c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TreeDropTargetEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TreeDropTargetEffect.java @@ -12,6 +12,38 @@ package org.eclipse.swt.dnd; import org.eclipse.swt.widgets.*; +/** + * This class provides a default drag under effect (eg. select, insert, scroll and expand) + * when a drag occurs over a <code>Tree</code>. + * + * <p>Classes that wish to provide their own drag under effect for a <code>Tree</code> + * can extend the <code>TreeDropTargetEffect</code> class and override any applicable methods + * in <code>TreeDropTargetEffect</code> to display their own drag under effect.</p> + * + * Subclasses that override any methods of this class must call the corresponding + * <code>super</code> method to get the default drag under effect implementation. + * + * <p>The feedback value is either one of the FEEDBACK constants defined in + * class <code>DND</code> which is applicable to instances of this class, + * or it must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>DND</code> effect constants. + * </p> + * <p> + * <dl> + * <dt><b>Feedback:</b></dt> + * <dd>FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE, FEEDBACK_INSERT_AFTER, FEEDBACK_EXPAND, FEEDBACK_SCROLL</dd> + * </dl> + * </p><p> + * Note: Only one of the styles FEEDBACK_SELECT, FEEDBACK_INSERT_BEFORE or + * FEEDBACK_INSERT_AFTER may be specified. + * </p> + * + * @see DropTargetAdapter + * @see DropTargetEvent + * + * @since 3.3 + */ public class TreeDropTargetEffect extends DropTargetEffect { /** * Creates a new <code>TreeDropTargetEffect</code> to handle the drag under effect on the specified diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/carbon/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/carbon/org/eclipse/swt/opengl/GLCanvas.java index dc2f53b065..b7751894ae 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/carbon/org/eclipse/swt/opengl/GLCanvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/carbon/org/eclipse/swt/opengl/GLCanvas.java @@ -19,8 +19,6 @@ import org.eclipse.swt.internal.opengl.carbon.*; /** * GLCanvas is a widget capable of displaying OpenGL content. * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * * @since 3.2 */ @@ -42,10 +40,6 @@ public class GLCanvas extends Canvas { * <ul><li>ERROR_NULL_ARGUMENT when the data is null * <li>ERROR_UNSUPPORTED_DEPTH when the requested attributes cannot be provided</ul> * </ul> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public GLCanvas (Composite parent, int style, GLData data) { super (parent, style); @@ -175,10 +169,6 @@ void fixBounds () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public GLData getGLData () { checkWidget (); @@ -225,10 +215,6 @@ public GLData getGLData () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public boolean isCurrent () { checkWidget (); @@ -243,10 +229,6 @@ public boolean isCurrent () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public void setCurrent () { checkWidget (); @@ -262,10 +244,6 @@ public void setCurrent () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public void swapBuffers () { checkWidget (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/emulated/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/emulated/org/eclipse/swt/opengl/GLCanvas.java index ac3d5e8cf9..c837bdea53 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/emulated/org/eclipse/swt/opengl/GLCanvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/emulated/org/eclipse/swt/opengl/GLCanvas.java @@ -16,8 +16,6 @@ import org.eclipse.swt.widgets.*; /** * GLCanvas is a widget capable of displaying OpenGL content. * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * * @since 3.2 */ @@ -35,10 +33,6 @@ public class GLCanvas extends Canvas { * <ul><li>ERROR_NULL_ARGUMENT when the data is null * <li>ERROR_UNSUPPORTED_DEPTH when the requested attributes cannot be provided</ul> * </ul> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public GLCanvas (Composite parent, int style, GLData data) { super (parent, style); @@ -53,10 +47,6 @@ public GLCanvas (Composite parent, int style, GLData data) { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public GLData getGLData () { checkWidget (); @@ -74,10 +64,6 @@ public GLData getGLData () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public boolean isCurrent () { checkWidget (); @@ -93,10 +79,6 @@ public boolean isCurrent () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public void setCurrent () { checkWidget (); @@ -110,10 +92,6 @@ public void setCurrent () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public void swapBuffers () { checkWidget (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java index ef4a36a86b..2d610f4af9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java @@ -19,8 +19,6 @@ import org.eclipse.swt.internal.opengl.glx.*; /** * GLCanvas is a widget capable of displaying OpenGL content. * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * * @since 3.2 */ @@ -43,10 +41,6 @@ public class GLCanvas extends Canvas { * <ul><li>ERROR_NULL_ARGUMENT when the data is null * <li>ERROR_UNSUPPORTED_DEPTH when the requested attributes cannot be provided</ul> * </ul> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public GLCanvas (Composite parent, int style, GLData data) { super (parent, style); @@ -189,10 +183,6 @@ public GLCanvas (Composite parent, int style, GLData data) { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public GLData getGLData () { checkWidget (); @@ -241,10 +231,6 @@ public GLData getGLData () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public boolean isCurrent () { checkWidget (); @@ -259,10 +245,6 @@ public boolean isCurrent () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public void setCurrent () { checkWidget (); @@ -279,10 +261,6 @@ public void setCurrent () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public void swapBuffers () { checkWidget (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/motif/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/motif/org/eclipse/swt/opengl/GLCanvas.java index 00d8eeb36b..836ff2ee3a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/motif/org/eclipse/swt/opengl/GLCanvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/motif/org/eclipse/swt/opengl/GLCanvas.java @@ -19,8 +19,6 @@ import org.eclipse.swt.internal.opengl.glx.*; /** * GLCanvas is a widget capable of displaying OpenGL content. * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * * @since 3.2 */ @@ -43,10 +41,6 @@ public class GLCanvas extends Canvas { * <ul><li>ERROR_NULL_ARGUMENT when the data is null * <li>ERROR_UNSUPPORTED_DEPTH when the requested attributes cannot be provided</ul> * </ul> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public GLCanvas (Composite parent, int style, GLData data) { super (parent, style); @@ -199,10 +193,6 @@ public GLCanvas (Composite parent, int style, GLData data) { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public GLData getGLData () { checkWidget (); @@ -250,10 +240,6 @@ public GLData getGLData () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public boolean isCurrent () { checkWidget (); @@ -268,10 +254,6 @@ public boolean isCurrent () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public void setCurrent () { checkWidget (); @@ -287,10 +269,6 @@ public void setCurrent () { * <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> - * - * WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE - * - * @since 3.2 */ public void swapBuffers () { checkWidget (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java index 83a2ebe7d6..758c279fdf 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java @@ -223,8 +223,8 @@ public void setScope(int scope) { * Returns the start page setting that the user selected * before pressing OK in the dialog. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @return the start page setting that the user selected @@ -237,8 +237,8 @@ public int getStartPage() { * Sets the start page that the user will see when the dialog * is opened. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @param startPage the startPage setting when the dialog is opened @@ -251,8 +251,8 @@ public void setStartPage(int startPage) { * Returns the end page setting that the user selected * before pressing OK in the dialog. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @return the end page setting that the user selected @@ -265,8 +265,8 @@ public int getEndPage() { * Sets the end page that the user will see when the dialog * is opened. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @param endPage the end page setting when the dialog is opened diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/Printer.java index f1a370fcbb..795d8f24ce 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/Printer.java @@ -202,10 +202,11 @@ public Printer(PrinterData data) { * (that is, not covered by the "trimmings") would be the * rectangle described by the arguments (relative to the * receiver's parent). - * </p> + * </p><p> * Note that there is no setBounds for a printer. This method * is usually used by passing in the client area (the 'printable * area') of the printer. It can also be useful to pass in 0, 0, 0, 0. + * </p> * * @param x the desired x coordinate of the client area * @param y the desired y coordinate of the client area @@ -526,7 +527,7 @@ public Point getDPI() { /** * Returns a rectangle describing the receiver's size and location. - * For a printer, this is the size of a page, in pixels. + * For a printer, this is the size of a physical page, in pixels. * * @return the bounding rectangle * diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java index bacce111cf..5e2ffc65ef 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java @@ -136,8 +136,8 @@ public void setScope(int scope) { * Returns the start page setting that the user selected * before pressing OK in the dialog. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @return the start page setting that the user selected @@ -150,8 +150,8 @@ public int getStartPage() { * Sets the start page that the user will see when the dialog * is opened. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @param startPage the startPage setting when the dialog is opened @@ -164,8 +164,8 @@ public void setStartPage(int startPage) { * Returns the end page setting that the user selected * before pressing OK in the dialog. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @return the end page setting that the user selected @@ -178,8 +178,8 @@ public int getEndPage() { * Sets the end page that the user will see when the dialog * is opened. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @param endPage the end page setting when the dialog is opened diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java index 9482850483..5c6a6e1cb7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java @@ -355,28 +355,10 @@ public void internal_dispose_GC(int /*long*/ gdkGC, GCData data) { } } -/** - * Releases any internal resources back to the operating - * system and clears all fields except the device handle. - * <p> - * When a device is destroyed, resources that were acquired - * on behalf of the programmer need to be returned to the - * operating system. For example, if the device allocated a - * font to be used as the system font, this font would be - * freed in <code>release</code>. Also,to assist the garbage - * collector and minimize the amount of memory that is not - * reclaimed when the programmer keeps a reference to a - * disposed device, all fields except the handle are zero'd. - * The handle is needed by <code>destroy</code>. - * </p> - * This method is called before <code>destroy</code>. - * </p><p> - * If subclasses reimplement this method, they must - * call the <code>super</code> implementation. - * </p> - * - * @see #dispose - * @see #destroy +/** + * Releases any internal state prior to destroying this printer. + * This method is called internally by the dispose + * mechanism of the <code>Device</code> class. */ protected void release () { super.release(); @@ -394,10 +376,6 @@ protected void release () { * followed by any number of startPage/endPage calls, followed by * endJob. Calling startPage, endPage, or endJob before startJob * will result in undefined behavior. - * </p><p> - * Also, this must be called before creating any GCs on the printer. - * Calling new GC(printer) before startJob will result in undefined - * behavior. * </p> * * @param jobName the name of the print job to start @@ -431,19 +409,10 @@ public boolean startJob(String jobName) { return true; } -/** - * Destroys the device in the operating system and releases - * the device's handle. If the device does not have a handle, - * this method may do nothing depending on the device. - * <p> - * This method is called after <code>release</code>. - * </p><p> - * Subclasses are supposed to reimplement this method and not - * call the <code>super</code> implementation. - * </p> - * - * @see #dispose - * @see #release +/** + * Destroys the printer handle. + * This method is called internally by the dispose + * mechanism of the <code>Device</code> class. */ protected void destroy () { if (printer != 0) OS.g_object_unref (printer); @@ -561,7 +530,7 @@ public Point getDPI() { /** * Returns a rectangle describing the receiver's size and location. - * For a printer, this is the size of a page, in pixels. + * For a printer, this is the size of a physical page, in pixels. * * @return the bounding rectangle * @@ -615,10 +584,11 @@ public Rectangle getClientArea() { * (that is, not covered by the "trimmings") would be the * rectangle described by the arguments (relative to the * receiver's parent). - * </p> + * </p><p> * Note that there is no setBounds for a printer. This method * is usually used by passing in the client area (the 'printable * area') of the printer. It can also be useful to pass in 0, 0, 0, 0. + * </p> * * @param x the desired x coordinate of the client area * @param y the desired y coordinate of the client area diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/PrintDialog.java index 9aaa6eb752..1dc9ebae67 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/PrintDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/PrintDialog.java @@ -137,8 +137,8 @@ public void setScope(int scope) { * Returns the start page setting that the user selected * before pressing OK in the dialog. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @return the start page setting that the user selected @@ -150,8 +150,8 @@ public int getStartPage() { * Sets the start page that the user will see when the dialog * is opened. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @param startPage the startPage setting when the dialog is opened @@ -163,8 +163,8 @@ public void setStartPage(int startPage) { * Returns the end page setting that the user selected * before pressing OK in the dialog. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @return the end page setting that the user selected @@ -176,8 +176,8 @@ public int getEndPage() { * Sets the end page that the user will see when the dialog * is opened. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @param endPage the end page setting when the dialog is opened diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/Printer.java index 1c4a781bfe..073984e4cd 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/Printer.java @@ -557,7 +557,7 @@ public Point getDPI() { /** * Returns a rectangle describing the receiver's size and location. - * For a printer, this is the size of a page, in pixels. + * For a printer, this is the size of a physical page, in pixels. * * @return the bounding rectangle * @@ -611,10 +611,11 @@ public Rectangle getClientArea() { * (that is, not covered by the "trimmings") would be the * rectangle described by the arguments (relative to the * receiver's parent). - * </p> + * </p><p> * Note that there is no setBounds for a printer. This method * is usually used by passing in the client area (the 'printable * area') of the printer. It can also be useful to pass in 0, 0, 0, 0. + * </p> * * @param x the desired x coordinate of the client area * @param y the desired y coordinate of the client area diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java index 9aaa6eb752..1dc9ebae67 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java @@ -137,8 +137,8 @@ public void setScope(int scope) { * Returns the start page setting that the user selected * before pressing OK in the dialog. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @return the start page setting that the user selected @@ -150,8 +150,8 @@ public int getStartPage() { * Sets the start page that the user will see when the dialog * is opened. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @param startPage the startPage setting when the dialog is opened @@ -163,8 +163,8 @@ public void setStartPage(int startPage) { * Returns the end page setting that the user selected * before pressing OK in the dialog. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @return the end page setting that the user selected @@ -176,8 +176,8 @@ public int getEndPage() { * Sets the end page that the user will see when the dialog * is opened. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @param endPage the end page setting when the dialog is opened diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/Printer.java index 91e3b6d73f..04c8612ba0 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/Printer.java @@ -236,7 +236,7 @@ public Point getDPI() { /** * Returns a rectangle describing the receiver's size and location. - * For a printer, this is the size of a page, in pixels. + * For a printer, this is the size of a physical page, in pixels. * * @return the bounding rectangle * @@ -282,10 +282,11 @@ public Rectangle getClientArea() { * (that is, not covered by the "trimmings") would be the * rectangle described by the arguments (relative to the * receiver's parent). - * </p> + * </p><p> * Note that there is no setBounds for a printer. This method * is usually used by passing in the client area (the 'printable * area') of the printer. It can also be useful to pass in 0, 0, 0, 0. + * </p> * * @param x the desired x coordinate of the client area * @param y the desired y coordinate of the client area diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/PrintDialog.java index f8c48ec56f..743ee70008 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/PrintDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/PrintDialog.java @@ -137,8 +137,8 @@ public void setScope(int scope) { * Returns the start page setting that the user selected * before pressing OK in the dialog. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @return the start page setting that the user selected @@ -150,8 +150,8 @@ public int getStartPage() { * Sets the start page that the user will see when the dialog * is opened. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @param startPage the startPage setting when the dialog is opened @@ -163,8 +163,8 @@ public void setStartPage(int startPage) { * Returns the end page setting that the user selected * before pressing OK in the dialog. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @return the end page setting that the user selected @@ -176,8 +176,8 @@ public int getEndPage() { * Sets the end page that the user will see when the dialog * is opened. * <p> - * Note that this value is one based and only valid if the scope is - * <code>PAGE_RANGE</code>. + * This value can be from 1 to the maximum number of pages for the platform. + * Note that it is only valid if the scope is <code>PAGE_RANGE</code>. * </p> * * @param endPage the end page setting when the dialog is opened diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/Printer.java index 977a5656d0..db82d8ee96 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/Printer.java @@ -236,7 +236,7 @@ public Point getDPI() { /** * Returns a rectangle describing the receiver's size and location. - * For a printer, this is the size of a page, in pixels. + * For a printer, this is the size of a physical page, in pixels. * * @return the bounding rectangle * @@ -282,10 +282,11 @@ public Rectangle getClientArea() { * (that is, not covered by the "trimmings") would be the * rectangle described by the arguments (relative to the * receiver's parent). - * </p> + * </p><p> * Note that there is no setBounds for a printer. This method * is usually used by passing in the client area (the 'printable * area') of the printer. It can also be useful to pass in 0, 0, 0, 0. + * </p> * * @param x the desired x coordinate of the client area * @param y the desired y coordinate of the client area diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java index 449a23c1f3..24622ed0bc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java @@ -24,6 +24,10 @@ import org.eclipse.swt.internal.cairo.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -45,14 +49,22 @@ public class Path extends Resource { /** * Constructs a new empty Path. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the path * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained</li> * </ul> * * @see #dispose() diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java index 831f03a6e3..9875237949 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java @@ -21,6 +21,10 @@ import org.eclipse.swt.internal.cairo.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -41,6 +45,11 @@ public class Pattern extends Resource { /** * Constructs a new Pattern given an image. Drawing with the resulting * pattern will cause the image to be tiled over the resulting area. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param image the image that the pattern will draw @@ -49,8 +58,11 @@ public class Pattern extends Resource { * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device, or the image is null</li> * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() @@ -73,6 +85,11 @@ public Pattern(Device device, Image image) { * Constructs a new Pattern that represents a linear, two color * gradient. Drawing with the pattern will cause the resulting area to be * tiled with the gradient specified by the arguments. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param x1 the x coordinate of the starting corner of the gradient @@ -87,8 +104,11 @@ public Pattern(Device device, Image image) { * or if either color1 or color2 is null</li> * <li>ERROR_INVALID_ARGUMENT - if either color1 or color2 has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() @@ -100,6 +120,11 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo * Constructs a new Pattern that represents a linear, two color * gradient. Drawing with the pattern will cause the resulting area to be * tiled with the gradient specified by the arguments. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param x1 the x coordinate of the starting corner of the gradient @@ -116,8 +141,11 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo * or if either color1 or color2 is null</li> * <li>ERROR_INVALID_ARGUMENT - if either color1 or color2 has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java index 1012b4ffaf..8a367bc910 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java @@ -22,6 +22,10 @@ import org.eclipse.swt.internal.cairo.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -40,14 +44,22 @@ public class Transform extends Resource { /** * Constructs a new identity Transform. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -59,6 +71,11 @@ public Transform (Device device) { /** * Constructs a new Transform given an array of elements that represent the * matrix that describes the transformation. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * @param elements an array of floats that describe the transformation matrix @@ -67,8 +84,11 @@ public Transform (Device device) { * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device, or the elements array is null</li> * <li>ERROR_INVALID_ARGUMENT - if the elements array is too small to hold the matrix values</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -80,6 +100,11 @@ public Transform(Device device, float[] elements) { /** * Constructs a new Transform given all of the elements that represent the * matrix that describes the transformation. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * @param m11 the first element of the first row of the matrix @@ -92,8 +117,11 @@ public Transform(Device device, float[] elements) { * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -160,7 +188,7 @@ public void getElements(float[] elements) { * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> - * <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertable</li> + * <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertible</li> * </ul> */ public void invert() { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java index 654bb2273e..39ac3d756a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java @@ -624,6 +624,22 @@ public boolean isDisposed () { return disposed; } +/** + * Loads the font specified by a file. The font will be + * present in the list of fonts available to the application. + * + * @param path the font file path + * @return whether the font was successfully loaded + * + * @exception SWTException <ul> + * <li>ERROR_NULL_ARGUMENT - if path is null</li> + * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see Font + * + * @since 3.3 + */ public boolean loadFont (String path) { checkDevice(); if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java index e0da5d3ab0..8cdcd89645 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java @@ -92,7 +92,7 @@ public final class FontData { String lang, country, variant; /** - * Constructs a new un-initialized font data. + * Constructs a new uninitialized font data. */ public FontData () { this("", 12, SWT.NORMAL); @@ -222,7 +222,7 @@ public boolean equals (Object object) { * * @return the height of this FontData * - * @see #setHeight + * @see #setHeight(int) */ public int getHeight() { return (int)height; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java index f42d211901..18be591589 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java @@ -89,8 +89,8 @@ GC() { /** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the - * foreground and background color in the GC to match those - * in the drawable. + * foreground color, background color and font in the GC + * to match those in the drawable. * <p> * You must dispose the graphics context when it is no longer required. * </p> @@ -114,8 +114,8 @@ public GC(Drawable drawable) { /** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the - * foreground and background color in the GC to match those - * in the drawable. + * foreground color, background color and font in the GC + * to match those in the drawable. * <p> * You must dispose the graphics context when it is no longer required. * </p> @@ -992,7 +992,12 @@ public void drawOval(int x, int y, int width, int height) { /** * Draws the path described by the parameter. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param path the path to draw * * @exception IllegalArgumentException <ul> @@ -1001,6 +1006,7 @@ public void drawOval(int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path @@ -1366,7 +1372,7 @@ public void drawText(String string, int x, int y, boolean isTransparent) { * @param string the string to be drawn * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn - * @param flags the flags specifing how to process the text + * @param flags the flags specifying how to process the text * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> @@ -1618,6 +1624,11 @@ public void fillOval(int x, int y, int width, int height) { /** * Fills the path described by the parameter. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param path the path to fill * @@ -1627,6 +1638,7 @@ public void fillOval(int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path @@ -1897,6 +1909,7 @@ public Pattern getBackgroundPattern() { * </ul> * * @see #setAdvanced + * * @since 3.1 */ public boolean getAdvanced() { @@ -2235,6 +2248,17 @@ public int getInterpolation() { return SWT.DEFAULT; } +/** + * Returns the receiver's line attributes. + * + * @return the line attributes used for drawing lines + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @since 3.3 + */ public LineAttributes getLineAttributes() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); float[] dashes = null; @@ -2267,7 +2291,7 @@ public int getLineCap() { * Returns the receiver's line dash style. The default value is * <code>null</code>. * - * @return the lin dash style used for drawing lines + * @return the line dash style used for drawing lines * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> @@ -2514,8 +2538,7 @@ boolean isIdentity(float[] transform) { * advanced and normal graphics operations. Because the two subsystems are * different, their output may differ. Switching to advanced graphics before * any graphics operations are performed ensures that the output is consistent. - * </p> - * <p> + * </p><p> * Advanced graphics may not be installed for the operating system. In this * case, this operation does nothing. Some operating system have only one * graphics subsystem, so switching from normal to advanced graphics does @@ -2535,6 +2558,7 @@ boolean isIdentity(float[] transform) { * @see #setBackgroundPattern * @see #setClipping(Path) * @see #setForegroundPattern + * @see #setLineAttributes * @see #setInterpolation * @see #setTextAntialias * @see #setTransform @@ -2558,13 +2582,21 @@ public void setAdvanced(boolean advanced) { /** * Sets the receiver's alpha value. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param alpha the alpha value * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.1 */ public void setAlpha(int alpha) { @@ -2578,6 +2610,11 @@ public void setAlpha(int alpha) { * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing for all * <em>non-text drawing</em> operations. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param antialias the anti-aliasing setting * @@ -2587,8 +2624,11 @@ public void setAlpha(int alpha) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced * @see #setTextAntialias * * @since 3.1 @@ -2638,7 +2678,12 @@ public void setBackground(Color color) { /** * Sets the background pattern. The default value is <code>null</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param pattern the new background pattern * * @exception IllegalArgumentException <ul> @@ -2646,9 +2691,12 @@ public void setBackground(Color color) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2714,8 +2762,13 @@ public void setClipping(int x, int y, int width, int height) { /** * Sets the area of the receiver which can be changed * by drawing operations to the path specified - * by the argument. - * + * by the argument. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param path the clipping path. * * @exception IllegalArgumentException <ul> @@ -2723,9 +2776,12 @@ public void setClipping(int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2934,7 +2990,11 @@ public void setForeground(Color color) { /** * Sets the foreground pattern. The default value is <code>null</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param pattern the new foreground pattern * * @exception IllegalArgumentException <ul> @@ -2942,9 +3002,12 @@ public void setForeground(Color color) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2962,7 +3025,12 @@ public void setForegroundPattern(Pattern pattern) { * Sets the receiver's interpolation setting to the parameter, which * must be one of <code>SWT.DEFAULT</code>, <code>SWT.NONE</code>, * <code>SWT.LOW</code> or <code>SWT.HIGH</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param interpolation the new interpolation setting * * @exception IllegalArgumentException <ul> @@ -2971,8 +3039,12 @@ public void setForegroundPattern(Pattern pattern) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.1 */ public void setInterpolation(int interpolation) { @@ -2989,6 +3061,30 @@ public void setInterpolation(int interpolation) { OS.CGContextSetInterpolationQuality(handle, quality); } +/** + * Sets the receiver's line attributes. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * @param attributes the line attributes + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the attributes is null</li> + * <li>ERROR_INVALID_ARGUMENT - if any of the line attributes is not valid</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> + * + * @see LineAttributes + * @see #getAdvanced + * @see #setAdvanced + * + * @since 3.3 + */ public void setLineAttributes(LineAttributes attributes) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); @@ -3346,7 +3442,12 @@ public void setXORMode(boolean xor) { * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing only * for all <em>text drawing</em> operations. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param antialias the anti-aliasing setting * * @exception IllegalArgumentException <ul> @@ -3355,8 +3456,11 @@ public void setXORMode(boolean xor) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced * @see #setAntialias * * @since 3.1 @@ -3374,11 +3478,16 @@ public void setTextAntialias(int antialias) { data.textAntialias = antialias; } -/** +/** * Sets the transform that is currently being used by the receiver. If * the argument is <code>null</code>, the current transform is set to * the identity transform. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param transform the transform to set * * @exception IllegalArgumentException <ul> @@ -3386,9 +3495,12 @@ public void setTextAntialias(int antialias) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Transform + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -3486,7 +3598,7 @@ public Point textExtent(String string) { * </p> * * @param string the string to measure - * @param flags the flags specifing how to process the text + * @param flags the flags specifying how to process the text * @return a point containing the extent of the string * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java index 841c433997..d105bf436d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java @@ -24,6 +24,10 @@ import org.eclipse.swt.internal.carbon.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -45,14 +49,22 @@ public class Path extends Resource { /** * Constructs a new empty Path. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the path * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained</li> * </ul> * * @see #dispose() diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java index f47a6b8ec1..70aafdc98a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java @@ -21,6 +21,10 @@ import org.eclipse.swt.internal.carbon.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -36,6 +40,11 @@ public class Pattern extends Resource { /** * Constructs a new Pattern given an image. Drawing with the resulting * pattern will cause the image to be tiled over the resulting area. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param image the image that the pattern will draw @@ -44,8 +53,11 @@ public class Pattern extends Resource { * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device, or the image is null</li> * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() @@ -67,6 +79,11 @@ public Pattern(Device device, Image image) { * Constructs a new Pattern that represents a linear, two color * gradient. Drawing with the pattern will cause the resulting area to be * tiled with the gradient specified by the arguments. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param x1 the x coordinate of the starting corner of the gradient @@ -81,8 +98,11 @@ public Pattern(Device device, Image image) { * or if either color1 or color2 is null</li> * <li>ERROR_INVALID_ARGUMENT - if either color1 or color2 has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() @@ -94,6 +114,11 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo * Constructs a new Pattern that represents a linear, two color * gradient. Drawing with the pattern will cause the resulting area to be * tiled with the gradient specified by the arguments. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param x1 the x coordinate of the starting corner of the gradient @@ -110,8 +135,11 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo * or if either color1 or color2 is null</li> * <li>ERROR_INVALID_ARGUMENT - if either color1 or color2 has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java index 04b23f8d1b..a625be299c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java @@ -431,6 +431,33 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo draw(gc, x, y, selectionStart, selectionEnd, selectionForeground, selectionBackground, 0); } +/** + * Draws the receiver's text using the specified GC at the specified + * point. + * <p> + * The parameter <code>flags</code> can include one of <code>SWT.DELIMITER_SELECTION</code> + * or <code>SWT.FULL_SELECTION</code> to specify the selection behavior on all lines except + * for the last line, and can also include <code>SWT.LAST_LINE_SELECTION</code> to extend + * the specified selection behavior to the last line. + * </p> + * @param gc the GC to draw + * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn + * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn + * @param selectionStart the offset where the selections starts, or -1 indicating no selection + * @param selectionEnd the offset where the selections ends, or -1 indicating no selection + * @param selectionForeground selection foreground, or NULL to use the system default color + * @param selectionBackground selection background, or NULL to use the system default color + * @param flags drawing options + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the gc is null</li> + * </ul> + * + * @since 3.3 + */ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout (); computeRuns(); @@ -779,7 +806,7 @@ public boolean getJustify () { * embedding level is usually used to determine the directionality of a * character in bidirectional text. * - * @param offset the charecter offset + * @param offset the character offset * @return the embedding level * * @exception IllegalArgumentException <ul> @@ -974,7 +1001,8 @@ public Point getLocation(int offset, boolean trailing) { /** * Returns the next offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code>, <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type @@ -1154,7 +1182,8 @@ public int getOrientation() { /** * Returns the previous offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java index e7bdc56b4d..d224d159cd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java @@ -22,6 +22,10 @@ import org.eclipse.swt.internal.carbon.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -40,14 +44,22 @@ public class Transform extends Resource { /** * Constructs a new identity Transform. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -59,6 +71,11 @@ public Transform (Device device) { /** * Constructs a new Transform given an array of elements that represent the * matrix that describes the transformation. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * @param elements an array of floats that describe the transformation matrix @@ -67,8 +84,11 @@ public Transform (Device device) { * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device, or the elements array is null</li> * <li>ERROR_INVALID_ARGUMENT - if the elements array is too small to hold the matrix values</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -80,6 +100,11 @@ public Transform(Device device, float[] elements) { /** * Constructs a new Transform given all of the elements that represent the * matrix that describes the transformation. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * @param m11 the first element of the first row of the matrix @@ -92,8 +117,11 @@ public Transform(Device device, float[] elements) { * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -154,7 +182,7 @@ public void getElements(float[] elements) { * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> - * <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertable</li> + * <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertible</li> * </ul> */ public void invert() { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java index cd1e4a111a..98f0a5d6a1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java @@ -92,11 +92,11 @@ public Button (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control is selected. + * <code>widgetSelected</code> is called when the control is selected by the user. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -437,7 +437,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -570,7 +570,12 @@ void setDefault (boolean value) { /** * Sets the receiver's image to the argument, which may be * <code>null</code> indicating that no image should be displayed. - * + * <p> + * Note that a Button can display an image and text simultaneously + * on Windows (starting with XP), GTK+ and OSX. On other platforms, + * a Button that has an image and text set into it will display the + * image or text that was set most recently. + * </p> * @param image the image to display on the receiver (may be <code>null</code>) * * @exception IllegalArgumentException <ul> @@ -667,12 +672,16 @@ public void setSelection (boolean selected) { * character to be the mnemonic. When the user presses a * key sequence that matches the mnemonic, a selection * event occurs. On most platforms, the mnemonic appears - * underlined but may be emphasised in a platform specific + * underlined but may be emphasized in a platform specific * manner. The mnemonic indicator character '&' can be * escaped by doubling it in the string, causing a single * '&' to be displayed. + * </p><p> + * Note that a Button can display an image and text simultaneously + * on Windows (starting with XP), GTK+ and OSX. On other platforms, + * a Button that has an image and text set into it will display the + * image or text that was set most recently. * </p> - * * @param string the new text * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java index 15c460252a..f3e9ca1b1e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java @@ -45,7 +45,7 @@ import org.eclipse.swt.internal.carbon.Rect; * <dt><b>Styles:</b></dt> * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd> * <dt><b>Events:</b></dt> - * <dd>DefaultSelection, Modify, Selection</dd> + * <dd>DefaultSelection, Modify, Selection, Verify</dd> * </dl> * <p> * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified. @@ -213,11 +213,11 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the combo's list selection changes. + * <code>widgetSelected</code> is called when the user changes the combo's list selection. * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed the combo's text area. * </p> * @@ -1237,7 +1237,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * @@ -1396,9 +1396,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize } /** * Sets the text of the item in the receiver's list at the given - * zero-relative index to the string argument. This is equivalent - * to removing the old item at the index, and then adding the new - * item at that index. + * zero-relative index to the string argument. * * @param index the index for the item * @param string the new text for the item diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java index 40d2654542..d45a235729 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java @@ -645,7 +645,13 @@ boolean isTabGroup () { * <p> * This is equivalent to calling <code>layout(true)</code>. * </p> - * + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -671,7 +677,14 @@ public void layout () { * will cascade down through all child widgets in the receiver's widget * tree until a child is encountered that does not resize. Note that * a layout due to a resize will not flush any cached information - * (same as <code>layout(false)</code>).</p> + * (same as <code>layout(false)</code>). + * </p> + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise * @@ -702,7 +715,14 @@ public void layout (boolean changed) { * tree. However, if a child is resized as a result of a call to layout, the * resize event will invoke the layout of the child. Note that * a layout due to a resize will not flush any cached information - * (same as <code>layout(false)</code>).</p> + * (same as <code>layout(false)</code>). + * </p> + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise * @param all <code>true</code> if all children in the receiver's widget tree should be laid out, and <code>false</code> otherwise @@ -729,6 +749,12 @@ public void layout (boolean changed, boolean all) { * (potentially) optimize the work it is doing by assuming that none of the * peers of the changed control have changed state since the last layout. * If an ancestor does not have a layout, skip it. + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed a control that has had a state change which requires a recalculation of its size * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java index f34ab996e1..5ef046bc13 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java @@ -34,9 +34,8 @@ import org.eclipse.swt.accessibility.Accessible; * <dd>BORDER</dd> * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd> * <dt><b>Events:</b> - * <dd>FocusIn, FocusOut, Help, KeyDown, KeyUp, MouseDoubleClick, MouseDown, MouseEnter, - * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse, - * DragDetect, MenuDetect</dd> + * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter, + * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd> * </dl> * </p><p> * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified. @@ -144,6 +143,27 @@ public void addControlListener(ControlListener listener) { addListener (SWT.Move,typedListener); } +/** + * Adds the listener to the collection of listeners who will + * be notified when a drag gesture occurs, by sending it + * one of the messages defined in the <code>DragDetectListener</code> + * interface. + * + * @param listener the listener which should be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #removeDragDetectListener + * + * @since 3.3 + */ public void addDragDetectListener (DragDetectListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -209,7 +229,18 @@ public void addHelpListener (HelpListener listener) { * be notified when keys are pressed and released on the system keyboard, by sending * it one of the messages defined in the <code>KeyListener</code> * interface. - * + * <p> + * When a key listener is added to a control, the control + * will take part in widget traversal. By default, all + * traversal keys (such as the tab key and so on) are + * delivered to the control. In order for a control to take + * part in traversal, it should listen for traversal events. + * Otherwise, the user can traverse into a control but not + * out. Note that native controls such as table and tree + * implement key traversal in the operating system. It is + * not necessary to add traversal listeners for these controls, + * unless you want to override the default traversal. + * </p> * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> @@ -630,12 +661,84 @@ void destroyWidget () { } } +/** + * Detects a drag and drop gesture. This method is used + * to detect a drag gesture when called from within a mouse + * down listener. + * + * <p>By default, a drag is detected when the gesture + * occurs anywhere within the client area of a control. + * Some controls, such as tables and trees, override this + * behavior. In addition to the operating system specific + * drag gesture, they require the mouse to be inside an + * item. Custom widget writers can use <code>setDragDetect</code> + * to disable the default detection, listen for mouse down, + * and then call <code>dragDetect()</code> from within the + * listener to conditionally detect a drag. + * </p> + * + * @param event the mouse down event + * + * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT when the event is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @see #getDragDetect + * @see #setDragDetect + * + * @since 3.3 + */ public boolean dragDetect (Event event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); return dragDetect (event.button, event.count, event.stateMask, event.x, event.y); } +/** + * Detects a drag and drop gesture. This method is used + * to detect a drag gesture when called from within a mouse + * down listener. + * + * <p>By default, a drag is detected when the gesture + * occurs anywhere within the client area of a control. + * Some controls, such as tables and trees, override this + * behavior. In addition to the operating system specific + * drag gesture, they require the mouse to be inside an + * item. Custom widget writers can use <code>setDragDetect</code> + * to disable the default detection, listen for mouse down, + * and then call <code>dragDetect()</code> from within the + * listener to conditionally detect a drag. + * </p> + * + * @param event the mouse down event + * + * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT when the event is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @see #getDragDetect + * @see #setDragDetect + * + * @since 3.3 + */ public boolean dragDetect (MouseEvent event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -977,6 +1080,19 @@ public Rectangle getBounds () { return getControlBounds (topHandle ()); } +/** + * Returns <code>true</code> if the receiver is detecting + * drag gestures, and <code>false</code> otherwise. + * + * @return the receiver's drag detect state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public boolean getDragDetect () { checkWidget (); return (state & DRAG_DETECT) != 0; @@ -987,6 +1103,20 @@ int getDrawCount (int control) { return parent.getDrawCount (control); } +/** + * Returns the receiver's cursor, or null if it has not been set. + * <p> + * When the mouse pointer passes over a control its appearance + * is changed to match the control's cursor. + * </p> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Cursor getCursor () { checkWidget(); return cursor; @@ -2080,12 +2210,13 @@ public void pack (boolean changed) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #update + * @see #update() * @see PaintListener * @see SWT#Paint * @see SWT#NO_BACKGROUND * @see SWT#NO_REDRAW_RESIZE * @see SWT#NO_MERGE_PAINTS + * @see SWT#DOUBLE_BUFFERED */ public void redraw () { checkWidget(); @@ -2119,12 +2250,13 @@ void redraw (boolean children) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #update + * @see #update() * @see PaintListener * @see SWT#Paint * @see SWT#NO_BACKGROUND * @see SWT#NO_REDRAW_RESIZE * @see SWT#NO_MERGE_PAINTS + * @see SWT#DOUBLE_BUFFERED */ public void redraw (int x, int y, int width, int height, boolean all) { checkWidget (); @@ -2186,6 +2318,25 @@ public void removeControlListener (ControlListener listener) { eventTable.unhook (SWT.Resize, listener); } +/** + * Removes the listener from the collection of listeners who will + * be notified when a drag gesture occurs. + * + * @param listener the listener which should no longer be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @since 3.3 + */ public void removeDragDetectListener(DragDetectListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -2671,7 +2822,10 @@ void setBackground () { * Sets the receiver's background color to the color specified * by the argument, or to the default system color for the control * if the argument is null. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + * </p> * @param color the new color (or null) * * @exception IllegalArgumentException <ul> @@ -2699,7 +2853,10 @@ public void setBackground (Color color) { * by the argument, or to the default system color for the control * if the argument is null. The background image is tiled to fill * the available space. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + * </p> * @param image the new image (or null) * * @exception IllegalArgumentException <ul> @@ -2898,6 +3055,20 @@ void setDefaultFont () { if (display.smallFonts) setFontStyle (defaultFont ()); } +/** + * Sets the receiver's drag detect state. If the argument is + * <code>true</code>, the receiver will detect drag gestures, + * otherwise these gestures will be ignored. + * + * @param dragDetect the new drag detect state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public void setDragDetect (boolean dragDetect) { checkWidget (); if (dragDetect) { @@ -3008,7 +3179,9 @@ void setFontStyle (int control, Font font) { * Sets the receiver's foreground color to the color specified * by the argument, or to the default system color for the control * if the argument is null. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * </p> * @param color the new color (or null) * * @exception IllegalArgumentException <ul> @@ -3202,7 +3375,7 @@ public boolean setParent (Composite parent) { * </ul> * * @see #redraw(int, int, int, int, boolean) - * @see #update + * @see #update() */ public void setRedraw (boolean redraw) { checkWidget(); @@ -3727,13 +3900,19 @@ boolean traverseMnemonic (Event event) { /** * Forces all outstanding paint requests for the widget - * to be processed before this method returns. + * to be processed before this method returns. If there + * are no outstanding paint request, this method does + * nothing. + * <p> + * Note: This method does not cause a redraw. + * </p> * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * + * @see #redraw() * @see #redraw(int, int, int, int, boolean) * @see PaintListener * @see SWT#Paint diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java index ad7d118d2e..2a68c18b14 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java @@ -20,6 +20,29 @@ import org.eclipse.swt.internal.carbon.LongDateRec; import org.eclipse.swt.internal.carbon.OS; import org.eclipse.swt.internal.carbon.Rect; +/** + * Instances of this class are selectable user interface + * objects that allow the user to enter and modify date + * or time values. + * <p> + * Note that although this class is a subclass of <code>Composite</code>, + * it does not make sense to add children to it, or set a layout on it. + * </p> + * <dl> + * <dt><b>Styles:</b></dt> + * <dd>DATE, TIME, CALENDAR, SHORT, MEDIUM, LONG</dd> + * <dt><b>Events:</b></dt> + * <dd>Selection</dd> + * </dl> + * <p> + * Note: Only one of the styles DATE, TIME, or CALENDAR may be specified, + * and only one of the styles SHORT, MEDIUM, or LONG may be specified. + * </p><p> + * IMPORTANT: This class is <em>not</em> intended to be subclassed. + * </p> + * + * @since 3.3 + */ public class DateTime extends Composite { LongDateRec dateRec; @@ -34,6 +57,36 @@ public class DateTime extends Composite { static final int MARGIN_WIDTH = 2; static final int MARGIN_HEIGHT = 1; +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + * <p> + * The style value is either one of the style constants defined in + * class <code>SWT</code> which is applicable to instances of this + * class, or must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>SWT</code> style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + * </p> + * + * @param parent a composite control which will be the parent of the new instance (cannot be null) + * @param style the style of control to construct + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> + * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> + * </ul> + * + * @see SWT#DATE + * @see SWT#TIME + * @see SWT#CALENDAR + * @see Widget#checkSubclass + * @see Widget#getStyle + */ public DateTime (Composite parent, int style) { super (parent, checkStyle (style) | ((style & SWT.CALENDAR) != 0 ? SWT.NO_REDRAW_RESIZE : 0)); if ((this.style & SWT.CALENDAR) != 0) { @@ -94,6 +147,30 @@ protected void checkSubclass () { if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS); } +/** + * Adds the listener to the collection of listeners who will + * be notified when the control is selected by the user, by sending + * it one of the messages defined in the <code>SelectionListener</code> + * interface. + * <p> + * <code>widgetSelected</code> is called when the user changes the control's value. + * <code>widgetDefaultSelected</code> is not called. + * </p> + * + * @param listener the listener which should be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see SelectionListener + * @see #removeSelectionListener + * @see SelectionEvent + */ public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -344,6 +421,19 @@ public Color getForeground() { return fg; } +/** + * Returns the receiver's date, or day of the month. + * <p> + * The first day of the month is 1, and the last day depends on the month and year. + * </p> + * + * @return a positive integer beginning with 1 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getDay () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -353,6 +443,19 @@ public int getDay () { return dateRec.day; } +/** + * Returns the receiver's hours. + * <p> + * Hours is an integer between 0 and 23. + * </p> + * + * @return an integer between 0 and 23 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getHours () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -362,6 +465,19 @@ public int getHours () { return dateRec.hour; } +/** + * Returns the receiver's minutes. + * <p> + * Minutes is an integer between 0 and 59. + * </p> + * + * @return an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getMinutes () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -371,6 +487,19 @@ public int getMinutes () { return dateRec.minute; } +/** + * Returns the receiver's month. + * <p> + * The first month of the year is 0, and the last month is 11. + * </p> + * + * @return an integer between 0 and 11 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getMonth () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -380,6 +509,19 @@ public int getMonth () { return dateRec.month - 1; } +/** + * Returns the receiver's seconds. + * <p> + * Seconds is an integer between 0 and 59. + * </p> + * + * @return an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getSeconds () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -389,6 +531,19 @@ public int getSeconds () { return dateRec.second; } +/** + * Returns the receiver's year. + * <p> + * The first year is 1752 and the last year is 9999. + * </p> + * + * @return an integer between 1752 and 9999 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getYear () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -448,6 +603,23 @@ void releaseWidget () { dateRec = null; } +/** + * Removes the listener from the collection of listeners who will + * be notified when the control is selected by the user. + * + * @param listener the listener which should no longer be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see SelectionListener + * @see #addSelectionListener + */ public void removeSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -493,6 +665,19 @@ void setDay(int newDay, boolean notify) { if (notify) notifyListeners(SWT.Selection, new Event()); } +/** + * Sets the receiver's date, or day of the month, to the specified day. + * <p> + * The first day of the month is 1, and the last day depends on the month and year. + * </p> + * + * @param day a positive integer beginning with 1 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setDay (int day) { checkWidget (); if (!isValid(Calendar.DAY_OF_MONTH, day)) return; @@ -506,6 +691,19 @@ public void setDay (int day) { } } +/** + * Sets the receiver's hours. + * <p> + * Hours is an integer between 0 and 23. + * </p> + * + * @param hours an integer between 0 and 23 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setHours (int hours) { checkWidget (); if (!isValid(Calendar.HOUR_OF_DAY, hours)) return; @@ -519,6 +717,19 @@ public void setHours (int hours) { redraw(); } +/** + * Sets the receiver's minutes. + * <p> + * Minutes is an integer between 0 and 59. + * </p> + * + * @param minutes an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setMinutes (int minutes) { checkWidget (); if (!isValid(Calendar.MINUTE, minutes)) return; @@ -532,6 +743,19 @@ public void setMinutes (int minutes) { redraw(); } +/** + * Sets the receiver's month. + * <p> + * The first month of the year is 0, and the last month is 11. + * </p> + * + * @param month an integer between 0 and 11 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setMonth (int month) { checkWidget (); if (!isValid(Calendar.MONTH, month)) return; @@ -545,6 +769,19 @@ public void setMonth (int month) { redraw(); } +/** + * Sets the receiver's seconds. + * <p> + * Seconds is an integer between 0 and 59. + * </p> + * + * @param seconds an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setSeconds (int seconds) { checkWidget (); if (!isValid(Calendar.SECOND, seconds)) return; @@ -558,6 +795,19 @@ public void setSeconds (int seconds) { redraw(); } +/** + * Sets the receiver's year. + * <p> + * The first year is 1752 and the last year is 9999. + * </p> + * + * @param year an integer between 1752 and 9999 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setYear (int year) { checkWidget (); //if (!isValid(Calendar.YEAR, year)) return; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java index 386b3bb407..8c8f745a19 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java @@ -219,7 +219,7 @@ void fixDecorations (Decorations newDecorations, Control control, Menu [] menus) * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #setDefaultButton + * @see #setDefaultButton(Button) */ public Button getDefaultButton () { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java index 2b938cbb2d..a4e9469b92 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java @@ -90,7 +90,7 @@ import org.eclipse.swt.graphics.*; * <dt><b>Styles:</b></dt> * <dd>(none)</dd> * <dt><b>Events:</b></dt> - * <dd>Close, Dispose</dd> + * <dd>Close, Dispose, Settings</dd> * </dl> * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -3781,7 +3781,7 @@ int sourceProc (int info) { * @param runnable code to run on the user-interface thread or <code>null</code> * * @exception SWTException <ul> - * <li>ERROR_FAILED_EXEC - if an exception occured when executing the runnable</li> + * <li>ERROR_FAILED_EXEC - if an exception occurred when executing the runnable</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java index cdff095ce8..7be5a9c06d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java @@ -81,11 +81,11 @@ public Link (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control is selected. + * <code>widgetSelected</code> is called when the control is selected by the user. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -349,7 +349,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java index 11493b812e..0d5a51c9bb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java @@ -153,7 +153,7 @@ public void add (String string, int index) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -161,7 +161,7 @@ public void add (String string, int index) { * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -878,7 +878,7 @@ public int indexOf (String string, int start) { * range are ignored. * * @param index the index of the item - * @return the visibility state of the item at the index + * @return the selection state of the item at the index * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1023,7 +1023,7 @@ public void removeAll () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * @@ -1218,9 +1218,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize /** * Sets the text of the item in the receiver's list at the given - * zero-relative index to the string argument. This is equivalent - * to <code>remove</code>'ing the old item at the index, and then - * <code>add</code>'ing the new item at that index. + * zero-relative index to the string argument. * * @param index the index for the item * @param string the new text for the item diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java index 194d074826..af4d175150 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java @@ -787,7 +787,7 @@ int kEventMenuTargetItem (int nextHandler, int theEvent, int userData) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java index 9426907a78..fdb90e3b4c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java @@ -173,7 +173,7 @@ public void addHelpListener (HelpListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the menu item is selected, by sending + * be notified when the menu item is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -181,7 +181,7 @@ public void addHelpListener (HelpListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the menu item is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -507,7 +507,7 @@ public void removeHelpListener (HelpListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java index 7584ed55c7..be007ba70d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java @@ -117,7 +117,7 @@ public String getMessage () { * of the display. * * @return the ID of the button that was selected to dismiss the - * message box (e.g. SWT.OK, SWT.CANCEL, etc...) + * message box (e.g. SWT.OK, SWT.CANCEL, etc.) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the dialog has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java index 4ca60daf41..1aa2554238 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java @@ -17,7 +17,7 @@ import org.eclipse.swt.internal.carbon.OS; import org.eclipse.swt.*; /** - * Instances of the receiver represent is an unselectable + * Instances of the receiver represent an unselectable * user interface object that is used to display progress, * typically in the form of a bar. * <dl> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java index 5d2873e6e0..718b6ece28 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java @@ -79,7 +79,7 @@ public Sash (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -88,7 +88,7 @@ public Sash (Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -250,7 +250,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java index 34d7224636..aed6a5757d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java @@ -81,11 +81,11 @@ int actionProc (int theControl, int partCode) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control's value changes. + * <code>widgetSelected</code> is called when the user changes the receiver's value. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -253,7 +253,7 @@ int kEventMouseDown (int nextHandler, int theEvent, int userData) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java index b0aa5ae759..025bc2c460 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java @@ -100,7 +100,7 @@ ScrollBar (Scrollable parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -116,7 +116,7 @@ ScrollBar (Scrollable parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -517,7 +517,7 @@ void redraw () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java index 70ae13c144..d6a784d7a4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java @@ -652,7 +652,7 @@ void fixShell (Shell newShell, Control control) { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ @@ -772,7 +772,7 @@ public Shell getShell () { /** * Returns an array containing all shells which are - * descendents of the receiver. + * descendants of the receiver. * <p> * @return the dialog shells * @@ -1140,7 +1140,7 @@ void resizeBounds () { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#setActive * @see Shell#forceActive */ @@ -1237,7 +1237,7 @@ public void removeShellListener(ShellListener listener) { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java index 2b242ac6bf..d286976373 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java @@ -105,7 +105,7 @@ public Slider (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -121,7 +121,7 @@ public Slider (Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -323,7 +323,7 @@ int kEventMouseDown (int nextHandler, int theEvent, int userData) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java index e2b54f95a0..0facf49c7b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java @@ -24,11 +24,14 @@ import org.eclipse.swt.graphics.*; * objects that allow the user to enter and modify numeric * values. * <p> + * Note that although this class is a subclass of <code>Composite</code>, + * it does not make sense to add children to it, or set a layout on it. + * </p><p> * <dl> * <dt><b>Styles:</b></dt> * <dd>READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> - * <dd>Selection, Modify</dd> + * <dd>Selection, Modify, Verify</dd> * </dl> * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -132,7 +135,7 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -140,7 +143,7 @@ public void addModifyListener (ModifyListener listener) { * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -647,7 +650,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java index 80910fc6a5..e6fa32b2e5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java @@ -82,7 +82,7 @@ public TabFolder (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -90,7 +90,7 @@ public TabFolder (Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -386,7 +386,7 @@ float getThemeAlpha () { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -503,7 +503,7 @@ void removeControl (Control control) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java index 6066c264d6..a372627478 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java @@ -125,18 +125,18 @@ public Table (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called, the item field of the event object is valid. - * If the receiver has <code>SWT.CHECK</code> style set and the check selection changes, + * If the receiver has the <code>SWT.CHECK</code> style and the check selection changes, * the event object detail field contains the value <code>SWT.CHECK</code>. * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * The item field of the event object is valid for default selection, but the detail field is not used. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -1934,7 +1934,7 @@ void hookEvents () { * @return the index of the column * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1960,7 +1960,7 @@ public int indexOf (TableColumn column) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1993,7 +1993,7 @@ public int indexOf (TableItem item) { * range are ignored. * * @param index the index of the item - * @return the visibility state of the item at the index + * @return the selection state of the item at the index * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -2397,7 +2397,7 @@ public void removeAll () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableColumn.java index 8be0425956..6a98ba81a5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableColumn.java @@ -147,7 +147,7 @@ public void addControlListener(ControlListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -155,7 +155,7 @@ public void addControlListener(ControlListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -381,7 +381,7 @@ public void removeControlListener (ControlListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java index b8663a2047..2b814b670a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java @@ -556,6 +556,22 @@ public String getText (int index) { return ""; } +/** + * Returns a rectangle describing the size and location + * relative to its parent of the text at a column in the + * table. An empty rectangle is returned if index exceeds + * the index of the table's last column. + * + * @param index the index that specifies the column + * @return the receiver's bounding text rectangle + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java index 916306256f..f0390369c1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java @@ -34,12 +34,13 @@ import org.eclipse.swt.graphics.*; * <p> * <dl> * <dt><b>Styles:</b></dt> - * <dd>CENTER, LEFT, MULTI, PASSWORD, SINGLE, RIGHT, READ_ONLY, WRAP</dd> + * <dd>CANCEL, CENTER, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> * <dd>DefaultSelection, Modify, Verify</dd> * </dl> * <p> - * Note: Only one of the styles MULTI and SINGLE may be specified. + * Note: Only one of the styles MULTI and SINGLE may be specified, + * and only one of the styles LEFT, CENTER, and RIGHT may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> @@ -155,15 +156,17 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * <code>widgetSelected</code> is not called for texts. - * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. + * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text, + * or when ENTER is pressed in a search text. If the receiver has the <code>SWT.SEARCH | SWT.CANCEL</code> style + * and the user cancels the search, the event object detail field contains the value <code>SWT.CANCEL</code>. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -891,6 +894,25 @@ public int getOrientation () { return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT); } +/** + * Returns the widget message. When the widget is created + * with the style <code>SWT.SEARCH</code>, the message text + * is displayed as a hint for the user, indicating the + * purpose of the field. + * <p> + * Note: This operation is a <em>HINT</em> and is not + * supported on platforms that do not have this concept. + * </p> + * + * @return the widget message + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public String getMessage () { checkWidget (); return message; @@ -1440,7 +1462,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -1813,6 +1835,28 @@ public void setOrientation (int orientation) { checkWidget(); } +/** + * Sets the widget message. When the widget is created + * with the style <code>SWT.SEARCH</code>, the message text + * is displayed as a hint for the user, indicating the + * purpose of the field. + * <p> + * Note: This operation is a <em>HINT</em> and is not + * supported on platforms that do not have this concept. + * </p> + * + * @param message the new message + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the message is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public void setMessage (String message) { checkWidget (); if (message == null) error (SWT.ERROR_NULL_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java index c2cfcfc439..68a737fee7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java @@ -169,7 +169,7 @@ int actionProc (int theControl, int partCode) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -178,7 +178,7 @@ int actionProc (int theControl, int partCode) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user, * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -848,7 +848,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -1010,7 +1010,7 @@ void setForeground (float [] color) { * Sets the receiver's disabled image to the argument, which may be * null indicating that no disabled image should be displayed. * <p> - * The disbled image is displayed when the receiver is disabled. + * The disabled image is displayed when the receiver is disabled. * </p> * * @param image the disabled image to display on the receiver (may be null) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java index 8cc905da97..984403102c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java @@ -28,6 +28,9 @@ import org.eclipse.swt.events.*; * <dd>Selection</dd> * </dl> * </p><p> + * Note: Only one of the styles ICON_ERROR, ICON_INFORMATION, + * and ICON_WARNING may be specified. + * </p><p> * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> @@ -97,11 +100,15 @@ static int checkStyle (int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the receiver is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. + * <p> + * <code>widgetSelected</code> is called when the receiver is selected. + * <code>widgetDefaultSelected</code> is not called. + * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the receiver is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -401,7 +408,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the receiver is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java index dfe08dca4d..41c41cb9bc 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java @@ -110,7 +110,7 @@ public void addMenuDetectListener (MenuDetectListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver is selected, by sending + * be notified when the receiver is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -118,7 +118,7 @@ public void addMenuDetectListener (MenuDetectListener listener) { * <code>widgetDefaultSelected</code> is called when the receiver is double-clicked * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the receiver is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -282,7 +282,7 @@ public void removeMenuDetectListener (MenuDetectListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver is selected. + * be notified when the receiver is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java index 85a0f94544..c2efe8ba9e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java @@ -255,18 +255,18 @@ TreeItem _getItem (TreeItem parentItem, int index) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called, the item field of the event object is valid. - * If the receiver has <code>SWT.CHECK</code> style set and the check selection changes, + * If the receiver has the <code>SWT.CHECK</code> style and the check selection changes, * the event object detail field contains the value <code>SWT.CHECK</code>. * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * The item field of the event object is valid for default selection, but the detail field is not used. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -1996,7 +1996,7 @@ void hookEvents () { * @return the index of the column * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -2025,8 +2025,8 @@ public int indexOf (TreeColumn column) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the tool item is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the tool item has been disposed</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -2496,7 +2496,7 @@ public void removeAll () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeColumn.java index 229538d610..5802a441be 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeColumn.java @@ -149,7 +149,7 @@ public void addControlListener(ControlListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -157,7 +157,7 @@ public void addControlListener(ControlListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -394,7 +394,7 @@ public void removeControlListener (ControlListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java index 2a50d0c7b1..bc014fec8f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java @@ -789,6 +789,21 @@ public String getText (int index) { return ""; } +/** + * Returns a rectangle describing the size and location + * relative to its parent of the text at a column in the + * tree. + * + * @param index the index that specifies the column + * @return the receiver's bounding text rectangle + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); @@ -840,8 +855,8 @@ public Rectangle getTextBounds (int index) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the tool item is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the tool item has been disposed</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java index 75055c0220..cb529d6c37 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java @@ -155,7 +155,7 @@ int actionProc (int theControl, int partCode) { * * @see Listener * @see SWT - * @see #removeListener + * @see #removeListener(int, Listener) * @see #notifyListeners */ public void addListener (int eventType, Listener listener) { @@ -630,13 +630,13 @@ int drawItemProc (int browser, int item, int property, int itemState, int theRec /** * Disposes of the operating system resources associated with - * the receiver and all its descendents. After this method has - * been invoked, the receiver and all descendents will answer + * the receiver and all its descendants. After this method has + * been invoked, the receiver and all descendants will answer * <code>true</code> when sent the message <code>isDisposed()</code>. * Any internal connections between the widgets in the tree will * have been removed to facilitate garbage collection. * <p> - * NOTE: This method is not called recursively on the descendents + * NOTE: This method is not called recursively on the descendants * of the receiver. This means that, widget implementers can not * detect when a widget is being disposed of by re-implementing * this method, but should instead listen for the <code>Dispose</code> @@ -1287,7 +1287,7 @@ int mouseProc (int nextHandler, int theEvent, int userData) { * * @see SWT * @see #addListener - * @see #removeListener + * @see #removeListener(int, Listener) */ public void notifyListeners (int eventType, Event event) { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolItem.java index a22672aa1e..2bf2138ef4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolItem.java @@ -125,7 +125,7 @@ public CoolItem (CoolBar parent, int style, int index) { } /** * Adds the listener to the collection of listeners that will - * be notified when the control is selected, by sending it one + * be notified when the control is selected by the user, by sending it one * of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -137,7 +137,7 @@ public CoolItem (CoolBar parent, int style, int index) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -399,7 +399,7 @@ void onSelection (Event ev) { } /** * Removes the listener from the collection of listeners that - * will be notified when the control is selected. + * will be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/datetime/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/datetime/org/eclipse/swt/widgets/DateTime.java index 2220d78212..80a6192c24 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/datetime/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/datetime/org/eclipse/swt/widgets/DateTime.java @@ -8,6 +8,29 @@ 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 date + * or time values. + * <p> + * Note that although this class is a subclass of <code>Composite</code>, + * it does not make sense to add children to it, or set a layout on it. + * </p> + * <dl> + * <dt><b>Styles:</b></dt> + * <dd>DATE, TIME, CALENDAR, SHORT, MEDIUM, LONG</dd> + * <dt><b>Events:</b></dt> + * <dd>Selection</dd> + * </dl> + * <p> + * Note: Only one of the styles DATE, TIME, or CALENDAR may be specified, + * and only one of the styles SHORT, MEDIUM, or LONG may be specified. + * </p><p> + * IMPORTANT: This class is <em>not</em> intended to be subclassed. + * </p> + * + * @since 3.3 + */ // TODO: locale is currently hard-coded to EN_US. This needs to be fixed. Use java.text.DateFormat? // TODO: add accessibility to calendar - note: win32 calendar is not accessible... test gtk @@ -40,6 +63,36 @@ public class DateTime extends Composite { static final int MIN_YEAR = 1752; // Gregorian switchover in North America: September 19, 1752 static final int MAX_YEAR = 9999; +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + * <p> + * The style value is either one of the style constants defined in + * class <code>SWT</code> which is applicable to instances of this + * class, or must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>SWT</code> style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + * </p> + * + * @param parent a composite control which will be the parent of the new instance (cannot be null) + * @param style the style of control to construct + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> + * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> + * </ul> + * + * @see SWT#DATE + * @see SWT#TIME + * @see SWT#CALENDAR + * @see Widget#checkSubclass + * @see Widget#getStyle + */ public DateTime(Composite parent, int style) { super(parent, checkStyle(style) | SWT.NO_REDRAW_RESIZE); calendar = Calendar.getInstance(); @@ -184,6 +237,30 @@ int getFieldIndex(int fieldName) { return -1; } +/** + * Adds the listener to the collection of listeners who will + * be notified when the control is selected by the user, by sending + * it one of the messages defined in the <code>SelectionListener</code> + * interface. + * <p> + * <code>widgetSelected</code> is called when the user changes the control's value. + * <code>widgetDefaultSelected</code> is not called. + * </p> + * + * @param listener the listener which should be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see SelectionListener + * @see #removeSelectionListener + * @see SelectionEvent + */ public void addSelectionListener(SelectionListener listener) { checkWidget (); if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); @@ -341,6 +418,19 @@ public Color getBackground() { return bg; } +/** + * Returns the receiver's date, or day of the month. + * <p> + * The first day of the month is 1, and the last day depends on the month and year. + * </p> + * + * @return a positive integer beginning with 1 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getDay() { checkWidget(); return calendar.get(Calendar.DAY_OF_MONTH); @@ -354,26 +444,91 @@ public Color getForeground() { return fg; } +/** + * Returns the receiver's hours. + * <p> + * Hours is an integer between 0 and 23. + * </p> + * + * @return an integer between 0 and 23 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getHours () { checkWidget (); return calendar.get(Calendar.HOUR_OF_DAY); } +/** + * Returns the receiver's minutes. + * <p> + * Minutes is an integer between 0 and 59. + * </p> + * + * @return an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getMinutes () { checkWidget (); return calendar.get(Calendar.MINUTE); } +/** + * Returns the receiver's month. + * <p> + * The first month of the year is 0, and the last month is 11. + * </p> + * + * @return an integer between 0 and 11 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getMonth() { checkWidget(); return calendar.get(Calendar.MONTH); } +/** + * Returns the receiver's seconds. + * <p> + * Seconds is an integer between 0 and 59. + * </p> + * + * @return an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getSeconds () { checkWidget (); return calendar.get(Calendar.SECOND); } +/** + * Returns the receiver's year. + * <p> + * The first year is 1752 and the last year is 9999. + * </p> + * + * @return an integer between 1752 and 9999 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getYear() { checkWidget(); return calendar.get(Calendar.YEAR); @@ -676,6 +831,23 @@ void setField(int fieldName, int value) { notifyListeners(SWT.Selection, new Event()); } +/** + * Removes the listener from the collection of listeners who will + * be notified when the control is selected by the user. + * + * @param listener the listener which should no longer be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see SelectionListener + * @see #addSelectionListener + */ public void removeSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); @@ -695,6 +867,19 @@ public void setBackground(Color color) { if (text != null) text.setBackground(color); } +/** + * Sets the receiver's date, or day of the month, to the specified day. + * <p> + * The first day of the month is 1, and the last day depends on the month and year. + * </p> + * + * @param day a positive integer beginning with 1 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setDay(int day) { checkWidget(); if (!isValid(Calendar.DAY_OF_MONTH, day)) return; @@ -766,6 +951,19 @@ void setFormat(String string) { } } +/** + * Sets the receiver's hours. + * <p> + * Hours is an integer between 0 and 23. + * </p> + * + * @param hours an integer between 0 and 23 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setHours (int hours) { checkWidget (); if (!isValid(Calendar.HOUR_OF_DAY, hours)) return; @@ -773,6 +971,19 @@ public void setHours (int hours) { updateControl(); } +/** + * Sets the receiver's minutes. + * <p> + * Minutes is an integer between 0 and 59. + * </p> + * + * @param minutes an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setMinutes (int minutes) { checkWidget (); if (!isValid(Calendar.MINUTE, minutes)) return; @@ -780,6 +991,19 @@ public void setMinutes (int minutes) { updateControl(); } +/** + * Sets the receiver's month. + * <p> + * The first month of the year is 0, and the last month is 11. + * </p> + * + * @param month an integer between 0 and 11 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setMonth(int month) { checkWidget(); if (!isValid(Calendar.MONTH, month)) return; @@ -787,6 +1011,19 @@ public void setMonth(int month) { updateControl(); } +/** + * Sets the receiver's seconds. + * <p> + * Seconds is an integer between 0 and 59. + * </p> + * + * @param seconds an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setSeconds (int seconds) { checkWidget (); if (!isValid(Calendar.SECOND, seconds)) return; @@ -794,6 +1031,19 @@ public void setSeconds (int seconds) { updateControl(); } +/** + * Sets the receiver's year. + * <p> + * The first year is 1752 and the last year is 9999. + * </p> + * + * @param year an integer between 1752 and 9999 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setYear(int year) { checkWidget(); //if (!isValid(Calendar.YEAR, year)) return; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Path.java index 7a9a24e823..bf2516e6c1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Path.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Path.java @@ -22,6 +22,10 @@ import org.eclipse.swt.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -41,14 +45,22 @@ public class Path extends Resource { /** * Constructs a new empty Path. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the path * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained</li> * </ul> * * @see #dispose() diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Pattern.java index 206a67c1cd..fa2798c606 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Pattern.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Pattern.java @@ -20,6 +20,10 @@ import org.eclipse.swt.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -40,6 +44,11 @@ public class Pattern extends Resource { /** * Constructs a new Pattern given an image. Drawing with the resulting * pattern will cause the image to be tiled over the resulting area. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param image the image that the pattern will draw @@ -48,8 +57,11 @@ public class Pattern extends Resource { * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device, or the image is null</li> * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() @@ -68,6 +80,11 @@ public Pattern(Device device, Image image) { * Constructs a new Pattern that represents a linear, two color * gradient. Drawing with the pattern will cause the resulting area to be * tiled with the gradient specified by the arguments. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param x1 the x coordinate of the starting corner of the gradient @@ -82,8 +99,11 @@ public Pattern(Device device, Image image) { * or if either color1 or color2 is null</li> * <li>ERROR_INVALID_ARGUMENT - if either color1 or color2 has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() @@ -96,6 +116,11 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo * Constructs a new Pattern that represents a linear, two color * gradient. Drawing with the pattern will cause the resulting area to be * tiled with the gradient specified by the arguments. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param x1 the x coordinate of the starting corner of the gradient @@ -112,8 +137,11 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo * or if either color1 or color2 is null</li> * <li>ERROR_INVALID_ARGUMENT - if either color1 or color2 has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Transform.java index e8c624a64d..3aeddf523f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Transform.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Transform.java @@ -20,6 +20,10 @@ import org.eclipse.swt.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -38,14 +42,22 @@ public class Transform extends Resource { /** * Constructs a new identity Transform. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -57,6 +69,11 @@ public Transform (Device device) { /** * Constructs a new Transform given an array of elements that represent the * matrix that describes the transformation. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * @param elements an array of floats that describe the transformation matrix @@ -65,8 +82,11 @@ public Transform (Device device) { * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device, or the elements array is null</li> * <li>ERROR_INVALID_ARGUMENT - if the elements array is too small to hold the matrix values</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -78,6 +98,11 @@ public Transform(Device device, float[] elements) { /** * Constructs a new Transform given all of the elements that represent the * matrix that describes the transformation. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * @param m11 the first element of the first row of the matrix @@ -90,8 +115,11 @@ public Transform(Device device, float[] elements) { * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -149,7 +177,7 @@ public void getElements(float[] elements) { * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> - * <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertable</li> + * <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertible</li> * </ul> */ public void invert() { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/tabfolder/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/tabfolder/org/eclipse/swt/widgets/TabFolder.java index 2002af1942..0a6921935b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/tabfolder/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/tabfolder/org/eclipse/swt/widgets/TabFolder.java @@ -102,7 +102,7 @@ public TabFolder(Composite parent, int style) { } /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -110,7 +110,7 @@ public TabFolder(Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -642,7 +642,7 @@ void handleEvents (Event event){ * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -985,7 +985,7 @@ void removeControl (Control control) { } /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java index 87b5ea122b..ff88ad2bb6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java @@ -304,6 +304,33 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col draw(gc, x, y, selectionStart, selectionEnd, selectionForeground, selectionBackground, 0); } +/** + * Draws the receiver's text using the specified GC at the specified + * point. + * <p> + * The parameter <code>flags</code> can include one of <code>SWT.DELIMITER_SELECTION</code> + * or <code>SWT.FULL_SELECTION</code> to specify the selection behavior on all lines except + * for the last line, and can also include <code>SWT.LAST_LINE_SELECTION</code> to extend + * the specified selection behavior to the last line. + * </p> + * @param gc the GC to draw + * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn + * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn + * @param selectionStart the offset where the selections starts, or -1 indicating no selection + * @param selectionEnd the offset where the selections ends, or -1 indicating no selection + * @param selectionForeground selection foreground, or NULL to use the system default color + * @param selectionBackground selection background, or NULL to use the system default color + * @param flags drawing options + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the gc is null</li> + * </ul> + * + * @since 3.3 + */ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout(); if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); @@ -598,7 +625,7 @@ public boolean getJustify () { * embedding level is usually used to determine the directionality of a * character in bidirectional text. * - * @param offset the charecter offset + * @param offset the character offset * @return the embedding level * * @exception IllegalArgumentException <ul> @@ -853,7 +880,8 @@ Font getItemFont(StyleItem item) { /** * Returns the next offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code>, <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type @@ -1022,7 +1050,8 @@ public int getOrientation () { /** * Returns the previous offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/tooltip/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/tooltip/org/eclipse/swt/widgets/ToolTip.java index 90702f093a..41ec74b2b1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/tooltip/org/eclipse/swt/widgets/ToolTip.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/tooltip/org/eclipse/swt/widgets/ToolTip.java @@ -26,6 +26,9 @@ import org.eclipse.swt.events.*; * <dd>Selection</dd> * </dl> * </p><p> + * Note: Only one of the styles ICON_ERROR, ICON_INFORMATION, + * and ICON_WARNING may be specified. + * </p><p> * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> @@ -111,11 +114,15 @@ static int checkStyle (int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the receiver is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. + * <p> + * <code>widgetSelected</code> is called when the receiver is selected. + * <code>widgetDefaultSelected</code> is not called. + * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the receiver is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -424,7 +431,7 @@ void onPaint (Event event) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the receiver is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/tray/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/tray/org/eclipse/swt/widgets/TrayItem.java index 6f69d401c7..04d1bd7475 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/tray/org/eclipse/swt/widgets/TrayItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/tray/org/eclipse/swt/widgets/TrayItem.java @@ -101,7 +101,7 @@ public void addMenuDetectListener (MenuDetectListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver is selected, by sending + * be notified when the receiver is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -109,7 +109,7 @@ public void addMenuDetectListener (MenuDetectListener listener) { * <code>widgetDefaultSelected</code> is called when the receiver is double-clicked * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the receiver is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -236,7 +236,7 @@ public void removeMenuDetectListener (MenuDetectListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver is selected. + * be notified when the receiver is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java index b229cea93c..1488277d13 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java @@ -205,18 +205,18 @@ public Table (Composite parent, int style) { } /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called, the item field of the event object is valid. - * If the receiver has <code>SWT.CHECK</code> style set and the check selection changes, + * If the receiver has the <code>SWT.CHECK</code> style and the check selection changes, * the event object detail field contains the value <code>SWT.CHECK</code>. * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * The item field of the event object is valid for default selection, but the detail field is not used. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -1624,7 +1624,7 @@ boolean headerUpdateToolTip (int x) { * @return the index of the column * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1647,7 +1647,7 @@ public int indexOf (TableColumn column) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1730,7 +1730,7 @@ static void initImages (final Display display) { * range are ignored. * * @param index the index of the item - * @return the visibility state of the item at the index + * @return the selection state of the item at the index * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -3040,7 +3040,7 @@ void removeSelectedItem (int index) { } /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableColumn.java index 0e039dd7a2..18be012b40 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableColumn.java @@ -139,7 +139,7 @@ public void addControlListener (ControlListener listener) { } /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -147,7 +147,7 @@ public void addControlListener (ControlListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -529,7 +529,7 @@ public void removeControlListener (ControlListener listener) { } /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableItem.java index ccb402a426..9b917f7b64 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableItem.java @@ -973,6 +973,22 @@ String getText (int columnIndex, boolean checkData) { if (texts [columnIndex] == null) return ""; //$NON-NLS-1$ return texts [columnIndex]; } +/** + * Returns a rectangle describing the size and location + * relative to its parent of the text at a column in the + * table. An empty rectangle is returned if index exceeds + * the index of the table's last column. + * + * @param index the index that specifies the column + * @return the receiver's bounding text rectangle + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Rectangle getTextBounds (int columnIndex) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java index 120acf9676..4ae8c98757 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java @@ -219,18 +219,18 @@ public Tree (Composite parent, int style) { } /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called, the item field of the event object is valid. - * If the receiver has <code>SWT.CHECK</code> style set and the check selection changes, + * If the receiver has the <code>SWT.CHECK</code> style and the check selection changes, * the event object detail field contains the value <code>SWT.CHECK</code>. * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * The item field of the event object is valid for default selection, but the detail field is not used. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -1655,7 +1655,7 @@ boolean headerUpdateToolTip (int x) { * @return the index of the column * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1680,8 +1680,8 @@ public int indexOf (TreeColumn column) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the tool item is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the tool item has been disposed</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -3241,7 +3241,7 @@ void removeSelectedItem (int index) { } /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeColumn.java index 6ff097fac6..e1b892c585 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeColumn.java @@ -141,7 +141,7 @@ public void addControlListener (ControlListener listener) { } /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -149,7 +149,7 @@ public void addControlListener (ControlListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -508,7 +508,7 @@ public void removeControlListener (ControlListener listener) { } /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java index 99639ff97f..5c49d8aeb4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java @@ -1514,6 +1514,21 @@ String getText (int columnIndex, boolean checkData) { if (texts [columnIndex] == null) return ""; //$NON-NLS-1$ return texts [columnIndex]; } +/** + * Returns a rectangle describing the size and location + * relative to its parent of the text at a column in the + * tree. + * + * @param index the index that specifies the column + * @return the receiver's bounding text rectangle + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Rectangle getTextBounds (int columnIndex) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); @@ -1591,8 +1606,8 @@ boolean hasAncestor (TreeItem item) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the tool item is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the tool item has been disposed</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java index 27ffa0f80c..255f728dea 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java @@ -668,6 +668,22 @@ public boolean isDisposed () { return disposed; } +/** + * Loads the font specified by a file. The font will be + * present in the list of fonts available to the application. + * + * @param path the font file path + * @return whether the font was successfully loaded + * + * @exception SWTException <ul> + * <li>ERROR_NULL_ARGUMENT - if path is null</li> + * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see Font + * + * @since 3.3 + */ public boolean loadFont (String path) { checkDevice(); if (path == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java index d51771c145..e833365a0a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java @@ -92,7 +92,7 @@ public final class FontData { String lang, country, variant; /** - * Constructs a new un-initialized font data. + * Constructs a new uninitialized font data. */ public FontData () { this("", 12, SWT.NORMAL); @@ -220,7 +220,7 @@ public boolean equals (Object object) { * * @return the height of this FontData * - * @see #setHeight + * @see #setHeight(int) */ public int getHeight() { return (int)(0.5f + height); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java index 071f6e60ac..9380d48bfa 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java @@ -89,8 +89,8 @@ GC() { /** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the - * foreground and background color in the GC to match those - * in the drawable. + * foreground color, background color and font in the GC + * to match those in the drawable. * <p> * You must dispose the graphics context when it is no longer required. * </p> @@ -114,8 +114,8 @@ public GC(Drawable drawable) { /** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the - * foreground and background color in the GC to match those - * in the drawable. + * foreground color, background color and font in the GC + * to match those in the drawable. * <p> * You must dispose the graphics context when it is no longer required. * </p> @@ -1161,7 +1161,12 @@ public void drawOval(int x, int y, int width, int height) { /** * Draws the path described by the parameter. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param path the path to draw * * @exception IllegalArgumentException <ul> @@ -1170,6 +1175,7 @@ public void drawOval(int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path @@ -1559,7 +1565,7 @@ public void drawText(String string, int x, int y, boolean isTransparent) { * @param string the string to be drawn * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn - * @param flags the flags specifing how to process the text + * @param flags the flags specifying how to process the text * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> @@ -1835,6 +1841,11 @@ public void fillOval(int x, int y, int width, int height) { /** * Fills the path described by the parameter. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param path the path to fill * @@ -1844,6 +1855,7 @@ public void fillOval(int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path @@ -2093,6 +2105,7 @@ public int getAdvanceWidth(char ch) { * </ul> * * @see #setAdvanced + * * @since 3.1 */ public boolean getAdvanced() { @@ -2454,6 +2467,17 @@ public int getInterpolation() { return data.interpolation; } +/** + * Returns the receiver's line attributes. + * + * @return the line attributes used for drawing lines + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @since 3.3 + */ public LineAttributes getLineAttributes() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); float[] dashes = null; @@ -2486,7 +2510,7 @@ public int getLineCap() { * Returns the receiver's line dash style. The default value is * <code>null</code>. * - * @return the lin dash style used for drawing lines + * @return the line dash style used for drawing lines * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> @@ -2792,8 +2816,7 @@ boolean isIdentity(double[] matrix) { * advanced and normal graphics operations. Because the two subsystems are * different, their output may differ. Switching to advanced graphics before * any graphics operations are performed ensures that the output is consistent. - * </p> - * <p> + * </p><p> * Advanced graphics may not be installed for the operating system. In this * case, this operation does nothing. Some operating system have only one * graphics subsystem, so switching from normal to advanced graphics does @@ -2813,6 +2836,7 @@ boolean isIdentity(double[] matrix) { * @see #setBackgroundPattern * @see #setClipping(Path) * @see #setForegroundPattern + * @see #setLineAttributes * @see #setInterpolation * @see #setTextAntialias * @see #setTransform @@ -2841,13 +2865,21 @@ public void setAdvanced(boolean advanced) { /** * Sets the receiver's alpha value. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param alpha the alpha value * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.1 */ public void setAlpha(int alpha) { @@ -2863,6 +2895,11 @@ public void setAlpha(int alpha) { * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing for all * <em>non-text drawing</em> operations. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param antialias the anti-aliasing setting * @@ -2872,8 +2909,11 @@ public void setAlpha(int alpha) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced * @see #setTextAntialias * * @since 3.1 @@ -2921,7 +2961,12 @@ public void setBackground(Color color) { /** * Sets the background pattern. The default value is <code>null</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param pattern the new background pattern * * @exception IllegalArgumentException <ul> @@ -2929,9 +2974,12 @@ public void setBackground(Color color) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -3068,8 +3116,13 @@ public void setClipping(int x, int y, int width, int height) { /** * Sets the area of the receiver which can be changed * by drawing operations to the path specified - * by the argument. - * + * by the argument. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param path the clipping path. * * @exception IllegalArgumentException <ul> @@ -3077,9 +3130,12 @@ public void setClipping(int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -3225,7 +3281,11 @@ public void setForeground(Color color) { /** * Sets the foreground pattern. The default value is <code>null</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param pattern the new foreground pattern * * @exception IllegalArgumentException <ul> @@ -3233,9 +3293,12 @@ public void setForeground(Color color) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -3253,7 +3316,12 @@ public void setForegroundPattern(Pattern pattern) { * Sets the receiver's interpolation setting to the parameter, which * must be one of <code>SWT.DEFAULT</code>, <code>SWT.NONE</code>, * <code>SWT.LOW</code> or <code>SWT.HIGH</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param interpolation the new interpolation setting * * @exception IllegalArgumentException <ul> @@ -3262,8 +3330,12 @@ public void setForegroundPattern(Pattern pattern) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.1 */ public void setInterpolation(int interpolation) { @@ -3282,6 +3354,30 @@ public void setInterpolation(int interpolation) { data.interpolation = interpolation; } +/** + * Sets the receiver's line attributes. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * @param attributes the line attributes + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the attributes is null</li> + * <li>ERROR_INVALID_ARGUMENT - if any of the line attributes is not valid</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> + * + * @see LineAttributes + * @see #getAdvanced + * @see #setAdvanced + * + * @since 3.3 + */ public void setLineAttributes(LineAttributes attributes) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); @@ -3585,7 +3681,12 @@ void setString(String string, int flags) { * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing only * for all <em>text drawing</em> operations. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param antialias the anti-aliasing setting * * @exception IllegalArgumentException <ul> @@ -3594,8 +3695,11 @@ void setString(String string, int flags) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced * @see #setAntialias * * @since 3.1 @@ -3624,11 +3728,16 @@ public void setTextAntialias(int antialias) { Cairo.cairo_font_options_destroy(options); } -/** +/** * Sets the transform that is currently being used by the receiver. If * the argument is <code>null</code>, the current transform is set to * the identity transform. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param transform the transform to set * * @exception IllegalArgumentException <ul> @@ -3636,9 +3745,12 @@ public void setTextAntialias(int antialias) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Transform + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -3750,7 +3862,7 @@ public Point textExtent(String string) { * </p> * * @param string the string to measure - * @param flags the flags specifing how to process the text + * @param flags the flags specifying how to process the text * @return a point containing the extent of the string * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java index 50d6475927..aaa54b2cfc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java @@ -302,6 +302,33 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo draw(gc, x, y, selectionStart, selectionEnd, selectionForeground, selectionBackground, 0); } +/** + * Draws the receiver's text using the specified GC at the specified + * point. + * <p> + * The parameter <code>flags</code> can include one of <code>SWT.DELIMITER_SELECTION</code> + * or <code>SWT.FULL_SELECTION</code> to specify the selection behavior on all lines except + * for the last line, and can also include <code>SWT.LAST_LINE_SELECTION</code> to extend + * the specified selection behavior to the last line. + * </p> + * @param gc the GC to draw + * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn + * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn + * @param selectionStart the offset where the selections starts, or -1 indicating no selection + * @param selectionEnd the offset where the selections ends, or -1 indicating no selection + * @param selectionForeground selection foreground, or NULL to use the system default color + * @param selectionBackground selection background, or NULL to use the system default color + * @param flags drawing options + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the gc is null</li> + * </ul> + * + * @since 3.3 + */ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout (); computeRuns(); @@ -662,7 +689,7 @@ public boolean getJustify () { * embedding level is usually used to determine the directionality of a * character in bidirectional text. * - * @param offset the charecter offset + * @param offset the character offset * @return the embedding level * * @exception IllegalArgumentException <ul> @@ -891,7 +918,8 @@ public Point getLocation(int offset, boolean trailing) { /** * Returns the next offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code>, <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type @@ -1060,7 +1088,8 @@ public int getOrientation() { /** * Returns the previous offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java index a92c8856b1..4843505231 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 @@ -104,11 +104,11 @@ static int checkStyle (int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control is selected. + * <code>widgetSelected</code> is called when the control is selected by the user. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -454,7 +454,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -628,7 +628,12 @@ void setForegroundColor (GdkColor color) { /** * Sets the receiver's image to the argument, which may be * <code>null</code> indicating that no image should be displayed. - * + * <p> + * Note that a Button can display an image and text simultaneously + * on Windows (starting with XP), GTK+ and OSX. On other platforms, + * a Button that has an image and text set into it will display the + * image or text that was set most recently. + * </p> * @param image the image to display on the receiver (may be <code>null</code>) * * @exception IllegalArgumentException <ul> @@ -711,12 +716,16 @@ public void setSelection (boolean selected) { * character to be the mnemonic. When the user presses a * key sequence that matches the mnemonic, a selection * event occurs. On most platforms, the mnemonic appears - * underlined but may be emphasised in a platform specific + * underlined but may be emphasized in a platform specific * manner. The mnemonic indicator character '&' can be * escaped by doubling it in the string, causing a single * '&' to be displayed. + * </p><p> + * Note that a Button can display an image and text simultaneously + * on Windows (starting with XP), GTK+ and OSX. On other platforms, + * a Button that has an image and text set into it will display the + * image or text that was set most recently. * </p> - * * @param string the new text * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java index b4cd8dfe44..a2a12058a6 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 @@ -42,7 +42,7 @@ import org.eclipse.swt.events.*; * <dt><b>Styles:</b></dt> * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd> * <dt><b>Events:</b></dt> - * <dd>DefaultSelection, Modify, Selection</dd> + * <dd>DefaultSelection, Modify, Selection, Verify</dd> * </dl> * <p> * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified. @@ -217,11 +217,11 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the combo's list selection changes. + * <code>widgetSelected</code> is called when the user changes the combo's list selection. * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed the combo's text area. * </p> * @@ -1470,7 +1470,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * @@ -1619,9 +1619,7 @@ void setForegroundColor (GdkColor color) { /** * Sets the text of the item in the receiver's list at the given - * zero-relative index to the string argument. This is equivalent - * to removing the old item at the index, and then adding the new - * item at that index. + * zero-relative index to the string argument. * * @param index the index for the item * @param string the new text for the item diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java index ebad55743b..6c8b41e992 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 @@ -800,7 +800,13 @@ boolean isTabGroup() { * <p> * This is equivalent to calling <code>layout(true)</code>. * </p> - * + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -826,7 +832,14 @@ public void layout () { * will cascade down through all child widgets in the receiver's widget * tree until a child is encountered that does not resize. Note that * a layout due to a resize will not flush any cached information - * (same as <code>layout(false)</code>).</p> + * (same as <code>layout(false)</code>). + * </p> + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise * @@ -857,7 +870,14 @@ public void layout (boolean changed) { * tree. However, if a child is resized as a result of a call to layout, the * resize event will invoke the layout of the child. Note that * a layout due to a resize will not flush any cached information - * (same as <code>layout(false)</code>).</p> + * (same as <code>layout(false)</code>). + * </p> + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise * @param all <code>true</code> if all children in the receiver's widget tree should be laid out, and <code>false</code> otherwise @@ -884,6 +904,12 @@ public void layout (boolean changed, boolean all) { * (potentially) optimize the work it is doing by assuming that none of the * peers of the changed control have changed state since the last layout. * If an ancestor does not have a layout, skip it. + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed a control that has had a state change which requires a recalculation of its size * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java index 61484f6d95..940f51f215 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 @@ -27,9 +27,8 @@ import org.eclipse.swt.accessibility.*; * <dd>BORDER</dd> * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd> * <dt><b>Events:</b> - * <dd>FocusIn, FocusOut, Help, KeyDown, KeyUp, MouseDoubleClick, MouseDown, MouseEnter, - * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse, - * DragDetect, MenuDetect</dd> + * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter, + * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd> * </dl> * </p><p> * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified. @@ -1082,6 +1081,27 @@ public void addControlListener(ControlListener listener) { addListener (SWT.Move,typedListener); } +/** + * Adds the listener to the collection of listeners who will + * be notified when a drag gesture occurs, by sending it + * one of the messages defined in the <code>DragDetectListener</code> + * interface. + * + * @param listener the listener which should be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #removeDragDetectListener + * + * @since 3.3 + */ public void addDragDetectListener (DragDetectListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -1147,7 +1167,18 @@ public void addHelpListener (HelpListener listener) { * be notified when keys are pressed and released on the system keyboard, by sending * it one of the messages defined in the <code>KeyListener</code> * interface. - * + * <p> + * When a key listener is added to a control, the control + * will take part in widget traversal. By default, all + * traversal keys (such as the tab key and so on) are + * delivered to the control. In order for a control to take + * part in traversal, it should listen for traversal events. + * Otherwise, the user can traverse into a control but not + * out. Note that native controls such as table and tree + * implement key traversal in the operating system. It is + * not necessary to add traversal listeners for these controls, + * unless you want to override the default traversal. + * </p> * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> @@ -1387,6 +1418,25 @@ public void removeControlListener (ControlListener listener) { eventTable.unhook (SWT.Resize, listener); } +/** + * Removes the listener from the collection of listeners who will + * be notified when a drag gesture occurs. + * + * @param listener the listener which should no longer be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @since 3.3 + */ public void removeDragDetectListener(DragDetectListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -1656,12 +1706,84 @@ public void removeTraverseListener(TraverseListener listener) { eventTable.unhook (SWT.Traverse, listener); } +/** + * Detects a drag and drop gesture. This method is used + * to detect a drag gesture when called from within a mouse + * down listener. + * + * <p>By default, a drag is detected when the gesture + * occurs anywhere within the client area of a control. + * Some controls, such as tables and trees, override this + * behavior. In addition to the operating system specific + * drag gesture, they require the mouse to be inside an + * item. Custom widget writers can use <code>setDragDetect</code> + * to disable the default detection, listen for mouse down, + * and then call <code>dragDetect()</code> from within the + * listener to conditionally detect a drag. + * </p> + * + * @param event the mouse down event + * + * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT when the event is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @see #getDragDetect + * @see #setDragDetect + * + * @since 3.3 + */ public boolean dragDetect (Event event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); return dragDetect (event.button, event.count, event.stateMask, event.x, event.y); } +/** + * Detects a drag and drop gesture. This method is used + * to detect a drag gesture when called from within a mouse + * down listener. + * + * <p>By default, a drag is detected when the gesture + * occurs anywhere within the client area of a control. + * Some controls, such as tables and trees, override this + * behavior. In addition to the operating system specific + * drag gesture, they require the mouse to be inside an + * item. Custom widget writers can use <code>setDragDetect</code> + * to disable the default detection, listen for mouse down, + * and then call <code>dragDetect()</code> from within the + * listener to conditionally detect a drag. + * </p> + * + * @param event the mouse down event + * + * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT when the event is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @see #getDragDetect + * @see #setDragDetect + * + * @since 3.3 + */ public boolean dragDetect (MouseEvent event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -1880,11 +2002,38 @@ public int getBorderWidth () { return 0; } +/** + * Returns the receiver's cursor, or null if it has not been set. + * <p> + * When the mouse pointer passes over a control its appearance + * is changed to match the control's cursor. + * </p> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Cursor getCursor () { checkWidget (); return cursor; } +/** + * Returns <code>true</code> if the receiver is detecting + * drag gestures, and <code>false</code> otherwise. + * + * @return the receiver's drag detect state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public boolean getDragDetect () { checkWidget (); return (state & DRAG_DETECT) != 0; @@ -2742,12 +2891,13 @@ void register () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #update + * @see #update() * @see PaintListener * @see SWT#Paint * @see SWT#NO_BACKGROUND * @see SWT#NO_REDRAW_RESIZE * @see SWT#NO_MERGE_PAINTS + * @see SWT#DOUBLE_BUFFERED */ public void redraw () { checkWidget(); @@ -2782,12 +2932,13 @@ void redraw (boolean all) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #update + * @see #update() * @see PaintListener * @see SWT#Paint * @see SWT#NO_BACKGROUND * @see SWT#NO_REDRAW_RESIZE * @see SWT#NO_MERGE_PAINTS + * @see SWT#DOUBLE_BUFFERED */ public void redraw (int x, int y, int width, int height, boolean all) { checkWidget(); @@ -2974,7 +3125,10 @@ void setBackground () { * Sets the receiver's background color to the color specified * by the argument, or to the default system color for the control * if the argument is null. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + * </p> * @param color the new color (or null) * * @exception IllegalArgumentException <ul> @@ -3038,7 +3192,10 @@ void setBackgroundColor (GdkColor color) { * by the argument, or to the default system color for the control * if the argument is null. The background image is tiled to fill * the available space. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + * </p> * @param image the new image (or null) * * @exception IllegalArgumentException <ul> @@ -3133,6 +3290,20 @@ void setCursor (int /*long*/ cursor) { } } +/** + * Sets the receiver's drag detect state. If the argument is + * <code>true</code>, the receiver will detect drag gestures, + * otherwise these gestures will be ignored. + * + * @param dragDetect the new drag detect state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public void setDragDetect (boolean dragDetect) { checkWidget (); if (dragDetect) { @@ -3277,7 +3448,9 @@ void setFontDescription (int /*long*/ font) { * Sets the receiver's foreground color to the color specified * by the argument, or to the default system color for the control * if the argument is null. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * </p> * @param color the new color (or null) * * @exception IllegalArgumentException <ul> @@ -3456,7 +3629,7 @@ boolean setRadioSelection (boolean value) { * </ul> * * @see #redraw(int, int, int, int, boolean) - * @see #update + * @see #update() */ public void setRedraw (boolean redraw) { checkWidget(); @@ -3989,13 +4162,19 @@ boolean traverseMnemonic (char key) { /** * Forces all outstanding paint requests for the widget - * to be processed before this method returns. + * to be processed before this method returns. If there + * are no outstanding paint request, this method does + * nothing. + * <p> + * Note: This method does not cause a redraw. + * </p> * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * + * @see #redraw() * @see #redraw(int, int, int, int, boolean) * @see PaintListener * @see SWT#Paint diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java index 7bf38e5642..7cdd1541aa 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 @@ -18,6 +18,29 @@ import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.internal.gtk.OS; +/** + * Instances of this class are selectable user interface + * objects that allow the user to enter and modify date + * or time values. + * <p> + * Note that although this class is a subclass of <code>Composite</code>, + * it does not make sense to add children to it, or set a layout on it. + * </p> + * <dl> + * <dt><b>Styles:</b></dt> + * <dd>DATE, TIME, CALENDAR, SHORT, MEDIUM, LONG</dd> + * <dt><b>Events:</b></dt> + * <dd>Selection</dd> + * </dl> + * <p> + * Note: Only one of the styles DATE, TIME, or CALENDAR may be specified, + * and only one of the styles SHORT, MEDIUM, or LONG may be specified. + * </p><p> + * IMPORTANT: This class is <em>not</em> intended to be subclassed. + * </p> + * + * @since 3.3 + */ public class DateTime extends Composite { int day, month, year, hours, minutes, seconds; @@ -41,6 +64,36 @@ public class DateTime extends Composite { static final String DEFAULT_MEDIUM_TIME_FORMAT = "HH:MM:SS AM"; static final String DEFAULT_LONG_TIME_FORMAT = "HH:MM:SS AM"; +/** + * Constructs a new instance of this class given its parent + * and a style value describing its behavior and appearance. + * <p> + * The style value is either one of the style constants defined in + * class <code>SWT</code> which is applicable to instances of this + * class, or must be built by <em>bitwise OR</em>'ing together + * (that is, using the <code>int</code> "|" operator) two or more + * of those <code>SWT</code> style constants. The class description + * lists the style constants that are applicable to the class. + * Style bits are also inherited from superclasses. + * </p> + * + * @param parent a composite control which will be the parent of the new instance (cannot be null) + * @param style the style of control to construct + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> + * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> + * </ul> + * + * @see SWT#DATE + * @see SWT#TIME + * @see SWT#CALENDAR + * @see Widget#checkSubclass + * @see Widget#getStyle + */ public DateTime (Composite parent, int style) { super (parent, checkStyle (style)); if ((this.style & SWT.CALENDAR) == 0) { @@ -109,6 +162,30 @@ static int checkStyle (int style) { return checkBits (style, SWT.MEDIUM, SWT.SHORT, SWT.LONG, 0, 0, 0); } +/** + * Adds the listener to the collection of listeners who will + * be notified when the control is selected by the user, by sending + * it one of the messages defined in the <code>SelectionListener</code> + * interface. + * <p> + * <code>widgetSelected</code> is called when the user changes the control's value. + * <code>widgetDefaultSelected</code> is not called. + * </p> + * + * @param listener the listener which should be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see SelectionListener + * @see #removeSelectionListener + * @see SelectionEvent + */ public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -250,6 +327,19 @@ void getDate() { day = d[0]; } +/** + * Returns the receiver's date, or day of the month. + * <p> + * The first day of the month is 1, and the last day depends on the month and year. + * </p> + * + * @return a positive integer beginning with 1 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getDay () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -260,6 +350,19 @@ public int getDay () { } } +/** + * Returns the receiver's hours. + * <p> + * Hours is an integer between 0 and 23. + * </p> + * + * @return an integer between 0 and 23 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getHours () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -269,6 +372,19 @@ public int getHours () { } } +/** + * Returns the receiver's minutes. + * <p> + * Minutes is an integer between 0 and 59. + * </p> + * + * @return an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getMinutes () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -278,6 +394,19 @@ public int getMinutes () { } } +/** + * Returns the receiver's month. + * <p> + * The first month of the year is 0, and the last month is 11. + * </p> + * + * @return an integer between 0 and 11 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getMonth () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -288,6 +417,19 @@ public int getMonth () { } } +/** + * Returns the receiver's seconds. + * <p> + * Seconds is an integer between 0 and 59. + * </p> + * + * @return an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getSeconds () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -297,6 +439,19 @@ public int getSeconds () { } } +/** + * Returns the receiver's year. + * <p> + * The first year is 1752 and the last year is 9999. + * </p> + * + * @return an integer between 1752 and 9999 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public int getYear () { checkWidget (); if ((style & SWT.CALENDAR) != 0) { @@ -495,6 +650,23 @@ void releaseWidget () { //TODO: need to do anything here? } +/** + * Removes the listener from the collection of listeners who will + * be notified when the control is selected by the user. + * + * @param listener the listener which should no longer be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see SelectionListener + * @see #addSelectionListener + */ public void removeSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -638,6 +810,19 @@ void setTextField(int fieldName, int value, boolean commit, boolean adjust) { if (commit) setField(fieldName, value); } +/** + * Sets the receiver's date, or day of the month, to the specified day. + * <p> + * The first day of the month is 1, and the last day depends on the month and year. + * </p> + * + * @param day a positive integer beginning with 1 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setDay (int day) { checkWidget (); if (!isValid(Calendar.DAY_OF_MONTH, day)) return; @@ -650,6 +835,19 @@ public void setDay (int day) { } } +/** + * Sets the receiver's hours. + * <p> + * Hours is an integer between 0 and 23. + * </p> + * + * @param hours an integer between 0 and 23 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setHours (int hours) { checkWidget (); if (!isValid(Calendar.HOUR_OF_DAY, hours)) return; @@ -661,6 +859,19 @@ public void setHours (int hours) { } } +/** + * Sets the receiver's minutes. + * <p> + * Minutes is an integer between 0 and 59. + * </p> + * + * @param minutes an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setMinutes (int minutes) { checkWidget (); if (!isValid(Calendar.MINUTE, minutes)) return; @@ -672,6 +883,19 @@ public void setMinutes (int minutes) { } } +/** + * Sets the receiver's month. + * <p> + * The first month of the year is 0, and the last month is 11. + * </p> + * + * @param month an integer between 0 and 11 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setMonth (int month) { checkWidget (); if (!isValid(Calendar.MONTH, month)) return; @@ -684,6 +908,19 @@ public void setMonth (int month) { } } +/** + * Sets the receiver's seconds. + * <p> + * Seconds is an integer between 0 and 59. + * </p> + * + * @param seconds an integer between 0 and 59 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setSeconds (int seconds) { checkWidget (); if (!isValid(Calendar.SECOND, seconds)) return; @@ -695,6 +932,19 @@ public void setSeconds (int seconds) { } } +/** + * Sets the receiver's year. + * <p> + * The first year is 1752 and the last year is 9999. + * </p> + * + * @param year an integer between 1752 and 9999 + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + */ public void setYear (int year) { checkWidget (); //if (!isValid(Calendar.YEAR, year)) return; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java index 1d7a2dd445..cfa7626fbd 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 @@ -286,7 +286,7 @@ void fixDecorations (Decorations newDecorations, Control control, Menu [] menus) * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #setDefaultButton + * @see #setDefaultButton(Button) */ public Button getDefaultButton () { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java index ab263f283c..237716e172 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 @@ -79,7 +79,7 @@ import org.eclipse.swt.graphics.*; * <dt><b>Styles:</b></dt> * <dd>(none)</dd> * <dt><b>Events:</b></dt> - * <dd>Close, Dispose</dd> + * <dd>Close, Dispose, Settings</dd> * </dl> * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -3880,7 +3880,7 @@ int /*long*/ styleSetProc (int /*long*/ gobject, int /*long*/ arg1, int /*long*/ * @param runnable code to run on the user-interface thread or <code>null</code> * * @exception SWTException <ul> - * <li>ERROR_FAILED_EXEC - if an exception occured when executing the runnable</li> + * <li>ERROR_FAILED_EXEC - if an exception occurred when executing the runnable</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java index 2762d3fa94..48ab07f547 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 @@ -79,11 +79,11 @@ public Link (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control is selected. + * <code>widgetSelected</code> is called when the control is selected by the user. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -467,7 +467,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java index 4a6f14618b..b264def3e6 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 @@ -146,7 +146,7 @@ public void add (String string, int index) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -154,7 +154,7 @@ public void add (String string, int index) { * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -878,7 +878,7 @@ public int indexOf (String string, int start) { * range are ignored. * * @param index the index of the item - * @return the visibility state of the item at the index + * @return the selection state of the item at the index * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1058,7 +1058,7 @@ public void removeAll () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * @@ -1278,9 +1278,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize /** * Sets the text of the item in the receiver's list at the given - * zero-relative index to the string argument. This is equivalent - * to <code>remove</code>'ing the old item at the index, and then - * <code>add</code>'ing the new item at that index. + * zero-relative index to the string argument. * * @param index the index for the item * @param string the new text for the item diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java index e0f995220b..f6f1c59c55 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 @@ -622,7 +622,7 @@ void hookEvents () { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java index 7b2999efd1..3fe760ba7c 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 @@ -187,7 +187,7 @@ public void addHelpListener (HelpListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the menu item is selected, by sending + * be notified when the menu item is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -195,7 +195,7 @@ public void addHelpListener (HelpListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the menu item is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -563,7 +563,7 @@ public void removeHelpListener (HelpListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java index 48aafc07cd..d69e49d79c 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 @@ -116,7 +116,7 @@ public void setMessage (String string) { * of the display. * * @return the ID of the button that was selected to dismiss the - * message box (e.g. SWT.OK, SWT.CANCEL, etc...) + * message box (e.g. SWT.OK, SWT.CANCEL, etc.) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the dialog has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java index b117622fd2..c379605bb7 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 @@ -15,7 +15,7 @@ import org.eclipse.swt.*; import org.eclipse.swt.internal.gtk.*; /** - * Instances of the receiver represent is an unselectable + * Instances of the receiver represent an unselectable * user interface object that is used to display progress, * typically in the form of a bar. * <dl> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java index 0134c1be91..d42980e145 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 @@ -76,7 +76,7 @@ public Sash (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -85,7 +85,7 @@ public Sash (Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -394,7 +394,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java index 2fe42efb04..e113dd4db9 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 @@ -71,11 +71,11 @@ public Scale (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control's value changes. + * <code>widgetSelected</code> is called when the user changes the receiver's value. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -241,7 +241,7 @@ int /*long*/ gtk_value_changed (int /*long*/ adjustment) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java index 24aa86e030..3672b01885 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 @@ -99,7 +99,7 @@ ScrollBar (Scrollable parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -115,7 +115,7 @@ ScrollBar (Scrollable parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -472,7 +472,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java index d4420539ed..8405e2841b 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 @@ -867,7 +867,7 @@ Shell _getShell () { } /** * Returns an array containing all shells which are - * descendents of the receiver. + * descendants of the receiver. * <p> * @return the dialog shells * @@ -1037,7 +1037,7 @@ int /*long*/ gtk_window_state_event (int /*long*/ widget, int /*long*/ event) { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#setActive * @see Shell#forceActive */ @@ -1094,7 +1094,7 @@ public void removeShellListener (ShellListener listener) { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ @@ -1662,7 +1662,7 @@ public void dispose () { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java index b5b2d811ac..9f714644de 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 @@ -102,7 +102,7 @@ public Slider (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -118,7 +118,7 @@ public Slider (Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -371,7 +371,7 @@ public int getThumb () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java index 9115eb2f67..eb50c854d2 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 @@ -22,11 +22,14 @@ import org.eclipse.swt.events.*; * objects that allow the user to enter and modify numeric * values. * <p> + * Note that although this class is a subclass of <code>Composite</code>, + * it does not make sense to add children to it, or set a layout on it. + * </p><p> * <dl> * <dt><b>Styles:</b></dt> * <dd>READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> - * <dd>Selection, Modify</dd> + * <dd>Selection, Modify, Verify</dd> * </dl> * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -102,7 +105,7 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -110,7 +113,7 @@ public void addModifyListener (ModifyListener listener) { * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -733,7 +736,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java index 51ee72e4e9..5fb9aee82c 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 @@ -102,7 +102,7 @@ int /*long*/ childStyle () { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -110,7 +110,7 @@ int /*long*/ childStyle () { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -427,7 +427,7 @@ void hookEvents () { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -524,7 +524,7 @@ void removeControl (Control control) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java index 645942927b..539baca31b 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 @@ -286,18 +286,18 @@ protected void checkSubclass () { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called, the item field of the event object is valid. - * If the receiver has <code>SWT.CHECK</code> style set and the check selection changes, + * If the receiver has the <code>SWT.CHECK</code> style and the check selection changes, * the event object detail field contains the value <code>SWT.CHECK</code>. * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * The item field of the event object is valid for default selection, but the detail field is not used. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -2019,7 +2019,7 @@ void hookEvents () { * @return the index of the column * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -2045,7 +2045,7 @@ public int indexOf (TableColumn column) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -2078,7 +2078,7 @@ public int indexOf (TableItem item) { * range are ignored. * * @param index the index of the item - * @return the visibility state of the item at the index + * @return the selection state of the item at the index * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -2382,7 +2382,7 @@ public void removeAll () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java index 49be0567ba..e766a161dd 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 @@ -145,7 +145,7 @@ public void addControlListener(ControlListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -153,7 +153,7 @@ public void addControlListener(ControlListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -471,7 +471,7 @@ public void removeControlListener (ControlListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java index 1eeae3acd7..b51cf283a2 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 @@ -615,6 +615,22 @@ public String getText (int index) { return new String (Converter.mbcsToWcs (null, buffer)); } +/** + * Returns a rectangle describing the size and location + * relative to its parent of the text at a column in the + * table. An empty rectangle is returned if index exceeds + * the index of the table's last column. + * + * @param index the index that specifies the column + * @return the receiver's bounding text rectangle + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); 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 fe446a72ae..907d3c9d9c 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 @@ -23,12 +23,13 @@ import org.eclipse.swt.events.*; * <p> * <dl> * <dt><b>Styles:</b></dt> - * <dd>CENTER, LEFT, MULTI, PASSWORD, SINGLE, RIGHT, READ_ONLY, WRAP</dd> + * <dd>CANCEL, CENTER, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> * <dd>DefaultSelection, Modify, Verify</dd> * </dl> * <p> - * Note: Only one of the styles MULTI and SINGLE may be specified. + * Note: Only one of the styles MULTI and SINGLE may be specified, + * and only one of the styles LEFT, CENTER, and RIGHT may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> @@ -200,15 +201,17 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * <code>widgetSelected</code> is not called for texts. - * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. + * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text, + * or when ENTER is pressed in a search text. If the receiver has the <code>SWT.SEARCH | SWT.CANCEL</code> style + * and the user cancels the search, the event object detail field contains the value <code>SWT.CANCEL</code>. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -749,6 +752,25 @@ public int getLineHeight () { return fontHeight (getFontDescription (), handle); } +/** + * Returns the widget message. When the widget is created + * with the style <code>SWT.SEARCH</code>, the message text + * is displayed as a hint for the user, indicating the + * purpose of the field. + * <p> + * Note: This operation is a <em>HINT</em> and is not + * supported on platforms that do not have this concept. + * </p> + * + * @return the widget message + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public String getMessage () { checkWidget (); return message; @@ -1474,7 +1496,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -1635,6 +1657,28 @@ void setFontDescription (int /*long*/ font) { setTabStops (tabs); } +/** + * Sets the widget message. When the widget is created + * with the style <code>SWT.SEARCH</code>, the message text + * is displayed as a hint for the user, indicating the + * purpose of the field. + * <p> + * Note: This operation is a <em>HINT</em> and is not + * supported on platforms that do not have this concept. + * </p> + * + * @param message the new message + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the message is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public void setMessage (String message) { checkWidget (); if (message == null) error (SWT.ERROR_NULL_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java index fe4d483e75..53a7fd686a 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 @@ -129,7 +129,7 @@ public ToolItem (ToolBar parent, int style, int index) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -138,7 +138,7 @@ public ToolItem (ToolBar parent, int style, int index) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user, * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -681,7 +681,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -768,7 +768,7 @@ public void setControl (Control control) { * Sets the receiver's disabled image to the argument, which may be * null indicating that no disabled image should be displayed. * <p> - * The disbled image is displayed when the receiver is disabled. + * The disabled image is displayed when the receiver is disabled. * </p> * * @param image the disabled image to display on the receiver (may be null) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java index 6e7c53fe20..79da579361 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 @@ -28,6 +28,9 @@ import org.eclipse.swt.events.*; * <dd>Selection</dd> * </dl> * </p><p> + * Note: Only one of the styles ICON_ERROR, ICON_INFORMATION, + * and ICON_WARNING may be specified. + * </p><p> * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> @@ -94,11 +97,15 @@ static int checkStyle (int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the receiver is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. + * <p> + * <code>widgetSelected</code> is called when the receiver is selected. + * <code>widgetDefaultSelected</code> is not called. + * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the receiver is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -533,7 +540,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the receiver is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java index 344a046091..0205aa497b 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 @@ -106,7 +106,7 @@ public void addMenuDetectListener (MenuDetectListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver is selected, by sending + * be notified when the receiver is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -114,7 +114,7 @@ public void addMenuDetectListener (MenuDetectListener listener) { * <code>widgetDefaultSelected</code> is called when the receiver is double-clicked * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the receiver is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -365,7 +365,7 @@ public void removeMenuDetectListener (MenuDetectListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver is selected. + * be notified when the receiver is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index 1fc23de90d..a7c93877d5 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 @@ -331,18 +331,18 @@ protected void checkSubclass () { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called, the item field of the event object is valid. - * If the receiver has <code>SWT.CHECK</code> style set and the check selection changes, + * If the receiver has the <code>SWT.CHECK</code> style and the check selection changes, * the event object detail field contains the value <code>SWT.CHECK</code>. * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * The item field of the event object is valid for default selection, but the detail field is not used. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -2063,7 +2063,7 @@ void hookEvents () { * @return the index of the column * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -2091,8 +2091,8 @@ public int indexOf (TreeColumn column) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the tool item is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the tool item has been disposed</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -2318,7 +2318,7 @@ public void removeAll () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java index 523f993fcc..4f0d5b472b 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 @@ -147,7 +147,7 @@ public void addControlListener(ControlListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -155,7 +155,7 @@ public void addControlListener(ControlListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -467,7 +467,7 @@ public void removeControlListener (ControlListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java index b4001462ee..ece1fb3ef8 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 @@ -878,6 +878,21 @@ public String getText (int index) { return new String (Converter.mbcsToWcs (null, buffer)); } +/** + * Returns a rectangle describing the size and location + * relative to its parent of the text at a column in the + * tree. + * + * @param index the index that specifies the column + * @return the receiver's bounding text rectangle + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); @@ -950,8 +965,8 @@ public Rectangle getTextBounds (int index) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the tool item is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the tool item has been disposed</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java index 387b6c5717..5b616828d2 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 @@ -227,7 +227,7 @@ void _addListener (int eventType, Listener listener) { * * @see Listener * @see SWT - * @see #removeListener + * @see #removeListener(int, Listener) * @see #notifyListeners */ public void addListener (int eventType, Listener listener) { @@ -403,13 +403,13 @@ void destroyWidget () { /** * Disposes of the operating system resources associated with - * the receiver and all its descendents. After this method has - * been invoked, the receiver and all descendents will answer + * the receiver and all its descendants. After this method has + * been invoked, the receiver and all descendants will answer * <code>true</code> when sent the message <code>isDisposed()</code>. * Any internal connections between the widgets in the tree will * have been removed to facilitate garbage collection. * <p> - * NOTE: This method is not called recursively on the descendents + * NOTE: This method is not called recursively on the descendants * of the receiver. This means that, widget implementers can not * detect when a widget is being disposed of by re-implementing * this method, but should instead listen for the <code>Dispose</code> @@ -943,7 +943,7 @@ boolean mnemonicMatch (int /*long*/ mnemonicHandle, char key) { * * @see SWT * @see #addListener - * @see #removeListener + * @see #removeListener(int, Listener) */ public void notifyListeners (int eventType, Event event) { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java index 04c1d310e9..f84b13e655 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java @@ -735,6 +735,22 @@ public boolean isDisposed () { return xDisplay == 0; } +/** + * Loads the font specified by a file. The font will be + * present in the list of fonts available to the application. + * + * @param path the font file path + * @return whether the font was successfully loaded + * + * @exception SWTException <ul> + * <li>ERROR_NULL_ARGUMENT - if path is null</li> + * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see Font + * + * @since 3.3 + */ public boolean loadFont (String path) { checkDevice(); if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/FontData.java index d1cf4c7aeb..d9271c3bf5 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/FontData.java @@ -198,7 +198,7 @@ public final class FontData { */ String lang, country, variant; /** - * Constructs a new un-initialized font data. + * Constructs a new uninitialized font data. */ public FontData () { } @@ -356,7 +356,7 @@ public boolean equals (Object object) { * * @return the height of this FontData * - * @see #setHeight + * @see #setHeight(int) */ public int getHeight() { return points / 10; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java index 67cfc62356..cbb7c451dd 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java @@ -90,8 +90,8 @@ GC() { /** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the - * foreground and background color in the GC to match those - * in the drawable. + * foreground color, background color and font in the GC + * to match those in the drawable. * <p> * You must dispose the graphics context when it is no longer required. * </p> @@ -114,8 +114,8 @@ public GC(Drawable drawable) { /** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the - * foreground and background color in the GC to match those - * in the drawable. + * foreground color, background color and font in the GC + * to match those in the drawable. * <p> * You must dispose the graphics context when it is no longer required. * </p> @@ -1205,7 +1205,12 @@ public void drawOval(int x, int y, int width, int height) { } /** * Draws the path described by the parameter. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param path the path to draw * * @exception IllegalArgumentException <ul> @@ -1214,6 +1219,7 @@ public void drawOval(int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path @@ -1705,7 +1711,7 @@ public void drawText (String string, int x, int y, boolean isTransparent) { * @param string the string to be drawn * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn - * @param flags the flags specifing how to process the text + * @param flags the flags specifying how to process the text * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> @@ -1991,6 +1997,11 @@ public void fillOval (int x, int y, int width, int height) { } /** * Fills the path described by the parameter. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param path the path to fill * @@ -2000,6 +2011,7 @@ public void fillOval (int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path @@ -2374,6 +2386,7 @@ public int getAdvanceWidth(char ch) { * </ul> * * @see #setAdvanced + * * @since 3.1 */ public boolean getAdvanced() { @@ -3097,6 +3110,17 @@ public int getInterpolation() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return data.interpolation; } +/** + * Returns the receiver's line attributes. + * + * @return the line attributes used for drawing lines + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @since 3.3 + */ public LineAttributes getLineAttributes() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); float[] dashes = null; @@ -3127,7 +3151,7 @@ public int getLineCap() { * Returns the receiver's line dash style. The default value is * <code>null</code>. * - * @return the lin dash style used for drawing lines + * @return the line dash style used for drawing lines * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> @@ -3397,8 +3421,7 @@ boolean isIdentity(double[] matrix) { * advanced and normal graphics operations. Because the two subsystems are * different, their output may differ. Switching to advanced graphics before * any graphics operations are performed ensures that the output is consistent. - * </p> - * <p> + * </p><p> * Advanced graphics may not be installed for the operating system. In this * case, this operation does nothing. Some operating system have only one * graphics subsystem, so switching from normal to advanced graphics does @@ -3418,6 +3441,7 @@ boolean isIdentity(double[] matrix) { * @see #setBackgroundPattern * @see #setClipping(Path) * @see #setForegroundPattern + * @see #setLineAttributes * @see #setInterpolation * @see #setTextAntialias * @see #setTransform @@ -3444,13 +3468,21 @@ public void setAdvanced(boolean advanced) { } /** * Sets the receiver's alpha value. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param alpha the alpha value * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.1 */ public void setAlpha(int alpha) { @@ -3465,6 +3497,11 @@ public void setAlpha(int alpha) { * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing for all * <em>non-text drawing</em> operations. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param antialias the anti-aliasing setting * @@ -3474,8 +3511,11 @@ public void setAlpha(int alpha) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced * @see #setTextAntialias * * @since 3.1 @@ -3565,7 +3605,12 @@ public void setBackground (Color color) { } /** * Sets the background pattern. The default value is <code>null</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param pattern the new background pattern * * @exception IllegalArgumentException <ul> @@ -3573,9 +3618,12 @@ public void setBackground (Color color) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -3696,8 +3744,13 @@ public void setClipping (int x, int y, int width, int height) { /** * Sets the area of the receiver which can be changed * by drawing operations to the path specified - * by the argument. - * + * by the argument. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param path the clipping path. * * @exception IllegalArgumentException <ul> @@ -3705,9 +3758,12 @@ public void setClipping (int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -3851,7 +3907,11 @@ public void setForeground (Color color) { } /** * Sets the foreground pattern. The default value is <code>null</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param pattern the new foreground pattern * * @exception IllegalArgumentException <ul> @@ -3859,9 +3919,12 @@ public void setForeground (Color color) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -3878,7 +3941,12 @@ public void setForegroundPattern(Pattern pattern) { * Sets the receiver's interpolation setting to the parameter, which * must be one of <code>SWT.DEFAULT</code>, <code>SWT.NONE</code>, * <code>SWT.LOW</code> or <code>SWT.HIGH</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param interpolation the new interpolation setting * * @exception IllegalArgumentException <ul> @@ -3887,8 +3955,12 @@ public void setForegroundPattern(Pattern pattern) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.1 */ public void setInterpolation(int interpolation) { @@ -3906,6 +3978,30 @@ public void setInterpolation(int interpolation) { initCairo(); data.interpolation = interpolation; } +/** + * Sets the receiver's line attributes. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * @param attributes the line attributes + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the attributes is null</li> + * <li>ERROR_INVALID_ARGUMENT - if any of the line attributes is not valid</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> + * + * @see LineAttributes + * @see #getAdvanced + * @see #setAdvanced + * + * @since 3.3 + */ public void setLineAttributes(LineAttributes attributes) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); @@ -4198,7 +4294,12 @@ void setText(String string, int flags) { * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing only * for all <em>text drawing</em> operations. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param antialias the anti-aliasing setting * * @exception IllegalArgumentException <ul> @@ -4207,8 +4308,11 @@ void setText(String string, int flags) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced * @see #setAntialias * * @since 3.1 @@ -4231,11 +4335,16 @@ public void setTextAntialias(int antialias) { Cairo.cairo_set_font_options(data.cairo, options); Cairo.cairo_font_options_destroy(options); } -/** +/** * Sets the transform that is currently being used by the receiver. If * the argument is <code>null</code>, the current transform is set to * the identity transform. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param transform the transform to set * * @exception IllegalArgumentException <ul> @@ -4243,9 +4352,12 @@ public void setTextAntialias(int antialias) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Transform + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -4377,7 +4489,7 @@ public Point textExtent(String string) { * </p> * * @param string the string to measure - * @param flags the flags specifing how to process the text + * @param flags the flags specifying how to process the text * @return a point containing the extent of the string * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java index d0093a2d6e..1c0ba016fe 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java @@ -326,6 +326,33 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo draw(gc, x, y, selectionStart, selectionEnd, selectionForeground, selectionBackground, 0); } +/** + * Draws the receiver's text using the specified GC at the specified + * point. + * <p> + * The parameter <code>flags</code> can include one of <code>SWT.DELIMITER_SELECTION</code> + * or <code>SWT.FULL_SELECTION</code> to specify the selection behavior on all lines except + * for the last line, and can also include <code>SWT.LAST_LINE_SELECTION</code> to extend + * the specified selection behavior to the last line. + * </p> + * @param gc the GC to draw + * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn + * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn + * @param selectionStart the offset where the selections starts, or -1 indicating no selection + * @param selectionEnd the offset where the selections ends, or -1 indicating no selection + * @param selectionForeground selection foreground, or NULL to use the system default color + * @param selectionBackground selection background, or NULL to use the system default color + * @param flags drawing options + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the gc is null</li> + * </ul> + * + * @since 3.3 + */ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout(); computeRuns(); @@ -668,7 +695,7 @@ public boolean getJustify () { * embedding level is usually used to determine the directionality of a * character in bidirectional text. * - * @param offset the charecter offset + * @param offset the character offset * @return the embedding level * * @exception IllegalArgumentException <ul> @@ -919,7 +946,8 @@ Font getItemFont(StyleItem item) { /** * Returns the next offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code>, <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type @@ -1092,7 +1120,8 @@ public int getOrientation () { /** * Returns the previous offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java index d8ce18df90..71442e6e88 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java @@ -160,11 +160,11 @@ void _setText (String string) { } /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control is selected. + * <code>widgetSelected</code> is called when the control is selected by the user. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -531,7 +531,7 @@ void releaseWidget () { } /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -657,7 +657,12 @@ public void setFont (Font font) { /** * Sets the receiver's image to the argument, which may be * <code>null</code> indicating that no image should be displayed. - * + * <p> + * Note that a Button can display an image and text simultaneously + * on Windows (starting with XP), GTK+ and OSX. On other platforms, + * a Button that has an image and text set into it will display the + * image or text that was set most recently. + * </p> * @param image the image to display on the receiver (may be <code>null</code>) * * @exception IllegalArgumentException <ul> @@ -722,12 +727,16 @@ public void setSelection (boolean selected) { * character to be the mnemonic. When the user presses a * key sequence that matches the mnemonic, a selection * event occurs. On most platforms, the mnemonic appears - * underlined but may be emphasised in a platform specific + * underlined but may be emphasized in a platform specific * manner. The mnemonic indicator character '&' can be * escaped by doubling it in the string, causing a single * '&' to be displayed. + * </p><p> + * Note that a Button can display an image and text simultaneously + * on Windows (starting with XP), GTK+ and OSX. On other platforms, + * a Button that has an image and text set into it will display the + * image or text that was set most recently. * </p> - * * @param string the new text * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java index 2c6d800280..d25b11c578 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 @@ -42,7 +42,7 @@ import org.eclipse.swt.events.*; * <dt><b>Styles:</b></dt> * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd> * <dt><b>Events:</b></dt> - * <dd>DefaultSelection, Modify, Selection</dd> + * <dd>DefaultSelection, Modify, Selection, Verify</dd> * </dl> * <p> * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified. @@ -201,11 +201,11 @@ public void addModifyListener (ModifyListener listener) { } /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the combo's list selection changes. + * <code>widgetSelected</code> is called when the user changes the combo's list selection. * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed the combo's text area. * </p> * @@ -1089,7 +1089,7 @@ public void removeModifyListener (ModifyListener listener) { } /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * @@ -1249,9 +1249,7 @@ void setForegroundPixel (int pixel) { } /** * Sets the text of the item in the receiver's list at the given - * zero-relative index to the string argument. This is equivalent - * to removing the old item at the index, and then adding the new - * item at that index. + * zero-relative index to the string argument. * * @param index the index for the item * @param string the new text for the item diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java index 00d7331439..0b4949bdef 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 @@ -615,7 +615,13 @@ boolean isTabGroup () { * <p> * This is equivalent to calling <code>layout(true)</code>. * </p> - * + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -640,7 +646,14 @@ public void layout () { * will cascade down through all child widgets in the receiver's widget * tree until a child is encountered that does not resize. Note that * a layout due to a resize will not flush any cached information - * (same as <code>layout(false)</code>).</p> + * (same as <code>layout(false)</code>). + * </p> + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise * @@ -670,7 +683,14 @@ public void layout (boolean changed) { * tree. However, if a child is resized as a result of a call to layout, the * resize event will invoke the layout of the child. Note that * a layout due to a resize will not flush any cached information - * (same as <code>layout(false)</code>).</p> + * (same as <code>layout(false)</code>). + * </p> + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise * @param all <code>true</code> if all children in the receiver's widget tree should be laid out, and <code>false</code> otherwise @@ -696,6 +716,12 @@ public void layout (boolean changed, boolean all) { * (potentially) optimize the work it is doing by assuming that none of the * peers of the changed control have changed state since the last layout. * If an ancestor does not have a layout, skip it. + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed a control that has had a state change which requires a recalculation of its size * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java index b6c20e9862..fdf8f2eec3 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 @@ -25,9 +25,8 @@ import org.eclipse.swt.accessibility.*; * <dd>BORDER</dd> * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd> * <dt><b>Events:</b> - * <dd>FocusIn, FocusOut, Help, KeyDown, KeyUp, MouseDoubleClick, MouseDown, MouseEnter, - * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse, - * DragDetect, MenuDetect</dd> + * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter, + * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd> * </dl> * </p><p> * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified. @@ -109,6 +108,27 @@ public void addControlListener(ControlListener listener) { addListener (SWT.Resize,typedListener); addListener (SWT.Move,typedListener); } +/** + * Adds the listener to the collection of listeners who will + * be notified when a drag gesture occurs, by sending it + * one of the messages defined in the <code>DragDetectListener</code> + * interface. + * + * @param listener the listener which should be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #removeDragDetectListener + * + * @since 3.3 + */ public void addDragDetectListener (DragDetectListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -171,7 +191,18 @@ public void addHelpListener (HelpListener listener) { * be notified when keys are pressed and released on the system keyboard, by sending * it one of the messages defined in the <code>KeyListener</code> * interface. - * + * <p> + * When a key listener is added to a control, the control + * will take part in widget traversal. By default, all + * traversal keys (such as the tab key and so on) are + * delivered to the control. In order for a control to take + * part in traversal, it should listen for traversal events. + * Otherwise, the user can traverse into a control but not + * out. Note that native controls such as table and tree + * implement key traversal in the operating system. It is + * not necessary to add traversal listeners for these controls, + * unless you want to override the default traversal. + * </p> * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> @@ -590,11 +621,83 @@ Font defaultFont () { int defaultForeground () { return display.defaultForeground; } +/** + * Detects a drag and drop gesture. This method is used + * to detect a drag gesture when called from within a mouse + * down listener. + * + * <p>By default, a drag is detected when the gesture + * occurs anywhere within the client area of a control. + * Some controls, such as tables and trees, override this + * behavior. In addition to the operating system specific + * drag gesture, they require the mouse to be inside an + * item. Custom widget writers can use <code>setDragDetect</code> + * to disable the default detection, listen for mouse down, + * and then call <code>dragDetect()</code> from within the + * listener to conditionally detect a drag. + * </p> + * + * @param event the mouse down event + * + * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT when the event is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @see #getDragDetect + * @see #setDragDetect + * + * @since 3.3 + */ public boolean dragDetect (Event event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); return dragDetect (event.button, event.count, event.stateMask, event.x, event.y); } +/** + * Detects a drag and drop gesture. This method is used + * to detect a drag gesture when called from within a mouse + * down listener. + * + * <p>By default, a drag is detected when the gesture + * occurs anywhere within the client area of a control. + * Some controls, such as tables and trees, override this + * behavior. In addition to the operating system specific + * drag gesture, they require the mouse to be inside an + * item. Custom widget writers can use <code>setDragDetect</code> + * to disable the default detection, listen for mouse down, + * and then call <code>dragDetect()</code> from within the + * listener to conditionally detect a drag. + * </p> + * + * @param event the mouse down event + * + * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT when the event is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @see #getDragDetect + * @see #setDragDetect + * + * @since 3.3 + */ public boolean dragDetect (MouseEvent event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -808,10 +911,37 @@ Point getClientLocation () { String getCodePage () { return font.codePage; } +/** + * Returns the receiver's cursor, or null if it has not been set. + * <p> + * When the mouse pointer passes over a control its appearance + * is changed to match the control's cursor. + * </p> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Cursor getCursor () { checkWidget (); return cursor; } +/** + * Returns <code>true</code> if the receiver is detecting + * drag gestures, and <code>false</code> otherwise. + * + * @return the receiver's drag detect state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public boolean getDragDetect () { checkWidget (); return (state & DRAG_DETECT) != 0; @@ -1566,12 +1696,13 @@ void realizeChildren () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #update + * @see #update() * @see PaintListener * @see SWT#Paint * @see SWT#NO_BACKGROUND * @see SWT#NO_REDRAW_RESIZE * @see SWT#NO_MERGE_PAINTS + * @see SWT#DOUBLE_BUFFERED */ public void redraw () { checkWidget(); @@ -1599,12 +1730,13 @@ public void redraw () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #update + * @see #update() * @see PaintListener * @see SWT#Paint * @see SWT#NO_BACKGROUND * @see SWT#NO_REDRAW_RESIZE * @see SWT#NO_MERGE_PAINTS + * @see SWT#DOUBLE_BUFFERED */ public void redraw (int x, int y, int width, int height, boolean all) { checkWidget (); @@ -1679,6 +1811,25 @@ public void removeControlListener (ControlListener listener) { eventTable.unhook (SWT.Move, listener); eventTable.unhook (SWT.Resize, listener); } +/** + * Removes the listener from the collection of listeners who will + * be notified when a drag gesture occurs. + * + * @param listener the listener which should no longer be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @since 3.3 + */ public void removeDragDetectListener(DragDetectListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -2058,7 +2209,10 @@ void setBackground () { * Sets the receiver's background color to the color specified * by the argument, or to the default system color for the control * if the argument is null. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + * </p> * @param color the new color (or null) * * @exception IllegalArgumentException <ul> @@ -2090,7 +2244,10 @@ public void setBackground (Color color) { * by the argument, or to the default system color for the control * if the argument is null. The background image is tiled to fill * the available space. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + * </p> * @param image the new image (or null) * * @exception IllegalArgumentException <ul> @@ -2316,6 +2473,20 @@ public void setCursor (Cursor cursor) { } OS.XFlush (xDisplay); } +/** + * Sets the receiver's drag detect state. If the argument is + * <code>true</code>, the receiver will detect drag gestures, + * otherwise these gestures will be ignored. + * + * @param dragDetect the new drag detect state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public void setDragDetect (boolean dragDetect) { checkWidget (); if (dragDetect) { @@ -2421,7 +2592,9 @@ public void setFont (Font font) { * Sets the receiver's foreground color to the color specified * by the argument, or to the default system color for the control * if the argument is null. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * </p> * @param color the new color (or null) * * @exception IllegalArgumentException <ul> @@ -2611,7 +2784,7 @@ boolean setRadioSelection (boolean value) { * </ul> * * @see #redraw(int, int, int, int, boolean) - * @see #update + * @see #update() */ public void setRedraw (boolean redraw) { checkWidget(); @@ -3128,13 +3301,19 @@ boolean traverseReturn () { } /** * Forces all outstanding paint requests for the widget - * to be processed before this method returns. + * to be processed before this method returns. If there + * are no outstanding paint request, this method does + * nothing. + * <p> + * Note: This method does not cause a redraw. + * </p> * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * + * @see #redraw() * @see #redraw(int, int, int, int, boolean) * @see PaintListener * @see SWT#Paint diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java index 95685dd8e7..edbf837535 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 @@ -264,7 +264,7 @@ int dialogHandle () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #setDefaultButton + * @see #setDefaultButton(Button) */ public Button getDefaultButton () { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java index 942517e214..0e217cb14a 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 @@ -79,7 +79,7 @@ import org.eclipse.swt.graphics.*; * <dt><b>Styles:</b></dt> * <dd>(none)</dd> * <dt><b>Events:</b></dt> - * <dd>Close, Dispose</dd> + * <dd>Close, Dispose, Settings</dd> * </dl> * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -3530,7 +3530,7 @@ public boolean sleep () { * @param runnable code to run on the user-interface thread or <code>null</code> * * @exception SWTException <ul> - * <li>ERROR_FAILED_EXEC - if an exception occured when executing the runnable</li> + * <li>ERROR_FAILED_EXEC - if an exception occurred when executing the runnable</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java index b34d223aa2..ac73a864dc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java @@ -77,11 +77,11 @@ public Link (Composite parent, int style) { } /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control is selected. + * <code>widgetSelected</code> is called when the control is selected by the user. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -229,7 +229,7 @@ void releaseWidget () { } /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/List.java index 6c36de9e0d..37c27a26b6 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 @@ -145,7 +145,7 @@ public void add (String string, int index) { } /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -153,7 +153,7 @@ public void add (String string, int index) { * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -744,7 +744,7 @@ public int indexOf (String string, int start) { * range are ignored. * * @param index the index of the item - * @return the visibility state of the item at the index + * @return the selection state of the item at the index * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -897,7 +897,7 @@ public void removeAll () { } /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * @@ -1207,9 +1207,7 @@ public void setFont (Font font) { } /** * Sets the text of the item in the receiver's list at the given - * zero-relative index to the string argument. This is equivalent - * to <code>remove</code>'ing the old item at the index, and then - * <code>add</code>'ing the new item at that index. + * zero-relative index to the string argument. * * @param index the index for the item * @param string the new text for the item diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java index 0a4bbb4b7b..19f554c74a 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 @@ -600,7 +600,7 @@ void hookEvents () { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java index 9cc067c0c4..0af98cae9a 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 @@ -219,7 +219,7 @@ public void addHelpListener (HelpListener listener) { } /** * Adds the listener to the collection of listeners who will - * be notified when the menu item is selected, by sending + * be notified when the menu item is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -227,7 +227,7 @@ public void addHelpListener (HelpListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the menu item is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -586,7 +586,7 @@ public void removeHelpListener (HelpListener listener) { } /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MessageBox.java index 9bb0c7cf43..ed0fde9835 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 @@ -124,7 +124,7 @@ public String getMessage () { * of the display. * * @return the ID of the button that was selected to dismiss the - * message box (e.g. SWT.OK, SWT.CANCEL, etc...) + * message box (e.g. SWT.OK, SWT.CANCEL, etc.) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the dialog has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java index 38453867d3..0bf52fecb5 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 @@ -16,7 +16,7 @@ import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; /** - * Instances of the receiver represent is an unselectable + * Instances of the receiver represent an unselectable * user interface object that is used to display progress, * typically in the form of a bar. * <dl> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Sash.java index 3731408963..05019e7b6e 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 @@ -75,7 +75,7 @@ public Sash (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -84,7 +84,7 @@ public Sash (Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -188,7 +188,7 @@ void releaseWidget () { } /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scale.java index 0fb6132258..23204cef1c 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 @@ -73,11 +73,11 @@ public Scale (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control's value changes. + * <code>widgetSelected</code> is called when the user changes the receiver's value. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -246,7 +246,7 @@ void register () { } /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java index 3050b0fe9d..494c784b7a 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 @@ -92,7 +92,7 @@ ScrollBar (Scrollable parent, int style) { } /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -108,7 +108,7 @@ ScrollBar (Scrollable parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -407,7 +407,7 @@ void releaseWidget () { } /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java index e5263e7860..70ad754c36 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 @@ -820,7 +820,7 @@ Composite findDeferredControl () { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ @@ -998,7 +998,7 @@ public Shell getShell () { } /** * Returns an array containing all shells which are - * descendents of the receiver. + * descendants of the receiver. * <p> * @return the dialog shells * @@ -1130,7 +1130,7 @@ void manageChildren () { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#setActive * @see Shell#forceActive */ @@ -1224,7 +1224,7 @@ public void removeShellListener(ShellListener listener) { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java index 2e3f944b66..3c82c9c3a2 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 @@ -100,7 +100,7 @@ public Slider (Composite parent, int style) { } /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -116,7 +116,7 @@ public Slider (Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -287,7 +287,7 @@ void overrideTranslations () { } /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java index f95d18ffba..68072b7a33 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java @@ -22,11 +22,14 @@ import org.eclipse.swt.events.*; * objects that allow the user to enter and modify numeric * values. * <p> + * Note that although this class is a subclass of <code>Composite</code>, + * it does not make sense to add children to it, or set a layout on it. + * </p><p> * <dl> * <dt><b>Styles:</b></dt> * <dd>READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> - * <dd>Selection, Modify</dd> + * <dd>Selection, Modify, Verify</dd> * </dl> * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -95,7 +98,7 @@ public void addModifyListener (ModifyListener listener) { } /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -103,7 +106,7 @@ public void addModifyListener (ModifyListener listener) { * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -490,7 +493,7 @@ public void removeModifyListener (ModifyListener listener) { } /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java index 00ea77aa47..2d21c03c46 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 @@ -23,12 +23,13 @@ import org.eclipse.swt.events.*; * <p> * <dl> * <dt><b>Styles:</b></dt> - * <dd>CENTER, LEFT, MULTI, PASSWORD, SINGLE, RIGHT, READ_ONLY, WRAP</dd> + * <dd>CANCEL, CENTER, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> * <dd>DefaultSelection, Modify, Verify</dd> * </dl> * <p> - * Note: Only one of the styles MULTI and SINGLE may be specified. + * Note: Only one of the styles MULTI and SINGLE may be specified, + * and only one of the styles LEFT, CENTER, and RIGHT may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> @@ -129,15 +130,17 @@ public void addModifyListener (ModifyListener listener) { } /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * <code>widgetSelected</code> is not called for texts. - * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. + * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text, + * or when ENTER is pressed in a search text. If the receiver has the <code>SWT.SEARCH | SWT.CANCEL</code> style + * and the user cancels the search, the event object detail field contains the value <code>SWT.CANCEL</code>. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -681,6 +684,25 @@ int getLineNumber (int position) { } return count; } +/** + * Returns the widget message. When the widget is created + * with the style <code>SWT.SEARCH</code>, the message text + * is displayed as a hint for the user, indicating the + * purpose of the field. + * <p> + * Note: This operation is a <em>HINT</em> and is not + * supported on platforms that do not have this concept. + * </p> + * + * @return the widget message + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public String getMessage () { checkWidget (); return message; @@ -1055,7 +1077,7 @@ public void removeModifyListener (ModifyListener listener) { } /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -1233,6 +1255,28 @@ public void setEditable (boolean editable) { int [] argList = {OS.XmNcursorPositionVisible, editable && hasFocus () ? 1 : 0}; OS.XtSetValues (handle, argList, argList.length / 2); } +/** + * Sets the widget message. When the widget is created + * with the style <code>SWT.SEARCH</code>, the message text + * is displayed as a hint for the user, indicating the + * purpose of the field. + * <p> + * Note: This operation is a <em>HINT</em> and is not + * supported on platforms that do not have this concept. + * </p> + * + * @param message the new message + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the message is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public void setMessage (String message) { checkWidget (); if (message == null) error (SWT.ERROR_NULL_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java index 3795d093b9..492b8050f6 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 @@ -128,7 +128,7 @@ public ToolItem (ToolBar parent, int style, int index) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -137,7 +137,7 @@ public ToolItem (ToolBar parent, int style, int index) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user, * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -547,7 +547,7 @@ void releaseWidget () { } /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -682,7 +682,7 @@ void setForegroundPixel(int pixel) { * Sets the receiver's disabled image to the argument, which may be * null indicating that no disabled image should be displayed. * <p> - * The disbled image is displayed when the receiver is disabled. + * The disabled image is displayed when the receiver is disabled. * </p> * * @param image the disabled image to display on the receiver (may be null) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java index b751545a23..169da7fe07 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 @@ -175,7 +175,7 @@ public Widget (Widget parent, int style) { * * @see Listener * @see SWT - * @see #removeListener + * @see #removeListener(int, Listener) * @see #notifyListeners */ public void addListener (int eventType, Listener handler) { @@ -321,13 +321,13 @@ void destroyWidget () { } /** * Disposes of the operating system resources associated with - * the receiver and all its descendents. After this method has - * been invoked, the receiver and all descendents will answer + * the receiver and all its descendants. After this method has + * been invoked, the receiver and all descendants will answer * <code>true</code> when sent the message <code>isDisposed()</code>. * Any internal connections between the widgets in the tree will * have been removed to facilitate garbage collection. * <p> - * NOTE: This method is not called recursively on the descendents + * NOTE: This method is not called recursively on the descendants * of the receiver. This means that, widget implementers can not * detect when a widget is being disposed of by re-implementing * this method, but should instead listen for the <code>Dispose</code> @@ -564,7 +564,7 @@ void manageChildren () { * * @see SWT * @see #addListener - * @see #removeListener + * @see #removeListener(int, Listener) */ public void notifyListeners (int eventType, Event event) { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java index 8f12c23e24..30aa06b23b 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java @@ -526,6 +526,22 @@ public boolean isDisposed () { return disposed; } +/** + * Loads the font specified by a file. The font will be + * present in the list of fonts available to the application. + * + * @param path the font file path + * @return whether the font was successfully loaded + * + * @exception SWTException <ul> + * <li>ERROR_NULL_ARGUMENT - if path is null</li> + * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see Font + * + * @since 3.3 + */ public boolean loadFont (String path) { checkDevice(); if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java index 784e3d5c6f..e2560952b5 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java @@ -114,7 +114,7 @@ FontData(byte[] stem) { } /** - * Constructs a new un-initialized font data. + * Constructs a new uninitialized font data. */ public FontData() { this("", 12, SWT.NORMAL); @@ -236,7 +236,7 @@ public boolean equals (Object object) { * * @return the height of this FontData * - * @see #setHeight + * @see #setHeight(int) */ public int getHeight() { return height; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java index c39bfca487..2707392300 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java @@ -90,8 +90,8 @@ GC() { /** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the - * foreground and background color in the GC to match those - * in the drawable. + * foreground color, background color and font in the GC + * to match those in the drawable. * <p> * You must dispose the graphics context when it is no longer required. * </p> @@ -115,8 +115,8 @@ public GC(Drawable drawable) { /** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the - * foreground and background color in the GC to match those - * in the drawable. + * foreground color, background color and font in the GC + * to match those in the drawable. * <p> * You must dispose the graphics context when it is no longer required. * </p> @@ -1016,7 +1016,12 @@ public void drawOval (int x, int y, int width, int height) { /** * Draws the path described by the parameter. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param path the path to draw * * @exception IllegalArgumentException <ul> @@ -1025,6 +1030,7 @@ public void drawOval (int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path @@ -1410,7 +1416,7 @@ public void drawText (String string, int x, int y, boolean isTransparent) { * @param string the string to be drawn * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn - * @param flags the flags specifing how to process the text + * @param flags the flags specifying how to process the text * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> @@ -1711,6 +1717,11 @@ public void fillOval (int x, int y, int width, int height) { /** * Fills the path described by the parameter. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param path the path to fill * @@ -1720,6 +1731,7 @@ public void fillOval (int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path @@ -1909,6 +1921,7 @@ public int getAdvanceWidth(char ch) { * </ul> * * @see #setAdvanced + * * @since 3.1 */ public boolean getAdvanced() { @@ -2239,6 +2252,17 @@ public int getInterpolation() { return SWT.DEFAULT; } +/** + * Returns the receiver's line attributes. + * + * @return the line attributes used for drawing lines + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @since 3.3 + */ public LineAttributes getLineAttributes() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); float[] dashes = null; @@ -2273,7 +2297,7 @@ public int getLineCap() { * Returns the receiver's line dash style. The default value is * <code>null</code>. * - * @return the lin dash style used for drawing lines + * @return the line dash style used for drawing lines * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> @@ -2530,8 +2554,7 @@ public boolean isDisposed() { * advanced and normal graphics operations. Because the two subsystems are * different, their output may differ. Switching to advanced graphics before * any graphics operations are performed ensures that the output is consistent. - * </p> - * <p> + * </p><p> * Advanced graphics may not be installed for the operating system. In this * case, this operation does nothing. Some operating system have only one * graphics subsystem, so switching from normal to advanced graphics does @@ -2551,6 +2574,7 @@ public boolean isDisposed() { * @see #setBackgroundPattern * @see #setClipping(Path) * @see #setForegroundPattern + * @see #setLineAttributes * @see #setInterpolation * @see #setTextAntialias * @see #setTransform @@ -2574,13 +2598,21 @@ public void setAdvanced(boolean advanced) { /** * Sets the receiver's alpha value. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param alpha the alpha value * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.1 */ public void setAlpha(int alpha) { @@ -2592,6 +2624,11 @@ public void setAlpha(int alpha) { * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing for all * <em>non-text drawing</em> operations. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param antialias the anti-aliasing setting * @@ -2601,8 +2638,11 @@ public void setAlpha(int alpha) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced * @see #setTextAntialias * * @since 3.1 @@ -2644,7 +2684,12 @@ public void setBackground (Color color) { /** * Sets the background pattern. The default value is <code>null</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param pattern the new background pattern * * @exception IllegalArgumentException <ul> @@ -2652,9 +2697,12 @@ public void setBackground (Color color) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2707,8 +2755,13 @@ public void setClipping (int x, int y, int width, int height) { /** * Sets the area of the receiver which can be changed * by drawing operations to the path specified - * by the argument. - * + * by the argument. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param path the clipping path. * * @exception IllegalArgumentException <ul> @@ -2716,9 +2769,12 @@ public void setClipping (int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2868,7 +2924,12 @@ public void setForeground (Color color) { * Sets the receiver's interpolation setting to the parameter, which * must be one of <code>SWT.DEFAULT</code>, <code>SWT.NONE</code>, * <code>SWT.LOW</code> or <code>SWT.HIGH</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param interpolation the new interpolation setting * * @exception IllegalArgumentException <ul> @@ -2877,8 +2938,12 @@ public void setForeground (Color color) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.1 */ public void setInterpolation(int interpolation) { @@ -2896,7 +2961,11 @@ public void setInterpolation(int interpolation) { /** * Sets the foreground pattern. The default value is <code>null</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param pattern the new foreground pattern * * @exception IllegalArgumentException <ul> @@ -2904,9 +2973,12 @@ public void setInterpolation(int interpolation) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2916,6 +2988,30 @@ public void setForegroundPattern (Pattern pattern) { if (pattern.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); } +/** + * Sets the receiver's line attributes. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * @param attributes the line attributes + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the attributes is null</li> + * <li>ERROR_INVALID_ARGUMENT - if any of the line attributes is not valid</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> + * + * @see LineAttributes + * @see #getAdvanced + * @see #setAdvanced + * + * @since 3.3 + */ public void setLineAttributes(LineAttributes attributes) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); @@ -3244,7 +3340,12 @@ int getClipping(int widget, int topWidget, boolean clipChildren, boolean clipSib * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing only * for all <em>text drawing</em> operations. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param antialias the anti-aliasing setting * * @exception IllegalArgumentException <ul> @@ -3253,8 +3354,11 @@ int getClipping(int widget, int topWidget, boolean clipChildren, boolean clipSib * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced * @see #setAntialias * * @since 3.1 @@ -3270,11 +3374,16 @@ public void setTextAntialias(int antialias) { } } -/** +/** * Sets the transform that is currently being used by the receiver. If * the argument is <code>null</code>, the current transform is set to * the identity transform. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param transform the transform to set * * @exception IllegalArgumentException <ul> @@ -3282,9 +3391,12 @@ public void setTextAntialias(int antialias) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Transform + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -3405,7 +3517,7 @@ public Point textExtent(String string) { * </p> * * @param string the string to measure - * @param flags the flags specifing how to process the text + * @param flags the flags specifying how to process the text * @return a point containing the extent of the string * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java index 9f6379eb6e..f8e2996ba4 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java @@ -101,11 +101,11 @@ static int checkStyle (int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control is selected. + * <code>widgetSelected</code> is called when the control is selected by the user. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -386,7 +386,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -508,7 +508,12 @@ public void setSelection (boolean selected) { /** * Sets the receiver's image to the argument, which may be * <code>null</code> indicating that no image should be displayed. - * + * <p> + * Note that a Button can display an image and text simultaneously + * on Windows (starting with XP), GTK+ and OSX. On other platforms, + * a Button that has an image and text set into it will display the + * image or text that was set most recently. + * </p> * @param image the image to display on the receiver (may be <code>null</code>) * * @exception IllegalArgumentException <ul> @@ -547,12 +552,16 @@ public void setImage (Image image) { * character to be the mnemonic. When the user presses a * key sequence that matches the mnemonic, a selection * event occurs. On most platforms, the mnemonic appears - * underlined but may be emphasised in a platform specific + * underlined but may be emphasized in a platform specific * manner. The mnemonic indicator character '&' can be * escaped by doubling it in the string, causing a single * '&' to be displayed. + * </p><p> + * Note that a Button can display an image and text simultaneously + * on Windows (starting with XP), GTK+ and OSX. On other platforms, + * a Button that has an image and text set into it will display the + * image or text that was set most recently. * </p> - * * @param string the new text * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java index 06333953a1..06ba20caf0 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java @@ -42,7 +42,7 @@ import org.eclipse.swt.events.*; * <dt><b>Styles:</b></dt> * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd> * <dt><b>Events:</b></dt> - * <dd>DefaultSelection, Modify, Selection</dd> + * <dd>DefaultSelection, Modify, Selection, Verify</dd> * </dl> * <p> * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified. @@ -356,11 +356,11 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the combo's list selection changes. + * <code>widgetSelected</code> is called when the user changes the combo's list selection. * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed the combo's text area. * </p> * @@ -1051,7 +1051,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * @@ -1126,9 +1126,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize /** * Sets the text of the item in the receiver's list at the given - * zero-relative index to the string argument. This is equivalent - * to removing the old item at the index, and then adding the new - * item at that index. + * zero-relative index to the string argument. * * @param index the index for the item * @param string the new text for the item diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java index 7dd9d23a80..02a5a1d808 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java @@ -624,7 +624,13 @@ public Control [] getTabList () { * <p> * This is equivalent to calling <code>layout(true)</code>. * </p> - * + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -650,7 +656,14 @@ public void layout () { * will cascade down through all child widgets in the receiver's widget * tree until a child is encountered that does not resize. Note that * a layout due to a resize will not flush any cached information - * (same as <code>layout(false)</code>).</p> + * (same as <code>layout(false)</code>). + * </p> + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise * @@ -681,7 +694,14 @@ public void layout (boolean changed) { * tree. However, if a child is resized as a result of a call to layout, the * resize event will invoke the layout of the child. Note that * a layout due to a resize will not flush any cached information - * (same as <code>layout(false)</code>).</p> + * (same as <code>layout(false)</code>). + * </p> + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise * @param all <code>true</code> if all children in the receiver's widget tree should be laid out, and <code>false</code> otherwise @@ -708,6 +728,12 @@ public void layout (boolean changed, boolean all) { * (potentially) optimize the work it is doing by assuming that none of the * peers of the changed control have changed state since the last layout. * If an ancestor does not have a layout, skip it. + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed a control that has had a state change which requires a recalculation of its size * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java index 1310090b4d..5b4eecfca9 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java @@ -25,9 +25,8 @@ import org.eclipse.swt.accessibility.*; * <dd>BORDER</dd> * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd> * <dt><b>Events:</b> - * <dd>FocusIn, FocusOut, Help, KeyDown, KeyUp, MouseDoubleClick, MouseDown, MouseEnter, - * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse, - * DragDetect, MenuDetect</dd> + * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter, + * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd> * </dl> * </p><p> * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified. @@ -111,6 +110,27 @@ public void addControlListener(ControlListener listener) { addListener (SWT.Move,typedListener); } +/** + * Adds the listener to the collection of listeners who will + * be notified when a drag gesture occurs, by sending it + * one of the messages defined in the <code>DragDetectListener</code> + * interface. + * + * @param listener the listener which should be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #removeDragDetectListener + * + * @since 3.3 + */ public void addDragDetectListener (DragDetectListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -176,7 +196,18 @@ public void addHelpListener (HelpListener listener) { * be notified when keys are pressed and released on the system keyboard, by sending * it one of the messages defined in the <code>KeyListener</code> * interface. - * + * <p> + * When a key listener is added to a control, the control + * will take part in widget traversal. By default, all + * traversal keys (such as the tab key and so on) are + * delivered to the control. In order for a control to take + * part in traversal, it should listen for traversal events. + * Otherwise, the user can traverse into a control but not + * out. Note that native controls such as table and tree + * implement key traversal in the operating system. It is + * not necessary to add traversal listeners for these controls, + * unless you want to override the default traversal. + * </p> * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> @@ -552,12 +583,84 @@ boolean drawGripper (int x, int y, int width, int height, boolean vertical) { return false; } +/** + * Detects a drag and drop gesture. This method is used + * to detect a drag gesture when called from within a mouse + * down listener. + * + * <p>By default, a drag is detected when the gesture + * occurs anywhere within the client area of a control. + * Some controls, such as tables and trees, override this + * behavior. In addition to the operating system specific + * drag gesture, they require the mouse to be inside an + * item. Custom widget writers can use <code>setDragDetect</code> + * to disable the default detection, listen for mouse down, + * and then call <code>dragDetect()</code> from within the + * listener to conditionally detect a drag. + * </p> + * + * @param event the mouse down event + * + * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT when the event is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @see #getDragDetect + * @see #setDragDetect + * + * @since 3.3 + */ public boolean dragDetect (Event event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); return dragDetect (event.button, event.count, event.stateMask, event.x, event.y); } +/** + * Detects a drag and drop gesture. This method is used + * to detect a drag gesture when called from within a mouse + * down listener. + * + * <p>By default, a drag is detected when the gesture + * occurs anywhere within the client area of a control. + * Some controls, such as tables and trees, override this + * behavior. In addition to the operating system specific + * drag gesture, they require the mouse to be inside an + * item. Custom widget writers can use <code>setDragDetect</code> + * to disable the default detection, listen for mouse down, + * and then call <code>dragDetect()</code> from within the + * listener to conditionally detect a drag. + * </p> + * + * @param event the mouse down event + * + * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT when the event is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @see #getDragDetect + * @see #setDragDetect + * + * @since 3.3 + */ public boolean dragDetect (MouseEvent event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -806,11 +909,38 @@ public Rectangle getBounds () { return new Rectangle (area.pos_x, area.pos_y, area.size_w, area.size_h); } +/** + * Returns the receiver's cursor, or null if it has not been set. + * <p> + * When the mouse pointer passes over a control its appearance + * is changed to match the control's cursor. + * </p> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Cursor getCursor () { checkWidget (); return cursor; } +/** + * Returns <code>true</code> if the receiver is detecting + * drag gestures, and <code>false</code> otherwise. + * + * @return the receiver's drag detect state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public boolean getDragDetect () { checkWidget (); //TODO - not implemented @@ -1736,12 +1866,13 @@ void releaseWidget () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #update + * @see #update() * @see PaintListener * @see SWT#Paint * @see SWT#NO_BACKGROUND * @see SWT#NO_REDRAW_RESIZE * @see SWT#NO_MERGE_PAINTS + * @see SWT#DOUBLE_BUFFERED */ public void redraw () { checkWidget(); @@ -1770,12 +1901,13 @@ public void redraw () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #update + * @see #update() * @see PaintListener * @see SWT#Paint * @see SWT#NO_BACKGROUND * @see SWT#NO_REDRAW_RESIZE * @see SWT#NO_MERGE_PAINTS + * @see SWT#DOUBLE_BUFFERED */ public void redraw (int x, int y, int width, int height, boolean allChildren) { checkWidget (); @@ -1813,6 +1945,25 @@ public void removeControlListener (ControlListener listener) { eventTable.unhook (SWT.Resize, listener); } +/** + * Removes the listener from the collection of listeners who will + * be notified when a drag gesture occurs. + * + * @param listener the listener which should no longer be notified + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @since 3.3 + */ public void removeDragDetectListener(DragDetectListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -2237,6 +2388,20 @@ public void setCursor (Cursor cursor) { } } +/** + * Sets the receiver's drag detect state. If the argument is + * <code>true</code>, the receiver will detect drag gestures, + * otherwise these gestures will be ignored. + * + * @param dragDetect the new drag detect state + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public void setDragDetect (boolean dragDetect) { checkWidget (); //TODO - not implemented @@ -2291,7 +2456,10 @@ public boolean setFocus () { * Sets the receiver's background color to the color specified * by the argument, or to the default system color for the control * if the argument is null. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + * </p> * @param color the new color (or null) * * @exception IllegalArgumentException <ul> @@ -2319,7 +2487,10 @@ public void setBackground (Color color) { * by the argument, or to the default system color for the control * if the argument is null. The background image is tiled to fill * the available space. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + * </p> * @param image the new image (or null) * * @exception IllegalArgumentException <ul> @@ -2399,7 +2570,9 @@ void setFont (int font) { * Sets the receiver's foreground color to the color specified * by the argument, or to the default system color for the control * if the argument is null. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * </p> * @param color the new color (or null) * * @exception IllegalArgumentException <ul> @@ -2598,7 +2771,7 @@ boolean setRadioSelection (boolean value) { * </ul> * * @see #redraw(int, int, int, int, boolean) - * @see #update + * @see #update() */ public void setRedraw (boolean redraw) { checkWidget(); @@ -2981,13 +3154,19 @@ boolean traverseReturn () { /** * Forces all outstanding paint requests for the widget - * to be processed before this method returns. + * to be processed before this method returns. If there + * are no outstanding paint request, this method does + * nothing. + * <p> + * Note: This method does not cause a redraw. + * </p> * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * + * @see #redraw() * @see #redraw(int, int, int, int, boolean) * @see PaintListener * @see SWT#Paint diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java index 6e9256633a..173f3b4264 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java @@ -197,7 +197,7 @@ Control computeTabRoot () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #setDefaultButton + * @see #setDefaultButton(Button) */ public Button getDefaultButton () { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java index d91cb7d08f..35ab3e36f6 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java @@ -79,7 +79,7 @@ import org.eclipse.swt.graphics.*; * <dt><b>Styles:</b></dt> * <dd>(none)</dd> * <dt><b>Events:</b></dt> - * <dd>Close, Dispose</dd> + * <dd>Close, Dispose, Settings</dd> * </dl> * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -2457,7 +2457,7 @@ public boolean sleep () { * @param runnable code to run on the user-interface thread or <code>null</code> * * @exception SWTException <ul> - * <li>ERROR_FAILED_EXEC - if an exception occured when executing the runnable</li> + * <li>ERROR_FAILED_EXEC - if an exception occurred when executing the runnable</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java index 2384f27c94..6f4694a468 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java @@ -78,11 +78,11 @@ public Link (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control is selected. + * <code>widgetSelected</code> is called when the control is selected by the user. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -541,7 +541,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/List.java index 0a6f0c0582..85f7668da9 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/List.java @@ -100,7 +100,7 @@ public void add (String string) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -108,7 +108,7 @@ public void add (String string) { * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -679,7 +679,7 @@ public int indexOf (String string, int start) { * range are ignored. * * @param index the index of the item - * @return the visibility state of the item at the index + * @return the selection state of the item at the index * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -847,7 +847,7 @@ public void removeAll () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * @@ -1000,9 +1000,7 @@ public void selectAll () { /** * Sets the text of the item in the receiver's list at the given - * zero-relative index to the string argument. This is equivalent - * to <code>remove</code>'ing the old item at the index, and then - * <code>add</code>'ing the new item at that index. + * zero-relative index to the string argument. * * @param index the index for the item * @param string the new text for the item diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java index 0dbe2f2d45..7d117fba2b 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java @@ -503,7 +503,7 @@ void hookEvents () { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java index 5d87854e1a..f39fa2e303 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java @@ -187,7 +187,7 @@ public void addHelpListener (HelpListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the menu item is selected, by sending + * be notified when the menu item is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -195,7 +195,7 @@ public void addHelpListener (HelpListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the menu item is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -546,7 +546,7 @@ void removeAccelerator () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MessageBox.java index 18b8dc57cc..5cd16a587d 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MessageBox.java @@ -105,7 +105,7 @@ public String getMessage () { * of the display. * * @return the ID of the button that was selected to dismiss the - * message box (e.g. SWT.OK, SWT.CANCEL, etc...) + * message box (e.g. SWT.OK, SWT.CANCEL, etc.) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the dialog has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ProgressBar.java index 965fc6fbc5..4840869621 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ProgressBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ProgressBar.java @@ -16,7 +16,7 @@ import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; /** - * Instances of the receiver represent is an unselectable + * Instances of the receiver represent an unselectable * user interface object that is used to display progress, * typically in the form of a bar. * <dl> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Sash.java index c302342d0d..0036fc90dd 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Sash.java @@ -74,7 +74,7 @@ public Sash (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -83,7 +83,7 @@ public Sash (Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -311,7 +311,7 @@ void processMouse (int info) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scale.java index 040c50d992..a356fb3fd9 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scale.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scale.java @@ -72,11 +72,11 @@ public Scale (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control's value changes. + * <code>widgetSelected</code> is called when the user changes the receiver's value. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -255,7 +255,7 @@ int Pt_CB_SLIDER_MOVE (int widget, int info) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java index 9fbe8b8be3..a0547046bc 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java @@ -102,7 +102,7 @@ static int checkStyle (int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -118,7 +118,7 @@ static int checkStyle (int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -439,7 +439,7 @@ int Pt_CB_SCROLL_MOVE (int widget, int info) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java index ebcbb4a3bf..9c60d560ba 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java @@ -541,7 +541,7 @@ Composite findDeferredControl () { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ @@ -674,7 +674,7 @@ public Shell getShell () { /** * Returns an array containing all shells which are - * descendents of the receiver. + * descendants of the receiver. * <p> * @return the dialog shells * @@ -760,7 +760,7 @@ int hotkeyProc (int w, int data, int info) { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#setActive * @see Shell#forceActive */ @@ -911,7 +911,7 @@ public void removeShellListener (ShellListener listener) { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java index a5a7cc0ec5..ea202ecd19 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java @@ -105,7 +105,7 @@ static int checkStyle (int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -121,7 +121,7 @@ static int checkStyle (int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -338,7 +338,7 @@ int Pt_CB_SCROLL_MOVE (int widget, int info) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java index 6d3fe7684e..cb551f8788 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java @@ -20,11 +20,14 @@ import org.eclipse.swt.*; * objects that allow the user to enter and modify numeric * values. * <p> + * Note that although this class is a subclass of <code>Composite</code>, + * it does not make sense to add children to it, or set a layout on it. + * </p><p> * <dl> * <dt><b>Styles:</b></dt> * <dd>READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> - * <dd>Selection, Modify</dd> + * <dd>Selection, Modify, Verify</dd> * </dl> * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -130,7 +133,7 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -138,7 +141,7 @@ public void addModifyListener (ModifyListener listener) { * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -514,7 +517,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java index 9681ffdd0e..6c7460a400 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java @@ -93,7 +93,7 @@ static int checkStyle (int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -101,7 +101,7 @@ static int checkStyle (int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -423,7 +423,7 @@ void hookEvents () { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -545,7 +545,7 @@ void removeControl (Control control) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java index 8bb03c7752..434dd5d718 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java @@ -23,12 +23,13 @@ import org.eclipse.swt.events.*; * <p> * <dl> * <dt><b>Styles:</b></dt> - * <dd>CENTER, LEFT, MULTI, PASSWORD, SINGLE, RIGHT, READ_ONLY, WRAP</dd> + * <dd>CANCEL, CENTER, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> * <dd>DefaultSelection, Modify, Verify</dd> * </dl> * <p> - * Note: Only one of the styles MULTI and SINGLE may be specified. + * Note: Only one of the styles MULTI and SINGLE may be specified, + * and only one of the styles LEFT, CENTER, and RIGHT may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> @@ -253,15 +254,17 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * <code>widgetSelected</code> is not called for texts. - * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. + * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text, + * or when ENTER is pressed in a search text. If the receiver has the <code>SWT.SEARCH | SWT.CANCEL</code> style + * and the user cancels the search, the event object detail field contains the value <code>SWT.CANCEL</code>. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -617,6 +620,25 @@ public int getLineHeight () { return extent.lr_y - extent.ul_y + 1 + args [4]; } +/** + * Returns the widget message. When the widget is created + * with the style <code>SWT.SEARCH</code>, the message text + * is displayed as a hint for the user, indicating the + * purpose of the field. + * <p> + * Note: This operation is a <em>HINT</em> and is not + * supported on platforms that do not have this concept. + * </p> + * + * @return the widget message + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public String getMessage () { checkWidget (); return message; @@ -1107,7 +1129,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -1254,6 +1276,28 @@ public void setFont (Font font) { setTabStops (tabs); } +/** + * Sets the widget message. When the widget is created + * with the style <code>SWT.SEARCH</code>, the message text + * is displayed as a hint for the user, indicating the + * purpose of the field. + * <p> + * Note: This operation is a <em>HINT</em> and is not + * supported on platforms that do not have this concept. + * </p> + * + * @param message the new message + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the message is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public void setMessage (String message) { checkWidget (); if (message == null) error (SWT.ERROR_NULL_ARGUMENT); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java index 9dadf357be..d60a23ec6e 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java @@ -125,7 +125,7 @@ public ToolItem (ToolBar parent, int style, int index) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -134,7 +134,7 @@ public ToolItem (ToolBar parent, int style, int index) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user, * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -579,7 +579,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -662,7 +662,7 @@ void setDefaultFont () { * Sets the receiver's disabled image to the argument, which may be * null indicating that no disabled image should be displayed. * <p> - * The disbled image is displayed when the receiver is disabled. + * The disabled image is displayed when the receiver is disabled. * </p> * * @param image the disabled image to display on the receiver (may be null) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java index 829cd567f7..ed186458bc 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java @@ -273,7 +273,7 @@ int copyPhImage(int image) { * * @see Listener * @see SWT - * @see #removeListener + * @see #removeListener(int, Listener) * @see #notifyListeners */ public void addListener (int eventType, Listener handler) { @@ -409,13 +409,13 @@ void destroyWidget () { /** * Disposes of the operating system resources associated with - * the receiver and all its descendents. After this method has - * been invoked, the receiver and all descendents will answer + * the receiver and all its descendants. After this method has + * been invoked, the receiver and all descendants will answer * <code>true</code> when sent the message <code>isDisposed()</code>. * Any internal connections between the widgets in the tree will * have been removed to facilitate garbage collection. * <p> - * NOTE: This method is not called recursively on the descendents + * NOTE: This method is not called recursively on the descendants * of the receiver. This means that, widget implementers can not * detect when a widget is being disposed of by re-implementing * this method, but should instead listen for the <code>Dispose</code> @@ -663,7 +663,7 @@ boolean isValidThread () { * * @see SWT * @see #addListener - * @see #removeListener + * @see #removeListener(int, Listener) */ public void notifyListeners (int eventType, Event event) { checkWidget(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java index 399743e2f5..85899a4506 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java @@ -107,7 +107,7 @@ public final class FontData { String lang, country, variant; /** - * Constructs a new un-initialized font data. + * Constructs a new uninitialized font data. */ public FontData() { fontFamily = ""; @@ -276,7 +276,7 @@ public boolean equals (Object object) { * * @return the height of this FontData * - * @see #setHeight + * @see #setHeight(int) */ public int getHeight() { return height; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/GC.java index 1882f72715..ac26c6b3c9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/GC.java @@ -90,8 +90,8 @@ GC() { /** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the - * foreground and background color in the GC to match those - * in the drawable. + * foreground color, background color and font in the GC + * to match those in the drawable. * <p> * You must dispose the graphics context when it is no longer required. * </p> @@ -115,8 +115,8 @@ public GC(Drawable drawable) { /** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the - * foreground and background color in the GC to match those - * in the drawable. + * foreground color, background color and font in the GC + * to match those in the drawable. * <p> * You must dispose the graphics context when it is no longer required. * </p> @@ -694,7 +694,12 @@ public void drawOval (int x, int y, int width, int height) { /** * Draws the path described by the parameter. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param path the path to draw * * @exception IllegalArgumentException <ul> @@ -703,6 +708,7 @@ public void drawOval (int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path @@ -1047,7 +1053,7 @@ public void drawText (String string, int x, int y, boolean isTransparent) { * @param string the string to be drawn * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn - * @param flags the flags specifing how to process the text + * @param flags the flags specifying how to process the text * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> @@ -1311,6 +1317,11 @@ public void fillOval (int x, int y, int width, int height) { /** * Fills the path described by the parameter. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param path the path to fill * @@ -1320,6 +1331,7 @@ public void fillOval (int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path @@ -1490,6 +1502,7 @@ public int getAdvanceWidth(char ch) { * </ul> * * @see #setAdvanced + * * @since 3.1 */ public boolean getAdvanced() { @@ -1866,7 +1879,7 @@ public int getLineCap() { * Returns the receiver's line dash style. The default value is * <code>null</code>. * - * @return the lin dash style used for drawing lines + * @return the line dash style used for drawing lines * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> @@ -2116,8 +2129,7 @@ public boolean isDisposed() { * advanced and normal graphics operations. Because the two subsystems are * different, their output may differ. Switching to advanced graphics before * any graphics operations are performed ensures that the output is consistent. - * </p> - * <p> + * </p><p> * Advanced graphics may not be installed for the operating system. In this * case, this operation does nothing. Some operating system have only one * graphics subsystem, so switching from normal to advanced graphics does @@ -2137,6 +2149,7 @@ public boolean isDisposed() { * @see #setBackgroundPattern * @see #setClipping(Path) * @see #setForegroundPattern + * @see #setLineAttributes * @see #setInterpolation * @see #setTextAntialias * @see #setTransform @@ -2163,6 +2176,11 @@ public void setAdvanced(boolean advanced) { * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing for all * <em>non-text drawing</em> operations. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param antialias the anti-aliasing setting * @@ -2172,8 +2190,11 @@ public void setAdvanced(boolean advanced) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced * @see #setTextAntialias * * @since 3.1 @@ -2193,13 +2214,21 @@ public void setAntialias(int antialias) { /** * Sets the receiver's alpha value. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param alpha the alpha value * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.1 */ public void setAlpha(int alpha) { @@ -2235,7 +2264,12 @@ public void setBackground (Color color) { /** * Sets the background pattern. The default value is <code>null</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param pattern the new background pattern * * @exception IllegalArgumentException <ul> @@ -2243,9 +2277,12 @@ public void setBackground (Color color) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2292,8 +2329,13 @@ public void setClipping (int x, int y, int width, int height) { /** * Sets the area of the receiver which can be changed * by drawing operations to the path specified - * by the argument. - * + * by the argument. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param path the clipping path. * * @exception IllegalArgumentException <ul> @@ -2301,9 +2343,12 @@ public void setClipping (int x, int y, int width, int height) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Path + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2438,7 +2483,11 @@ public void setForeground (Color color) { /** * Sets the foreground pattern. The default value is <code>null</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param pattern the new foreground pattern * * @exception IllegalArgumentException <ul> @@ -2446,9 +2495,12 @@ public void setForeground (Color color) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Pattern + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2464,7 +2516,12 @@ public void setForegroundPattern (Pattern pattern) { * Sets the receiver's interpolation setting to the parameter, which * must be one of <code>SWT.DEFAULT</code>, <code>SWT.NONE</code>, * <code>SWT.LOW</code> or <code>SWT.HIGH</code>. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param interpolation the new interpolation setting * * @exception IllegalArgumentException <ul> @@ -2473,8 +2530,12 @@ public void setForegroundPattern (Pattern pattern) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.1 */ public void setInterpolation(int interpolation) { @@ -2492,7 +2553,11 @@ public void setInterpolation(int interpolation) { /** * Sets the receiver's line attributes. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * @param attributes the line attributes * * @exception IllegalArgumentException <ul> @@ -2501,8 +2566,13 @@ public void setInterpolation(int interpolation) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see LineAttributes + * @see #getAdvanced + * @see #setAdvanced + * * @since 3.3 */ public void setLineAttributes(LineAttributes attributes) { @@ -2798,7 +2868,12 @@ public void setXORMode(boolean xor) { * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing only * for all <em>text drawing</em> operations. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param antialias the anti-aliasing setting * * @exception IllegalArgumentException <ul> @@ -2807,8 +2882,11 @@ public void setXORMode(boolean xor) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * + * @see #getAdvanced + * @see #setAdvanced * @see #setAntialias * * @since 3.1 @@ -2826,11 +2904,16 @@ public void setTextAntialias(int antialias) { data.textAntialias = antialias; } -/** +/** * Sets the transform that is currently being used by the receiver. If * the argument is <code>null</code>, the current transform is set to * the identity transform. - * + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> + * * @param transform the transform to set * * @exception IllegalArgumentException <ul> @@ -2838,9 +2921,12 @@ public void setTextAntialias(int antialias) { * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> * * @see Transform + * @see #getAdvanced + * @see #setAdvanced * * @since 3.1 */ @@ -2918,7 +3004,7 @@ public Point textExtent(String string) { * </p> * * @param string the string to measure - * @param flags the flags specifing how to process the text + * @param flags the flags specifying how to process the text * @return a point containing the extent of the string * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Image.java index 225127d2a9..8f9dc02cca 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Image.java @@ -1028,7 +1028,7 @@ public int internal_new_GC (GCData data) { * application code. * </p> * - * @param dc the platform specific GC handle + * @param hDC the platform specific GC handle * @param data the platform specific GC data */ public void internal_dispose_GC (int dc, GCData data) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Path.java index 6b21644adc..ae1b303c00 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Path.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Path.java @@ -23,6 +23,10 @@ import org.eclipse.swt.internal.wpf.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -44,14 +48,22 @@ public class Path extends Resource { /** * Constructs a new empty Path. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the path * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained</li> * </ul> * * @see #dispose() diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Pattern.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Pattern.java index 93dcd4e751..a8d42e88b7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Pattern.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Pattern.java @@ -21,6 +21,10 @@ import org.eclipse.swt.internal.wpf.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -41,6 +45,11 @@ public class Pattern extends Resource { /** * Constructs a new Pattern given an image. Drawing with the resulting * pattern will cause the image to be tiled over the resulting area. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param image the image that the pattern will draw @@ -49,8 +58,11 @@ public class Pattern extends Resource { * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device, or the image is null</li> * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() @@ -76,6 +88,11 @@ public Pattern(Device device, Image image) { * Constructs a new Pattern that represents a linear, two color * gradient. Drawing with the pattern will cause the resulting area to be * tiled with the gradient specified by the arguments. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param x1 the x coordinate of the starting corner of the gradient @@ -90,8 +107,11 @@ public Pattern(Device device, Image image) { * or if either color1 or color2 is null</li> * <li>ERROR_INVALID_ARGUMENT - if either color1 or color2 has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() @@ -104,6 +124,11 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo * Constructs a new Pattern that represents a linear, two color * gradient. Drawing with the pattern will cause the resulting area to be * tiled with the gradient specified by the arguments. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the pattern * @param x1 the x coordinate of the starting corner of the gradient @@ -120,8 +145,11 @@ public Pattern(Device device, float x1, float y1, float x2, float y2, Color colo * or if either color1 or color2 is null</li> * <li>ERROR_INVALID_ARGUMENT - if either color1 or color2 has been disposed</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the pattern could not be obtained</li> * </ul> * * @see #dispose() diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/TextLayout.java index 5f97a20e8d..137ae5f2f9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/TextLayout.java @@ -274,6 +274,33 @@ public void draw (GC gc, int x, int y) { public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground) { draw(gc, x, y, selectionStart, selectionEnd, selectionForeground, selectionBackground, 0); } +/** + * Draws the receiver's text using the specified GC at the specified + * point. + * <p> + * The parameter <code>flags</code> can include one of <code>SWT.DELIMITER_SELECTION</code> + * or <code>SWT.FULL_SELECTION</code> to specify the selection behavior on all lines except + * for the last line, and can also include <code>SWT.LAST_LINE_SELECTION</code> to extend + * the specified selection behavior to the last line. + * </p> + * @param gc the GC to draw + * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn + * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn + * @param selectionStart the offset where the selections starts, or -1 indicating no selection + * @param selectionEnd the offset where the selections ends, or -1 indicating no selection + * @param selectionForeground selection foreground, or NULL to use the system default color + * @param selectionBackground selection background, or NULL to use the system default color + * @param flags drawing options + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT - if the gc is null</li> + * </ul> + * + * @since 3.3 + */ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout(); computeRuns(); @@ -610,7 +637,7 @@ public boolean getJustify () { * embedding level is usually used to determine the directionality of a * character in bidirectional text. * - * @param offset the charecter offset + * @param offset the character offset * @return the embedding level * * @exception IllegalArgumentException <ul> @@ -843,7 +870,8 @@ public Point getLocation (int offset, boolean trailing) { /** * Returns the next offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code>, <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type @@ -1028,7 +1056,8 @@ public int getOrientation () { /** * Returns the previous offset for the specified offset and movement * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, - * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. + * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>, + * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. * * @param offset the start offset * @param movement the movement type diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Transform.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Transform.java index b90a166098..3cef29c5a7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Transform.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Transform.java @@ -21,6 +21,10 @@ import org.eclipse.swt.internal.wpf.*; * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> + * <p> + * This class requires the operating system's advanced graphics subsystem + * which may not be available on some platforms. + * </p> * * @since 3.1 */ @@ -40,14 +44,22 @@ public class Transform extends Resource { /** * Constructs a new identity Transform. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -59,6 +71,11 @@ public Transform (Device device) { /** * Constructs a new Transform given an array of elements that represent the * matrix that describes the transformation. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * @param elements an array of floats that describe the transformation matrix @@ -67,8 +84,11 @@ public Transform (Device device) { * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device, or the elements array is null</li> * <li>ERROR_INVALID_ARGUMENT - if the elements array is too small to hold the matrix values</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -80,6 +100,11 @@ public Transform(Device device, float[] elements) { /** * Constructs a new Transform given all of the elements that represent the * matrix that describes the transformation. + * <p> + * This operation requires the operating system's advanced + * graphics subsystem which may not be available on some + * platforms. + * </p> * * @param device the device on which to allocate the Transform * @param m11 the first element of the first row of the matrix @@ -92,8 +117,11 @@ public Transform(Device device, float[] elements) { * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> + * @exception SWTException <ul> + * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> + * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained/li> + * <li>ERROR_NO_HANDLES if a handle for the Transform could not be obtained</li> * </ul> * * @see #dispose() @@ -159,7 +187,7 @@ public void getElements(float[] elements) { * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> - * <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertable</li> + * <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertible</li> * </ul> */ public void invert() { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Button.java index 1981d4b172..c70a03dbd4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Button.java @@ -88,11 +88,11 @@ public Button (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control is selected. + * <code>widgetSelected</code> is called when the control is selected by the user. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -395,7 +395,7 @@ void releaseWidget () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -460,7 +460,12 @@ void setDefault (boolean value) { /** * Sets the receiver's image to the argument, which may be * <code>null</code> indicating that no image should be displayed. - * + * <p> + * Note that a Button can display an image and text simultaneously + * on Windows (starting with XP), GTK+ and OSX. On other platforms, + * a Button that has an image and text set into it will display the + * image or text that was set most recently. + * </p> * @param image the image to display on the receiver (may be <code>null</code>) * * @exception IllegalArgumentException <ul> @@ -521,12 +526,16 @@ public void setSelection (boolean selected) { * character to be the mnemonic. When the user presses a * key sequence that matches the mnemonic, a selection * event occurs. On most platforms, the mnemonic appears - * underlined but may be emphasised in a platform specific + * underlined but may be emphasized in a platform specific * manner. The mnemonic indicator character '&' can be * escaped by doubling it in the string, causing a single * '&' to be displayed. + * </p><p> + * Note that a Button can display an image and text simultaneously + * on Windows (starting with XP), GTK+ and OSX. On other platforms, + * a Button that has an image and text set into it will display the + * image or text that was set most recently. * </p> - * * @param string the new text * * @exception IllegalArgumentException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Combo.java index f2116f447c..ad7d40feb0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Combo.java @@ -204,11 +204,11 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the combo's list selection changes. + * <code>widgetSelected</code> is called when the user changes the combo's list selection. * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed the combo's text area. * </p> * @@ -1080,7 +1080,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * @@ -1170,9 +1170,7 @@ void setForegroundBrush (int brush) { /** * Sets the text of the item in the receiver's list at the given - * zero-relative index to the string argument. This is equivalent - * to removing the old item at the index, and then adding the new - * item at that index. + * zero-relative index to the string argument. * * @param index the index for the item * @param string the new text for the item diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java index 2f381501e8..529c80ae01 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java @@ -613,7 +613,13 @@ boolean isTabGroup() { * <p> * This is equivalent to calling <code>layout(true)</code>. * </p> - * + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -639,7 +645,14 @@ public void layout () { * will cascade down through all child widgets in the receiver's widget * tree until a child is encountered that does not resize. Note that * a layout due to a resize will not flush any cached information - * (same as <code>layout(false)</code>).</p> + * (same as <code>layout(false)</code>). + * </p> + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise * @@ -670,7 +683,14 @@ public void layout (boolean changed) { * tree. However, if a child is resized as a result of a call to layout, the * resize event will invoke the layout of the child. Note that * a layout due to a resize will not flush any cached information - * (same as <code>layout(false)</code>).</p> + * (same as <code>layout(false)</code>). + * </p> + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed <code>true</code> if the layout must flush its caches, and <code>false</code> otherwise * @param all <code>true</code> if all children in the receiver's widget tree should be laid out, and <code>false</code> otherwise @@ -697,6 +717,12 @@ public void layout (boolean changed, boolean all) { * (potentially) optimize the work it is doing by assuming that none of the * peers of the changed control have changed state since the last layout. * If an ancestor does not have a layout, skip it. + * <p> + * Note: Layout is different from painting. If a child is + * moved or resized such that an area in the parent is + * exposed, then the parent will paint. If no child is + * affected, the parent will not paint. + * </p> * * @param changed a control that has had a state change which requires a recalculation of its size * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Control.java index f1d0c6c498..fb6498588d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Control.java @@ -24,9 +24,8 @@ import org.eclipse.swt.accessibility.*; * <dd>BORDER</dd> * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd> * <dt><b>Events:</b> - * <dd>FocusIn, FocusOut, Help, KeyDown, KeyUp, MouseDoubleClick, MouseDown, MouseEnter, - * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse, - * DragDetect, MenuDetect</dd> + * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter, + * MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd> * </dl> * </p><p> * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified. @@ -201,7 +200,18 @@ public void addHelpListener (HelpListener listener) { * be notified when keys are pressed and released on the system keyboard, by sending * it one of the messages defined in the <code>KeyListener</code> * interface. - * + * <p> + * When a key listener is added to a control, the control + * will take part in widget traversal. By default, all + * traversal keys (such as the tab key and so on) are + * delivered to the control. In order for a control to take + * part in traversal, it should listen for traversal events. + * Otherwise, the user can traverse into a control but not + * out. Note that native controls such as table and tree + * implement key traversal in the operating system. It is + * not necessary to add traversal listeners for these controls, + * unless you want to override the default traversal. + * </p> * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> @@ -623,12 +633,84 @@ void destroyWidget () { releaseHandle (); } +/** + * Detects a drag and drop gesture. This method is used + * to detect a drag gesture when called from within a mouse + * down listener. + * + * <p>By default, a drag is detected when the gesture + * occurs anywhere within the client area of a control. + * Some controls, such as tables and trees, override this + * behavior. In addition to the operating system specific + * drag gesture, they require the mouse to be inside an + * item. Custom widget writers can use <code>setDragDetect</code> + * to disable the default detection, listen for mouse down, + * and then call <code>dragDetect()</code> from within the + * listener to conditionally detect a drag. + * </p> + * + * @param event the mouse down event + * + * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT when the event is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @see #getDragDetect + * @see #setDragDetect + * + * @since 3.3 + */ public boolean dragDetect (Event event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); return dragDetect (event.button, event.count, event.stateMask, event.x, event.y); } +/** + * Detects a drag and drop gesture. This method is used + * to detect a drag gesture when called from within a mouse + * down listener. + * + * <p>By default, a drag is detected when the gesture + * occurs anywhere within the client area of a control. + * Some controls, such as tables and trees, override this + * behavior. In addition to the operating system specific + * drag gesture, they require the mouse to be inside an + * item. Custom widget writers can use <code>setDragDetect</code> + * to disable the default detection, listen for mouse down, + * and then call <code>dragDetect()</code> from within the + * listener to conditionally detect a drag. + * </p> + * + * @param event the mouse down event + * + * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_NULL_ARGUMENT when the event is null</li> + * </ul> + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @see DragDetectListener + * @see #addDragDetectListener + * + * @see #getDragDetect + * @see #setDragDetect + * + * @since 3.3 + */ public boolean dragDetect (MouseEvent event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); @@ -1718,7 +1800,7 @@ public void pack (boolean changed) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #update + * @see #update() * @see PaintListener * @see SWT#Paint * @see SWT#NO_BACKGROUND @@ -1760,7 +1842,7 @@ void redraw (boolean all) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #update + * @see #update() * @see PaintListener * @see SWT#Paint * @see SWT#NO_BACKGROUND @@ -2143,7 +2225,10 @@ boolean sendFocusEvent (int type) { * Sets the receiver's background color to the color specified * by the argument, or to the default system color for the control * if the argument is null. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + * </p> * @param color the new color (or null) * * @exception IllegalArgumentException <ul> @@ -2227,7 +2312,10 @@ void setBackground () { * by the argument, or to the default system color for the control * if the argument is null. The background image is tiled to fill * the available space. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + * </p> * @param image the new image (or null) * * @exception IllegalArgumentException <ul> @@ -2532,7 +2620,9 @@ void setFont (int font, double size) { * Sets the receiver's foreground color to the color specified * by the argument, or to the default system color for the control * if the argument is null. - * + * <p> + * Note: This operation is a hint and may be overridden by the platform. + * </p> * @param color the new color (or null) * * @exception IllegalArgumentException <ul> @@ -2686,7 +2776,7 @@ public void setMenu (Menu menu) { * </ul> * * @see #redraw(int, int, int, int, boolean) - * @see #update + * @see #update() */ public void setRedraw (boolean redraw) { checkWidget (); @@ -3189,14 +3279,19 @@ boolean traverseReturn () { /** * Forces all outstanding paint requests for the widget - * to be processed before this method returns. + * to be processed before this method returns. If there + * are no outstanding paint request, this method does + * nothing. + * <p> + * Note: This method does not cause a redraw. + * </p> * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #redraw + * @see #redraw() * @see #redraw(int, int, int, int, boolean) * @see PaintListener * @see SWT#Paint diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/CoolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/CoolItem.java index d29f3269ae..e558d07efe 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/CoolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/CoolItem.java @@ -111,7 +111,7 @@ public CoolItem (CoolBar parent, int style, int index) { /** * Adds the listener to the collection of listeners that will - * be notified when the control is selected, by sending it one + * be notified when the control is selected by the user, by sending it one * of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -123,7 +123,7 @@ public CoolItem (CoolBar parent, int style, int index) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -382,7 +382,7 @@ void releaseHandle () { /** * Removes the listener from the collection of listeners that - * will be notified when the control is selected. + * will be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Decorations.java index e8a2358f9d..020aeda215 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Decorations.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Decorations.java @@ -324,7 +324,7 @@ void fixDecorations (Decorations newDecorations, Control control, Menu [] menus) * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * - * @see #setDefaultButton + * @see #setDefaultButton(Button) */ public Button getDefaultButton () { checkWidget (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Display.java index d5c2277285..e98074993e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Display.java @@ -77,7 +77,7 @@ import org.eclipse.swt.graphics.*; * <dt><b>Styles:</b></dt> * <dd>(none)</dd> * <dt><b>Events:</b></dt> - * <dd>Close, Dispose</dd> + * <dd>Close, Dispose, Settings</dd> * </dl> * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -2786,7 +2786,7 @@ public boolean sleep () { * @param runnable code to run on the user-interface thread or <code>null</code> * * @exception SWTException <ul> - * <li>ERROR_FAILED_EXEC - if an exception occured when executing the runnable</li> + * <li>ERROR_FAILED_EXEC - if an exception occurred when executing the runnable</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Link.java index 330ecb50db..7c9e7c6dcc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Link.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Link.java @@ -72,11 +72,11 @@ public Link (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control is selected. + * <code>widgetSelected</code> is called when the control is selected by the user. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -297,7 +297,7 @@ int parseMnemonics (char [] buffer, int start, int end, StringBuffer result) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/List.java index 8583a0566a..a11d7e0b44 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/List.java @@ -136,7 +136,7 @@ public void add (String string, int index) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -144,7 +144,7 @@ public void add (String string, int index) { * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -627,7 +627,7 @@ public int indexOf (String string, int start) { * range are ignored. * * @param index the index of the item - * @return the visibility state of the item at the index + * @return the selection state of the item at the index * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -778,7 +778,7 @@ public void removeAll () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * @@ -945,9 +945,7 @@ public void selectAll () { /** * Sets the text of the item in the receiver's list at the given - * zero-relative index to the string argument. This is equivalent - * to <code>remove</code>'ing the old item at the index, and then - * <code>add</code>'ing the new item at that index. + * zero-relative index to the string argument. * * @param index the index for the item * @param string the new text for the item diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Menu.java index 40cfea5c5e..61709684c2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Menu.java @@ -606,7 +606,7 @@ void hookEvents() { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MenuItem.java index 875ba8ab2c..2855b5f846 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MenuItem.java @@ -172,7 +172,7 @@ public void addHelpListener (HelpListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the menu item is selected, by sending + * be notified when the menu item is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -180,7 +180,7 @@ public void addHelpListener (HelpListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the menu item is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -508,7 +508,7 @@ public void removeHelpListener (HelpListener listener) { } /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MessageBox.java index f2193f0429..0d72a2340c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MessageBox.java @@ -110,7 +110,7 @@ public String getMessage () { * of the display. * * @return the ID of the button that was selected to dismiss the - * message box (e.g. SWT.OK, SWT.CANCEL, etc...) + * message box (e.g. SWT.OK, SWT.CANCEL, etc.) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the dialog has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ProgressBar.java index c046bad140..ff8ca08916 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ProgressBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ProgressBar.java @@ -16,7 +16,7 @@ import org.eclipse.swt.graphics.*; import org.eclipse.swt.internal.wpf.*; /** - * Instances of the receiver represent is an unselectable + * Instances of the receiver represent an unselectable * user interface object that is used to display progress, * typically in the form of a bar. * <dl> @@ -120,7 +120,7 @@ public int getMaximum () { * * @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> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public int getMinimum () { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Sash.java index c4e1e31c31..6c6c04e41f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Sash.java @@ -73,7 +73,7 @@ public Sash (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -82,7 +82,7 @@ public Sash (Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -269,7 +269,7 @@ void HandlePreviewMouseMove (int sender, int e) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Scale.java index 58d9639dee..cc9b0efbb0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Scale.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Scale.java @@ -72,11 +72,11 @@ public Scale (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> - * <code>widgetSelected</code> is called when the control's value changes. + * <code>widgetSelected</code> is called when the user changes the receiver's value. * <code>widgetDefaultSelected</code> is not called. * </p> * @@ -231,7 +231,7 @@ void hookEvents() { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ScrollBar.java index 5f9dd8bcea..e94a170020 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ScrollBar.java @@ -120,7 +120,7 @@ ScrollBar (Scrollable parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -136,7 +136,7 @@ ScrollBar (Scrollable parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -437,7 +437,7 @@ void releaseParent () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Shell.java index 1548100499..58a45733af 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Shell.java @@ -593,7 +593,7 @@ Control findThemeControl () { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ @@ -727,7 +727,7 @@ public boolean getVisible () { /** * Returns an array containing all shells which are - * descendents of the receiver. + * descendants of the receiver. * <p> * @return the dialog shells * @@ -903,7 +903,7 @@ void HandleSizeChanged (int sender, int e) { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#setActive * @see Shell#forceActive */ @@ -994,7 +994,7 @@ public void removeShellListener (ShellListener listener) { * @see Control#setFocus * @see Control#setVisible * @see Display#getActiveShell - * @see Decorations#setDefaultButton + * @see Decorations#setDefaultButton(Button) * @see Shell#open * @see Shell#setActive */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Slider.java index d1c50603ad..3a2e64cb80 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Slider.java @@ -102,7 +102,7 @@ public Slider (Composite parent, int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's value changes, by sending + * be notified when the user changes the receiver's value, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -118,7 +118,7 @@ public Slider (Composite parent, int style) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's value * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -293,7 +293,7 @@ void hookEvents () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's value changes. + * be notified when the user changes the receiver's value. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Spinner.java index 84ee7dfdf8..7eace95398 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Spinner.java @@ -21,11 +21,14 @@ import org.eclipse.swt.events.*; * objects that allow the user to enter and modify numeric * values. * <p> + * Note that although this class is a subclass of <code>Composite</code>, + * it does not make sense to add children to it, or set a layout on it. + * </p><p> * <dl> * <dt><b>Styles:</b></dt> * <dd>READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> - * <dd>Selection, Modify</dd> + * <dd>Selection, Modify, Verify</dd> * </dl> * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -226,7 +229,7 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -234,7 +237,7 @@ public void addModifyListener (ModifyListener listener) { * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -500,7 +503,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TabFolder.java index 8e7beda5a9..90a40d4dfd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TabFolder.java @@ -95,7 +95,7 @@ void addChild (Control widget) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -103,7 +103,7 @@ void addChild (Control widget) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -399,7 +399,7 @@ void hookEvents () { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -512,7 +512,7 @@ void removeControl (Control control) { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java index 73f1c45b78..88df6d96ee 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java @@ -126,18 +126,18 @@ void _addListener (int eventType, Listener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called, the item field of the event object is valid. - * If the receiver has <code>SWT.CHECK</code> style set and the check selection changes, + * If the receiver has the <code>SWT.CHECK</code> style and the check selection changes, * the event object detail field contains the value <code>SWT.CHECK</code>. * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * The item field of the event object is valid for default selection, but the detail field is not used. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -1446,7 +1446,7 @@ void hookEvents () { * @return the index of the column * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1472,7 +1472,7 @@ public int indexOf (TableColumn column) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1494,7 +1494,7 @@ public int indexOf (TableItem item) { * range are ignored. * * @param index the index of the item - * @return the visibility state of the item at the index + * @return the selection state of the item at the index * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1670,7 +1670,7 @@ public void removeAll () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableColumn.java index d48360e259..31715ed684 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableColumn.java @@ -144,7 +144,7 @@ public void addControlListener(ControlListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -152,7 +152,7 @@ public void addControlListener(ControlListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -451,7 +451,7 @@ public void removeControlListener (ControlListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java index 01a688bc84..196763b5a9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java @@ -587,6 +587,22 @@ public Table getParent () { return parent; } +/** + * Returns a rectangle describing the size and location + * relative to its parent of the text at a column in the + * table. An empty rectangle is returned if index exceeds + * the index of the table's last column. + * + * @param index the index that specifies the column + * @return the receiver's bounding text rectangle + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Rectangle getTextBounds (int index) { checkWidget(); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Text.java index 2b5ec674fc..20010e34fd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Text.java @@ -22,12 +22,13 @@ import org.eclipse.swt.events.*; * <p> * <dl> * <dt><b>Styles:</b></dt> - * <dd>CENTER, LEFT, MULTI, PASSWORD, SINGLE, RIGHT, READ_ONLY, WRAP</dd> + * <dd>CANCEL, CENTER, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> * <dd>DefaultSelection, Modify, Verify</dd> * </dl> * <p> - * Note: Only one of the styles MULTI and SINGLE may be specified. + * Note: Only one of the styles MULTI and SINGLE may be specified, + * and only one of the styles LEFT, CENTER, and RIGHT may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> @@ -130,15 +131,17 @@ public void addModifyListener (ModifyListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * <code>widgetSelected</code> is not called for texts. - * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. + * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text, + * or when ENTER is pressed in a search text. If the receiver has the <code>SWT.SEARCH | SWT.CANCEL</code> style + * and the user cancels the search, the event object detail field contains the value <code>SWT.CANCEL</code>. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -978,7 +981,7 @@ public void removeModifyListener (ModifyListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolItem.java index de049bae89..8c7bf43371 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolItem.java @@ -124,7 +124,7 @@ public ToolItem (ToolBar parent, int style, int index) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -133,7 +133,7 @@ public ToolItem (ToolBar parent, int style, int index) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user, * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -565,7 +565,7 @@ void releaseHandle () { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * @@ -654,7 +654,7 @@ public void setEnabled (boolean enabled) { * Sets the receiver's disabled image to the argument, which may be * null indicating that no disabled image should be displayed. * <p> - * The disbled image is displayed when the receiver is disabled. + * The disabled image is displayed when the receiver is disabled. * </p> * * @param image the disabled image to display on the receiver (may be null) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java index 22fc77e1ba..7fbf120e94 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java @@ -189,18 +189,18 @@ static int checkStyle (int style) { /** * Adds the listener to the collection of listeners who will - * be notified when the receiver's selection changes, by sending + * be notified when the user changes the receiver's selection, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called, the item field of the event object is valid. - * If the receiver has <code>SWT.CHECK</code> style set and the check selection changes, + * If the receiver has the <code>SWT.CHECK</code> style and the check selection changes, * the event object detail field contains the value <code>SWT.CHECK</code>. * <code>widgetDefaultSelected</code> is typically called when an item is double-clicked. * The item field of the event object is valid for default selection, but the detail field is not used. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the user changes the receiver's selection * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -1490,7 +1490,7 @@ void hookEvents() { * @return the index of the column * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the string is null</li> + * <li>ERROR_NULL_ARGUMENT - if the column is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1517,8 +1517,8 @@ public int indexOf (TreeColumn column) { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the tool item is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the tool item has been disposed</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1743,7 +1743,7 @@ public void removeAll () { /** * Removes the listener from the collection of listeners who will - * be notified when the receiver's selection changes. + * be notified when the user changes the receiver's selection. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeColumn.java index 050ed0bb8f..f316f0ca16 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeColumn.java @@ -144,7 +144,7 @@ public void addControlListener(ControlListener listener) { /** * Adds the listener to the collection of listeners who will - * be notified when the control is selected, by sending + * be notified when the control is selected by the user, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> @@ -152,7 +152,7 @@ public void addControlListener(ControlListener listener) { * <code>widgetDefaultSelected</code> is not called. * </p> * - * @param listener the listener which should be notified + * @param listener the listener which should be notified when the control is selected by the user * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> @@ -469,7 +469,7 @@ public void removeControlListener (ControlListener listener) { /** * Removes the listener from the collection of listeners who will - * be notified when the control is selected. + * be notified when the control is selected by the user. * * @param listener the listener which should no longer be notified * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java index 5047a642ac..5f25f7f5c5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java @@ -821,6 +821,21 @@ public TreeItem getParentItem () { return result; } +/** + * Returns a rectangle describing the size and location + * relative to its parent of the text at a column in the + * tree. + * + * @param index the index that specifies the column + * @return the receiver's bounding text rectangle + * + * @exception SWTException <ul> + * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> + * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> + * </ul> + * + * @since 3.3 + */ public Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); @@ -887,8 +902,8 @@ Control getWidgetControl () { * @return the index of the item * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the tool item is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the tool item has been disposed</li> + * <li>ERROR_NULL_ARGUMENT - if the item is null</li> + * <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Widget.java index 3ec482631e..466db4e8fa 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Widget.java @@ -166,7 +166,7 @@ void _addListener (int eventType, Listener listener) { * * @see Listener * @see SWT - * @see #removeListener + * @see #removeListener(int, Listener) * @see #notifyListeners */ public void addListener (int eventType, Listener listener) { @@ -414,13 +414,13 @@ void destroyWidget () { /** * Disposes of the operating system resources associated with - * the receiver and all its descendents. After this method has - * been invoked, the receiver and all descendents will answer + * the receiver and all its descendants. After this method has + * been invoked, the receiver and all descendants will answer * <code>true</code> when sent the message <code>isDisposed()</code>. * Any internal connections between the widgets in the tree will * have been removed to facilitate garbage collection. * <p> - * NOTE: This method is not called recursively on the descendents + * NOTE: This method is not called recursively on the descendants * of the receiver. This means that, widget implementers can not * detect when a widget is being disposed of by re-implementing * this method, but should instead listen for the <code>Dispose</code> @@ -768,7 +768,7 @@ boolean mnemonicMatch (int accessText, char key) { * * @see SWT * @see #addListener - * @see #removeListener + * @see #removeListener(int, Listener) */ public void notifyListeners (int eventType, Event event) { checkWidget(); |