Basic container for 2D drawing. A drawing panel is a view element able to display drawable objects within a rectangular region of the plane in which it defines a world coordinate system in user-provided coordinates. Drawables, or drawing elements, are graphical objects which draw themselves (in different forms) in a given position and with a given size within a drawing panel.
Scales |
Name | Description | Values accepted | Default |
Autoscale X | Whether to automatically adjust X scales. | A boolean variable or one of the constants true or false. | |
Autoscale Y | Whether to automatically adjust Y scales. | A boolean variable or one of the constants true or false. | |
Minimum X | Minimum X value that can be displayed. | A constant or variable of type double or int. | |
Maximum X | Maximum X value that can be displayed. | A constant or variable of type double or int. | |
Minimum Y | Minimum Y value that can be displayed. | A constant or variable of type double or int. | |
Maximum Y | Maximum Y value that can be displayed. | A constant or variable of type double or int. | |
Square | Whether to keep a square aspect. | A boolean variable or one of the constants true or false. | |
X Margin (%) | The percentage of the margin in the autoscaled horizontal direction. | A constant or variable of type double or int. | |
Y Margin (%) | The percentage of the margin in the autoscaled vertical direction. | A constant or variable of type double or int. | |
Interaction |
Name | Description | Values accepted | Default |
Menu | Display popup menus in this panel. | A boolean variable or one of the constants true or false. | |
Menu Entry | The name to display in the simulation's corresponding elements menu entry. | A string variable. | |
Pos X | The X coordinate of the pointer. | A constant or variable of type double or int. | |
Pos Y | The Y coordinate of the pointer. | A constant or variable of type double or int. | |
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 dragged. | 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 mouse enters the element. | The Java code to invoke for the action. | |
On Exit | The action to invoke when the mouse leaves the element. | The Java code to invoke for the action. | |
Key Action | The action triggered when a key is pressed. | The Java code to invoke for the action. | |
Key Pressed | The integer code of the key pressed. | A integer value. | |
Print Target | The view element to print when taking a snapshot. | A string constant or variable. | |
Configuration |
Name | Description | Values accepted | Default |
Anti Aliasing | Whether to smooth lines and texts in the panel. | A boolean variable or one of the constants true or false. | |
Gutters | Gutters around the drawing area. | Type the size of the four gutters or use the editor provided. | |
Coordinates | Whether to display coordinates when the mouse is pressed. | A boolean variable or one of the constants true or false. | |
X Format | The format to the X coordinate. | The Format X property refers to the way the panel displays (in a yellow box at its lower left corner) the X coordinate when you click on a point in the panel. The special value null makes the panel not to display this coordinate. | "x=0.000" |
Y Format | The format to the Y coordinate. | The Format Y property refers to the way the panel displays (in a yellow box at its lower left corner) the Y coordinate when you click on a point in the panel. The special value null makes the panel not to display this coordinate. | "y=0.000" |
Messages |
Name | Description | Values accepted | Default |
Expression | An additional (x,y) expression to display. | ???? | |
Expr Format | The format for the expression. | ???? | |
TL Message | The message to display at the top-left corner. | A string constant or variable. | |
TR Message | The message to display at the top-right corner. | A string constant or variable. | |
BL Message | The message to display at the bottom-left corner. | A string constant or variable. | |
BR Message | The message to display at the bottom-right corner. | A string constant or variable. | |
Graphical Aspect |
Name | Description | Values accepted | Default |
Visible | The visibility of the element. | A boolean variable or one of the constants true or false. | |
Size | The double[] array with the size of the panel in each direction. | Type the two size values or use the editor provided. | |
Background | The background color for the element. | Use the editor provided or read about colors. | |
Foreground | The color to use when drawing or writing in the element. | Use the editor provided or read about colors. | |
Font | The font used to display text in the element. | Use the editor provided to select name, style and size of the font. | |
Tooltip | Text displayed when the mouse is over the element. | A string constant or variable. | |