Revision 42c4238c
Added by Cherian Mathew over 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ClassificationChooserWizardPage.java | ||
---|---|---|
29 | 29 |
import org.eclipse.wb.swt.ResourceManager; |
30 | 30 |
|
31 | 31 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
32 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
32 | 33 |
import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory; |
33 | 34 |
|
34 | 35 |
/** |
... | ... | |
105 | 106 |
btnClear.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif")); |
106 | 107 |
btnClear.addListener(SWT.Selection, this); |
107 | 108 |
|
108 |
//report |
|
109 |
Label labelReportFile = new Label(composite, SWT.NONE); |
|
110 |
labelReportFile.setText("Report File"); |
|
109 |
if(!CdmStore.getCurrentSessionManager().isRemoting()) { |
|
110 |
//report |
|
111 |
Label labelReportFile = new Label(composite, SWT.NONE); |
|
112 |
labelReportFile.setText("Report File"); |
|
111 | 113 |
|
112 |
fileDialogReport = new FileDialog(parent.getShell());
|
|
114 |
fileDialogReport = new FileDialog(parent.getShell());
|
|
113 | 115 |
|
114 |
fileDialogReport.setFilterExtensions(new String[]{"*.*"});
|
|
116 |
fileDialogReport.setFilterExtensions(new String[]{"*.*"});
|
|
115 | 117 |
|
116 |
textFileReport = new Text(composite, SWT.BORDER);
|
|
117 |
textFileReport.setEditable(false);
|
|
118 |
textFileReport.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
|
|
118 |
textFileReport = new Text(composite, SWT.BORDER);
|
|
119 |
textFileReport.setEditable(false);
|
|
120 |
textFileReport.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
|
|
119 | 121 |
|
120 | 122 |
|
121 |
Button buttonReport = new Button(composite, SWT.PUSH);
|
|
122 |
buttonReport.setText("Browse...");
|
|
123 |
Button buttonReport = new Button(composite, SWT.PUSH);
|
|
124 |
buttonReport.setText("Browse...");
|
|
123 | 125 |
|
124 |
buttonReport.addSelectionListener(new SelectionAdapter(){
|
|
126 |
buttonReport.addSelectionListener(new SelectionAdapter(){
|
|
125 | 127 |
|
126 |
/* (non-Javadoc) |
|
127 |
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) |
|
128 |
*/ |
|
129 |
@Override |
|
130 |
public void widgetSelected(SelectionEvent e) { |
|
131 |
String path = fileDialogReport.open(); |
|
132 |
if(path!=null){ |
|
133 |
textFileReport.setText(path); |
|
134 |
setPageComplete(true); |
|
135 |
} |
|
136 |
} |
|
137 |
|
|
138 |
}); |
|
128 |
/* (non-Javadoc) |
|
129 |
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) |
|
130 |
*/ |
|
131 |
@Override |
|
132 |
public void widgetSelected(SelectionEvent e) { |
|
133 |
String path = fileDialogReport.open(); |
|
134 |
if(path!=null){ |
|
135 |
textFileReport.setText(path); |
|
136 |
setPageComplete(true); |
|
137 |
} |
|
138 |
} |
|
139 | 139 |
|
140 |
}); |
|
141 |
} |
|
140 | 142 |
setControl(composite); |
141 | 143 |
} |
142 | 144 |
|
... | ... | |
165 | 167 |
} |
166 | 168 |
|
167 | 169 |
public URI getReportUri(){ |
170 |
if(textFileReport == null) { |
|
171 |
return null; |
|
172 |
} |
|
168 | 173 |
String text = textFileReport.getText(); |
169 | 174 |
if(text==null || text.isEmpty()){ |
170 | 175 |
return null; |
Also available in: Unified diff
#5297 Integrate remoting monitor cancel functionality in ui