Element: Particle.

Icon: 

Text: An interactive particle.

Description: A Particle is a drawing element that displays a simple geometrical shape, a rectangle or an ellipse, at given coordinates of the parent drawing panel. The shape is drawn at the given coordinates with the size specified in each direction (in 3D the largest of the X and Y sizes is used for the horizontal dimension). The element can also be applied a rotation and a zoom factor.

Particles respond to user interaction on their position coordinates (changing their position), invoking up to three different actions. The precise drawing position of the geometrical shape with respect to the given coordinates can be chosen among several standard values.

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. 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
Style The graphical shape to display the element. One of the following constants:
  • NONE. A single dot is drawn. (Equivalent integer: 0)
  • ELLIPSE. (Equivalent integer: 1)
  • RECTANGLE. (Equivalent integer: 2)
  • ROUND_RECTANGLE. (Equivalent integer: 3)
  • WHEEL. An ellipse with its coordinate axes. (Equivalent integer: 4)

Integer constants and variables are also accepted, using any of the values indicated in the parentheses above. This allows changing the shape in run-time.

Position The exact drawing position of the shape relative to the element's coordinates. One of the following constants:
  • CENTERED. The shape is drawn with its center point on the element's coordinates. (Equivalent integer: 0).
  • NORTH. The shape is drawn with its top middle point on the element's coordinates. (Equivalent integer: 1).
  • SOUTH. The shape is drawn with its bottom middle point on the element's coordinates.  (Equivalent integer: 2).
  • EAST. The shape is drawn with its middle right point on the element's coordinates. (Equivalent integer: 3).
  • WEST. The shape is drawn with its middle left point on the element's coordinates.(Equivalent integer: 4).
  • NORTH_EAST. The shape is drawn with its top right point on the element's coordinates. (Equivalent integer: 5).
  • NORTH_WEST. The shape is drawn with its top left point on the element's coordinates. (Equivalent integer: 6).
  • SOUTH_EAST. The shape is drawn with its bottom right point on the element's coordinates. (Equivalent integer: 7).
  • SOUTH_WEST. The shape is drawn with its bottom left point on the element's coordinates. (Equivalent integer: 8).

Integer constants and variables are also accepted, using any of the values indicated in the parentheses above. This allows changing the position in run-time.

Rotate The (counter-clockwise) rotation angle to apply to the element. A constant or variable of type double for an angle in radians, or a constant or variable of type int for an angle in degrees.
Fill Color The color used to fill the element. The special value null draws an empty 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.

Edge Color The color used for the edge of the element. The special value null draws the element without an edge. See the values for the Fill Color property.
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.