Editing basic properties

Some basic properties of a selected widget, such as foreground color, font and text, can be modified in the General property view of the XUI Editor. To edit basic properties, you need to do the following steps:

  1. Select a widget in the design panel and check the Properties view.
  2. The Appearance properties define features related with appearance. Most modifications of Appearance properties can be directly seen in the design panel. All the modifications create codes in the Source view. The following screen capture shows the Properties view:
    Screen capture of the Properties view

    In the Image field, you can choose icon file from your workspace and set it as the Composite's background image. And in the ImageAlignment filed, you can select LEFT, CENTER, and RIGHT in the dropdown list to set the position of the image.

  3. The General properties define features related with the widgets. The modification of these characteristics create codes in the Source view. The following screen capture shows the General property view.
    Screen capture showing the General property view
Note: If you set an image to a label, the texts on that label cannot be displayed

In the Properties view of XUITable, you can use the Check attribute to add checkboxes before the rows of a table. Then you can select the checkbox to select the row.

Besides, sort function is added to XUITable. You can click the header of a table to sort the data in the column. The following screen capture illustrates the XUITable:

Screen capture of the XUITable

You can use com.ibm.btt.rcp.xui.widgets.ColumnViewerSorter to do the column sorting. Following is the code sample:
final XUITable xtable = (XUITable)widget;
		final TableViewer viewer = xtable.getTableViewer();
		for (final XUITableColumn column : xtable.getColumns()) {
			new ColumnViewerSorter(viewer, column.getWidget()) {

				@Override
				protected int doCompare(Viewer arg0, Object arg1, Object arg2) {
					String dataName = column.getDataName();//Adjuect models using dataName if needed
					KeyedCollection kColl1 = (KeyedCollection)((KCollModel)arg1).getContent();//line 1 data
					KeyedCollection kColl2 = (KeyedCollection)((KCollModel)arg2).getContent();//line 2 data
					try {
						return ((String)kColl1.getValueAt(dataName)).compareTo((String)kColl2.getValueAt(dataName));
					} catch (DSEObjectNotFoundException e) {
						return 0;
					}
				}
				
			};
		}