Revision 36fdf767
Added by Andreas Müller about 3 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ToggleableTextElement.java | ||
---|---|---|
24 | 24 |
import org.eclipse.swt.widgets.Label; |
25 | 25 |
import org.eclipse.swt.widgets.Text; |
26 | 26 |
|
27 |
import eu.etaxonomy.cdm.common.CdmUtils; |
|
27 | 28 |
import eu.etaxonomy.taxeditor.l10n.Messages; |
28 | 29 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
29 | 30 |
import eu.etaxonomy.taxeditor.model.ImageResources; |
... | ... | |
40 | 41 |
private final Text text_cache; |
41 | 42 |
private final Button btnToggleProtectTitleCache; |
42 | 43 |
private boolean state; |
43 |
private final Set<SelectionListener> selectionListener = new HashSet<SelectionListener>();
|
|
44 |
private final Set<SelectionListener> selectionListener = new HashSet<>(); |
|
44 | 45 |
private final Label label; |
45 | 46 |
private final Composite container; |
46 | 47 |
|
... | ... | |
185 | 186 |
public void setSelected(boolean selected) { |
186 | 187 |
setBackground(selected ? SELECTED : getPersistentBackground()); |
187 | 188 |
} |
189 |
|
|
190 |
@Override |
|
191 |
public String toString() { |
|
192 |
if (label != null){ |
|
193 |
return CdmUtils.concat("ComboElement", label.getText()); |
|
194 |
}else{ |
|
195 |
return super.toString(); |
|
196 |
} |
|
197 |
} |
|
198 |
|
|
188 | 199 |
} |
Also available in: Unified diff
cleanup