import java.io.File;
import java.net.URI;
-import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
* @created 04.08.2009
* @version 1.0
*/
-public class ImportFromFileDataSourceWizardPage extends WizardPage {
+public class ImportFromFileDataSourceWizardPage extends AbcdSourceSelectionPage {
/** Constant <code>PAGE_NAME="CdmXmlDataSourceWizardPage"</code> */
public static final String PAGE_NAME = "CdmXmlDataSourceWizardPage";
private FileDialog fileDialog;
- private Text text_file;
+
protected ImportFromFileDataSourceWizardPage(String title, String description, String[] extensions) {
super(PAGE_NAME);
fileDialog.setFilterExtensions(extensions);
- text_file = new Text(composite, SWT.BORDER);
- text_file.setEditable(false);
- text_file.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ text_source = new Text(composite, SWT.BORDER);
+ text_source.setEditable(false);
+ text_source.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
Button button = new Button(composite, SWT.PUSH);
public void widgetSelected(SelectionEvent e) {
String path = fileDialog.open();
if(path!=null){
- text_file.setText(path);
+ text_source.setText(path);
setPageComplete(true);
}
}
}
public File getFile() {
- return new File(text_file.getText());
+ return new File(text_source.getText());
}
- public URI getUri() {
+ @Override
+ public URI getUri() {
return getFile().toURI();
}
@Override
public boolean isPageComplete() {
- return CdmUtils.isNotBlank(text_file.getText());
+ return CdmUtils.isNotBlank(text_source.getText());
}
}