Revision 0fe8c1ba
Added by Katja Luther about 3 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/RightsElement.java | ||
---|---|---|
6 | 6 |
import org.eclipse.swt.events.SelectionListener; |
7 | 7 |
|
8 | 8 |
import eu.etaxonomy.cdm.model.agent.AgentBase; |
9 |
import eu.etaxonomy.cdm.model.term.TermType; |
|
10 | 9 |
import eu.etaxonomy.cdm.model.media.Rights; |
11 | 10 |
import eu.etaxonomy.cdm.model.media.RightsType; |
11 |
import eu.etaxonomy.cdm.model.term.TermType; |
|
12 | 12 |
import eu.etaxonomy.taxeditor.ui.combo.term.TermComboElement; |
13 | 13 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
14 | 14 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
15 | 15 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
16 | 16 |
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement; |
17 |
import eu.etaxonomy.taxeditor.ui.element.UriWithLabelElement; |
|
17 | 18 |
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement; |
18 | 19 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; |
19 | 20 |
|
... | ... | |
31 | 32 |
private TermComboElement<RightsType> combo_rightsType; |
32 | 33 |
private EntitySelectionElement<AgentBase> selection_agent; |
33 | 34 |
private TextWithLabelElement text; |
35 |
private TextWithLabelElement abbrev; |
|
36 |
private UriWithLabelElement uri; |
|
34 | 37 |
|
35 | 38 |
/** |
36 | 39 |
* <p> |
... | ... | |
74 | 77 |
null, EntitySelectionElement.ALL, style); |
75 | 78 |
text = formFactory.createMultiLineTextWithLabel(this, "Text", 100, |
76 | 79 |
style); |
80 |
abbrev = formFactory.createTextWithLabelElement(element, "Abbrev. Text", null, style); |
|
81 |
|
|
82 |
uri = formFactory.createUriWithLabelElement(element, "Uri", null, style); |
|
83 |
|
|
77 | 84 |
} |
78 | 85 |
|
79 | 86 |
/* |
... | ... | |
90 | 97 |
combo_rightsType.setSelection(element.getType()); |
91 | 98 |
selection_agent.setEntity(element.getAgent()); |
92 | 99 |
text.setText(element.getText()); |
100 |
abbrev.setText(element.getAbbreviatedText()); |
|
101 |
uri.setParsedText(element.getUri()); |
|
93 | 102 |
} |
94 | 103 |
|
95 | 104 |
/* |
... | ... | |
108 | 117 |
entity.setAgent(selection_agent.getSelection()); |
109 | 118 |
} else if (eventSource == text) { |
110 | 119 |
entity.setText(text.getText()); |
111 |
} |
|
120 |
}else if (eventSource == abbrev) { |
|
121 |
entity.setAbbreviatedText(abbrev.getText()); |
|
122 |
}else if (eventSource == uri) { |
|
123 |
entity.setUri(uri.parseText()); |
|
124 |
} |
|
125 |
|
|
112 | 126 |
} |
113 | 127 |
|
114 | 128 |
} |
Also available in: Unified diff
ref #7091: add abbrev. text and uri to rights