VirtualLabBuilder.ViewElements.InteractiveControls

Interactive control elements

Information


 

InteractiveControls package

InteractiveControls package contains classes that allow modifying interactively the value of model variables. Each class includes a definition of an input real variable (var) and a boolean variable (event). The value of the event variable is true at those time instants at which the interactive control is manipulated by the virtual-lab user. Otherwise, the event variable is false The interactive model variable can be linked to the var variable by writing the corresponding equation.

Package Content

NameDescription
VirtualLabBuilder.ViewElements.InteractiveControls.Slider Slider Creates a slider
VirtualLabBuilder.ViewElements.InteractiveControls.SliderSet SliderSet Creates a set of sliders
VirtualLabBuilder.ViewElements.InteractiveControls.NumberField NumberField Allows editing a numeric value
VirtualLabBuilder.ViewElements.InteractiveControls.RadioButton RadioButton Creates a radio-button
VirtualLabBuilder.ViewElements.InteractiveControls.Button1Action Button1Action Creates a 1 action button
VirtualLabBuilder.ViewElements.InteractiveControls.Button2Actions Button2Actions Creates a 2 actions button


VirtualLabBuilder.ViewElements.InteractiveControls.Slider VirtualLabBuilder.ViewElements.InteractiveControls.Slider

Creates a slider

VirtualLabBuilder.ViewElements.InteractiveControls.Slider

Information


                        

Creates a slider.


Parameters

TypeNameDefaultDescription
positioninLayoutposition"CENTER"Position inside its container
StringstringFormat"0.00"Format of the text displayed by the component
StringtickFormat"0.00"Format of the text displayed with the ticks
IntegertickNumber9Number of ticks
Realminimum0Minimum value of the variable linked to the component
Realmaximum1Maximum value of the variable linked to the component
Realfactor1Scale factor
booleanValueenable"true"True if the component is enabled

Connectors

TypeNameDescription
ParentLpLLeftConnector of non drawable components
ChildLcLLeftConnector of non drawable components

Modelica definition

model Slider "Creates a slider" 
                        extends src.ViewElements.InteractiveControls.Slider;
end Slider;

VirtualLabBuilder.ViewElements.InteractiveControls.SliderSet VirtualLabBuilder.ViewElements.InteractiveControls.SliderSet

Creates a set of sliders

VirtualLabBuilder.ViewElements.InteractiveControls.SliderSet

Information


                        

Creates a set of sliders.


Parameters

TypeNameDefaultDescription
IntegerN2Number of sliders
StringstringFormat[N] Format of the text displayed by the component
StringtickFormat"0.00"Format of the text displayed with the ticks
IntegertickNumber[N]9*ones(N)Number of ticks
Realminimum[N]zeros(N)Minimum value of the variable linked to the component
Realmaximum[N]ones(N)Maximum value of the variable linked to the component
Realfactor[N]ones(N)Scale factor
booleanValueenable"true"True if the component is enabled

Connectors

TypeNameDescription
ParentLparentLConnector of drawables
ChildLchildLConnector of drawables

Modelica definition

model SliderSet "Creates a set of sliders" 
                extends src.ViewElements.InteractiveControls.SliderSet;
end SliderSet;

VirtualLabBuilder.ViewElements.InteractiveControls.NumberField VirtualLabBuilder.ViewElements.InteractiveControls.NumberField

Allows editing a numeric value

VirtualLabBuilder.ViewElements.InteractiveControls.NumberField

Information


                        

Creates an element that allows editing a numeric value.


Parameters

TypeNameDefaultDescription
positioninLayoutposition"CENTER"Position inside its container
StringstringFormat"0.00"Format of the displayed number
booleanValueenable"true"1: enabled, 0: disabled

Connectors

TypeNameDescription
ParentLpLLeftConnector of non drawable components
ChildLcLLeftConnector of non drawable components

Modelica definition

model NumberField "Allows editing a numeric value" 
  
                                     extends src.ViewElements.InteractiveControls.NumberField;
end NumberField;

VirtualLabBuilder.ViewElements.InteractiveControls.RadioButton VirtualLabBuilder.ViewElements.InteractiveControls.RadioButton

Creates a radio-button

VirtualLabBuilder.ViewElements.InteractiveControls.RadioButton

Information


                        

Creates a radio-button. The var variable of this element can have the value 0 or 1.


Parameters

TypeNameDefaultDescription
positioninLayoutposition"CENTER"Position inside its container
booleanValuebuttonValue"true"Initial value
Stringtext"radioButton"Text displayed by the element
StringbuttonGroup"buttonGroup"The radio-button belongs to this group

Connectors

TypeNameDescription
ParentLpLLeftConnector of non drawable components
ChildLcLLeftConnector of non drawable components

Modelica definition

model RadioButton "Creates a radio-button" 
                        extends src.ViewElements.InteractiveControls.RadioButton;
end RadioButton;

VirtualLabBuilder.ViewElements.InteractiveControls.Button1Action VirtualLabBuilder.ViewElements.InteractiveControls.Button1Action

Creates a 1 action button

VirtualLabBuilder.ViewElements.InteractiveControls.Button1Action

Information


                        

Creates a button. The var variable is equal to one when the button is pressed and it is equal to zero otherwise. This variable can be used as a condition in a when clause. This way, the when clause is executed whenever the virtual-lab user presses the button.


Parameters

TypeNameDefaultDescription
positioninLayoutposition"CENTER"Position inside its container
booleanValueselected"false"Whether the button is selected or not
Stringlabel"info"Text displayed by the button
alignmentTypealignment"0.00"Text alignment
Stringimage""Path of the image of the button
Colorbgcolor[4]{192,192,192,255}Background color
Stringtooltip""Tooltip
Colorlettercolor[4]{0,0,0,255}String color
fontTypetypeFont"Times New Roman"Type of font
fontStylestyleFont"Plain"Style of font
IntegersizeFont20Size of font

Connectors

TypeNameDescription
ParentLpLLeftConnector of non drawable components
ChildLcLLeftConnector of non drawable components

Modelica definition

model Button1Action "Creates a 1 action button" 
                                     extends src.ViewElements.InteractiveControls.Button1Action;
end Button1Action;

VirtualLabBuilder.ViewElements.InteractiveControls.Button2Actions VirtualLabBuilder.ViewElements.InteractiveControls.Button2Actions

Creates a 2 actions button

VirtualLabBuilder.ViewElements.InteractiveControls.Button2Actions

Information


                        

This class creates a button. The var variable changes alternatively from zero to one and from one to zero whenever the button is pressed. By programming the corresponding when clauses, it is possible to associate two different actions to this button: an action is triggered when var changes from zero to one, and the other action is triggered when var changes from one to zero.


Parameters

TypeNameDefaultDescription
positioninLayoutposition"CENTER"Position inside its container
booleanValueselected"false"Whether the button is selected or not
Stringlabel"info"Text displayed by the button
alignmentTypealignment"0.00"Text alignment
Stringimage""Path of the image of the button
Colorbgcolor[4]{192,192,192,255}Background color
Stringtooltip""Tooltip
Colorlettercolor[4]{0,0,0,255}String color
fontTypetypeFont"Times New Roman"Type of font
fontStylestyleFont"Plain"Style of font
IntegersizeFont20Size of font

Connectors

TypeNameDescription
ParentLpLLeftConnector of non drawable components
ChildLcLLeftConnector of non drawable components

Modelica definition

model Button2Actions "Creates a 2 actions button" 
  
                        extends src.ViewElements.InteractiveControls.Button2Actions;
end Button2Actions;

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