## com.ibm.lab.soln.layouts
Class LayoutView

    java.lang.Object
      |
      +--org.eclipse.ui.part.WorkbenchPart
            |
            +--org.eclipse.ui.part.ViewPart
                  |
                  +--com.ibm.lab.soln.layouts.LayoutView

All Implemented Interfaces:
  org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart

public class LayoutView
extends org.eclipse.ui.part.ViewPart

Demonstrates the use of all the SWT layout managers and their associated classes. These include: FillLayout, RowLayout, GridLayout, and FormLayout.

Field Summary

Fields inherited from interface org.eclipse.ui.IWorkbenchPart
`PROP_TITLE`

Constructor Summary
`LayoutView()`

Method Summary
`void` | `createPartControl(org.eclipse.swt.widgets.Composite parent)` Populate the view with the example layout managers.
`void` | `dispose()`
`protected void` | `setButtons(org.eclipse.swt.widgets.Composite parent)` Define the buttons used by the row and grid layout managers.
`protected void` | `setCheckBoxes(org.eclipse.swt.widgets.Composite parent)` Defines a set of checkbox style buttons used by FillLayout.
`protected void` | `setFields(org.eclipse.swt.widgets.Composite group)` Define the fields used in the grid and form layout examples.
`protected void` | `setFillLayout(org.eclipse.swt.widgets.Composite parent)` Creates a fill layout.
`void` | `setFocus()`
`protected void` | `setFormLayoutAddress(org.eclipse.swt.widgets.Composite parent)` Define a name and address form using a form layout.
`protected void` | `setGridLayoutAddress(org.eclipse.swt.widgets.Composite parent)` Define a name and address form using a grid layout.
`protected void` | `setGridLayoutButtons(org.eclipse.swt.widgets.Composite parent)` Layout buttons used by the first grid layout example.
`protected void` | `setRowLayout(org.eclipse.swt.widgets.Composite parent)` Create a simple row layout of buttons.

Methods inherited from class org.eclipse.ui.part.ViewPart
`getViewSite, init, init, saveState`

Methods inherited from class org.eclipse.ui.part.WorkbenchPart
`addPropertyListener, firePropertyChange, getAdapter, getConfigurationElement, getDefaultImage, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setInitializationData, setSite, setTitle, setTitleImage, setTitleToolTip`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.ui.IWorkbenchPart
`addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener`

Methods inherited from interface org.eclipse.core.runtime.IAdaptable
`getAdapter`

Constructor Detail

### LayoutView

    public LayoutView()

Method Detail

### createPartControl

    public void createPartControl(org.eclipse.swt.widgets.Composite parent)

  Populate the view with the example layout managers.

  Specified by:
    `createPartControl` in interface `org.eclipse.ui.IWorkbenchPart`
  Specified by:
    `createPartControl` in class `org.eclipse.ui.part.WorkbenchPart`
  See Also:
    `IWorkbenchPart.createPartControl(Composite)`

### dispose

    public void dispose()

  Specified by:
    `dispose` in interface `org.eclipse.ui.IWorkbenchPart`
  Overrides:
    `dispose` in class `org.eclipse.ui.part.WorkbenchPart`
  See Also:
    `IWorkbenchPart.dispose()`

### setButtons

    protected void setButtons(org.eclipse.swt.widgets.Composite parent)

  Define the buttons used by the row and grid layout managers. Note: A listener is defined on Button b1 to demonstrate that different instances of these buttons are used in more than one layout. Widget disposal is not an issue. Even though the same names b1..b5 are used by each layout manager calling this method, they are separate Button instances, with separate Composite parent objects. Each parent is reponsible for disposal of it own children.

### setCheckBoxes

    protected void setCheckBoxes(org.eclipse.swt.widgets.Composite parent)

  Defines a set of checkbox style buttons used by FillLayout.

### setFields

    protected void setFields(org.eclipse.swt.widgets.Composite group)

  Define the fields used in the grid and form layout examples.

### setFillLayout

    protected void setFillLayout(org.eclipse.swt.widgets.Composite parent)

  Creates a fill layout.

### setFocus

    public void setFocus()

  Specified by:
    `setFocus` in interface `org.eclipse.ui.IWorkbenchPart`
  Specified by:
    `setFocus` in class `org.eclipse.ui.part.WorkbenchPart`
  See Also:
    `WorkbenchPart.setFocus()`

### setFormLayoutAddress

    protected void setFormLayoutAddress(org.eclipse.swt.widgets.Composite parent)

  Define a name and address form using a form layout.

### setGridLayoutAddress

    protected void setGridLayoutAddress(org.eclipse.swt.widgets.Composite parent)

  Define a name and address form using a grid layout.

### setGridLayoutButtons

    protected void setGridLayoutButtons(org.eclipse.swt.widgets.Composite parent)

  Layout buttons used by the first grid layout example.

### setRowLayout

    protected void setRowLayout(org.eclipse.swt.widgets.Composite parent)

  Create a simple row layout of buttons.