Page History
...
id | 1352969330 |
---|
...
id | 1352969332 |
---|
...
id | 1352969328 |
---|
On this page
Table of Contents | ||||
---|---|---|---|---|
|
Content block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
The MagicDraw User Interface Modeling diagram becomes even more powerful and valuable when used with Cameo Simulation Toolkit. Supported UI components are as follows FramesYou need to drag a Classifier to a UI Frame to bind them together (Cameo Simulation Toolkit will automatically apply a «UI» stereotype and set its represents tag to the Classifier). Once bound, the UI Frame can represent the Classifier. The source tag of the applied «UI» stereotype will also be set as com.nomagic.magicdraw.simulation.uiprototype.UIDiagramFrame by default.
PanelsA UI Panel can hold any supported UI components, such as buttons, labels, sliders, check boxes, text fields, combo boxes, spinners, radio buttons, and even panels themselves.
During runtime, UI components in the UI Panel can also display their documentation as a tooltip. Runtime documentation of User Interface components displayed as a tooltip.Group boxesGroup boxes have similar usages to Panels. TextFields, checkboxes, and slidersDrag a Property to one of these three UI components to bind the Property with that particular UI component. The «RuntimeValue» stereotype will be automatically applied, its "element" tag will be set to the Property, and its "Text" tag will also be set to the name of that Property. In this case, the UI component represents the Property. Once represented, the UI component will reflect the value of the represented Property in the Variables pane during simulation, and vice versa. LabelsDrag a Property to a UI Label to bind the Property with that particular UI Label. The «RuntimeValue» stereotype will be automatically applied, its "element" tag will be set to the Property, and its "Text" tag will also be set to the name of that Property. In this case, the UI Label represents the Property. Once represented, the UI Label will display the value of the represented Property in the Variables pane during simulation. ButtonsYou can use a UI button to send Signal(s), call Operation(s), or call Behavior(s). To use a UI button to send a Signal
To use a UI button to call an operation
If you click this UI button is during simulation, it will call the associated Operation. To use a UI button to call a behavior
If you click this UI button during simulation, it will call the associated Behavior. Combo boxes and spinnersDrag a Property typed by Enumeration to one of these two UI components (ComboBoxes and Spinners) to bind the Property to that particular UI component. The «RuntimeValue» stereotype will be automatically applied, its "element" tag will then be set to the Property, and its "Text" tag will also be set to the name of that Property. In this case, the UI component will represent the Property typed by Enumeration. Once represented, the UI component will reflect the value (the selected Enumeration Literal) of the represented Property in the Variables pane during simulation, and vice versa. Radio buttonsDrag a Property typed by Enumeration to a UI Panel or GroupBox to bind the Property to that particular UI panel or GroupBox. The «RuntimeValue» stereotype will be automatically applied, its "element" tag will then be set to the Property, and its "Text" tag will also be set to the name of that Property. All Enumeration Literals of the Property type will be automatically created as a vertical list of UI RadioButtons. Each UI RadioButton will represent Enumeration Literal of the Property type accordingly. Once represented, the UI RadioButton will display the value of the represented Property in the Variables pane during simulation. In addition, you can assign or re-assign other Enumeration Literals to an existing UI RadioButton by dragging other Enumeration Literals of the same Property type to the existing UI RadioButton. Also, you can create a single UI RadioButton to represent a particular Enumeration Literal by dragging the Enumeration Literal to a UI Panel or GroupBox. The «RuntimeValue» stereotype will be automatically applied, its "element" tag will then be set to Enumeration Literal, and its "Text" tag will also be set to the name of the Enumeration Literal. Using the MagicDraw User Interface modeling diagram with Cameo Simulation Toolkit.The steps in this example are as follows
See the Calculator.mdzip sample for detailed instructions. When you drag any GUI elements to a diagram, click Run to simulate the animation.
Sample modelsThe models used on this page are the CarBrakingAnalysis and Calculator sample models that come with MagicDraw. To open a sample, do either of the following
|
...
|