The rotated output applet
displays a vector image at different scales and rotations. There is a C++ program written
for windows that can generate images suitable for use in this applet, its called Spinner
Designer, a generated vector image is required for use. You can use this applet free of
charge when you link back to ElriDEV's web page using link http://www.geocities.com/elricsgsx the image
file to use for the link is included in this archive too its called elrilink.gif
Usage and inserting into a HTML document |
- Download the zip file below, and expand it into
your html directory.
- Adding an applet to your page is very simple, if
you are using front page, you can add an applet from the menu. The menu you use in
Frontpage is Insert > Advanced > Java Applet, other packages have similar
dialogs. In the worst case you can add the applet directly to the HTML, an example of the
HTML is shown below
- The applet source is JElriDEV.Spinner.class
set the code setting to this value
- Create a graphics file using the Spinner Designer.
- Using the table of parameters below, add
parameters to the applet to configure it
Parameter List and allowable ranges |
Parameter |
Range of values |
Description |
VectorFile |
string
- filenname |
the
vector file containing the image |
XRotation |
0
thru 10 |
the
speed of rotation. 0 no rotation, 10 fast |
ScaleSpeed |
0
thru 10 |
the
speed at which the image should zoom 0 slow 10 fast |
ScaleMin |
double
0.001 - 10.00 |
the
smallest scale value |
ScaleMax |
double
0.001 - 10.00 |
the
largest scale, if ScaleMin and ScaleMax are equal, no scaling is done. |
XLRotation |
0
thru 10 |
an
addition rotation about the images x axis |
YLRotation |
0
thru 10 |
an
addition rotation about the images y axis |
LightShading |
true
or false |
if
simple light shading should be used, default is false |
Actual Example for directly editing HTML |
<applet CODE="JElriDEV.Spinner.class" WIDTH="150" HEIGHT="150">
<param name="VectorFile" value="your file name">
<param name="XRotation" value="4">
<param name="ScaleSpeed" value="3">
<param name="ScaleMin" value="0.03">
<param name="ScaleMax" value="0.4">
<param name="XLRotation" value="1">
<param name="YLRotation" value="1">
</applet> |
- some webservers may only allow a
restricted set of file extensions, the .JVF extension produced by the Spinner designer
application may not be accepted by your server, if this is the case, simply rename the
file to an allowable extension.
- should you have problems with the
applet, you can use the Java console to debug some problems, output is sent there when
errors occur. Also note that some file errors are sent to the status line. If you have a
problem with the control after trying everything on this page, mail me with as much information as you can.
The Spinner Designer Application |
The spinner designer is a Visual
C++ application used to generate a 2d coordinate file for the Spinner applet. Sorry non
windows folks, but this application is presently only available for the windows platform.
Here's a snapshot of the
Application:

How do I use it? |
- Just select to draw a polyline or
polygon using the radio buttons to the left
- Select the foreground and
background colour
- Draw points of the shape you
require by left clicking, finish the shape by right clicking
- Click the Generate button to
create a file for use with the spinner applet
- Click the Clear button to clear
the diagram and re-start
- Click the Test button to see your
drawing spin around
- Re-sample is not implemented yet
|
What does it do? |
The
spinner designer is used to create two dimensional vector drawings that can be loaded into
a java applet (that I have presently almost got working) and be rotated. The tool
allows you to draw an image at a rotation of 0 degrees and whatever scale you like, once
you are happy with your drawing, press the Generate button to create a file of coordinates
in a format suitable for loading into the applet. At the moment this Application does not
support Serialization, therefore once drawn and Generated you cannot get them back! |
Good Luck!
Dave