Revision f561b00c
Added by Niels Hoffmann about 13 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/TaxonBaseSelectionElement.java | ||
---|---|---|
12 | 12 |
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement; |
13 | 13 |
|
14 | 14 |
/** |
15 |
* <p>TaxonBaseSelectionElement class.</p> |
|
16 |
* |
|
15 |
* <p> |
|
16 |
* TaxonBaseSelectionElement class. |
|
17 |
* </p> |
|
18 |
* |
|
17 | 19 |
* @author nho |
18 | 20 |
* @version $Id: $ |
19 | 21 |
*/ |
20 |
public class TaxonBaseSelectionElement extends AbstractSelectionElement<TaxonBase> { |
|
22 |
public class TaxonBaseSelectionElement extends |
|
23 |
AbstractSelectionElement<TaxonBase> { |
|
24 |
|
|
25 |
public static final int DEFAULT = DELETABLE; |
|
21 | 26 |
|
22 | 27 |
/** |
23 |
* <p>Constructor for TaxonBaseSelectionElement.</p> |
|
24 |
* |
|
25 |
* @param labelString a {@link java.lang.String} object. |
|
26 |
* @param selection a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object. |
|
27 |
* @param style a int. |
|
28 |
* @param toolkit a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object. |
|
29 |
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. |
|
30 |
* @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object. |
|
28 |
* <p> |
|
29 |
* Constructor for TaxonBaseSelectionElement. |
|
30 |
* </p> |
|
31 |
* |
|
32 |
* @param labelString |
|
33 |
* a {@link java.lang.String} object. |
|
34 |
* @param selection |
|
35 |
* a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object. |
|
36 |
* @param style |
|
37 |
* a int. |
|
38 |
* @param toolkit |
|
39 |
* a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} |
|
40 |
* object. |
|
41 |
* @param conversation |
|
42 |
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} |
|
43 |
* object. |
|
44 |
* @param parentElement |
|
45 |
* a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} |
|
46 |
* object. |
|
31 | 47 |
*/ |
32 |
public TaxonBaseSelectionElement(CdmFormFactory toolkit, ConversationHolder conversation, ICdmFormElement parentElement, String labelString, |
|
33 |
TaxonBase selection, int style) { |
|
34 |
super(toolkit, conversation, parentElement, labelString, selection, false, false, true, style); } |
|
48 |
public TaxonBaseSelectionElement(CdmFormFactory toolkit, |
|
49 |
ConversationHolder conversation, ICdmFormElement parentElement, |
|
50 |
String labelString, TaxonBase selection, int mode, int style) { |
|
51 |
super(toolkit, conversation, parentElement, labelString, selection, |
|
52 |
mode, style); |
|
53 |
} |
|
35 | 54 |
|
36 |
/* (non-Javadoc) |
|
37 |
* @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) |
|
55 |
/* |
|
56 |
* (non-Javadoc) |
|
57 |
* |
|
58 |
* @see |
|
59 |
* org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt |
|
60 |
* .events.SelectionEvent) |
|
38 | 61 |
*/ |
39 | 62 |
/** {@inheritDoc} */ |
63 |
@Override |
|
40 | 64 |
public void widgetSelected(SelectionEvent e) { |
41 |
TaxonBase newSelection = TaxonBaseSelectionDialog.selectTaxonBase(getShell(), getConversationHolder()); |
|
65 |
TaxonBase newSelection = TaxonBaseSelectionDialog.selectTaxonBase( |
|
66 |
getShell(), getConversationHolder()); |
|
42 | 67 |
setSelectionInternal(newSelection); |
43 | 68 |
} |
44 | 69 |
|
Also available in: Unified diff
Refactoring selection elements so they can be configured