Example Linear Gauge

The main goal of this example is to show how to use LinearGauge.class. For a listing of the attributes associated with the Linear Gauge Widget, click on LinearGauge.class. This example uses a Linear Gauge (LinGauge), and a Slider (Slider). As the slider handle is moved, it is setting the value of InternalRAM byte variable #5. LinGauge's href function reads InternalRAM byte variable #5, so as the slider handle moves, the gauge pointer moves linearly along the gauge's background image. Here is a snapshot of what the html page looks like in a "WYSIWYG" tool:


Figure 1.

To create a linear gauge named LinGauge that uses InternalRAM byte variable #5 as its input, the following is used:

<APPLET CODE="LinearGauge.class" WIDTH="188" HEIGHT="92" NAME="LinGauge" >
<PARAM NAME="href" VALUE="Amulet:InternalRAM.byte(5).value()">
<PARAM NAME="min" VALUE="0">
<PARAM NAME="max" VALUE="255">
<PARAM NAME="minAt" VALUE="left">
<PARAM NAME="pointerImage" VALUE="pointer.gif">
<PARAM NAME="backgroundImage" VALUE="gauge.gif">
<PARAM NAME="updateRate" VALUE=".25,0.01">
</APPLET>

To create a slider named Slider that sets InternalRAM byte variable #5, the following is used:

<APPLET CODE="Slider.class" WIDTH="100" HEIGHT="21" NAME="Slider">
<PARAM NAME="href" VALUE="Amulet:InternalRAM.byte(5).setValue()">
<PARAM NAME="hrefEvent" VALUE="onChange">
<PARAM NAME="min" VALUE="0">
<PARAM NAME="max" VALUE="255">
<PARAM NAME="minAt" VALUE="left">
<PARAM NAME="tickCount" VALUE="none">
<PARAM NAME="handleThickness" VALUE="15">
<PARAM NAME="initialCondition" VALUE="0x80">
</APPLET>

NOTES:



Amulet HTMLCompiler,
Copyright © 2000-2004 by
Amulet Technologies, LLC

Back to Welcome - Contact Amulet - Amulet Home