function tstable(h,varargin)

import javax.swing.*;

%% Method which builds/populates the timeseries table on the viewcontainer panel

if isempty(h.Handles) || isempty(h.Handles.PNLTs) || ...
        ~ishandle(h.Handles.PNLTs)
    return % No panel
end

%% Assemble the timeseries table data by traversing each member timeseries of the
%% selected viewnode
if nargin>=2 && ~isempty(varargin{1}) && ~isempty(varargin{1}.Plot)
    memberTs = varargin{1}.Plot.getTimeSeries;
    tableData = cell([length(memberTs) 2]);
    for k=1:length(memberTs)
        tableData(k,:) = {memberTs{k}.Name,''};
    end
else
    tableData = cell([0 2]);
end
%% Populate the table - if necessary creating it
if ~isfield(h.Handles,'tsTable') || isempty(h.Handles.tsTable)
    headings = {'Time Series','Dimensions'}; 
    % Parent figure passed as the first argument until uitables can
    % be parented directly to uipanels
    [h.Handles.tsTable, h.Handles.PNLtsTable] = ...
        tsuitable(ancestor(h.Handles.PNLTs,'figure'),'Position',[0 0 1 1]);
    h.Handles.tsTable.Editable = false;
    tsCustomizeUitable(h.Handles.tsTable)
    h.Handles.tsTable.setData(tableData)
    h.Handles.tsTable.setColumnNames(headings);
    set(h.Handles.PNLtsTable,'Parent',h.Handles.PNLTs,'Units','Normalized',...
        'Position',[0.02 0.02 0.96 0.96])
     
    % Row selection only
    awtinvoke(h.Handles.tsTable.getTable,'setSelectionMode(I)',...
        ListSelectionModel.SINGLE_SELECTION);
    awtinvoke(h.Handles.tsTable.getTable,'setCellSelectionEnabled(Z)',false);
    awtinvoke(h.Handles.tsTable.getTable,'setRowSelectionAllowed(Z)',true);

    %% Pack the table
    awtinvoke(h.Handles.tsTable.getTable,'setAutoResizeMode(I)',...
        JTable.AUTO_RESIZE_ALL_COLUMNS)
    
else
    %awtinvoke(h.Handles.viewsTable.getTable,'clearSelection()');
    h.Handles.tsTable.setData(tableData);
end



