Elements T to Z

tab

Description

The <tab> tag renders an SWT TabItem widget. They must be direct children of the <tabFolder>.

Available attributes

Attribute Description M/O Default

label

Specifies the ID of the resource containing the text to display on the TabItem.

M

-

Sample XML

<ui>
 <panel columns="2" span="2">
  <tabFolder span="2">
   <tab label="CERTS">
   <tab label="SSL">
 </panel>
</ui>

Rendered UI

The above XML renders the following UI:

tab example

tabFolder

Description

The <tabFolder> tag renders an SWT TabFolder widget used to house TabItems (generated by using <tab> tags as children).

Available attributes

Attribute Description M/O Default

span

Value used in the creation of layout data for the controls that are rendered.

    GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.verticalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.grabExcessVerticalSpace = true;
    gridData.horizontalSpan = span;

O

1

Sample XML

<ui>
 <panel columns="2" span="2">
  <tabFolder span="2">
   <tab label="CERTS">
   <tab label="SSL">
 </panel>
</ui>

Rendered UI

The above XML renders the following UI:

tabFolder example

TablePage

Description

The <TablePage> tag renders a jFace TableViewer that represents a list of entities of the specified type. These entities can be added, edited, and deleted using the available buttons.

Available attributes

Attribute Description M/O Default

type

Specifies the type of the entity that is represented by the table.

M

-

dialogClass

Specifies the full name of the Java class used to implement the dialog employed to add/edit items in the table.

M

-

columnProperties

Specifies a comma-separated list of entity fields to be displayed in table columns.

M

-

sortColumns

Specifies a comma-separated list of columns to make sortable.

M

-

columnResources

Specifies a comma-separated list of resource IDs (from a resource.properties file) that resolve to the text to be displayed on the table columns.

M

-

columnWidths

Specifies a comma-separated list of column widths.

M

-

deleteText

Specifies the resource ID that resolves to the text to be displayed to the user when an item from the table is about to be deleted.

M

-

span

Value used in the creation of layout data for the controls that are rendered.

GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.verticalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.horizontalSpan = span;

O

1

dialog.setFlavor

Specifies a declarative XML file to use to construct the dialog used to add or edit the entities for this table.

O

-

tableHeight

Specifies the preferred height of the control.

O

SWT.DEFAULT

Sample XML

<ui>
 <panel columns="2">
  <TablePage type="Property"
   dialogClass="com.vordel.client.manager.filter.exec.EnvironmentVariableDialog"
   columnProperties="name,value" sortColumns="name,value"
   columnResources="COLUMN_VARIABLE,COLUMN_VALUE" columnWidths="300,200"
   deleteText="DELETE_VARIABLE_CONFIRMATION"
   dialog.setFlavor="environment_variable_dialog.xml" />
 </panel>
</ui>

Sample dialog flavor XML

<panel columns="2">
 <TextAttribute field="name" label="NAME_LABEL" required="true"/>
 <TextAttribute field="value" label="VALUE_LABEL" required="false"/>
</panel>

Rendered UI

The above XML renders the following UI:

TablePage example

The dialog is rendered as follows:

TablePage dialog example

text

Description

The <text> tag renders an SWT Text widget.

Available attributes

Attribute Description M/O Default

label

Specifies the ID of the resource containing the text to display on the Label.

O

-

multiline

Specifies whether the control is a multiline Text widget.

If this attribute is not present the control defaults to a single-line widget.

O

false

wrap

Specifies whether the text should be wrapped within the control.

This attribute is conditional on the multiline attribute being present and set to true.

C

false

readOnly

Specifies whether or not the Text widget is read-only.

O

-

span

Value used in the creation of layout data for the controls that are rendered.

If a single-line control is being rendered, span represents the horizontal span of the following GridData:

    GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalSpan = colSpan;

If a multiline control is being rendered, span represents the horizontal span of the following GridData:

    GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.verticalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.grabExcessVerticalSpace = true;
    gridData.horizontalSpan = colSpan;

O

1

widthHint

Specifies the preferred width of the control.

O

SWT.DEFAULT

heightHint

Specifies the preferred height of the control.

O

SWT.DEFAULT

vscroll

Specifies whether a vertical scroll bar should be rendered.

This attribute is conditional on the multiline attribute being present and set to true.

C

-

hscroll

Specifies whether a horizontal scroll bar should be rendered.

This attribute is conditional on the multiline attribute being present and set to true.

C

-

Sample XML

<ui>
 <text label="KEYPAIRS_PUBLICKEY_LABEL" multiline="true" vscroll="true" 
  wrap="true" heightHint="100" widthHint="350" readOnly="true"/> 
</ui>

Rendered UI

The above XML renders the following UI:

text example

TextAttribute

Description

The <TextAttribute> tag renders an SWT Text widget (and optionally, a Label widget), backed by the specified field for the entity being configured.

Available attributes

Attribute Description M/O Default

field

Specifies the name of the field of the entity backed by the rendered controls.

The default value of the field will automatically appear in the Text widget.

M

-

label

Indicates that a Label should be rendered to the left of the Text widget.

The value of this field is set to a resource identifier, specified in a resources.properties file.

O

-

readOnly

Specifies whether or not the Text widget is read-only.

O

-

required

Specifies whether or not the field is required. If required and the user does not enter a value, a warning dialog appears, prompting the user to enter a value for the field.

O

-

span

Value used in the creation of layout data for the controls that are rendered.

If a single-line control is being rendered, span represents the horizontal span of the following GridData:

    GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalSpan = colSpan;

If multiline control is being rendered, span represents the horizontal span of the following GridData:

    GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.verticalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.grabExcessVerticalSpace = true;
    gridData.horizontalSpan = colSpan;

O

1

widthHint

Specifies the preferred width of the control.

O

SWT.DEFAULT

heightHint

Specifies the preferred height of the control.

O

SWT.DEFAULT

multiline

Specifies whether the control is a multiline Text widget.

If this attribute is not present the control defaults to a single-line widget.

O

false

wrap

Specifies whether the text should be wrapped within the control.

This attribute is conditional on the multiline attribute being present and set to true.

C

false

vscroll

Specifies whether a vertical scroll bar should be rendered.

This attribute is conditional on the multiline attribute being present and set to true.

C

false

hscroll

Specifies whether the a horizontal scrollbar should be rendered.

This attribute is conditional on the multiline attribute being present and set to true.

C

false

Sample XML

<ui>
 <panel columns="2">
  <TextAttribute field="name" label="EXCEPTION_NAME" required="true" />
 </panel>
</ui>

Rendered UI

The above XML renders the following UI:

TextAttribute example

In this case, EXCEPTION_NAME is resolved to the localized string “Name:”.

ui

Description

The <ui> tag is the root of a declarative XML document.

Available attributes

This tag does not require any attributes.

Sample XML

<ui>
 <panel columns="2">
  <TextAttribute field="name" label="EXCEPTION_NAME" required="true" />
 </panel>
</ui>

validator

Description

The <validator> tag is used to include a validator class.

Available attributes

Attribute Description M/O Default

class

Specifies the full name of the Java class used to validate input.

M

-

Sample XML

<ui>
 <validator class="com.vordel.client.manager.filter.dirscan.DirectoryScannerDialogValidator" />
</ui>

XPathAttribute

Description

The <XPathAttribute> tag renders an SWT Combo widget and three SWT Button widgets within an SWT Composite displayed as a Button bar.

Available attributes

Attribute Description M/O Default

field

Specifies the name of the field of the entity backed by the rendered controls.

M

-

xpathGroup

Specifies the entity type of all XPath expressions to be displayed.

M

-

label

Specifies the ID of the resource containing the text to display on the Label (to the left of the combo box).

O

-

required

Specifies whether or not the entity field is required.

O

false

span

Value used in the creation of layout data for the Button.

Span represents the horizontal span of the following GridData:

    GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalSpan = span;

O

1

Sample XML

<ui>
 <XPathAttribute field="insertTokenLocationXPath" 
  xpathGroup="XPathTokenInsertionLocationGroup" />
</ui>

Rendered UI

The above XML renders the following UI:

XPathAttribute example

Related Links