| Getting Started > Tutorial: Getting Started with ILOG JViews TGO > Creating a Basic Network Component |
Creating a Basic Network Component |
INDEX
PREVIOUS
NEXT
|
This section shows you how to create a network component to model and represent a telecommunications network. The data for this part of the tutorial is in the file:
<installdir>/tutorials/gettingStarted/data/regions.xml
To allow the network component to function, you must create a data source to supply the business data in the form of JViews TGO business objects. (See section Data Sources in the Business Objects and Data Sources documentation.)
You can then create a network component and connect it to the data source. (See Creating a Network Component: a Sample in the Graphic Components documentation.)
Next you read in the data from the XML file.
Finally, you add the network component to the container that you defined during initialization. This delimits the physical area in which the network view will be displayed.
This part of the code is referred to as Step 1.
void step1() throws Exception {
IltDefaultDataSource as a predefined data source. The new instance of IltDefaultDataSource created here is called mainDataSource. This data source is not specific to the network component and will be used to supply business objects to other graphic components.
IlpNetwork as a predefined network component. The new instance of IlpNetwork that you create is called networkComponent.
IltDefaultDataSource.parse. You can pass as an argument to this method either a filename or a valid org.xml.sax.InputSource that you have previously created.
Britain and Benelux and France. They belong to the business object class IltPolyGroup and have the attributes name and position. A position must be an instance of a class that implements IlpPosition. Here, the type is IlpPolygon which contains the (x,y) coordinates of the points that define the shape of the region.
<cplData>. See Data Sources in the Business Objects and Data Sources documentation.
The network component should look as shown in Figure 2.1.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |