Executing the tutorial

Describes how you initialize JViews TGO, store the context, and execute the different tasks. It assumes that you are familiar with writing Java™ code. Therefore, it does not describe the Java import statements or data member declarations that are used to set up the application environment for this tutorial.

Initializing JViews TGO

To run the tutorial, you first have to specify a container or frame to contain what is to be displayed and initialize JViews TGO by reading a deployment descriptor file, deploy.xml , to initialize the application context:
  void doSample (Container container) {
    try {
      if (isApplet())
        IltSystem.Init(this, "deploy.xml");
      else
        IltSystem.Init("deploy.xml");
In this code extract, container is a java.awt.Container class.
For more information about the content and purpose of the deployment descriptor file, see The application context.

Executing the steps in the tutorial

The remainder of this code refers to the main steps of the tutorial, which are described in detail in the rest of this section. These steps are called and executed in sequence. Finally, the code catches and logs any errors.
      // Create a simple network component
      step1();

      // Create a simple tree
      // Add subnodes to show containment in tree and network
      step2();

      // Create a simple table component
      step3();

      // Configure the network component
      step4();

      // Load alarms and show them in a separate table
      step5(container);

      // Update and remove objects
      step6();

      // Create a new window to show details of equipment
      step7();

      // Interactors:
      // - configure consistent pop-up menu on all components
      // - add double-click behavior for network elements
      // - show overview window on special keystroke
      step8();

      // Synchronize selection between components
      step9();
    }
    catch(Exception e){
      log.severe("Exception caught while running sample: " + 
                  e.getMessage());
      e.printStackTrace();
    }
  }