All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javaParse.Environment

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----javaParse.WindowItem
                                           |
                                           +----javaParse.Environment

public class Environment
extends WindowItem
implements ActionListener, WindowListener, MouseListener, KeyListener, ItemListener
This is the main window associated with each machine that the user opens. It contains the Desktop in the middle -- where the machine is displayed and edited --, a status bar at the bottom, an input string bar above the Desktop, and a menu bar at the top. It also contains the actual machine.

See Also:
Desktop

Variable Index

 o a
The machine.
 o AUTOMATON_IS_DETER_STR
 o AUTOMATON_IS_NON_DETER_STR
 o centerPanel
 o CLOSE_STR
 o d
The desktop.
 o dfa
Other desktop used by the TO_DFA FSA's to store the DFA to compare with
 o DFA_IS_CORRECT_STR
 o DONE_MINIMIZE_STR
 o DONE_STR
 o envSource
The Environment that generated this Environment
 o envTarget
the Environment that this Environment generated.
 o EXPAND_STATE_STR
 o HLP_MENUBAR_STR
 o HLP_MINIMIZE_STR
 o HLP_NFATODFA_STR
 o HLP_OVERVIEW_STR
 o HLP_STATE_STR
 o HLP_TRACEWINDOW_STR
 o HLP_TRANSITION_STR
 o HLP_UPPERWINDOW_STR
 o MINIMIZE_STR
 o NO_FILE_NAME
 o SHOW_LABEL_STR
 o SHOW_STR
 o SHOW_UNREACHABLE_STR
 o statusLine
The bottom status line.
 o TO_DFA_STR
 o type
The type of the machine.

Constructor Index

 o Environment(Vector, LR1Grammar)

Method Index

 o actionPerformed(ActionEvent)
 o breakupMultipleLabels()
Breaks up all multiple letter labels on the desktop into several states.
 o checkDeterministic()
Checks if the machine is deterministic or has any errors and returns an appropriate String.
 o checkMultiLetterLabels()
Check if any of the transitions have more than one letter.
 o clear()
Removes the current desktop and opens a brand new one.
 o close()
 o done()
Handles the checking to see if DFA and NFA are identical
 o expandState(State)
Solves only the selected State in the NFA to DFA window
 o getEnvSource()
 o getPreferredSize()
 o itemStateChanged(ItemEvent)
 o keyPressed(KeyEvent)
 o keyReleased(KeyEvent)
 o keyTyped(KeyEvent)
 o mouseClicked(MouseEvent)
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)
 o printPostscript()
Pops up a menu and prints the window to a postscript file
 o relabel()
Relabels the states by calling relabel from the Desktop.
 o setEnabled(boolean)
 o setEnvSource(Environment)
Sets the source Environment that generated this Environment
 o setEnvTarget(Environment)
Sets the Environment that is generated by this environment
 o setShowing(boolean)
sets the window showing or not
 o setToDfa(Vector)
sets the FSA to be a DFA builder
 o showAnswers()
Show the answer to the DFA convertion problem
 o showClosures(State)
 o showNondets()
Opens a dialog and focuses the nondeterministic states.
 o showUnreachables()
Shows the states which are unreachable from the initial state.
 o threadAction(int)
Should be removed when the bug regarding non-modal dialogs is fixed.
 o updateStatus()
Updates the title and the status line.
 o updateStatus(String)
Updates the title and the status line.
 o windowActivated(WindowEvent)
 o windowClosed(WindowEvent)
 o windowClosing(WindowEvent)
 o windowDeactivated(WindowEvent)
 o windowDeiconified(WindowEvent)
 o windowIconified(WindowEvent)
 o windowOpened(WindowEvent)

Variables

 o type
 public int type
The type of the machine.

 o centerPanel
 public Panel centerPanel
 o d
 public Desktop d
The desktop.

 o dfa
 public FSA dfa
Other desktop used by the TO_DFA FSA's to store the DFA to compare with

 o a
 public Machine a
The machine.

 o envSource
 public Environment envSource
The Environment that generated this Environment

 o envTarget
 public Environment envTarget
the Environment that this Environment generated. When this is set the window is frozen

 o statusLine
 public Label statusLine
The bottom status line.

 o CLOSE_STR
 public static final String CLOSE_STR
 o DONE_STR
 public static final String DONE_STR
 o TO_DFA_STR
 public static final String TO_DFA_STR
 o SHOW_STR
 public static final String SHOW_STR
 o EXPAND_STATE_STR
 public static final String EXPAND_STATE_STR
 o SHOW_LABEL_STR
 public static final String SHOW_LABEL_STR
 o MINIMIZE_STR
 public static final String MINIMIZE_STR
 o SHOW_UNREACHABLE_STR
 public static final String SHOW_UNREACHABLE_STR
 o HLP_STATE_STR
 public static final String HLP_STATE_STR
 o HLP_TRANSITION_STR
 public static final String HLP_TRANSITION_STR
 o HLP_OVERVIEW_STR
 public static final String HLP_OVERVIEW_STR
 o HLP_UPPERWINDOW_STR
 public static final String HLP_UPPERWINDOW_STR
 o HLP_TRACEWINDOW_STR
 public static final String HLP_TRACEWINDOW_STR
 o HLP_MENUBAR_STR
 public static final String HLP_MENUBAR_STR
 o HLP_NFATODFA_STR
 public static final String HLP_NFATODFA_STR
 o HLP_MINIMIZE_STR
 public static final String HLP_MINIMIZE_STR
 o AUTOMATON_IS_DETER_STR
 public static final String AUTOMATON_IS_DETER_STR
 o AUTOMATON_IS_NON_DETER_STR
 public static final String AUTOMATON_IS_NON_DETER_STR
 o DFA_IS_CORRECT_STR
 public static final String DFA_IS_CORRECT_STR
 o DONE_MINIMIZE_STR
 public static final String DONE_MINIMIZE_STR
 o NO_FILE_NAME
 public static final String NO_FILE_NAME

Constructors

 o Environment
 public Environment(Vector theStates,
                    LR1Grammar grammar)

Methods

 o getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Container
 o windowClosing
 public void windowClosing(WindowEvent e)
 o windowOpened
 public void windowOpened(WindowEvent e)
 o windowIconified
 public void windowIconified(WindowEvent e)
 o windowDeiconified
 public void windowDeiconified(WindowEvent e)
 o windowClosed
 public void windowClosed(WindowEvent e)
 o windowActivated
 public void windowActivated(WindowEvent e)
 o windowDeactivated
 public void windowDeactivated(WindowEvent e)
 o mousePressed
 public void mousePressed(MouseEvent e)
 o mouseReleased
 public void mouseReleased(MouseEvent e)
 o mouseEntered
 public void mouseEntered(MouseEvent e)
 o mouseExited
 public void mouseExited(MouseEvent e)
 o mouseClicked
 public void mouseClicked(MouseEvent e)
 o keyPressed
 public void keyPressed(KeyEvent e)
 o keyReleased
 public void keyReleased(KeyEvent e)
 o keyTyped
 public void keyTyped(KeyEvent e)
 o itemStateChanged
 public void itemStateChanged(ItemEvent e)
 o actionPerformed
 public void actionPerformed(ActionEvent e)
 o relabel
 public void relabel()
Relabels the states by calling relabel from the Desktop.

 o printPostscript
 public void printPostscript()
Pops up a menu and prints the window to a postscript file

 o showNondets
 public void showNondets()
Opens a dialog and focuses the nondeterministic states. These are found by calling showNondets from Machine.

See Also:
Machine
 o checkDeterministic
 public String checkDeterministic()
Checks if the machine is deterministic or has any errors and returns an appropriate String.

 o setToDfa
 public void setToDfa(Vector theStates)
sets the FSA to be a DFA builder

 o setEnvSource
 public void setEnvSource(Environment source)
Sets the source Environment that generated this Environment

 o setEnvTarget
 public void setEnvTarget(Environment target)
Sets the Environment that is generated by this environment

 o getEnvSource
 public Environment getEnvSource()
 o showAnswers
 public void showAnswers()
Show the answer to the DFA convertion problem

Overrides:
showAnswers in class WindowItem
 o setShowing
 public void setShowing(boolean boo)
sets the window showing or not

Overrides:
setShowing in class WindowItem
 o done
 public void done()
Handles the checking to see if DFA and NFA are identical

Overrides:
done in class WindowItem
 o expandState
 public void expandState(State s)
Solves only the selected State in the NFA to DFA window

 o checkMultiLetterLabels
 public boolean checkMultiLetterLabels()
Check if any of the transitions have more than one letter.

 o breakupMultipleLabels
 public void breakupMultipleLabels()
Breaks up all multiple letter labels on the desktop into several states.

 o showUnreachables
 public void showUnreachables()
Shows the states which are unreachable from the initial state.

 o showClosures
 public void showClosures(State s)
 o clear
 public void clear()
Removes the current desktop and opens a brand new one.

Overrides:
clear in class WindowItem
 o setEnabled
 public void setEnabled(boolean b)
Overrides:
setEnabled in class Component
 o close
 public void close()
 o updateStatus
 public void updateStatus()
Updates the title and the status line.

 o updateStatus
 public int updateStatus(String message)
Updates the title and the status line.

Parameters:
message - the new status line.
 o threadAction
 public void threadAction(int id)
Should be removed when the bug regarding non-modal dialogs is fixed.


All Packages  Class Hierarchy  This Package  Previous  Next  Index