Class NetworkInfoViewer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----NetworkInfoViewer

public class NetworkInfoViewer
extends Dialog
implements ActionListener, Runnable, WindowListener
Class definition for a dialog window to display information about a network.

Version:
$Revision: 1.1 $
Author:
John Cavanaugh

Variable Index

 o COLS
The maximum number of columns in the display window.
 o displayArea
A text area displaying the network information.
 o displayString
The string containing the network information.
 o done
A flag indicating when the thread is finished.
 o frame
The application's main frame.
 o net
The network whose information is being displayed.
 o netEndSystems
The number of end systems in the network.
 o netOrphans
The number of orphan hosts in the network.
 o netSwitches
The number of switches in the network.
 o netUnknownNodes
The number of unknown type nodes in the network.
 o netVccs
The number of VCCs in the network.
 o OK
 o ROWS
The number of rows in the display window.

Constructor Index

 o NetworkInfoViewer(VisiFrame, String, Network)
Constructs a network information dialog.

Method Index

 o actionPerformed(ActionEvent)
 o areCountsUpdated()
Test the current network element counts against values from the network to see if anything has changed.
 o getCounts()
Gets the current network element counts.
 o getNetSummary(Network)
Gets a string with information about the network.
 o run()
Main line code for the network information thread.
 o setUpInfoPanel()
Creates and fills out a panel with text information about the network.
 o windowActivated(WindowEvent)
 o windowClosed(WindowEvent)
 o windowClosing(WindowEvent)
 o windowDeactivated(WindowEvent)
 o windowDeiconified(WindowEvent)
 o windowIconified(WindowEvent)
 o windowOpened(WindowEvent)

Variables

 o ROWS
 private static final int ROWS
The number of rows in the display window.

 o COLS
 private static final int COLS
The maximum number of columns in the display window.

 o frame
 private VisiFrame frame
The application's main frame.

 o net
 private Network net
The network whose information is being displayed.

 o done
 private boolean done
A flag indicating when the thread is finished.

 o displayArea
 private TextArea displayArea
A text area displaying the network information.

 o displayString
 private String displayString
The string containing the network information.

 o netSwitches
 private int netSwitches
The number of switches in the network.

 o netEndSystems
 private int netEndSystems
The number of end systems in the network.

 o netUnknownNodes
 private int netUnknownNodes
The number of unknown type nodes in the network.

 o netOrphans
 private int netOrphans
The number of orphan hosts in the network.

 o netVccs
 private int netVccs
The number of VCCs in the network.

 o OK
 private static final String OK

Constructors

 o NetworkInfoViewer
 public NetworkInfoViewer(VisiFrame frame,
                          String title,
                          Network net)
Constructs a network information dialog.

Parameters:
frame - the application's main frame.
title - a title for the dialog window.
net - the network whose information is to be displayed.

Methods

 o run
 public void run()
Main line code for the network information thread.

 o setUpInfoPanel
 private TextArea setUpInfoPanel()
Creates and fills out a panel with text information about the network.

Returns:
a TextArea with network information.
 o getNetSummary
 private String getNetSummary(Network net)
Gets a string with information about the network.

Parameters:
net - the network we want informatin about.
Returns:
a String with network information.
 o getCounts
 private void getCounts()
Gets the current network element counts.

 o areCountsUpdated
 private boolean areCountsUpdated()
Test the current network element counts against values from the network to see if anything has changed.

Returns:
true if any network element count has changed; false if the counts are still the same.
 o windowActivated
 public void windowActivated(WindowEvent e)
 o windowClosed
 public void windowClosed(WindowEvent e)
 o windowClosing
 public void windowClosing(WindowEvent e)
 o windowDeactivated
 public void windowDeactivated(WindowEvent e)
 o windowDeiconified
 public void windowDeiconified(WindowEvent e)
 o windowIconified
 public void windowIconified(WindowEvent e)
 o windowOpened
 public void windowOpened(WindowEvent e)
 o actionPerformed
 public void actionPerformed(ActionEvent e)