function this = tsnode(varargin)
% NODE Constructor for @node class
%
% VARARGIN{1}: Node name
% VARARGIN{2}: Parent handle used for creating a unique node name
%
% Should not be used by clients. Instead subclass @node and write your own
% constructor. 

% Create class instance
this = tsguis.tsnode;
%this.HelpFile = 'C:\MATLAB701\toolbox\simulink\simdemos\aerospace\aero_atc.htm';
this.HelpFile = fullfile(matlabroot, 'toolbox', 'matlab', 'timeseries', ...
                         '@tsguis', '@tsnode','tshelp.htm');
                      
% Check input arguments
if nargin == 0 
  this.Label = 'Time Series Node';
elseif nargin == 1
  set(this,'Label',get(varargin{1},'Name'),'Timeseries',varargin{1})
else
  error('Time series node must be provided')
end

this.AllowsChildren = false;
this.Editable  = true;
this.Icon      = fullfile(matlabroot, 'toolbox', 'matlab', 'timeseries', ...
                           'data.gif');
% this.IsRoot    = true;
% this.Resources = 'com.mathworks.toolbox.control.resources.Explorer_Menus_Toolbars';
% this.Status    = 'Default explorer node.';

% Build tree node. Note in the CETM there is no need to do this becuase the
% Explorer calls it when building the tree
this.getTreeNodeInterface;

%% Add event listeners
%this.event_listeners;