Beruflich Dokumente
Kultur Dokumente
% ---------------------------------------------------------------------------- %
function LocalWindowClosing(~, ~, this)
% Do not allow closing the Explorer when the manager is busy; for example,
% when an estimation is running.
if this.isBusy
msg = getString(message('SLControllib:explorer:msgApplicationBusy'));
dlg = errordlg( msg, char(this.Explorer.getTitle), 'modal' );
% In case the dialog is closed before uiwait blocks MATLAB.
if ishandle(dlg)
uiwait(dlg)
end
return
end
% Force the focus to the frame so that ant focusloast events are processed
% before the save and none of the focuslost callbacks will fire after nodes
% have been deleted
this.Explorer.requestFocus
drawnow
% Clean up
drawnow
this.delete;
% ---------------------------------------------------------------------------- %
function abortFlag = LocalSaveProject(this, node)
abortFlag = false;
if node.Dirty
msg = getString(message('SLControllib:explorer:msgSaveChanges',node.Label));
selection = questdlg(msg, ...
getString(message('SLControllib:explorer:lblSaveProject')), ...
getString(message('SLControllib:explorer:lblYes')), ...
getString(message('SLControllib:explorer:lblNo')), ...
getString(message('SLControllib:explorer:lblCancel')), ...
getString(message('SLControllib:explorer:lblYes')));
switch selection
case getString(message('SLControllib:explorer:lblYes'))
this.saveas(node, true)
case getString(message('SLControllib:explorer:lblNo'))
% no action
case getString(message('SLControllib:explorer:lblCancel'))
abortFlag = true;
end
end
% ---------------------------------------------------------------------------- %
function LocalPopupTriggered(~, hData, this)
h = handle( hData.getNode.getObject );
e = hData.getEvent;
% ---------------------------------------------------------------------------- %
function LocalSelectionChanged(~, hData, this)
h = handle( hData.getNode.getObject );
ExplorerPanel = this.ExplorerPanel;
Explorer = this.Explorer;
try
% Get the panel
Panel = getDialogInterface( h, this );
catch E
util = slcontrol.Utilities;
beep;
'showMessageDialog(Ljava/awt/Component;Ljava/lang/Object;Ljava/lang/String;I)', ...
Explorer, util.getLastError(E), ...
getString(message('SLControllib:explorer:errToolsManager')), ...
javax.swing.JOptionPane.WARNING_MESSAGE);
Panel = com.mathworks.mwswing.MJPanel;
end