Revision a1fbc94a
Added by Katja Luther over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/DateDetailSection.java | ||
---|---|---|
55 | 55 |
text_parseText.getMainControl().setToolTipText(Messages.DateDetail_parseText_tooltip); |
56 | 56 |
partialElement_start = formFactory.createPartialElement(this, |
57 | 57 |
"Start ", null, style); |
58 |
|
|
59 |
period_continue = formFactory.createCheckbox(this, "Continue", false, style); |
|
60 |
period_continue.getMainControl().setLayoutData(LayoutConstants.FILL_HORIZONTALLY(6,1)); |
|
58 | 61 |
partialElement_end = formFactory.createPartialElement(this, "End ", |
59 | 62 |
null, style); |
60 |
period_continue = formFactory.createCheckbox(this, "Continue", false, style); |
|
61 |
period_continue.getMainControl().setLayoutData(LayoutConstants.FILL_HORIZONTALLY(6,1)); |
|
63 |
|
|
62 | 64 |
if (includeVerbatim){ |
63 | 65 |
text_VerbatimDate = formFactory.createTextWithLabelElement(this, |
64 | 66 |
"Verbatim Date", null, style); |
... | ... | |
135 | 137 |
period_continue.setSelection(timePeriod.isContinued()); |
136 | 138 |
if (timePeriod.isContinued()){ |
137 | 139 |
partialElement_end.setEnabled(false); |
140 |
|
|
138 | 141 |
} |
139 | 142 |
((Text) getText_parseText().getMainControl()).setSelection(cursorPosition); |
140 | 143 |
text_freeText.setText(timePeriod.getFreeText()); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java | ||
---|---|---|
19 | 19 |
import org.joda.time.Partial; |
20 | 20 |
|
21 | 21 |
import eu.etaxonomy.cdm.model.common.TimePeriod; |
22 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
|
23 |
import eu.etaxonomy.taxeditor.preference.Resources; |
|
22 | 24 |
|
23 | 25 |
/** |
24 | 26 |
* <p>PartialElement class.</p> |
... | ... | |
154 | 156 |
this.number_day.setEnabled(enabled); |
155 | 157 |
this.number_month.setEnabled(enabled); |
156 | 158 |
this.number_year.setEnabled(enabled); |
159 |
if (!enabled){ |
|
160 |
this.number_year.getMainControl().setBackground(AbstractUtility.getColor(Resources.COLOR_TEXT_DISABLED_BACKGROUND)); |
|
161 |
this.number_month.getMainControl().setBackground(AbstractUtility.getColor(Resources.COLOR_TEXT_DISABLED_BACKGROUND)); |
|
162 |
this.number_day.getMainControl().setBackground(AbstractUtility.getColor(Resources.COLOR_TEXT_DISABLED_BACKGROUND)); |
|
163 |
}else{ |
|
164 |
this.number_year.getMainControl().setBackground(getPersistentBackground()); |
|
165 |
this.number_month.getMainControl().setBackground(getPersistentBackground()); |
|
166 |
this.number_day.getMainControl().setBackground(getPersistentBackground()); |
|
167 |
} |
|
157 | 168 |
} |
158 | 169 |
|
159 | 170 |
/** |
Also available in: Unified diff
fix #7717: color of end fields in partial element are grey if disabled