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
-
cellsIn
- A display label for the port's receive cell count.
-
cellsOut
- A display label for the port's xmit cell count.
-
done
- A flag indicating when the thread is finished.
-
frame
- The application's main frame.
-
graph
- A graph showing recent usage for the port.
-
OK
-
-
port
- The switch port whose information is being displayed.
-
portUptime
- A display label for the port's uptime.
-
uptime
- The port uptime at the last update of the window.
-
PortInfoViewer(VisiFrame, String, SwitchPort)
- Constructs a switch port information dialog.
-
actionPerformed(ActionEvent)
-
-
run()
- Main line code for the switch port information thread.
-
setLocation(int, int)
- Sets the location of the dialog window, offsetting the
given location by the parent frame's location.
-
setLocation(Point)
- Sets the location of the dialog window, offsetting the
given location by the parent frame's location.
-
setUpInfoPanel(SwitchPort)
- Creates and fills out a panel with text information about
the switch port.
-
updateTextCounts()
- Updates the displayed versions of the port counters.
-
windowActivated(WindowEvent)
-
-
windowClosed(WindowEvent)
-
-
windowClosing(WindowEvent)
-
-
windowDeactivated(WindowEvent)
-
-
windowDeiconified(WindowEvent)
-
-
windowIconified(WindowEvent)
-
-
windowOpened(WindowEvent)
-
frame
private VisiFrame frame
- The application's main frame.
port
private SwitchPort port
- The switch port whose information is being displayed.
uptime
private long uptime
- The port uptime at the last update of the window.
done
private boolean done
- A flag indicating when the thread is finished.
portUptime
private Label portUptime
- A display label for the port's uptime.
cellsOut
private Label cellsOut
- A display label for the port's xmit cell count.
cellsIn
private Label cellsIn
- A display label for the port's receive cell count.
graph
private PortInfoViewer. PortGraph graph
- A graph showing recent usage for the port.
OK
private static final String OK
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.
run
public void run()
- Main line code for the switch port information thread.
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.
updateTextCounts
private void updateTextCounts()
- Updates the displayed versions of the port counters.
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)
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
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