Revision e41cdd18
Added by Lutz Suhrbier almost 13 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/NumberWithLabelElement.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import org.eclipse.swt.SWT; |
14 | 14 |
import org.eclipse.swt.events.ModifyEvent; |
15 |
import org.eclipse.swt.widgets.Display; |
|
16 | 15 |
|
17 | 16 |
import eu.etaxonomy.cdm.common.CdmUtils; |
17 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
18 | 18 |
|
19 | 19 |
|
20 | 20 |
/** |
... | ... | |
116 | 116 |
public void modifyText(ModifyEvent event) { |
117 | 117 |
String value = text.getText(); |
118 | 118 |
if(CdmUtils.isEmpty(value)){ |
119 |
text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
|
119 |
text.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_WHITE));
|
|
120 | 120 |
return; |
121 | 121 |
} |
122 | 122 |
|
... | ... | |
129 | 129 |
} |
130 | 130 |
|
131 | 131 |
}catch(NumberFormatException e){ |
132 |
text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
|
|
132 |
text.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_RED));
|
|
133 | 133 |
firePropertyChangeEvent(new CdmPropertyChangeEvent(this, e)); |
134 | 134 |
return; |
135 | 135 |
} |
136 | 136 |
|
137 | 137 |
exception = null; |
138 |
text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
|
138 |
text.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_WHITE));
|
|
139 | 139 |
|
140 | 140 |
super.modifyText(event); |
141 | 141 |
} |
Also available in: Unified diff
Replaced any Display.getDefault() & Display,getCurrent() by DisplayProxy.getDefault() which is implemented in fragment store.rcp or store.rap respectively