Revision 036b1573
Added by Katja Luther over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/DateDetailSection.java | ||
---|---|---|
8 | 8 |
import eu.etaxonomy.cdm.model.common.TimePeriod; |
9 | 9 |
import eu.etaxonomy.cdm.model.common.VerbatimTimePeriod; |
10 | 10 |
import eu.etaxonomy.cdm.strategy.parser.TimePeriodParser; |
11 |
import eu.etaxonomy.taxeditor.l10n.Messages; |
|
11 | 12 |
|
12 |
public class DateDetailSection<T extends TimePeriod>
|
|
13 |
public class DateDetailSection<T extends TimePeriod> |
|
13 | 14 |
extends AbstractFormSection<T> { |
14 | 15 |
protected TextWithLabelElement text_freeText; |
15 | 16 |
private PartialElement partialElement_start; |
... | ... | |
46 | 47 |
super(formFactory, parentElement, style); |
47 | 48 |
|
48 | 49 |
this.includeVerbatim = includeVerbatim; |
50 |
text_parseText = formFactory.createTextWithLabelElement(this, "Parse", |
|
51 |
null, style); |
|
52 |
text_parseText.getMainControl().setLayoutData( |
|
53 |
LayoutConstants.FILL_HORIZONTALLY(6, 1)); |
|
54 |
text_parseText.getMainControl().setToolTipText(Messages.DateDetail_parseText_tooltip); |
|
49 | 55 |
partialElement_start = formFactory.createPartialElement(this, |
50 | 56 |
"Start ", null, style); |
51 | 57 |
partialElement_end = formFactory.createPartialElement(this, "End ", |
... | ... | |
58 | 64 |
LayoutConstants.FILL_HORIZONTALLY(6, 1)); |
59 | 65 |
} |
60 | 66 |
|
61 |
setText_parseText(formFactory.createTextWithLabelElement(this, "Parse", |
|
62 |
null, style)); |
|
63 |
getText_parseText().getMainControl().setLayoutData( |
|
64 |
LayoutConstants.FILL_HORIZONTALLY(6, 1)); |
|
67 |
|
|
65 | 68 |
|
66 | 69 |
text_freeText = formFactory.createTextWithLabelElement(this, |
67 | 70 |
"Freetext", null, style); |
... | ... | |
80 | 83 |
} |
81 | 84 |
return super.getEntity(); |
82 | 85 |
} |
83 |
|
|
86 |
|
|
84 | 87 |
@SuppressWarnings("unchecked") |
85 | 88 |
protected T newInstance(){ |
86 | 89 |
if (includeVerbatim){ |
... | ... | |
89 | 92 |
return (T)TimePeriod.NewInstance(); |
90 | 93 |
} |
91 | 94 |
} |
92 |
|
|
95 |
|
|
93 | 96 |
@SuppressWarnings("unchecked") |
94 | 97 |
protected T parseNewInstance() { |
95 | 98 |
if (includeVerbatim){ |
... | ... | |
100 | 103 |
return result; |
101 | 104 |
} |
102 | 105 |
} |
103 |
|
|
104 |
|
|
106 |
|
|
107 |
|
|
105 | 108 |
/** |
106 | 109 |
* <p> |
107 | 110 |
* Setter for the field <code>timePeriod</code>. |
Also available in: Unified diff
move the parse field at the top of datedetails and add tooltip