Advanced topics

Customizing the user interface

YAKINDU Model Viewer provides several options to customize the user interface to better suit your needs. Many of these features are concepts that are provided by the underlying Eclipse Platform. Please see the Eclipse Workbench User Guide for more information.

Adding diagram views in new tabs

You can open a subsystem of the current model in a new tab, while keeping the view you are currently in. To do so, proceed as follows:

  • Right-click on the subsystem you want to open. The context menu appears.
  • In the context menu, select the Open in new tab entry.
  • YAKINDU Model Viewer creates a new tab in the main view, displaying the selected element.

You can switch back and forth between tabs by clicking on them.

To close a tab, click on its button "close" resp. button "close" highlighted button.

Please note: It is also possible to open additional model files in new tabs, see section "Opening in a separate tab".

Views

The YAKINDU Model Viewer workbench consists of a couple of views, as described in section "The workbench". The following subsections explain some actions you can perform with these views in order to optimize your model viewing experience.

Resizing views

Views are separated by vertical and/or horizontal separators. If you move the mouse cursor over such a separator between two views, it changes its shape to a double-sided arrow.

Press the left mouse button and drag the mouse to move the separator. As a result, one of the views grows – at the expense of its neighboring view.

Figure "Resizing a view" shows the Properties view in the process of being enlarged vertically (note the shape of the mouse cursor). Figure "Resized view" shows the result.

Resizing a view

Resizing a view

Resized view

Resized view

Moving views

You can move a view to a different place in the workbench’s grid. To move a view, click at the view’s title, keep the mouse button pressed, and drag it into the desired direction. Figure "Moving a view beside another view" shows the Properties view in the process of being moved: The user is dragging the view’s title along the dashed line. The tool superimposes the wordbench grid with grey rectangles: They indicate areas where the user could drop the view by releasing the mouse button.

Moving a view beside another view

Moving a view beside another view

Figure "Moved view alongside another view" shows the result: The Properties view is now left from the main view, and both views are displayed side by side. The space at the bottom, formerly occupied by the properties view, is released and claimed by main view and properties view.

Moved view alongside another view

Moved view alongside another view

An option to save some screen estate is to move a view „on top” of another view resp. to a tab. This is sensible for views that you usually don’t need to see at the same time. In figure "Moving a view to a tab", the user drags the properties view’s title immediately beside the main view’s title.

Moving a view to a tab

Moving a view to a tab

Figure "Moved view in new tab" shows the result: The properties view and the main view are sharing the same space. Select the view you want to see by clicking on the corresponding tab.

Moved view in new tab

Moved view in new tab

Closing a view

Close a view by clicking on its button "close" resp. button "close" highlighted button. A closed view is removed from the workbench. For re-opening a view, please see the following section.

Closing a view

Closing a view

Opening a view

Open a view via the Window → Show view → Other… menu item, see figure "The Show view menu" .

The "Show view" menu

The Show view menu

Selecting this menu item displays the Show view dialog that lists all views you can open, see figure "The Show view dialog" . The YAKINDU Model Viewer section contains entries for the Help, Overview, and Signal trace views. Views that are already open are greyed out.

Double-click on a view to open it, or select it and click on the OK button.

The "Show view" dialog

The Show view dialog

Maximizing and minimizing a view

Sometimes you want a certain view to temporarily occupy all the workbench space – or to get it completely out of the way, without closing it. The minimizing and maximizing functions come in handy.

To maximize a view, click on its maximize button button "maximize view" or double-click on its title. Clicking on the view’s restore button button "restore view" or double-clicking on its title brings it back to its previous size.

To minimize a view, click on its minimize button button "minimize view". Clicking on the view’s restore button button "restore view" brings it back to its previous size.

A minimized view can sometimes be hard to spot, because, well, because it is minimized. Minimized views are lined up vertically at the left or right side of the workbench, see figure "A minimized view". They consist of the view’s icon and a restore button button "restore view" above it.

  • Clicking on the view’s icon makes the view appear in an overlay on top of any other views. Click on the view’s icon again to make the overlay disappear. Hovering the mouse pointer over the view’s icon shows the view’s name in a popup.
  • Click on the restore button button "restore view" to de-minify the view and restore it to its previous size.

A minimized view

A minimized view

Perspectives

A collection of views and the way they are arranged is called a perspective. When you start up YAKINDU Model Viewer for the first time, the YAKINDU Model Viewer perspective is opened, as described in section "The workbench".

This section outlines some more details on perspectives that are good to know about.

Please note: The following list of features is in no way meant to be exhaustive. Please see the Eclipse Workbench User Guide for more information and/or investigate what’s in the Window → Perspective menu.

Resetting a perspective

The section on views describes how you can rearrange views in your perspective by resizing, moving, opening, or closing them. However, you can always get back to your perspective’s default settings by resetting it.

  • In the main menu, select Window → Perspective → Reset perspective….
  • A dialog appears, asking you whether you really want to reset the perspective to its defaults.
  • Click on the Yes button to reset the perspective, else click on No.

Saving your own perspective settings

Not satisfied with the YAKINDU Model Viewer perspective defaults? Okay, create your own!

  • Arrange the YAKINDU Model Viewer perspective as you like it.
  • In the main menu, select Window → Perspective → Save perspective as….
  • In the dialog, click on the Save button to store your settings as the current perspective’s new defaults.
  • Instead of overwriting the current perspective, you can alternatively save your settings as a new perspective. To do so, type a perspective name that does not yet exist into the Name field and click on Save.

If you want to modify your model, you can right away invoke the Simulink application – provided, of course, it is installed on your computer.

  • Right-click on the model element you want to edit, or on the main view’s background if you want to edit the current element. The context menu opens.
  • In the context menu, select the Open in Simulink entry.
  • Simulink starts and opens the model element in question.

Please note: To make changes done by Simulink (or any other tool) to a currently open model file visible in YAKINDU Model Viewer, you have to close and re-open it.

Customizing the tool

Changing model appearance using cascading style sheets (CSS)

YAKINDU Model Viewer controls the visual appearance of model elements by way of cascading style sheets (CSS). The tool has a built-in CSS style sheet called Standard. However, you can provide your own styling rules in the form of CSS files. Figure "Customizing model representation using cascading style sheets" is showing an example.

Customizing model representation using cascading style sheets

Customizing model representation using cascading style sheets

Providing your own CSS file

In order to provide and use your own CSS rules, proceed as follows:

  • In the installation folder of YAKINDU Model Viewer, create a subfolder named styles.
  • Place your CSS file, e.g., I_did_it_my_way.css, into the styles subfolder.
  • In YAKINDU Model Viewer’s main menu, select Window → Preferences.
  • In the Preferences dialog’s navigation on the left, select YAKINDU Model Viewer.
  • The Style drop-down menu displays the Standard style plus the names of the CSS files in the styles directory. Select the one you want to use, see figure "Selecting a CSS file".
  • Click on the OK button to activate the new styling and to close the Preferences dialog.

Selecting a CSS file

Selecting a CSS file

Available CSS classes

The sample style sheet above already showed some CSS classes you can use as selectors for your styles. Here’s an exhaustive list of the supported CSS classes:

CSS class
.bus-assignment
.bus-creator
.bus-selector
.compare-to-constant
.constant
.data-type-conversion
.discrete-time-integrator
.divide
.enable
.gain
.logic
.lookup-table
.math-function
.mux
.port-label
.port
.product
.reference
.relational-operator
.saturation
.subsystem
.sum
.switch

As YAKINDU Model Viewer uses JavaFX for rendering model elements, you can obtain further information on CSS styling from the JavaFX reference documentation.