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
-
a
- The machine.
-
AUTOMATON_IS_DETER_STR
-
-
AUTOMATON_IS_NON_DETER_STR
-
-
centerPanel
-
-
CLOSE_STR
-
-
d
- The desktop.
-
dfa
- Other desktop used by the TO_DFA FSA's to store the DFA to compare with
-
DFA_IS_CORRECT_STR
-
-
DONE_MINIMIZE_STR
-
-
DONE_STR
-
-
envSource
- The Environment that generated this Environment
-
envTarget
- the Environment that this Environment generated.
-
EXPAND_STATE_STR
-
-
HLP_MENUBAR_STR
-
-
HLP_MINIMIZE_STR
-
-
HLP_NFATODFA_STR
-
-
HLP_OVERVIEW_STR
-
-
HLP_STATE_STR
-
-
HLP_TRACEWINDOW_STR
-
-
HLP_TRANSITION_STR
-
-
HLP_UPPERWINDOW_STR
-
-
MINIMIZE_STR
-
-
NO_FILE_NAME
-
-
SHOW_LABEL_STR
-
-
SHOW_STR
-
-
SHOW_UNREACHABLE_STR
-
-
statusLine
- The bottom status line.
-
TO_DFA_STR
-
-
type
- The type of the machine.
-
Environment(Vector, LR1Grammar)
-
-
actionPerformed(ActionEvent)
-
-
breakupMultipleLabels()
- Breaks up all multiple letter labels on the desktop into several states.
-
checkDeterministic()
- Checks if the machine is deterministic or has any errors and returns an appropriate String.
-
checkMultiLetterLabels()
- Check if any of the transitions have more than one letter.
-
clear()
- Removes the current desktop and opens a brand new one.
-
close()
-
-
done()
- Handles the checking to see if DFA and NFA are identical
-
expandState(State)
- Solves only the selected State in the NFA to DFA window
-
getEnvSource()
-
-
getPreferredSize()
-
-
itemStateChanged(ItemEvent)
-
-
keyPressed(KeyEvent)
-
-
keyReleased(KeyEvent)
-
-
keyTyped(KeyEvent)
-
-
mouseClicked(MouseEvent)
-
-
mouseEntered(MouseEvent)
-
-
mouseExited(MouseEvent)
-
-
mousePressed(MouseEvent)
-
-
mouseReleased(MouseEvent)
-
-
printPostscript()
-
Pops up a menu and prints the window to a postscript file
-
relabel()
- Relabels the states by calling relabel from the Desktop.
-
setEnabled(boolean)
-
-
setEnvSource(Environment)
- Sets the source Environment that generated this Environment
-
setEnvTarget(Environment)
- Sets the Environment that is generated by this environment
-
setShowing(boolean)
- sets the window showing or not
-
setToDfa(Vector)
- sets the FSA to be a DFA builder
-
showAnswers()
- Show the answer to the DFA convertion problem
-
showClosures(State)
-
-
showNondets()
- Opens a dialog and focuses the nondeterministic states.
-
showUnreachables()
- Shows the states which are unreachable from
the initial state.
-
threadAction(int)
- Should be removed when the bug regarding non-modal
dialogs is fixed.
-
updateStatus()
- Updates the title and the status line.
-
updateStatus(String)
- Updates the title and the status line.
-
windowActivated(WindowEvent)
-
-
windowClosed(WindowEvent)
-
-
windowClosing(WindowEvent)
-
-
windowDeactivated(WindowEvent)
-
-
windowDeiconified(WindowEvent)
-
-
windowIconified(WindowEvent)
-
-
windowOpened(WindowEvent)
-
type
public int type
- The type of the machine.
centerPanel
public Panel centerPanel
d
public Desktop d
- The desktop.
dfa
public FSA dfa
- Other desktop used by the TO_DFA FSA's to store the DFA to compare with
a
public Machine a
- The machine.
envSource
public Environment envSource
- The Environment that generated this Environment
envTarget
public Environment envTarget
- the Environment that this Environment generated. When this is set the window is frozen
statusLine
public Label statusLine
- The bottom status line.
CLOSE_STR
public static final String CLOSE_STR
DONE_STR
public static final String DONE_STR
TO_DFA_STR
public static final String TO_DFA_STR
SHOW_STR
public static final String SHOW_STR
EXPAND_STATE_STR
public static final String EXPAND_STATE_STR
SHOW_LABEL_STR
public static final String SHOW_LABEL_STR
MINIMIZE_STR
public static final String MINIMIZE_STR
SHOW_UNREACHABLE_STR
public static final String SHOW_UNREACHABLE_STR
HLP_STATE_STR
public static final String HLP_STATE_STR
HLP_TRANSITION_STR
public static final String HLP_TRANSITION_STR
HLP_OVERVIEW_STR
public static final String HLP_OVERVIEW_STR
HLP_UPPERWINDOW_STR
public static final String HLP_UPPERWINDOW_STR
HLP_TRACEWINDOW_STR
public static final String HLP_TRACEWINDOW_STR
HLP_MENUBAR_STR
public static final String HLP_MENUBAR_STR
HLP_NFATODFA_STR
public static final String HLP_NFATODFA_STR
HLP_MINIMIZE_STR
public static final String HLP_MINIMIZE_STR
AUTOMATON_IS_DETER_STR
public static final String AUTOMATON_IS_DETER_STR
AUTOMATON_IS_NON_DETER_STR
public static final String AUTOMATON_IS_NON_DETER_STR
DFA_IS_CORRECT_STR
public static final String DFA_IS_CORRECT_STR
DONE_MINIMIZE_STR
public static final String DONE_MINIMIZE_STR
NO_FILE_NAME
public static final String NO_FILE_NAME
Environment
public Environment(Vector theStates,
LR1Grammar grammar)
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Container
windowClosing
public void windowClosing(WindowEvent e)
windowOpened
public void windowOpened(WindowEvent e)
windowIconified
public void windowIconified(WindowEvent e)
windowDeiconified
public void windowDeiconified(WindowEvent e)
windowClosed
public void windowClosed(WindowEvent e)
windowActivated
public void windowActivated(WindowEvent e)
windowDeactivated
public void windowDeactivated(WindowEvent e)
mousePressed
public void mousePressed(MouseEvent e)
mouseReleased
public void mouseReleased(MouseEvent e)
mouseEntered
public void mouseEntered(MouseEvent e)
mouseExited
public void mouseExited(MouseEvent e)
mouseClicked
public void mouseClicked(MouseEvent e)
keyPressed
public void keyPressed(KeyEvent e)
keyReleased
public void keyReleased(KeyEvent e)
keyTyped
public void keyTyped(KeyEvent e)
itemStateChanged
public void itemStateChanged(ItemEvent e)
actionPerformed
public void actionPerformed(ActionEvent e)
relabel
public void relabel()
- Relabels the states by calling relabel from the Desktop.
printPostscript
public void printPostscript()
- Pops up a menu and prints the window to a postscript file
showNondets
public void showNondets()
- Opens a dialog and focuses the nondeterministic states.
These are found by calling showNondets from Machine.
- See Also:
- Machine
checkDeterministic
public String checkDeterministic()
- Checks if the machine is deterministic or has any errors and returns an appropriate String.
setToDfa
public void setToDfa(Vector theStates)
- sets the FSA to be a DFA builder
setEnvSource
public void setEnvSource(Environment source)
- Sets the source Environment that generated this Environment
setEnvTarget
public void setEnvTarget(Environment target)
- Sets the Environment that is generated by this environment
getEnvSource
public Environment getEnvSource()
showAnswers
public void showAnswers()
- Show the answer to the DFA convertion problem
- Overrides:
- showAnswers in class WindowItem
setShowing
public void setShowing(boolean boo)
- sets the window showing or not
- Overrides:
- setShowing in class WindowItem
done
public void done()
- Handles the checking to see if DFA and NFA are identical
- Overrides:
- done in class WindowItem
expandState
public void expandState(State s)
- Solves only the selected State in the NFA to DFA window
checkMultiLetterLabels
public boolean checkMultiLetterLabels()
- Check if any of the transitions have more than one letter.
breakupMultipleLabels
public void breakupMultipleLabels()
- Breaks up all multiple letter labels on the desktop into several states.
showUnreachables
public void showUnreachables()
- Shows the states which are unreachable from
the initial state.
showClosures
public void showClosures(State s)
clear
public void clear()
- Removes the current desktop and opens a brand new one.
- Overrides:
- clear in class WindowItem
setEnabled
public void setEnabled(boolean b)
- Overrides:
- setEnabled in class Component
close
public void close()
updateStatus
public void updateStatus()
- Updates the title and the status line.
updateStatus
public int updateStatus(String message)
- Updates the title and the status line.
- Parameters:
- message - the new status line.
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