Instances of this class determine the size and position of the children of a <code>Composite</code> by placing them either in horizontal rows or vertical columns within the parent <code>Composite</code>. <p> <code>RowLayout</code> aligns all controls in one row if the <code>type</code> is set to horizontal, and one column if it is set to vertical. It has the ability to wrap, and provides configurable margins and spacing. <code>RowLayout</code> has a number of configuration fields. In addition, the height and width of each control in a <code>RowLayout</code> can be specified by setting a <code>RowData</code> object into the control using <code>setLayoutData ()</code>. </p> <p> The following example code creates a <code>RowLayout</code>, sets all of its fields to non-default values, and then sets it into a <code>Shell</code>. <pre> RowLayout rowLayout = new RowLayout(); rowLayout.wrap = false; rowLayout.pack = false; rowLayout.justify = true; rowLayout.type = SWT.VERTICAL; rowLayout.marginLeft = 5; rowLayout.marginTop = 5; rowLayout.marginRight = 5; rowLayout.marginBottom = 5; rowLayout.spacing = 0; shell.setLayout(rowLayout); </pre> If you are using the default field values, you only need one line of code: <pre> shell.setLayout(new RowLayout()); </pre> </p>
Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
Contributors: IBM Corporation - initial API and implementation Port to the D programming language: Frank Benoit <benoit@tionex.de>