View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2009 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  package com.eviware.x.impl.swing;
13  
14  import java.awt.event.ActionEvent;
15  
16  import javax.swing.AbstractAction;
17  
18  import com.eviware.soapui.support.action.swing.ActionList;
19  import com.eviware.soapui.support.action.swing.DefaultActionList;
20  
21  public class JWizardDialogBuilder extends SwingXFormDialogBuilder
22  {
23  
24  	private SwingXFormDialog dialog;
25  
26  	public JWizardDialogBuilder( String name )
27  	{
28  		super( name );
29  	}
30  
31  	protected final class NextAction extends AbstractAction
32  	{
33  		public NextAction()
34  		{
35  			super( "Next" );
36  		}
37  
38  		public void actionPerformed( ActionEvent e )
39  		{
40  			if( dialog != null )
41  			{
42  				// dialog.setReturnValue( XFormDialog.NEXT_OPTION );
43  				dialog.setVisible( false );
44  			}
45  		}
46  	}
47  
48  	public ActionList buildprevNextCancelActions()
49  	{
50  		DefaultActionList actions = new DefaultActionList( "Actions" );
51  		actions.addAction( new NextAction() );
52  		actions.addAction( new CancelAction() );
53  		return actions;
54  	}
55  }