All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javaParse.WindowItem

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

public class WindowItem
extends Frame
implements Watchable
The base window for all windows in the grammar sequence Contains everything that is similar between all windows: a frame, a northern panel of buttons, a center panel (that is provided by subclasses), and a southern panel that contains a message area.


Constructor Index

 o WindowItem()

Method Index

 o clear()
function called when a clear button is clicked
 o done()
function called when a Done button is clicked
 o informWatcher(Object)
informs that watcher that this WindowItem's state has changed by calling a watcher's method and sending it an object saying what was changed
 o returnToGrammar()
function called when a return button is clicked
 o setClearCommand(ClearCommand)
adds a listener to the clear button and place the clear button in the panel of buttons
 o setDoneCommand(DoneCommand)
adds a listener to the done button and place the done button in the panel of buttons
 o setEnabledAll(boolean)
enables or disables all the components in the window
 o setHelpCommand(HelpCommand)
adds a listener to the help button and places the button in the panel of buttons
 o setHideCommand(HideCommand)
adds a listener to the hide button and places the button in the panel of buttons
 o setInfoPanel(Panel)
sets the center panel to a given panel
 o setMessage(String)
sets the message area to a certain message
 o setMessageSize(int)
sets the size of the message area
 o setReturnCommand(ReturnCommand)
adds a listener to the return button and place the return button in the panel of buttons
 o setShowCommand(ShowCommand)
adds a listener to the show button and place the show button in the panel of buttons
 o setShowing(boolean)
sets the window showing or not
 o setWatcher(Watcher)
sets the watcher of this windowItem
 o showAnswers()
function called when a show button is clicked
 o showHelp(String)
shows the help dialog

Constructors

 o WindowItem
 public WindowItem()

Methods

 o setDoneCommand
 public void setDoneCommand(DoneCommand cmd)
adds a listener to the done button and place the done button in the panel of buttons

 o setClearCommand
 public void setClearCommand(ClearCommand cmd)
adds a listener to the clear button and place the clear button in the panel of buttons

 o setShowCommand
 public void setShowCommand(ShowCommand cmd)
adds a listener to the show button and place the show button in the panel of buttons

 o setReturnCommand
 public void setReturnCommand(ReturnCommand cmd)
adds a listener to the return button and place the return button in the panel of buttons

 o setHelpCommand
 public void setHelpCommand(HelpCommand cmd)
adds a listener to the help button and places the button in the panel of buttons

 o setHideCommand
 public void setHideCommand(HideCommand cmd)
adds a listener to the hide button and places the button in the panel of buttons

 o setMessage
 public void setMessage(String s)
sets the message area to a certain message

 o setMessageSize
 public void setMessageSize(int size)
sets the size of the message area

Parameters:
size - - the size of the message area
 o setInfoPanel
 public void setInfoPanel(Panel p)
sets the center panel to a given panel

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

 o done
 public void done()
function called when a Done button is clicked

 o showAnswers
 public void showAnswers()
function called when a show button is clicked

 o returnToGrammar
 public void returnToGrammar()
function called when a return button is clicked

 o clear
 public void clear()
function called when a clear button is clicked

 o showHelp
 public void showHelp(String filename)
shows the help dialog

Parameters:
filename - - the name of the help file to be shown
 o setWatcher
 public void setWatcher(Watcher w)
sets the watcher of this windowItem

 o informWatcher
 public void informWatcher(Object arg)
informs that watcher that this WindowItem's state has changed by calling a watcher's method and sending it an object saying what was changed

 o setEnabledAll
 public void setEnabledAll(boolean b)
enables or disables all the components in the window


All Packages  Class Hierarchy  This Package  Previous  Next  Index