| Getting Started > Tutorial: Getting Started with ILOG JViews TGO > Creating a Basic Tree |
Creating a Basic Tree |
INDEX
PREVIOUS
NEXT
|
This section shows you how to create a tree component to show the containment hierarchy. The data for this part of the tutorial is in the file:
<installdir>/tutorials/gettingStarted/data/elements.xml
To allow the tree component to function, you must create a tree component and connect it to a data source. This example uses the same data source that was created for the network component to show the same data in the tree and the network. A new XML data file is read into the data source. This file includes the child elements to be contained under the top level objects (Britain and Benelux) read in Step 1. (See Creating a Basic Network Component.)
You must also add the tree component to the container or frame.
This part of the code is referred to as Step 2.
void step2() throws Exception {
| Note |
Here top-level BTS nodes only are created. JViews TGO also supports a more complete representation of BTS nodes and their antennas through the class IltBTS.
|
Cardiff and London, are both contained under Britain. The BTSs are child objects of the BSCs.
IltNetworkElement, which has the following attributes among others:
name
type
family
function
position
IlpPoint. You can also give geographic positions as latitude and longitude values through the class IlpGeographicPosition. In this case, you need to provide a corresponding IlpGeographicPositionConverter to the network component. See Creating a Network Component: a Sample in the Graphic Components documentation for details.
IltLink. They are defined in terms of their start and end nodes. The links are named by their start and end node IDs. The start node is defined within a <from> element and the end node is defined within a <to> element. The file provides values for the following link attributes:
The sample with the tree component should look as shown in Figure 2.2.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |