EarthStones' AutoResTM Technology
EarthStones' AutoRes technology is built into the underlying
class library to provide web developers and Java programers with a transparent means of
assuring a consistent page look regardless of the viewer's screen resolution.
Here's how it works:
- The Java methods getToolkit().getScreenSize() of
the Container and Frame
classes return the pixel dimensions (e.g., 1024, 768) of the viewer's monitor.
- By default, EarthStones' Site class defines support
for the five most common screen resolutions: 1600x1200,
1024x768, 832x624 (Machintosh platform), 800x600, 640x480. Note that these pixel
dimensions share a common aspect ration of 1.333. Additional resolutions can be supported
by modifying the Site.web file.
- The resolutionFactor() methods of EarthStones' WebApplet and WebFrame
classes use these data to return a scaling factor relative to the pixel dimensions
1024x768 (i.e., screenWidth/1024). EarthStones' classes assume that all dimensions
supplied are those appropriate for a screen resolution of 1024x768. For screen
resolutions other than those explicitly supported, this method will automatically
interpolate, returning a value appropriate for the next lower resolution. Note that in
such cases, aspect ratios other than 1.333 will not be maintained.
- The scale(val) methods of the WebPanel and DocumentPanel classes
use this value to transparently scale all dimensions.
Finally, although we're not sure why anyone might wish to do so, the AutoRes feature
can conveniently be turned off by adding the statement autoRes=false
to the Site.web file or an application's command line
or including a <param name="autoRes"
value="false"> tag within the applet's <applet></applet>
tag.