JFace provides viewers to encapsulate the data from the presentation. For an introduction to JFace viewer please see Eclipse JFace Table Viewer. A JFace viewer requires a content provider and a label provider. Zest provides as a viewer the class "GraphViewer". Content provider in Zest are either based on the connections or on the nodes.
Standard Zest Content providers are:
Table 2. Zest JFace Content Provider
Content Provider | Description |
---|---|
IGraphContentProvider | Based on the connections. The connections contain the information which nodes they refer to. Cannot display nodes without connections. |
IGraphEntityContentProvider | Based on the Node which contain the information about which relationship they have. These relationship are available in the label provider as EntityConnectionData objects. |
IGraphEntityRelationshipContentProvider | Node based, the content provider defines getRelationShips(sourceNode, destinationNode) which determines the connections. The advantages compared with IGraphEntityContentProvider is that you decide which objects you return. |
As label provider Zest can use the standard JFace interface ILabelProvider (implemented for example by the class LabelProvider) or the Zest specific IEntityStyleProvider.
0 comments:
Post a Comment