Class PortInfoViewer

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

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

Version:
$Revision: 1.4 $, $Date: 2000/10/12 14:07:57 $
Author:
John Cavanaugh

Variable Index

 o cellsIn
A display label for the port's receive cell count.
 o cellsOut
A display label for the port's xmit cell count.
 o done
A flag indicating when the thread is finished.
 o frame
The application's main frame.
 o graph
A graph showing recent usage for the port.
 o OK
 o port
The switch port whose information is being displayed.
 o portUptime
A display label for the port's uptime.
 o uptime
The port uptime at the last update of the window.

Constructor Index

 o PortInfoViewer(VisiFrame, String, SwitchPort)
Constructs a switch port information dialog.

Method Index

 o actionPerformed(ActionEvent)
 o run()
Main line code for the switch port information thread.
 o setLocation(int, int)
Sets the location of the dialog window, offsetting the given location by the parent frame's location.
 o setLocation(Point)
Sets the location of the dialog window, offsetting the given location by the parent frame's location.
 o setUpInfoPanel(SwitchPort)
Creates and fills out a panel with text information about the switch port.
 o updateTextCounts()
Updates the displayed versions of the port counters.
 o windowActivated(WindowEvent)
 o windowClosed(WindowEvent)
 o windowClosing(WindowEvent)
 o windowDeactivated(WindowEvent)
 o windowDeiconified(WindowEvent)
 o windowIconified(WindowEvent)
 o windowOpened(WindowEvent)

Variables

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

 o port
 private SwitchPort port
The switch port whose information is being displayed.

 o uptime
 private long uptime
The port uptime at the last update of the window.

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

 o portUptime
 private Label portUptime
A display label for the port's uptime.

 o cellsOut
 private Label cellsOut
A display label for the port's xmit cell count.

 o cellsIn
 private Label cellsIn
A display label for the port's receive cell count.

 o graph
 private PortInfoViewer. PortGraph graph
A graph showing recent usage for the port.

 o OK
 private static final String OK

Constructors

 o PortInfoViewer
 public PortInfoViewer(VisiFrame frame,
                       String title,
                       SwitchPort port)
Constructs a switch port information dialog.

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

Methods

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

 o setUpInfoPanel
 private Panel setUpInfoPanel(SwitchPort port)
Creates and fills out a panel with text information about the switch port.

Parameters:
port - the port to be displayed.
Returns:
a panel with port information.
 o updateTextCounts
 private void updateTextCounts()
Updates the displayed versions of the port counters.

 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)
 o setLocation
 public void setLocation(Point loc)
Sets the location of the dialog window, offsetting the given location by the parent frame's location.

Parameters:
loc - The location for the window.
Overrides:
setLocation in class Component
 o setLocation
 public void setLocation(int x,
                         int y)
Sets the location of the dialog window, offsetting the given location by the parent frame's location.

Parameters:
x - The x offset for the window.
y - The y offset for the window.
Overrides:
setLocation in class Component