Spirograph Problem Set Javadocs

spirograph
Class OneRuleListener

java.lang.Object
  extended byspirograph.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
 

Constructor Detail

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 on
offTA - The code text area that is turned off
onFields - The fields text area that remains on
offFields - The fields text area that is turned off
onButton - The button that remains on
offButton - The button that is turned off
offCheckbox - The other check box wich gets turned off
myMerger - The code merger that is to be used for both rules
Method Detail

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.

Spirograph Problem Set Javadocs