Element: Tank.
Icon:
Text: A two-dimensional tank.
Description: A Tank is a two-dimensional drawing element that draws a tank filled with liquid. The tank is highly customizable and interactive. It can be interactively repositioned, resized, its level can be changed and its inner profile edited with the mouse.
Tanks without (left) and with a profile.
Table of properties |
||
Name | Description | Values accepted |
Position and Size | ||
Level | The height of the liquid inside the tank.. | Any constant or variable of type double or int. |
X | The X position of the element. | Any constant or variable of type double or int. |
Y | The Y position of the element. | Any constant or variable of type double or int. |
Height | The height of the element. | Any constant or variable of type double or int. |
Width | The width of the element. | Any constant or variable of type double or int. |
Show Profiles | Whether to display the profile of the inner sides of the tank. | A boolean variable or one of the constants true or false. |
Profile | The proporcional size of the profile. |
A double[4] array, p[], such that the profile is given by: {{0.5,0.0},{0.5,p[0]},{p[1],p[2]},{p[3],0.0}} These values are proporcional to the height and width of the tank. |
Input |
||
Enabled | Whether the level can be adjusted interactively. | A boolean variable or one of the constants true or false. |
Movable | Whether the element moves when the user drags the center of its base. | A boolean variable or one of the constants true or false. |
Resizable | Whether the element resizes when the user drags any of its corners. | A boolean variable or one of the constants true or false. |
Profilable | Whether the profile of the element resizes when the user drags any of its corners. | A boolean variable or one of the constants true or false. |
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 | ||
Closed | Whether the element is closed at its top. | A boolean variable or one of the constants true or false. |
Line Color | The color used for the lines of 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. |
Fill Color | The color used to fill the liquid. |
See the values for the Line Color property. |
Profile Color | The color used to fill the profile. |
See the values for the Line Color property. |