This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

slmetric.dashboard.Widget class

Package: slmetric.dashboard

Object for holding Actual/Potential Reuse, System Interface, or System Info widgets

Description

You can add, remove, or modify slmetric.dashboard.Widget objects in the Metrics Dashboard. The types of slmetric.dashboard.Widget objects are Actual Reuse/Potential Reuse, System Interface, or System Info widgets.

Construction

For slmetric.dashboard.Layout, slmetric.dashboard.Container, or slmetric.dashboard.Group objects, use the addWidget or removeWidget methods to add or remove slmetric.dashboard.Widget objects from the Metrics Dashboard. Use the slmetric.dashboard.Widget methods to specify widget size.

Properties

expand all

By default, the LibraryReuse widget title is Library Reuse, the SystemInfo widget title is blank, and the GlocalInterface widget title is System Interface. This property is read/write.

Data Types: char

Type of slmetric.dashboard.Widget object that you want to add, remove, or modify in the Metrics Dashboard. This property is read-only.

Data Types: char

Methods

getHeight Obtain height of Metrics Dashboard widget
getMetricIDs Obtain metric identifier for Metrics Dashboard widget
getPosition Obtain widget position within Metrics Dashboard
getSeparatorsDetermine whether there are lines on sides of Metrics Dashboard widget
getWidths Obtain widths of Metrics Dashboard widget
setHeight Specify height of Metrics Dashboard widget
setPosition Set widget position within Metrics Dashboard
setSeparators Specify lines on Metrics Dashboard widget sides
setWidths Specify multiple widths for Metrics Dashboard widget

Examples

collapse all

Create a Metrics Dashboard with the three types of slmetric.dashboard.Widget objects.

To begin, create a new slmetric.dashboard.Configuration object.

config=slmetric.dashboard.Configuration.new('Name','default');

Obtain the slmetric.dashboard.Layout object from the slmetric.dashboard.Configuration object.

layout=getDashboardLayout(config);

Add the three slmetric.dashboard.Widget objects to the slmetric.dashboard.Layout object.

addWidget(layout,'LibraryReuse');
addWidget(layout,'SystemInfo');
addWidget(layout,'GlocalInterface');

Save the configuration object. This command serializes the API information to an XML file.

save(config,'FileName','DashboardConfig.xml');

Set the active configuration.

slmetric.dashboard.setActiveConfiguration(fullfile(pwd,'DashboardConfig.xml'));

For your model, open the Metrics Dashboard.

metricsdashboard sf_car

The Metrics Dashboard contains the three slmetric.dashboard.Widget objects.

Click the All Metrics button and run all metrics.

Introduced in R2018b