All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javaParse.ParserWindow

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

public class ParserWindow
extends WindowItem
The general Frame class for some of the different views for the parser. It is extended by First, Follow, and Table windows.


Variable Index

 o myTextCommand

Constructor Index

 o ParserWindow(Checker)

Method Index

 o addMainPanel()
sets up the main panel of the data textfields and then adds this main panel to the main window by calling WindowItem's setInfoPanel(Panel) uses gridbaglayout, and the panel basically is 2x2 looking like: blank | colLabels ----------|------------ rowLabels | dataPanel
 o clear()
clears all the textfields
 o clearData()
clears all the textfields
 o done()
called when a done button is pushed checks to see if entered data is correct and then acts accordingly
 o getData()
gets the data field
 o getSingleData()
gets the data in a single array form (this is only called when colsize = 1)
 o highlightField(int, int)
highlights a certain textfield given by its row and column position in the textfield matrix
 o setColLabels(String[])
sets the column labels
 o setData(String[])
sets the data field with a single array
 o setData(String[][])
Sets the data field
 o setRowLabels(String[])
sets the row labels
 o setShowing(boolean)
sets the window showing or not
 o setTextFieldSize(int)
sets the textfield size for the data text fields
 o showAnswers()
shows all the correct answers in the textfields
 o unhighlightAllFields()
unhighlights all the textfields

Variables

 o myTextCommand
 protected ParserTextCommand myTextCommand

Constructors

 o ParserWindow
 public ParserWindow(Checker checker)
Parameters:
checker - the checker that will be used to check for correct sets inputted by the user

Methods

 o getData
 public String[][] getData()
gets the data field

 o getSingleData
 public String[] getSingleData()
gets the data in a single array form (this is only called when colsize = 1)

 o setData
 public void setData(String data[][])
Sets the data field

 o setData
 public void setData(String data[])
sets the data field with a single array

 o clearData
 public void clearData()
clears all the textfields

 o highlightField
 public void highlightField(int row,
                            int col)
highlights a certain textfield given by its row and column position in the textfield matrix

 o unhighlightAllFields
 public void unhighlightAllFields()
unhighlights all the textfields

 o addMainPanel
 public void addMainPanel()
sets up the main panel of the data textfields and then adds this main panel to the main window by calling WindowItem's setInfoPanel(Panel) uses gridbaglayout, and the panel basically is 2x2 looking like: blank | colLabels ----------|------------ rowLabels | dataPanel

 o setColLabels
 public void setColLabels(String colLab[])
sets the column labels

 o setRowLabels
 public void setRowLabels(String rowLab[])
sets the row labels

 o done
 public void done()
called when a done button is pushed checks to see if entered data is correct and then acts accordingly

Overrides:
done in class WindowItem
 o showAnswers
 public void showAnswers()
shows all the correct answers in the textfields

Overrides:
showAnswers in class WindowItem
 o clear
 public void clear()
clears all the textfields

Overrides:
clear in class WindowItem
 o setTextFieldSize
 public void setTextFieldSize(int size)
sets the textfield size for the data text fields

 o setShowing
 public void setShowing(boolean b)
sets the window showing or not

Overrides:
setShowing in class WindowItem

All Packages  Class Hierarchy  This Package  Previous  Next  Index