/**
* This <TT>Action</TT> will display the previous results tab for the
* current session.
*
* @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
*/
/**
* This <TT>Action</TT> will display the next results tab for the
* current session.
*
* @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
*/
public class [[#variable18d70fa0]]extends SquirrelAction implements ISQLPanelAction {
/** Logger for this class. */
private final static ILogger s_log = LoggerController.createLogger( [[#variable18d70fa0]].class );
/** Current panel. */
private ISQLPanelAPI _panel;
/** Command that will be executed by this action. */
private ICommand _cmd;
/**
* Ctor specifying Application API.
*
* @param app Application API.
*/
public [[#variable18d70fa0]](IApplication app) {
super(app);
}
public void setSQLPanel(ISQLPanelAPI panel) {
_panel = panel;
_cmd = null;
setEnabled(null != _panel);
}
/**
* Display the previous results tab.
*
* @param evt Event being executed.
*/
/**
* Display the next results tab.
*
* @param evt Event being executed.
*/
public synchronized void actionPerformed(ActionEvent evt) {
if (_panel != null) {
if (_cmd == null) {
_cmd = new [[#variable18d70f00]](_panel);
}
try {
_cmd.execute();
}
catch (Throwable
ex) {
final String msg = "Error occured seting current results tab";
_panel.getSession().showErrorMessage(msg + ": " + ex);
s_log.error(msg, ex);
}
}
}
}
|