VirtualLabBuilder.ViewElements.Drawables

Drawable elements

Information


 

Drawables package

Drawables package contains several classes implementing interactive 2-D shapes, whose properties (i.e., size, position, rotation angle, aspect ratio, colour, etc.) can be linked to the model variables. They are intended to be used for building animated and interactive schematic representations of the system. Objects of Drawables classes must be placed inside containers that provide a coordinate system (i.e., containers of DrawingPanel and PlottingPanel classes).

Package Content

NameDescription
VirtualLabBuilder.ViewElements.Drawables.Polygon Polygon Draws a polygon
VirtualLabBuilder.ViewElements.Drawables.Oval Oval Draws an oval
VirtualLabBuilder.ViewElements.Drawables.Text Text Displays a string
VirtualLabBuilder.ViewElements.Drawables.Arrow Arrow Draws an arrow
VirtualLabBuilder.ViewElements.Drawables.Trail Trail Draws a trail
VirtualLabBuilder.ViewElements.Drawables.TrailSet TrailSet Draws a set of trails
VirtualLabBuilder.ViewElements.Drawables.PolygonSet PolygonSet Draws a set of polygons
VirtualLabBuilder.ViewElements.Drawables.Mechanics Mechanics Mechanic drawable elements


VirtualLabBuilder.ViewElements.Drawables.Polygon VirtualLabBuilder.ViewElements.Drawables.Polygon

Draws a polygon

VirtualLabBuilder.ViewElements.Drawables.Polygon

Information


                        

Draws a polygonal curve specified by the coordinates of its vertexes points. The x and y coordinates of the vertexes points of the polygon (x[:] and y[:] vectors) can be linked to model variables.


Parameters

TypeNameDefaultDescription
booleanValuefilled"true"True if the poligon is filled and false otherwise
ColorlineColorp[4]{0,0,0,255}The color used for the lines of the component
ColorfillColorp[4]{0,0,255,255}The color used to fill the component
IntegerintLineColor01 if the line color change in time and 0 otherwise
IntegerintFillColor01 if the filling color change in time and 0 otherwise
IntegernPoints1Number of vertices
booleanValueclosed"true"True if the poligon is closed and false otherwise
IntegerintVertexesX[:]zeros(nPoints)intVertexesX[i] = 1 if coordinate x of vertex i changes in time
IntegerintVertexesY[:]zeros(nPoints)intVertexesY[i] = 1 if coordinate y of vertex i changes in time
Realstroke1.0Stroke used to draw the lines
Integergradient01 if there is a gradient in the filling color
Realp1[2]{0,0}Position where the color gradient starts
Colorcolor1[4]{192,192,192,255}Color at point p1
Realp2[2]{0,10}Position where the color gradient finishes
Colorcolor2[4]{64,64,64,255}Color at point p2
booleanValuecyclic"true"True if the color gradient is cyclic

Connectors

TypeNameDescription
ParentpLeftConnector of drawable components
ChildcLeftConnector of drawable components

Modelica definition

model Polygon "Draws a polygon" 
            extends src.ViewElements.Drawables.Polygon;
end Polygon;

VirtualLabBuilder.ViewElements.Drawables.Oval VirtualLabBuilder.ViewElements.Drawables.Oval

Draws an oval

VirtualLabBuilder.ViewElements.Drawables.Oval

Information


                        

Oval class draws an oval. The position of the oval center (Center[:] variable) and the lengths of the axes (Axes[:] variable) can be linked to the model variables.


Parameters

TypeNameDefaultDescription
booleanValuefilled"true"True if the poligon is filled and false otherwise
ColorlineColorp[4]{0,0,0,255}The color used for the lines of the component
ColorfillColorp[4]{0,0,255,255}The color used to fill the component
IntegerintLineColor01 if the line color change in time and 0 otherwise
IntegerintFillColor01 if the filling color change in time and 0 otherwise
IntegerintCenter0intCenter = 1 ==> the center changes in time
IntegerintAxes0intAxes = 1 ==> the axes change in time
Realstroke1.0Stroke used to draw the lines
Integergradient01 if there is a gradient in the filling color
Realp1[2]{0,0}Position where the color gradient starts
Colorcolor1[4]{192,192,192,255}Color at point p1
Realp2[2]{0,10}Position where the color gradient finishes
Colorcolor2[4]{64,64,64,255}Color at point p2
booleanValuecyclic"true"True if the color gradient is cyclic

Connectors

TypeNameDescription
ParentpLeftConnector of drawable components
ChildcLeftConnector of drawable components

Modelica definition

model Oval "Draws an oval" 
           extends src.ViewElements.Drawables.Oval;
end Oval;

VirtualLabBuilder.ViewElements.Drawables.Text VirtualLabBuilder.ViewElements.Drawables.Text

Displays a string

VirtualLabBuilder.ViewElements.Drawables.Text

Information


                        

Text class displays a string. The position of the string center (Center[:] variable) can be linked to the model variables.


Parameters

TypeNameDefaultDescription
ColortextColor[4]{0,0,0,255}string color
IntegerintCenter0= 0 if the center change in time and 0 otherwise
StringtextString""String displayed by the element

Connectors

TypeNameDescription
ParentpLeftConnector of drawable components
ChildcLeftConnector of drawable components

Modelica definition

model Text "Displays a string" 
                      extends src.ViewElements.Drawables.Text;
end Text;

VirtualLabBuilder.ViewElements.Drawables.Arrow VirtualLabBuilder.ViewElements.Drawables.Arrow

Draws an arrow

VirtualLabBuilder.ViewElements.Drawables.Arrow

Information


                        

Arrow class displays a vector. The position of the origin (Origin[:] variable) and horizontal and vertical components of the vector (Length[:] variable) can be linked to the model variables.


Parameters

TypeNameDefaultDescription
Colorcolor[4]{0,0,0,255}string color
IntegerintOrigin0= 0 if the center change in time and 0 otherwise
IntegerintLength0= 0 if the center change in time and 0 otherwise
Realstroke02Stroke used to draw the lines
IntegerintStroke0 = 0 if the stroke change in time and 0 otherwise

Connectors

TypeNameDescription
ParentpLeftConnector of drawable components
ChildcLeftConnector of drawable components

Modelica definition

model Arrow "Draws an arrow" 
             extends src.ViewElements.Drawables.Arrow;
end Arrow;

VirtualLabBuilder.ViewElements.Drawables.Trail VirtualLabBuilder.ViewElements.Drawables.Trail

Draws a trail

VirtualLabBuilder.ViewElements.Drawables.Trail

Information


                        

Creates a drawing element that displays a sequence of points at given coordinates of the hosting container. The position of the new point (point[:] variable) can be linked to the model variables.


Parameters

TypeNameDefaultDescription
IntegermaximumPoints100Maximum number of points to be drawn
IntegernSkip100Number of points to skip before plotting one
ColorlineColor[4]{0,0,0,255}Line color
booleanValueconnected"true"Whether to connect next point with the previous

Connectors

TypeNameDescription
ParentpLeftConnector of drawable components
ChildcLeftConnector of drawable components

Modelica definition

model Trail "Draws a trail" 
                 extends src.ViewElements.Drawables.Trail;
end Trail;

VirtualLabBuilder.ViewElements.Drawables.TrailSet VirtualLabBuilder.ViewElements.Drawables.TrailSet

Draws a set of trails

VirtualLabBuilder.ViewElements.Drawables.TrailSet

Information


                        

Draws a set of N_trails elements of the Trail class. The position of the new point of the trail i (i = 1,..N_trails)(point[i,:] variable) can be linked to the model variables.


Parameters

TypeNameDefaultDescription
IntegerN_trails2Number of trails
IntegermaximumPoints100Maximum number of points to be drawn
IntegernSkip1Number of points to skip before plotting one
ColorlineColor[4]{0,0,0,255}Line color
booleanValueconnected"true"Whether to connect next point with the previous

Connectors

TypeNameDescription
ParentparentConnector of the drawable elements
ChildchildConnector of the drawable elements

Modelica definition

model TrailSet "Draws a set of trails" 
extends src.ViewElements.Drawables.TrailSet;
end TrailSet;

VirtualLabBuilder.ViewElements.Drawables.PolygonSet VirtualLabBuilder.ViewElements.Drawables.PolygonSet

Draws a set of polygons

VirtualLabBuilder.ViewElements.Drawables.PolygonSet

Information


                        

Draws a set of N elements of the Polygon class. The x and y coordinates of the vertexes points of the polygon i (i = 1,..N) (x[i:,:] and y[i,:] vectors) can be linked to model variables.


Parameters

TypeNameDefaultDescription
booleanValuefilled"true"True if the poligon is filled and false otherwise
ColorlineColorp[4]{0,0,0,255}The color used for the lines of the component
ColorfillColorp[4]{0,0,255,255}The color used to fill the component
IntegerintLineColor01 if the line color change in time and 0 otherwise
IntegerintFillColor01 if the filling color change in time and 0 otherwise
IntegerN2Number of polygons
IntegernPoints1Number of vertices
booleanValueclosed"true"True if the poligon is closed and false otherwise
IntegerintVertexesX[:]zeros(nPoints)intVertexesX[i] = 1 if coordinate x of vertex i changes in time
IntegerintVertexesY[:]zeros(nPoints)intVertexesY[i] = 1 if coordinate y of vertex i changes in time
Realstroke1Stroke used to draw the lines
Integergradient01 if there is a gradient in the filling color
Realp1[2]zeros(2)Position where the color gradient starts
Colorcolor1[4]{192,192,192,255}Color at point p1
Realp2[2]{0,10}Position where the color gradient finishes
Colorcolor2[4]{64,64,64,255}Color at point p2
booleanValuecyclic"true"True if the color gradient is cyclic

Connectors

TypeNameDescription
ParentparentConnector of the drawable elements
ChildchildConnector of the drawable elements

Modelica definition

model PolygonSet "Draws a set of polygons" 
extends src.ViewElements.Drawables.PolygonSet;
end PolygonSet;

HTML-documentation generated by Dymola Tue Jul 24 18:58:09 2007.