getPropertyGroupsImpl

Property groups for System object display

Syntax

group = getPropertyGroupsImpl

Description

group = getPropertyGroupsImpl specifies how to group properties for display. You specify property sections (matlab.system.display.Section ) and section groups (matlab.system.display.SectionGroup ) within this method. Sections arrange properties into groups. Section groups arrange sections and properties into groups. If a System object™, included through the MATLAB System block, has a section, but that section is not in a section group, its properties appear above the block dialog tab panels.

If you do not include a getPropertyGroupsImpl method in your code, all public properties are included in the dialog box by default. If you include a getPropertyGroupsImpl method but do not list a property, that property does not appear in the dialog box.

When the System object is displayed at the MATLAB® command line, the properties are grouped as defined in getPropertyGroupsImpl. If your getPropertyGroupsImpl defines multiple section groups, only properties from the first section group are displayed at the command line. To display properties in other sections, a link is provided at the end of a System object property display. Group titles are also displayed at the command line. To omit the "Main" title for the first group of properties, set TitleSource to 'Auto' in matlab.system.display.SectionGroup.

getPropertyGroupsImpl is called by the MATLAB System block and when displaying the object at the command line.

Note

You must set Access = protected and Static for this method.

Output Arguments

group

Property group or groups

Examples

expand all

Define two block dialog tabs, each containing specific properties. For this example, you use the getPropertyGroupsImpl, matlab.system.display.SectionGroup, and matlab.system.display.Section methods in your class definition file.

methods (Static, Access = protected)
   function groups = getPropertyGroupsImpl
      valueGroup = matlab.system.display.Section(...
           'Title','Value parameters',...
           'PropertyList',{'StartValue','EndValue'});
 
      thresholdGroup = matlab.system.display.Section(...
           'Title','Threshold parameters',...
           'PropertyList',{'Threshold','UseThreshold'});
            
      mainGroup = matlab.system.display.SectionGroup(...
           'Title','Main', ...
           'Sections',[valueGroup,thresholdGroup]);
            
      initGroup = matlab.system.display.SectionGroup(...
           'Title','Initial conditions', ...
           'PropertyList',{'IC1','IC2','IC3'});
 
      groups = [mainGroup,initGroup];
   end
end

The resulting dialog box appears as follows.

Was this topic helpful?