getHeader method, your override must handle all cases where a state handler method
calls getHeader. (See “Methods Called for a Given Object State” on page 18-8)Sample Approaches Using the Interface
Here are some simple cases that show what methods to use for the particular customized
display.Change the Display of Scalar ObjectsUse a nonstandard layout for scalar object display that is fully defined in the
displayScalarObject method:classdef MyClass < matlab.mixin.CustomDisplay
...
methods (Access = protected)
function displayScalarObject(obj)
% Implement the custom display for scalar obj
end
end
endCustom Property List with Standard LayoutUse standard display layout, but create a custom property list for scalar and nonscalar
display:classdef MyClass < matlab.mixin.CustomDisplay
...
methods(Access = protected)
function groups = getPropertyGroups(obj)
% Return PropertyGroup instances
end
end
endCustom Property List for Scalar OnlyUse standard display layout, but create a custom property list for scalar only. Call the
superclass getPropertyGroups for the nonscalar case.
classdef MyClass < matlab.mixin.CustomDisplay
properties
Prop118 Customizing Object Display