Visual Tagging Tool

Modal Dialog Boxes

I. Introduction

A modal dialog box blocks user input to all other windows in the same application when it is visible. Users have to close a modal dialog box before other windows in the same application can get focus. Accordingly, only one modal dialog boxes shown at one time. Modal dialog boxes are commonly used in Graphic User Interface (GUI) to display warning, errors, confirmations, etc.

II. Types of Modal Dialog Box

  • Display information
  • Update information

ButtonsOperations
Ok
  • Update local variables from GUI
  • Update global variables from local variables
  • Close the dialog box
  • Cancel
  • Close the dialog box
  • Reset
  • Update GUI (display) from local variables
  • III. VTT Modal Dialog Java Class/Methods

    • Data Members
      • Local variables:
        Used as a local copy of the global variables manipulated in the dialog box
      • GUI controllers:
        The controllers for Java GUI components. The table below shows commonly used in VTT:

        GUI ComponentGUI Controller
        JButtonActionListener
        JTextFieldActionListener
        JComboBoxActionListener
        JCheckBoxItemListener
        JRadioButtonActionListener

    • Methods

      AccessibilityMethodProcedures
      publicConstructor( )
    • InitGuiControllers( )
    • InitGuiComponents( )
    • publicShow( )
    • UpdateGui( )
    • Open dialog box
    • publicUpdateGui( )
    • UpdateLocalVarsFromGlobal( )
    • UpdateGuiFromLocalVars( )
    • privateUpdateLocalVarsFromGui( )
    • Update the values of local variables from GUI inputs
    • privateUpdateLocalVarsFromGlobal( )
    • Update the values of local variables from global variables
    • privateUpdateGuiFromLocalVars( )
    • Update the GUI display from the local variables
    • privateInitGuiControllers( )
    • Init controller, add listeners, set action commands, etc.
    • privateInitGuiComponents( )
    • Set title, location, size, compose the GUI object