spirograph
Class OneRuleListener
java.lang.Object
spirograph.OneRuleListener
- All Implemented Interfaces:
- java.util.EventListener, java.awt.event.ItemListener
- public class OneRuleListener
- extends java.lang.Object
- implements java.awt.event.ItemListener
This implements a listener that is created by CodeBox
and passed
to AdvEnv
. It enables or disables the approprite text areas and
fields so that when only one rule is being used the other rule is
grayed out.
Copyright © 1998 Massachusetts Institute of Technology
Copyright © 2003 Franklin W. Olin College of Engineering
- Version:
- $Id: OneRuleListener.java,v 1.4 2004/02/09 20:55:03 gus Exp $
- Author:
- Luis Sarmenta, lfgs@cag.lcs.mit.edu, Henry Wong, henryw@mit.edu, Patrick G. Heck, gus.heck@olin.edu
- See Also:
CodeMerger
,
CodeBox
Constructor Summary |
OneRuleListener(java.awt.TextArea onTA,
java.awt.TextArea offTA,
java.awt.TextArea onFields,
java.awt.TextArea offFields,
java.awt.Button onButton,
java.awt.Button offButton,
java.awt.Checkbox offCheckbox,
CodeMerger myMerger)
Create an object that monitors the state of the specified components and
enables or disables them as needed. |
Method Summary |
void |
itemStateChanged(java.awt.event.ItemEvent ie)
Examine the supplied event and disable components if the item has been selected. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OneRuleListener
public OneRuleListener(java.awt.TextArea onTA,
java.awt.TextArea offTA,
java.awt.TextArea onFields,
java.awt.TextArea offFields,
java.awt.Button onButton,
java.awt.Button offButton,
java.awt.Checkbox offCheckbox,
CodeMerger myMerger)
- Create an object that monitors the state of the specified components and
enables or disables them as needed.
- Parameters:
onTA
- The code text area that remains onoffTA
- The code text area that is turned offonFields
- The fields text area that remains onoffFields
- The fields text area that is turned offonButton
- The button that remains onoffButton
- The button that is turned offoffCheckbox
- The other check box wich gets turned offmyMerger
- The code merger that is to be used for both rules
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent ie)
- Examine the supplied event and disable components if the item has been selected.
- Specified by:
itemStateChanged
in interface java.awt.event.ItemListener
- Parameters:
ie
- An item event from the component we are listening to.