Revision d12e0f5d
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/quantitative/QuantitativeDataDialog.java | ||
---|---|---|
11 | 11 |
import java.util.List; |
12 | 12 |
import java.util.stream.Collectors; |
13 | 13 |
|
14 |
import org.eclipse.jface.window.Window; |
|
14 | 15 |
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry; |
15 | 16 |
import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor; |
16 | 17 |
import org.eclipse.nebula.widgets.nattable.edit.gui.CellEditDialog; |
... | ... | |
24 | 25 |
import eu.etaxonomy.cdm.model.description.QuantitativeData; |
25 | 26 |
import eu.etaxonomy.cdm.model.description.StatisticalMeasure; |
26 | 27 |
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue; |
28 |
import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.CharacterMatrix; |
|
27 | 29 |
|
28 | 30 |
/** |
29 | 31 |
* @author pplitzner |
... | ... | |
34 | 36 |
|
35 | 37 |
private Character initialInput; |
36 | 38 |
|
37 |
public QuantitativeDataDialog(Character initialInput, Shell parentShell, Object originalCanonicalValue, ILayerCell cell, |
|
39 |
private CharacterMatrix matrix; |
|
40 |
|
|
41 |
public QuantitativeDataDialog(Character initialInput, CharacterMatrix matrix, Shell parentShell, Object originalCanonicalValue, ILayerCell cell, |
|
38 | 42 |
ICellEditor cellEditor, IConfigRegistry configRegistry) { |
39 | 43 |
super(parentShell, originalCanonicalValue, cell, cellEditor, configRegistry); |
40 | 44 |
this.initialInput = initialInput; |
45 |
this.matrix = matrix; |
|
41 | 46 |
} |
42 | 47 |
|
43 | 48 |
private QuantitativeData editorValue; |
... | ... | |
54 | 59 |
this.editorValue = editorValue; |
55 | 60 |
} |
56 | 61 |
|
62 |
@Override |
|
63 |
public boolean close() { |
|
64 |
if(getReturnCode()==Window.OK){ |
|
65 |
updateQuantitativeData(editorValue); |
|
66 |
matrix.setDirty(); |
|
67 |
} |
|
68 |
return super.close(); |
|
69 |
} |
|
70 |
|
|
57 | 71 |
void updateQuantitativeData(QuantitativeData object){ |
58 | 72 |
QuantitativeData quantitativeData = object; |
59 | 73 |
//get all non-exact values |
... | ... | |
74 | 88 |
} catch (NumberFormatException e) { |
75 | 89 |
} |
76 | 90 |
} |
77 |
|
|
78 | 91 |
} |
79 | 92 |
|
80 | 93 |
} |
Also available in: Unified diff
ref #7575 Enable quantitative dialog cell editor