diff options
author | Carolyn MacLeod <carolyn> | 2010-05-26 17:58:56 +0000 |
---|---|---|
committer | Carolyn MacLeod <carolyn> | 2010-05-26 17:58:56 +0000 |
commit | 0f960e0b213854d19299aaa9b453b69c8d7ee794 (patch) | |
tree | 4ee2be0a3b8b821c15859cb8b9359d908978f4c3 /bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java | |
parent | 15bb116304bc8aeea45302e2a4ff1e9abf3dd426 (diff) | |
download | eclipse.platform.swt-0f960e0b213854d19299aaa9b453b69c8d7ee794.tar.gz eclipse.platform.swt-0f960e0b213854d19299aaa9b453b69c8d7ee794.tar.xz eclipse.platform.swt-0f960e0b213854d19299aaa9b453b69c8d7ee794.zip |
Bug 314492 - Do the annual copyright/javadoc bashAFTER_JAVADOC_BASH_FOR_36RC3
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java | 58 |
1 files changed, 58 insertions, 0 deletions
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 5f3999e80b..cd63a46bbd 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 @@ -752,6 +752,64 @@ public void layout (Control [] changed) { layout (changed, SWT.NONE); } +/** + * Forces a lay out (that is, sets the size and location) of all widgets that + * are in the parent hierarchy of the changed control up to and including the + * receiver. + * <p> + * The parameter <code>flags</code> may be a combination of: + * <dl> + * <dt><b>SWT.ALL</b></dt> + * <dd>all children in the receiver's widget tree should be laid out</dd> + * <dt><b>SWT.CHANGED</b></dt> + * <dd>the layout must flush its caches</dd> + * <dt><b>SWT.DEFER</b></dt> + * <dd>layout will be deferred</dd> + * </dl> + * </p> + * <p> + * When the <code>changed</code> array is specified, the flags <code>SWT.ALL</code> + * and <code>SWT.CHANGED</code> have no effect. In this case, the layouts in the + * hierarchy must not rely on any information cached about the changed control or + * any of its ancestors. The layout may (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> + * <p> + * When the <code>changed</code> array is not specified, the flag <code>SWT.ALL</code> + * indicates that the whole widget tree should be laid out. And the flag + * <code>SWT.CHANGED</code> indicates that the layouts should flush any cached + * information for all controls that are laid out. + * </p> + * <p> + * The <code>SWT.DEFER</code> flag always causes the layout to be deferred by + * calling <code>Composite.setLayoutDeferred(true)</code> and scheduling a call + * to <code>Composite.setLayoutDeferred(false)</code>, which will happen when + * appropriate (usually before the next event is handled). When this flag is set, + * the application should not call <code>Composite.setLayoutDeferred(boolean)</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 a control that has had a state change which requires a recalculation of its size + * @param flags the flags specifying how the layout should happen + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_INVALID_ARGUMENT - if any of the controls in changed is null or has been disposed</li> + * <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</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.6 + */ public void layout (Control [] changed, int flags) { checkWidget (); if (changed != null) { |