{
Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );
// DSML file
BaseWidgetUtils.createLabel( composite, "DSML File:", 1 );
dsmlFileBrowserWidget = new FileBrowserWidget( "Select a DSML File", EXTENSIONS, FileBrowserWidget.TYPE_OPEN );
dsmlFileBrowserWidget.createWidget( composite );
dsmlFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
{
public void widgetModified( WidgetModifyEvent event )
{
wizard.setDsmlFilename( dsmlFileBrowserWidget.getFilename() );
if ( useDefaultResponseFileButton.getSelection() )
{
responseFileBrowserWidget.setFilename( dsmlFileBrowserWidget.getFilename() + ".response.xml" );
}
validate();
}
} );
// Connection
BaseWidgetUtils.createLabel( composite, "Import into:", 1 );
browserConnectionWidget = new BrowserConnectionWidget( wizard.getImportConnection() );
browserConnectionWidget.createWidget( composite );
browserConnectionWidget.addWidgetModifyListener( new WidgetModifyListener()
{
public void widgetModified( WidgetModifyEvent event )
{
wizard.setImportConnection( browserConnectionWidget.getBrowserConnection() );
validate();
}
} );
// Save Response
Composite responseOuterComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 3 );
Group responseGroup = BaseWidgetUtils.createGroup( responseOuterComposite, "Response", 1 );
Composite responseContainer = BaseWidgetUtils.createColumnContainer( responseGroup, 3, 1 );
saveResponseButton = BaseWidgetUtils.createCheckbox( responseContainer, "Save response", 3 );
saveResponseButton.setSelection( true );
wizard.setSaveResponse( saveResponseButton.getSelection() );
saveResponseButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent event )
{
wizard.setSaveResponse( saveResponseButton.getSelection() );
useDefaultResponseFileButton.setEnabled( saveResponseButton.getSelection() );
useCustomResponseFileButton.setEnabled( saveResponseButton.getSelection() );
responseFileBrowserWidget.setEnabled( saveResponseButton.getSelection()
&& useCustomResponseFileButton.getSelection() );
overwriteResponseFileButton.setEnabled( saveResponseButton.getSelection() );
validate();
}
} );
BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
useDefaultResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer,
"Use default response file", 2 );
useDefaultResponseFileButton.setSelection( true );
useDefaultResponseFileButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent event )
{
String temp = customResponseFileName;
responseFileBrowserWidget.setFilename( dsmlFileBrowserWidget.getFilename() + ".response.xml" );
responseFileBrowserWidget.setEnabled( false );
customResponseFileName = temp;
validate();
}
} );
BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
useCustomResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer, "Use custom response file",
2 );
useCustomResponseFileButton.setSelection( false );
useCustomResponseFileButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent event )
{
responseFileBrowserWidget.setFilename( customResponseFileName != null ? customResponseFileName : "" );
responseFileBrowserWidget.setEnabled( true );
validate();
}
} );
BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
responseFileBrowserWidget = new FileBrowserWidget( "Select save file", null, FileBrowserWidget.TYPE_SAVE );
responseFileBrowserWidget.createWidget( responseContainer );
responseFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
{
public void widgetModified( WidgetModifyEvent event )
{