Revision 014739f7
Added by Patrick Plitzner about 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ImportFromFileDataSourceWizardPage.java | ||
---|---|---|
28 | 28 |
import eu.etaxonomy.cdm.common.CdmUtils; |
29 | 29 |
|
30 | 30 |
/** |
31 |
* <p>ImportFromFileDataSourceWizardPage class.</p> |
|
32 | 31 |
* |
33 | 32 |
* @author n.hoffmann |
34 | 33 |
* @created 04.08.2009 |
... | ... | |
45 | 44 |
|
46 | 45 |
private Text text_file; |
47 | 46 |
|
48 |
|
|
49 |
/** |
|
50 |
* <p>Constructor for ImportFromFileDataSourceWizardPage.</p> |
|
51 |
* |
|
52 |
* @param title a {@link java.lang.String} object. |
|
53 |
* @param description a {@link java.lang.String} object. |
|
54 |
* @param extensions an array of {@link java.lang.String} objects. |
|
55 |
*/ |
|
56 | 47 |
protected ImportFromFileDataSourceWizardPage(String title, String description, String[] extensions) { |
57 | 48 |
super(PAGE_NAME); |
58 | 49 |
|
... | ... | |
63 | 54 |
this.extensions = extensions; |
64 | 55 |
} |
65 | 56 |
|
66 |
/** |
|
67 |
* <p>XML</p> |
|
68 |
* |
|
69 |
* @return a {@link eu.etaxonomy.taxeditor.io.wizard.ImportFromFileDataSourceWizardPage} object. |
|
70 |
*/ |
|
71 | 57 |
protected static ImportFromFileDataSourceWizardPage XML(){ |
72 | 58 |
return new ImportFromFileDataSourceWizardPage("Xml File", "Select XML file.", new String[]{"*.xml","*.*"}); |
73 | 59 |
} |
74 | 60 |
|
75 |
|
|
76 |
|
|
77 |
/* (non-Javadoc) |
|
78 |
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) |
|
79 |
*/ |
|
80 | 61 |
/** {@inheritDoc} */ |
81 | 62 |
@Override |
82 | 63 |
public void createControl(Composite parent) { |
... | ... | |
105 | 86 |
|
106 | 87 |
button.addSelectionListener(new SelectionAdapter(){ |
107 | 88 |
|
108 |
/* (non-Javadoc) |
|
109 |
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) |
|
110 |
*/ |
|
111 | 89 |
@Override |
112 | 90 |
public void widgetSelected(SelectionEvent e) { |
113 | 91 |
String path = fileDialog.open(); |
... | ... | |
123 | 101 |
setControl(composite); |
124 | 102 |
} |
125 | 103 |
|
126 |
/** |
|
127 |
* <p>getFile</p> |
|
128 |
* |
|
129 |
* @return a {@link java.io.File} object. |
|
130 |
*/ |
|
131 | 104 |
public File getFile() { |
132 | 105 |
return new File(text_file.getText()); |
133 | 106 |
} |
134 | 107 |
|
135 |
/** |
|
136 |
* <p>getUri</p> |
|
137 |
* |
|
138 |
* @return a {@link java.net.URI} object. |
|
139 |
*/ |
|
140 | 108 |
public URI getUri() { |
141 | 109 |
return getFile().toURI(); |
142 | 110 |
} |
Also available in: Unified diff
Trim code