Code for Demonstration 2
Zoom parameter modification and mouseclick-behavior.
<applet code="biz.xio.XIOview" archive="CODE/XIOview.jar" codebase="../" name="XIOview_Applet"
width="180px" height="240px" alt="XIOview 1.5 Java Applet (requires a Java-enabled browser)">
<param name="cabbase" value="CODE/XIOview.cab">
<param name="license_key" value="ENTER YOUR LICENSE KEY HERE">
<param name="image" value="images/grafitti.jpg">
<param name="zoom" value="50%">
<param name="zoom_range" value="50%-400%">
<param name="zoom_area_width" value="100%">
<param name="zoom_area_height" value="100%">
<param name="zoom_permanent" value="true">
<param name="zoom_step_percentage" value="50%">
<param name="on_right_click" value="images/grafitti.jpg,_blank">
<!-- Text below is shown if Java is not currently supported or activated. -->
<p>
The interactive content of this page requires a Java-enabled
browser.<br>
Please check your browser's settings and activate Java.<br>
If your browser has no built in Java plug-in you can obtain one at
<a href="http://www.java.com">www.java.com</a>.
</p>
</applet>
In this demonstration several zoom_parameters have been modified as well as mouseclick-behavior.
Explanation:
- "zoom": Sets the initial zoom magnification level (here: 50%) relative to the source
image dimensions. You can choose any value within the range defined by the
"zoom_range"-parameter.
- "zoom_range": Defines the range of allowed zoom-values. This parameter restricts all
changes in the "zoom"-parameter to the defined range.
(Setting used here: 50%-400%, default setting: 50%-800%.)
- "zoom_area_width" & "zoom_area_height": Parameters for setting the
width and height of the zoomed image-area. You can either use pixel values (e.g. 150px) or
percentage values relative to the total applet dimensions (e.g. 50%). In this case both
parameters are set to 100%; the resulting zoomed image-area therefore covers the entire
applet-space.
- "zoom_permanent": Sets, if zooming will remain activated after releasing the
mousebutton (i.e. after a complete mouseclick) until a further mouseclick is performed (or the mouse
cursor has left the applet space). Here permanent zooming mode is enabled.
- "zoom_step_percentage": Defines the size of every zoom-modification step if pressing
one of the arrow-keys for zoom controlling. In this case every keypress will increase/decrease the zoom
magnification level by 50%.
- "on_right_click": Specifies what to do, if the right mousebutton is pressed
(in the default configuration the right mousebutton is used for zooming, too).
Here the applet will request the browser to load the source image (grafitti.jpg) in a new frame.
|