The SWT controls are documented on the Eclipse web site. See: http://help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/package-summary.html
It is possible to bind template variables to a specific control by using the x:id
attribute.
<text x:id="templateVariableName" />
This is the way that template variables are bound to the controls (R=read, W=write):
This SWT class represents buttons, checkboxes and radio
buttons, depending on its style attribute (SWT.PUSH,
SWT.CHECK, SWT.RADIO
).
Represent a combo box and a custom combo box. It can be
made read-only (with the SWT.READ_ONLY
style). A read-only
combo allows list selection but no manual editing.
The list items can be specified from XSWT. Variables only
work with the textedit part (cannot add/remove list items).
A widget for editing date/time.
Label widget (not interactive).
A listbox widget that allows selection of one or more items,
depending on the style attribute (SWT.SINGLE
or SWT.MULTI
).
List items can be specified from XSWT. Template variables only
work with the selection (cannot add/remove list items).
A graphical widget for selecting a numeric value.
A textedit widget. It can be single-line or multi-line,
depending on the style attribute (SWT.SINGLE, SWT.MULTI
).
A control containing a text and a hyperlink between <a></a>
tags. An URL can
be specified to be opened in an external browser.
Other attributes:
<a></a>
denotes the link inside.
A control that displays a text with embedded link(s). Clicking on a link will display a hover text in a window. The hover text can be given with the setHoverText method (i.e. the hoverText XSWT attribute), or bound to a template variable (using the x:id XSWT attribute).
Other attributes:
A control for displaying the name of a resource as a link. When clicked, it shows the resource (opens Project Explorer and focuses it to the resource).
Other attributes:
A control for selecting a file from the workspace. Implemented as a Composite with a single-line Text and a Browse button.
Other attributes:
A control for selecting a file from the filesystem. Implemented as a Composite with a single-line Text and a Browse button.
Other attributes:
A control for selecting a name for a new file from the workspace. Implemented as a Composite with a single-line Text and a Browse button.
Other attributes:
A control for selecting a name for a new file in the filesystem. Implemented as a Composite with a single-line Text and a Browse button.
Other attributes:
A control for selecting a gate of a NED module type. If the module exists, it lets the user select one of its gates from a combo; if the module does not exist, it lets the user enter a gate name.
Other attributes:
gateFilter : type filter for the enumerated gates. Expects a
binary OR (|) of the following values: GateChooser.INPUT,
GateChooser.OUTPUT, GateChooser.INOUT, GateChooser.VECTOR,
GateChooser.SCALAR
.
<gateChooser x:id="gateName" nedTypeName="${nodeType}" gateFilter="GateChooser.INOUT|GateChooser.VECTOR"/>
A control for selecting a NED module type. An existing type name can be selected or a new one can be entered.
Other attributes:
acceptedTypes : filter for the enumeration of types. Expects a
binary OR (|) of the following values: NedTypeChooser.MODULE,
NedTypeChooser.SIMPLE_MODULE, NedTypeChooser.COMPOUND_MODULE,
NedTypeChooser.MODULEINTERFACE, NedTypeChooser.CHANNEL,
NedTypeChooser.CHANNELINTERFACE, NedTypeChooser.NETWORK
.
<nedTypeChooser x:id="channelType" acceptedTypes="NedTypeChooser.CHANNEL"/>
Table and tree widgets are currently not supported in a useful way; the main reason being that SWT Tables and Trees are not editable by default.
Some non-interactive widgets which cannot be connected to template variables but are useful in forms as structuring elements:
Used to group two or more controls into a single one.
<composite> <layoutData x:class="GridData" horizontalSpan="2"/> <layout x:class="GridLayout"/> <x:children> <button x:id="dynamic" text="Dynamic" x:style="RADIO"/> <button x:id="static" text="Static" x:style="RADIO"/> </x:children> </composite>
Used to group the controls with a visual heading.
<group text="Heading text"> <x:children> <label text="Control 1"/> <label text="Control 2"/> </x:children> </group>
Can be used to group the controls into separate pages.
<tabFolder> <x:children> <composite x:id="page1"></composite> <composite x:id="page2"></composite> <tabItem text="Tab 1" control="page1"/> <tabItem text="Tab 2" control="page2"/> </x:children> </tabFolder>