function status(ViewerObj,String,Hold)
%STATUS  Update Status Bar in LTI Viewer

%   Author(s): A. DiVergilio
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.2 $  $Date: 2000/06/14 20:03:16 $

%---Update status string and set as current user-default
if nargin==3
   set(ViewerObj.StatusText,'String',String,'UserData',String);

%---Update status string (do not set as user-default)
elseif nargin==2
   %---Also clear current user-default so built-in defaults show next time
   set(ViewerObj.StatusText,'String',String,'UserData','');

%---Display current default status string
elseif ~isempty(get(ViewerObj.StatusText,'UserData'))
   set(ViewerObj.StatusText,'String',get(ViewerObj.StatusText,'UserData'));

%---Display built-in default status strings
else
   if isempty(ViewerObj.Systems)
      set(ViewerObj.StatusText,'String','Use the Import item under the File menu to load an LTI system.');
   else
      set(ViewerObj.StatusText,'String','Right-click on the plot areas for more options.');
   end
end
