XWT |
|||||||||||||||||||||||||||||||
ComboViewer | The ComboViewer of JFace can be defined in the same way as ListViewer and TableViewer using the standard JFace class. |
||||||||||||||||||||||||||||||
Simplified JFace viewers | This milestone has simplified the declaration of JFace viewer. The ILabelProvider and IContentProvider are not needed any more. Here is the code for TableViewer, <TableViewer input="{Binding Path=employees}"> the code for ComboViewer, <ComboViewer input="{Binding Path=employees}" displayMemberPath="name"> and the code of ListViewer <ListViewer input="{Binding Path=employees}" displayMemberPath="name"> |
||||||||||||||||||||||||||||||
Viewer Filter | A new class ViewerFilter is provided to define a filter in a JFace viewer. This class contains a collection of Condition which are used as predicate to select the elements to display. <TableViewer Name="TableViewer" input="{Binding Path=employees}" > This TableViewer displays all Employee whose name is started with "Th" and ago is great than 30. |
||||||||||||||||||||||||||||||
IObservable Management | An IObservable management is implemented in XWT for each loading unit. XWT keeps now all instances of IObservable. It allows developers to get the IObservableValue and then modify observed values with automatically notifications in UI and in behind data. The service is provided in the main class XWT: IObservableValue XWT.getObservableValue(Object control, Object data, String path); |
||||||||||||||||||||||||||||||
Master/Detail support | XWT starts to provide a transparent a "Declarative Data Binding" solution to hide the all complexsity of JFace data binding. The master/detail presentation is supported strainghtforward in the path expression of Data Binding. The lanaguage of data binding is extended to have the possibility to indicate the missing type in programming language. For example, the element type of a collection is always missing in binary class of Java. This information is necesary to build the Data binding in chain of Mater/Detail pattern. In the follwing example, we have a class Company with a property employees in a collection or an array. The employees are displayed in a ListViewer, when user select an element, its name will be displayed in the Label below . <ListViewer name="master" input="{Binding Path=employees}" displayMemberPath="name"> The property "name" in the binding expression is prefixed by its type Employee and enclosed by a parenthese. Here is the example Snippet017 of Jface Data binding ported in XWT:
|
||||||||||||||||||||||||||||||
Update Source trigger | This Milestore integerats a new type UpdateSourceTrigger. And a new property updateSourceTrigger is added in the class Binding and thereofore in Data Binding expression. This class indicates when the modification to Data Binding source model will occur. Most of UI Element has only one possibility like check Button. But Text has two possibility: when the content get changed, or when the focus gets losed. <Text text="{Binding path=name,updateSourceTrigger=FocusOut}"> |
||||||||||||||||||||||||||||||
More operators in condition | The following operators has be added in Condition and all classes of Trigger to extend the expression capability:
|
||||||||||||||||||||||||||||||