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
-
COLS
- The maximum number of columns in the display window.
-
displayArea
- A text area displaying the network information.
-
displayString
- The string containing the network information.
-
done
- A flag indicating when the thread is finished.
-
frame
- The application's main frame.
-
net
- The network whose information is being displayed.
-
netEndSystems
- The number of end systems in the network.
-
netOrphans
- The number of orphan hosts in the network.
-
netSwitches
- The number of switches in the network.
-
netUnknownNodes
- The number of unknown type nodes in the network.
-
netVccs
- The number of VCCs in the network.
-
OK
-
-
ROWS
- The number of rows in the display window.
-
NetworkInfoViewer(VisiFrame, String, Network)
- Constructs a network information dialog.
-
actionPerformed(ActionEvent)
-
-
areCountsUpdated()
- Test the current network element counts against values
from the network to see if anything has changed.
-
getCounts()
- Gets the current network element counts.
-
getNetSummary(Network)
- Gets a string with information about the network.
-
run()
- Main line code for the network information thread.
-
setUpInfoPanel()
- Creates and fills out a panel with text information about
the network.
-
windowActivated(WindowEvent)
-
-
windowClosed(WindowEvent)
-
-
windowClosing(WindowEvent)
-
-
windowDeactivated(WindowEvent)
-
-
windowDeiconified(WindowEvent)
-
-
windowIconified(WindowEvent)
-
-
windowOpened(WindowEvent)
-
ROWS
private static final int ROWS
- The number of rows in the display window.
COLS
private static final int COLS
- The maximum number of columns in the display window.
frame
private VisiFrame frame
- The application's main frame.
net
private Network net
- The network whose information is being displayed.
done
private boolean done
- A flag indicating when the thread is finished.
displayArea
private TextArea displayArea
- A text area displaying the network information.
displayString
private String displayString
- The string containing the network information.
netSwitches
private int netSwitches
- The number of switches in the network.
netEndSystems
private int netEndSystems
- The number of end systems in the network.
netUnknownNodes
private int netUnknownNodes
- The number of unknown type nodes in the network.
netOrphans
private int netOrphans
- The number of orphan hosts in the network.
netVccs
private int netVccs
- The number of VCCs in the network.
OK
private static final String OK
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.
run
public void run()
- Main line code for the network information thread.
setUpInfoPanel
private TextArea setUpInfoPanel()
- Creates and fills out a panel with text information about
the network.
- Returns:
- a TextArea with network information.
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.
getCounts
private void getCounts()
- Gets the current network element counts.
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.
windowActivated
public void windowActivated(WindowEvent e)
windowClosed
public void windowClosed(WindowEvent e)
windowClosing
public void windowClosing(WindowEvent e)
windowDeactivated
public void windowDeactivated(WindowEvent e)
windowDeiconified
public void windowDeiconified(WindowEvent e)
windowIconified
public void windowIconified(WindowEvent e)
windowOpened
public void windowOpened(WindowEvent e)
actionPerformed
public void actionPerformed(ActionEvent e)