Rogue Wave JViews TGO Sample: Network Component - Link Ports


Description

This sample shows how to use link connection ports.

How to Use the Sample

The main frame contains a sample network component, showing a ficticious network with a link layout that has been constrained through link connection ports. The network component has a toolbar with a set of interactors:

When the Edit link port interactor is enabled:



The link connection port information for each node that is modified by the use of the Edit link port interactor is stored in a style sheet. When running this sample as an application, whenever this interactor is detached from the view, an output file (data/linkPort_output.css) is generated with the current link port information.

How to Run the Sample as an Application

This sample can also be run as an application. The installation directory contains an executable JAR file, network-linkPorts.jar, that allows you to execute the sample with a double click from a file browser. Note that if you are using Internet Explorer, you can open the installation directory and execute the JAR file from the browser. This technique may not work in other Web browsers.

Alternatively, you can run the sample application from the command line. First check that the Ant utility is properly configured. If not, see the instructions on how to configure Ant for Rogue Wave JViews.

Then, go to the installation directory of the sample and type:

ant run

Topics Covered

Detailed Description

This sample demonstrates how to use link connection ports (pins). The specific code of this sample can be found in the doSample method of linkPorts.Main. The sample includes the following steps:

The class linkPorts.EditPinButton illustrates how you create new buttons to the Network component toolbar. This class includes the following steps:



Installation Directory

The Network Component - Link Ports sample is installed here.

Classes Involved

Source Files

Copyright © Rogue Wave Software, Inc. 1997, 2015. All rights reserved. Legal terms.