001 package com.sptci.rwt.webui;
002
003 import nextapp.echo2.app.Button;
004 import nextapp.echo2.app.event.ActionEvent;
005
006 import com.sptci.echo2.Configuration;
007 import com.sptci.echo2.Listener;
008
009 /**
010 * The action listener used to display {@link HistoryView} instances for
011 * the {@link ExecutorView} specified.
012 *
013 * <p>© Copyright 2007 <a href='http://sptci.com/' target='_new'>Sans Pareil Technologies, Inc.</a></p>
014 * @author Rakesh Vidyadharan 2007-10-13
015 * @version $Id: HistoryListener.java 4123 2008-05-25 21:49:01Z rakesh $
016 */
017 public class HistoryListener extends Listener<MainController>
018 {
019 /**
020 * Create a new instance of the listener for the specified controller.
021 *
022 * @param controller The controller to use to interact with the
023 * application.
024 */
025 public HistoryListener( final MainController controller )
026 {
027 super( controller );
028 }
029
030 /**
031 * The action listener implementation. Displays a {@link HistoryView}
032 * component that displays the statement history for the view from
033 * which the history was launched.
034 *
035 * @param event The action event that was triggered.
036 */
037 public void actionPerformed( ActionEvent event )
038 {
039 ExecutorView view = (ExecutorView)
040 controller.getParentView( (Button) event.getSource() );
041 controller.addPane( new HistoryView( view, controller ) );
042 }
043 }