classdef (Hidden) LogicAnalyzerDivider < dsp.AbstractLogicAnalyzerDisplay
    %LogicAnalyzerDivider Divider object for dsp.LogicAnalyzer
    %   This object is used to describe the properties of a Divider
    %   displayed in the Logic Analyzer window.
    %
    %Properties:
    %
    % Name Label for display in Logic Analyzer
    %   The default value of this property is 'Divider'.
    % 
    % Height Display height
    %   Specify the Height to be a scalar integer. The value 0 
    %   implies that the height set in the Logic Analyzer should be used.
    %   The default value for this property is 0.
    %
    
    %   Copyright 2012-2014 The MathWorks, Inc.

%     properties
%         Color
%     end
    
    methods
        function obj = LogicAnalyzerDivider(varargin)
            % constructor
            obj = obj@dsp.AbstractLogicAnalyzerDisplay;
            obj.Name = getString(message('Spcuilib:logicanalyzer:defaultDividerName'));
            if mod(nargin,2) ~= 0
                error(message('dspshared:LogicAnalyzer:pvpairs'));
            end
            for ii = 1:nargin/2
                obj.(char(varargin{(2*ii)-1})) = varargin{2*ii};
            end
        end % constructor
    end % methods
    
    methods (Hidden, Static)
        function h = fromGraphicalSettings(gs, ~)
            inputs = {'Tag', sprintf('D%d', gs.instanceNumber)};
            if isfield(gs, 'name')
                inputs = [inputs {'Name', gs.name}];
            end
            
            h = dsp.LogicAnalyzerDivider(inputs{:});
        end
    end
    
    methods (Hidden)
        function gs = toGraphicalSettings(this, varargin)
            gs = toGraphicalSettings@dsp.AbstractLogicAnalyzerDisplay(this, varargin{:});
            gs.type = 'divider';
        end
    end
end % LogicAnalyzerDivider
