org.eclipse.jpt.ui
Interface WidgetFactory


public interface WidgetFactory

A widget factory is responsible for creating an SWT widget based on the right style. Some style shows the widgets differently, for instance, the flat style shows the widgets with less borders.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
2.0
Version:
2.0

Method Summary
 org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent, java.lang.String text)
          Creates a new regular button.
 org.eclipse.swt.custom.CCombo createCCombo(org.eclipse.swt.widgets.Composite parent)
          Creates a new non-editable custom Combo.
 org.eclipse.swt.widgets.Button createCheckBox(org.eclipse.swt.widgets.Composite parent, java.lang.String text)
          Creates a new check box button.
 org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent)
          Creates a new non-editable Combo.
 org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent)
          Creates a new container.
 org.eclipse.swt.custom.CCombo createEditableCCombo(org.eclipse.swt.widgets.Composite parent)
          Creates a new editable custom CCombo.
 org.eclipse.swt.widgets.Combo createEditableCombo(org.eclipse.swt.widgets.Composite parent)
          Creates a new editable Combo.
 org.eclipse.swt.widgets.Group createGroup(org.eclipse.swt.widgets.Composite parent, java.lang.String title)
          Creates a new titled pane (group box).
 org.eclipse.ui.forms.widgets.Hyperlink createHyperlink(org.eclipse.swt.widgets.Composite parent, java.lang.String text)
          Creates a new label that is shown as a hyperlink.
 org.eclipse.swt.widgets.Label createLabel(org.eclipse.swt.widgets.Composite container, java.lang.String labelText)
          Creates a new label.
 org.eclipse.swt.widgets.List createList(org.eclipse.swt.widgets.Composite container, int style)
          Creates a new list.
 org.eclipse.ui.forms.widgets.FormText createMultiLineLabel(org.eclipse.swt.widgets.Composite container, java.lang.String labelText)
          Creates a new label that can be wrapped on multiple lines.
 org.eclipse.swt.widgets.Text createMultiLineText(org.eclipse.swt.widgets.Composite parent)
          Creates a new editable text area.
 org.eclipse.swt.widgets.Text createPasswordText(org.eclipse.swt.widgets.Composite container)
          Creates a new editable text field that handles password.
 org.eclipse.swt.widgets.Button createPushButton(org.eclipse.swt.widgets.Composite parent, java.lang.String text)
          Creates a new push button (toggle between selected and unselected).
 org.eclipse.swt.widgets.Button createRadioButton(org.eclipse.swt.widgets.Composite parent, java.lang.String text)
          Creates a new radio button.
 org.eclipse.ui.forms.widgets.Section createSection(org.eclipse.swt.widgets.Composite parent, int style)
          Creates a new section, which is a collapsable pane with a title bar.
 org.eclipse.swt.widgets.Spinner createSpinner(org.eclipse.swt.widgets.Composite parent)
          Creates a new spinner.
 org.eclipse.swt.widgets.Table createTable(org.eclipse.swt.widgets.Composite parent, int style)
          Creates a new table.
 org.eclipse.swt.widgets.Text createText(org.eclipse.swt.widgets.Composite parent)
          Creates a new editable text field.
 org.eclipse.swt.widgets.Button createTriStateCheckBox(org.eclipse.swt.widgets.Composite parent, java.lang.String text)
          Creates a new tri-state check box.
 

Method Detail

createButton

org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent,
                                            java.lang.String text)
Creates a new regular button.

Parameters:
parent - The parent container
text - The button's text
Returns:
A new Button

createCCombo

org.eclipse.swt.custom.CCombo createCCombo(org.eclipse.swt.widgets.Composite parent)
Creates a new non-editable custom Combo.

Parameters:
parent - The parent container
Returns:
A new CCombo

createCheckBox

org.eclipse.swt.widgets.Button createCheckBox(org.eclipse.swt.widgets.Composite parent,
                                              java.lang.String text)
Creates a new check box button.

Parameters:
parent - The parent container
text - The button's text
Returns:
A new Button

createCombo

org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent)
Creates a new non-editable Combo.

Parameters:
parent - The parent container
Returns:
A new Combo

createComposite

org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent)
Creates a new container.

Parameters:
parent - The parent container
Returns:
A new Composite

createEditableCCombo

org.eclipse.swt.custom.CCombo createEditableCCombo(org.eclipse.swt.widgets.Composite parent)
Creates a new editable custom CCombo.

Parameters:
parent - The parent container
Returns:
A new CCombo

createEditableCombo

org.eclipse.swt.widgets.Combo createEditableCombo(org.eclipse.swt.widgets.Composite parent)
Creates a new editable Combo.

Parameters:
parent - The parent container
Returns:
A new Combo

createGroup

org.eclipse.swt.widgets.Group createGroup(org.eclipse.swt.widgets.Composite parent,
                                          java.lang.String title)
Creates a new titled pane (group box).

Parameters:
parent - The parent container
title - The group pane's title
Returns:
A new Group

createHyperlink

org.eclipse.ui.forms.widgets.Hyperlink createHyperlink(org.eclipse.swt.widgets.Composite parent,
                                                       java.lang.String text)
Creates a new label that is shown as a hyperlink.

Parameters:
parent - The parent container
text - The label's text
Returns:
A new Hyperlink

createLabel

org.eclipse.swt.widgets.Label createLabel(org.eclipse.swt.widgets.Composite container,
                                          java.lang.String labelText)
Creates a new label.

Parameters:
container - The parent container
labelText - The label's text
Returns:
A new Label

createList

org.eclipse.swt.widgets.List createList(org.eclipse.swt.widgets.Composite container,
                                        int style)
Creates a new list.

Parameters:
container - The parent container
style - The style is usually to tell what type of selection (SWT.MULTI or SWT.SINGLE)
Returns:
A new Label

createMultiLineLabel

org.eclipse.ui.forms.widgets.FormText createMultiLineLabel(org.eclipse.swt.widgets.Composite container,
                                                           java.lang.String labelText)
Creates a new label that can be wrapped on multiple lines.

Parameters:
container - The parent container
labelText - The label's text
Returns:
A new FormText

createMultiLineText

org.eclipse.swt.widgets.Text createMultiLineText(org.eclipse.swt.widgets.Composite parent)
Creates a new editable text area.

Parameters:
parent - The parent container
parent - The number of lines the text area should display
Returns:
A new Text

createPasswordText

org.eclipse.swt.widgets.Text createPasswordText(org.eclipse.swt.widgets.Composite container)
Creates a new editable text field that handles password.

Parameters:
container - The parent container
Returns:
A new Text

createPushButton

org.eclipse.swt.widgets.Button createPushButton(org.eclipse.swt.widgets.Composite parent,
                                                java.lang.String text)
Creates a new push button (toggle between selected and unselected).

Parameters:
parent - The parent container
text - The button's text
Returns:
A new Button

createRadioButton

org.eclipse.swt.widgets.Button createRadioButton(org.eclipse.swt.widgets.Composite parent,
                                                 java.lang.String text)
Creates a new radio button.

Parameters:
parent - The parent container
text - The button's text
Returns:
A new Button

createSection

org.eclipse.ui.forms.widgets.Section createSection(org.eclipse.swt.widgets.Composite parent,
                                                   int style)
Creates a new section, which is a collapsable pane with a title bar.

Parameters:
parent - The parent container
style - The style of the title bar, which can be ExpandableComposite.TWISTIE and ExpandableComposite.TITLE_BAR
Returns:
A new Section

createSpinner

org.eclipse.swt.widgets.Spinner createSpinner(org.eclipse.swt.widgets.Composite parent)
Creates a new spinner.

Parameters:
parent - The parent container
Returns:
A new Spinner

createTable

org.eclipse.swt.widgets.Table createTable(org.eclipse.swt.widgets.Composite parent,
                                          int style)
Creates a new table.

Parameters:
container - The parent container
style - The style to apply to the table
Returns:
A new Table

createText

org.eclipse.swt.widgets.Text createText(org.eclipse.swt.widgets.Composite parent)
Creates a new editable text field.

Parameters:
container - The parent container
Returns:
A new Text

createTriStateCheckBox

org.eclipse.swt.widgets.Button createTriStateCheckBox(org.eclipse.swt.widgets.Composite parent,
                                                      java.lang.String text)
Creates a new tri-state check box.

Parameters:
parent - The parent container
text - The button's text
Returns:
A new Button that has 3 selection states