Class VisiFrame

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----VisiFrame

public class VisiFrame
extends Frame
implements ActionListener, ItemListener
Class definition for main display frame with menus, drawing canvas, and message area.

Version:
$Revision: 1.9 $, $Date: 2000/10/30 17:05:23 $
Author:
John Cavanaugh

Variable Index

 o ABOUT
 o ABOUT_MENU
 o bottomLabel
The label at the bottom of the frame, below the network display.
 o C_CLEAR_MENU
 o C_DEL_AREA_MENU
 o C_NEW_AREA_MENU
 o C_OPEN_MENU
 o C_REN_AREA_MENU
 o C_SAVE_AS_MENU
 o C_SAVE_MENU
 o canvas
The canvas for displaying the network.
 o CONFIG_CLEAR
 o CONFIG_DELETE_AREA
 o CONFIG_NEW_AREA
 o CONFIG_OPEN
 o CONFIG_POS_AUTO
 o CONFIG_POS_CFG
 o CONFIG_RENAME_AREA
 o CONFIG_SAVE
 o CONFIG_SAVE_AS
 o CONNECT
 o CONNECT_MENU
 o dataDir
Directory containing files for VisiDisplay.
 o DEBUG_01
 o DEBUG_01_MENU
 o DEBUG_02
 o DEBUG_02_MENU
 o DEBUG_03
 o DEBUG_03_MENU
 o DEBUG_04
 o DEBUG_04_MENU
 o DEBUG_05
 o DEBUG_05_MENU
 o DEFAULT_FRAME_TITLE
Application name to display on the frame.
 o EXIT
 o EXIT_MENU
 o isApplet
A flag indicating the execution mode.
 o main
The application's main processing thread.
 o MENU_CNT
 o MENU_MAX
 o MENU_MIN
 o menuArray
An array holding the menu items that can be enabled and disabled
 o NET_INFO
 o NET_INFO_MENU
 o OPEN
 o OPEN_MENU
 o posCheckbox
 o SAVE_GIF
 o SAVE_GIF_MENU
 o SAVE_JPEG
 o SAVE_JPEG_MENU
 o view
The view settings.
 o VIEW_MENU
 o VIEW_SETUP

Constructor Index

 o VisiFrame(VisiMain, String, boolean)
Constructs a frame.

Method Index

 o actionPerformed(ActionEvent)
Handle menu choices (for ActionListener interface).
 o addMenus(MenuBar, boolean)
Set up menus in the menu bar.
 o disableMenu(int)
Disable a menu item.
 o enableMenu(int)
Enable a menu item.
 o exitApp()
Terminate the application.
 o getCanvas()
Get the display canvas.
 o getView()
Get the user's display choices.
 o itemStateChanged(ItemEvent)
Handle a checkbox menu item (for ItemListener interface).
 o setLabel(String)
Set the text of the label on the bottom of the screen.

Variables

 o ABOUT
 public static final String ABOUT
 o CONFIG_CLEAR
 public static final String CONFIG_CLEAR
 o CONFIG_DELETE_AREA
 public static final String CONFIG_DELETE_AREA
 o CONFIG_NEW_AREA
 public static final String CONFIG_NEW_AREA
 o CONFIG_OPEN
 public static final String CONFIG_OPEN
 o CONFIG_POS_AUTO
 public static final String CONFIG_POS_AUTO
 o CONFIG_POS_CFG
 public static final String CONFIG_POS_CFG
 o CONFIG_RENAME_AREA
 public static final String CONFIG_RENAME_AREA
 o CONFIG_SAVE
 public static final String CONFIG_SAVE
 o CONFIG_SAVE_AS
 public static final String CONFIG_SAVE_AS
 o CONNECT
 public static final String CONNECT
 o DEBUG_01
 public static final String DEBUG_01
 o DEBUG_02
 public static final String DEBUG_02
 o DEBUG_03
 public static final String DEBUG_03
 o DEBUG_04
 public static final String DEBUG_04
 o DEBUG_05
 public static final String DEBUG_05
 o EXIT
 public static final String EXIT
 o NET_INFO
 public static final String NET_INFO
 o OPEN
 public static final String OPEN
 o SAVE_GIF
 public static final String SAVE_GIF
 o SAVE_JPEG
 public static final String SAVE_JPEG
 o VIEW_SETUP
 public static final String VIEW_SETUP
 o ABOUT_MENU
 public static final int ABOUT_MENU
 o C_CLEAR_MENU
 public static final int C_CLEAR_MENU
 o C_DEL_AREA_MENU
 public static final int C_DEL_AREA_MENU
 o C_NEW_AREA_MENU
 public static final int C_NEW_AREA_MENU
 o C_OPEN_MENU
 public static final int C_OPEN_MENU
 o C_REN_AREA_MENU
 public static final int C_REN_AREA_MENU
 o C_SAVE_MENU
 public static final int C_SAVE_MENU
 o C_SAVE_AS_MENU
 public static final int C_SAVE_AS_MENU
 o CONNECT_MENU
 public static final int CONNECT_MENU
 o DEBUG_01_MENU
 public static final int DEBUG_01_MENU
 o DEBUG_02_MENU
 public static final int DEBUG_02_MENU
 o DEBUG_03_MENU
 public static final int DEBUG_03_MENU
 o DEBUG_04_MENU
 public static final int DEBUG_04_MENU
 o DEBUG_05_MENU
 public static final int DEBUG_05_MENU
 o EXIT_MENU
 public static final int EXIT_MENU
 o NET_INFO_MENU
 public static final int NET_INFO_MENU
 o OPEN_MENU
 public static final int OPEN_MENU
 o SAVE_GIF_MENU
 public static final int SAVE_GIF_MENU
 o SAVE_JPEG_MENU
 public static final int SAVE_JPEG_MENU
 o VIEW_MENU
 public static final int VIEW_MENU
 o MENU_MIN
 public static final int MENU_MIN
 o MENU_MAX
 public static final int MENU_MAX
 o MENU_CNT
 public static final int MENU_CNT
 o DEFAULT_FRAME_TITLE
 public static final String DEFAULT_FRAME_TITLE
Application name to display on the frame.

 o dataDir
 private String dataDir
Directory containing files for VisiDisplay.

 o isApplet
 private boolean isApplet
A flag indicating the execution mode. True if the code is running as an applet in a browser, false if it is running as a Java application.

 o canvas
 private DisplayCanvas canvas
The canvas for displaying the network.

 o view
 private ViewSettings view
The view settings. This is a set of controls that determine how the network is displayed.

 o bottomLabel
 private Label bottomLabel
The label at the bottom of the frame, below the network display.

 o menuArray
 private MenuItem menuArray[]
An array holding the menu items that can be enabled and disabled

 o main
 private VisiMain main
The application's main processing thread.

 o posCheckbox
 public CheckboxMenuItem posCheckbox

Constructors

 o VisiFrame
 public VisiFrame(VisiMain main,
                  String dataDir,
                  boolean isApplet)
Constructs a frame.

Parameters:
main - the main processing thread.
dataDir - dirctory containing data files.
isApplet - execution mode indicator.

Methods

 o setLabel
 public void setLabel(String text)
Set the text of the label on the bottom of the screen.

Parameters:
text - the message to be displayed.
 o enableMenu
 public void enableMenu(int m)
Enable a menu item.

Parameters:
m - the index of the menu item to be enabled.
 o disableMenu
 public void disableMenu(int m)
Disable a menu item.

Parameters:
m - the index of the menu item to be disabled.
 o addMenus
 private void addMenus(MenuBar menuBar,
                       boolean active)
Set up menus in the menu bar.

Parameters:
menuBar - the menu bar to add the menus to.
active - a flag indicating whether the menus are active.
 o exitApp
 private void exitApp()
Terminate the application.

 o getCanvas
 public DisplayCanvas getCanvas()
Get the display canvas.

Returns:
the display canvas.
 o getView
 public ViewSettings getView()
Get the user's display choices.

Returns:
the user's view settings.
 o actionPerformed
 public void actionPerformed(ActionEvent e)
Handle menu choices (for ActionListener interface).

Parameters:
e - the action event to be handled.
 o itemStateChanged
 public void itemStateChanged(ItemEvent e)
Handle a checkbox menu item (for ItemListener interface).