Project

General

Profile

« Previous | Next » 

Revision 7563a18e

Added by Katja Luther about 8 years ago

minor

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ImportFromFileDataSourceWizardPage.java
13 13
import java.io.File;
14 14
import java.net.URI;
15 15

  
16
import org.eclipse.jface.wizard.WizardPage;
17 16
import org.eclipse.swt.SWT;
18 17
import org.eclipse.swt.events.SelectionAdapter;
19 18
import org.eclipse.swt.events.SelectionEvent;
......
33 32
 * @created 04.08.2009
34 33
 * @version 1.0
35 34
 */
36
public class ImportFromFileDataSourceWizardPage extends WizardPage {
35
public class ImportFromFileDataSourceWizardPage extends AbcdSourceSelectionPage {
37 36

  
38 37
	/** Constant <code>PAGE_NAME="CdmXmlDataSourceWizardPage"</code> */
39 38
	public static final String PAGE_NAME = "CdmXmlDataSourceWizardPage";
......
42 41

  
43 42
	private FileDialog fileDialog;
44 43

  
45
	private Text text_file;
44

  
46 45

  
47 46
	protected ImportFromFileDataSourceWizardPage(String title, String description, String[] extensions) {
48 47
		super(PAGE_NAME);
......
76 75

  
77 76
		fileDialog.setFilterExtensions(extensions);
78 77

  
79
		text_file = new Text(composite, SWT.BORDER);
80
		text_file.setEditable(false);
81
		text_file.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
78
		text_source = new Text(composite, SWT.BORDER);
79
		text_source.setEditable(false);
80
		text_source.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
82 81

  
83 82

  
84 83
		Button button = new Button(composite, SWT.PUSH);
......
90 89
			public void widgetSelected(SelectionEvent e) {
91 90
				String path = fileDialog.open();
92 91
				if(path!=null){
93
				    text_file.setText(path);
92
				    text_source.setText(path);
94 93
				    setPageComplete(true);
95 94
				}
96 95
			}
......
102 101
	}
103 102

  
104 103
	public File getFile() {
105
		return new File(text_file.getText());
104
		return new File(text_source.getText());
106 105
	}
107 106

  
108
	public URI getUri() {
107
	@Override
108
    public URI getUri() {
109 109
		return getFile().toURI();
110 110
	}
111 111

  
112 112
	@Override
113 113
	public boolean isPageComplete() {
114
		return CdmUtils.isNotBlank(text_file.getText());
114
		return CdmUtils.isNotBlank(text_source.getText());
115 115
	}
116 116

  
117 117
}

Also available in: Unified diff