Main Content

matlab.system.display.Header class

Package: matlab.system.display
Superclasses:

Header for System objects properties

Syntax

matlab.system.display.Header(N1,V1,...Nn,Vn)
matlab.system.display.Header(Obj,...)

Description

matlab.system.display.Header(N1,V1,...Nn,Vn) specifies a header for the System object™, with the header properties defined in Name-Value (N,V) pairs. You use matlab.system.display.Header within the getHeaderImpl method. The available header properties are

  • Title — Header title. The default value is an empty character vector.

  • Text — Header description. The default value is an empty character vector.

  • ShowSourceLink — Show link to source code for the object.

matlab.system.display.Header(Obj,...) creates a header for the specified System object (Obj) and sets the following property values:

  • Title — Set to the Obj class name.

  • Text — Set to help summary for Obj.

  • ShowSourceLink — Set to true if Obj is MATLAB code. In this case, the Source Code link is displayed. If Obj is P-coded and the source code is not available, set this property to false.

You can use mfilename('class') from within this method to get the name of the System object. If you set any Name-Value pairs, those property values override the default settings.

Examples

collapse all

Define a header in your class definition file.

 methods (Static, Access = protected)
    function header = getHeaderImpl
       header = matlab.system.display.Header(mfilename('class'), ...
           'Title','AlternativeTitle',...
           'Text','An alternative class description');
    end
 end

The resulting output appears as follows. In this case, Source code appears because the ShowSourceLink property was set to true.