classdef (Hidden) ModeSelectionTool < mrtool.tools.AbstractTool
    % Mode Selection Tool consisting its tab, plot and data
    % compatible with MATLAB Online       
    
    % Author(s): Suat Gumussoy
    % Copyright 2016 The MathWorks, Inc.    
       
    methods
        %% Constructor
        function this = ModeSelectionTool(Target,TargetList,ParentToolGroup,varargin)
            this = this@mrtool.tools.AbstractTool(mrtool.util.setSingleTarget(Target),TargetList,ParentToolGroup,varargin{:});
            enableEventManager(this.ToolData,true);
        end  
        function setToolData(this,Target,TargetList)
            this.ToolData = mrtool.data.ModeSelectionData(Target,TargetList);            
        end
        function setToolPlot(this,ToolData)
            this.ToolPlot = mrtool.plots.ModeSelectionPlot(ToolData);             
        end
        function setToolTab(this,ToolData,ToolFlot,ParentToolGroup)
            if mrtool.util.MRToolstripSettings.isNewAPI
                this.ToolTab = mrtool.tabs.ModeSelectionTabMLOnline(ToolData,ToolFlot,ParentToolGroup);
            else
                this.ToolTab = mrtool.tabs.ModeSelectionTab(ToolData,ToolFlot,ParentToolGroup);
            end            
        end
    end  
end