001 package com.sptci.rwt.webui;
002
003 import nextapp.echo2.app.event.ActionEvent;
004
005 /**
006 * The listener used by {@link MenuComponent} to display a new {@link
007 * QueryExecutorView} component.
008 *
009 * <p>© Copyright 2007 <a href='http://sptci.com/' target='_new'>Sans Pareil Technologies, Inc.</a></p>
010 * @author Rakesh Vidyadharan 2007-10-06
011 * @version $Id: QueryExecutorListener.java 4123 2008-05-25 21:49:01Z rakesh $
012 */
013 public class QueryExecutorListener extends ExecutorListener
014 {
015 /**
016 * Create a new instance of the listener using the specified {@link
017 * com.sptci.echo2.Controller} to interact with the application.
018 *
019 * @param controller The controller to use.
020 */
021 public QueryExecutorListener( MainController controller )
022 {
023 super( controller );
024 }
025
026 /**
027 * The {@link nextapp.echo2.app.event.ActionListener} implementation.
028 * Display a new instance of {@link QueryExecutorView}.
029 *
030 * @param event The action event that was triggered by the user.
031 */
032 public void actionPerformed( ActionEvent event )
033 {
034 if ( checkConnection() )
035 {
036 controller.addPane( new QueryExecutorView( controller ) );
037 }
038 }
039 }