## com.ibm.lab.soln.swt
Class SWTView

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

All Implemented Interfaces:
  java.util.EventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener

public class SWTView
extends org.eclipse.ui.part.ViewPart
implements org.eclipse.swt.events.SelectionListener

Displays a variety of SWT controls using an Eclipse view as the container.

Field Summary

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

Constructor Summary
`SWTView()`

Method Summary
`void` | `createButtons(org.eclipse.swt.widgets.Composite parent)` Creates the buttons that display the Message and File dialogs and their selection listeners.
`void` | `createList(org.eclipse.swt.widgets.Composite parent)` Creates the List widget and selection listener.
`void` | `createPartControl(org.eclipse.swt.widgets.Composite parent)` Create the contents of the view.
`void` | `createProgressBar(org.eclipse.swt.widgets.Composite parent)` Basic demonstration of UI and non-UI thread synchronization.
`void` | `createStyledText(org.eclipse.swt.widgets.Composite parent)` Creates a rich text widget, sets its font, and defines event listeners.
`void` | `dispose()` Disposes of the font.
`protected void` | `open(org.eclipse.swt.widgets.Composite parent)` Populate the widgets into the view container.
`void` | `setFocus()`
`void` | `widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)`
`void` | `widgetSelected(org.eclipse.swt.events.SelectionEvent e)` Listener for Button b1.

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

### SWTView

    public SWTView()

Method Detail

### createButtons

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

  Creates the buttons that display the Message and File dialogs and their selection listeners.

### createList

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

  Creates the List widget and selection listener.

### createPartControl

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

  Create the contents of the view.

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

### createProgressBar

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

  Basic demonstration of UI and non-UI thread synchronization. Creates a progress bar and button to run it in another thread. Progress bar is updated in the non-UI thread using Display.asyncExec method. Half way through processing the user is notified using Display.syncExec method.

  See Also:
    `Display.syncExec(Runnable)`, `Display.asyncExec(Runnable)`

### createStyledText

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

  Creates a rich text widget, sets its font, and defines event listeners.

### dispose

    public void dispose()

  Disposes of the font.

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

### open

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

  Populate the widgets into the view container.

### 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()`

### widgetDefaultSelected

    public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)

  Specified by:
    `widgetDefaultSelected` in interface `org.eclipse.swt.events.SelectionListener`
  See Also:
    `SelectionListener.widgetDefaultSelected(SelectionEvent)`

### widgetSelected

    public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)

  Listener for Button b1.

  Specified by:
    `widgetSelected` in interface `org.eclipse.swt.events.SelectionListener`
  See Also:
    `createButtons(Composite)`, `SelectionListener.widgetSelected(SelectionEvent)`