The main goal of this example is to show how to use the InterWidgetCommunication method setUpdateRate(). This exampe uses a list (Update), a line plot (Output), and a function button (Toggle). Making a selection in Update sets the href method of Output to change its update rate. Toggle has an href function that makes Output toggle between stop plotting and continue plotting. Here is a snapshot of what the html page looks like in a "WYSIWYG" tool:

Figure 1.
To create a list of update rates named Update that alters the update rate for Output, the following is used:
<APPLET CODE="List.class" WIDTH="46" HEIGHT="62" NAME="Update">
<PARAM NAME="href" VALUE="Amulet:document.Output.setUpdateRate()">
<PARAM NAME="fontSize" VALUE="2">
<PARAM NAME="fontStyle" VALUE="plain">
<PARAM NAME="options" VALUE=""0.05=0.05,0.10=0.1,0.50=0.5,1.00=1,2.00=2,5.00=5">
<PARAM NAME="default" VALUE="0.50">
</APPLET>
Update defaults Output to an update rate of 500msec by using the function Amulet:document.Output.setUpdateRate(). The update rate for Output is changed any time a selection is made in Update.
To create a lineplot named Output that uses a random byte as its input, the following is used:
<APPLET CODE="LinePlot.class" WIDTH="181" HEIGHT="102" NAME="Output" >
<PARAM NAME="href" VALUE="Amulet:math.randomByte.value()">
<PARAM NAME="yMin" VALUE="0">
<PARAM NAME="yMax" VALUE="255">
<PARAM NAME="xSamples" VALUE="16">
<PARAM NAME="lineWeight" VALUE="2">
<PARAM NAME="updateRate" VALUE=".5">
</APPLET>
Output initially updates every 500msec, getting a random byte that is generated internally by using the href function Amulet:math.randomByte.value().
To create a function button named Toggle which toggles updating for Output, the following is used:
<APPLET CODE="FunctionButton.class" WIDTH="73" HEIGHT="25" NAME="Toggle">
<PARAM NAME="href" VALUE="Amulet:document.Output.toggleUpdating()">
<PARAM NAME="fontSize" VALUE="3">
<PARAM NAME="fontStyle">
<PARAM NAME="label" VALUE="Toggle">
<PARAM NAME="onButtonPress" VALUE="depress">
</APPLET>
Each time Toggle is pressed, Output will either stop plotting or continue plotting depending on the previous state of Output by using the href function Amulet:document.Output.toggleUpdating().
NOTES: