| Graphic Components > Tree Component > Introducing the Tree Component |
Introducing the Tree Component |
INDEX
PREVIOUS
NEXT
|
The JViews TGO tree component is based on the Swing tree component. It allows you to display data in a hierarchical representation.
The tree component is connected to a data source, from which it retrieves the business objects to be displayed. By default, the tree displays all the objects contained in the data source. However, it is possible to restrict the contents displayed by:
Objects that do not have a parent are displayed as root nodes, while the others are displayed under their parent.
The tree component offers the following features:
expansion (see Customizing the Expansion of Business Objects in the Styling documentation). More advanced customization can be performed at the adapter level (see Expansion Strategy).
The tree component is implemented by the class IlpTree, which is a Swing JComponent that can be directly inserted into a panel (JPanel).
IlpTree provides the API for the most common uses of the tree component, such as:
getDataSource(), setDataSource()
getSelectionModel(), setSelectionModel(), addSelectionObject(), removeSelectionObject(), clearSelection(), isObjectSelected(), getSelectedObject(), getSelectedObjects()
setViewInteractor(), getViewInteractor()
getAdapter()
setFilter(), getFilter()
setSortComparator(), getSortComparator()
IlpTree also acts as a façade for a number of lower-level components that it contains. These components provide more detailed APIs and advanced services. They are described in Architecture of the Tree Component of this section.
This section contains extracts of sample code located in <installdir>/samples/tree/basic and <installdir>/samples/tree/customClasses.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |