Element: Spring.

Icon:   

Text: An interactive spring.

Description: A Spring is a drawing element that displays a spring at given coordinates of the parent drawing panel, with a given size. The element can also be applied a zoom factor.

Springs respond to user interaction on their head (changing size) and on their tail (changing position), invoking up to three different actions. 

Table of properties

Name Description Values accepted
Position and Size
X The X coordinate of the element. Any constant or variable of type double or int.
Y The Y coordinate of the element. Any constant or variable of type double or int.
Z The Z coordinate of the element. Any constant or variable of type double or int.
Size X The size of the element in the X direction. Any constant or variable of type double or int.
Size Y The size of the element in the Y direction. Any constant or variable of type double or int.
Size Z The size of the element in the Z direction. Any constant or variable of type double or int.
Scale X The zoom factor for the element in the X direction. Any constant or variable of type double or int.
Scale Y The zoom factor for the element in the Y direction. Any constant or variable of type double or int.
Scale Z The zoom factor for the element in the Z direction. Any constant or variable of type double or int.

Visibility and Interaction

Visible The visibility of the element. A boolean variable or one of the constants true or false.
Enabled Whether the element responds to user interaction on its head. A boolean variable or one of the constants true or false.
Movable Whether the element responds to user interaction on its tail. A boolean variable or one of the constants true or false.

Actions

On Press The action to invoke when the element is pressed. The Java code to invoke for the action. 
On Drag The action to invoke when the element is moved. The Java code to invoke for the action. 
On Release The action to invoke when the element is released. The Java code to invoke for the action. 
On Enter The action to invoke when the pointer enters the element. The Java code to invoke for the action. 
On Exit The action to invoke when the pointer leaves the element. The Java code to invoke for the action. 
Graphical Aspect
Radius The radius for the spring. Any constant or variable of type double or int.
Color The color used to draw the element. An Object variable of the class java.awt.Color or one of the predefined colors: black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow.

A color can also be specified providing its integer RGB coordinates (between 0 and 255), plus an optional transparency coordinate.

The default value is decided by the system.

Stroke The thickness for the lines of the element. Any constant or variable of type double or int. The default value is 1.

Object variables of the class  java.awt.Stroke are also accepted.

Resolution How to subdivide the element in smaller pieces. This is only useful in 3D drawing modes to improve the result of the hidden-lines removal algoritm.  Two integers separated by a comma, or a String that constains such a construction. The first integer is the number of spires in the spring. The second integer is the number of points in each spire, The default values are 8 and 15, respectively.