Revision f1a1f6de
Added by Cherian Mathew almost 9 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/ConceptRelationshipView.java | ||
---|---|---|
10 | 10 |
package eu.etaxonomy.cdm.vaadin.view; |
11 | 11 |
|
12 | 12 |
import java.util.Arrays; |
13 |
import java.util.UUID; |
|
14 | 13 |
|
15 | 14 |
import com.vaadin.annotations.AutoGenerated; |
16 | 15 |
import com.vaadin.data.Container; |
... | ... | |
74 | 73 |
buildMainLayout(); |
75 | 74 |
setCompositionRoot(mainLayout); |
76 | 75 |
|
76 |
|
|
77 | 77 |
conceptRelationshipComposite.setView(this); |
78 | 78 |
|
79 |
setPrimaryStatusCompositeUuid(statusCompositeLeft.getSelectedClassificationUuid());
|
|
79 |
setPrimaryStatusCompositeUuid(statusCompositeLeft); |
|
80 | 80 |
direction = Direction.LEFT_RIGHT; |
81 | 81 |
CdmVaadinSessionUtilities.getCurrentBasicEventService().register(this); |
82 | 82 |
|
... | ... | |
103 | 103 |
statusCompositeRight.getTaxaTreeTable().setDropHandler(new ConceptRelationshipDropHandler(statusCompositeLeft)); |
104 | 104 |
} |
105 | 105 |
|
106 |
public void setPrimaryStatusCompositeUuid(UUID scUuid) {
|
|
107 |
if(scUuid != null) {
|
|
108 |
if(scUuid.equals(statusCompositeLeft.getSelectedClassificationUuid())) {
|
|
106 |
public void setPrimaryStatusCompositeUuid(StatusComposite sc) {
|
|
107 |
if(sc != null) { |
|
108 |
if(sc == statusCompositeLeft) {
|
|
109 | 109 |
primaryStatusComposite = statusCompositeLeft; |
110 | 110 |
secondaryStatusComposite = statusCompositeRight; |
111 | 111 |
direction = Direction.LEFT_RIGHT; |
112 | 112 |
} |
113 |
if(scUuid.equals(statusCompositeRight.getSelectedClassificationUuid())) {
|
|
113 |
if(sc == statusCompositeRight) {
|
|
114 | 114 |
secondaryStatusComposite = statusCompositeLeft; |
115 | 115 |
primaryStatusComposite = statusCompositeRight; |
116 | 116 |
direction = Direction.RIGHT_LEFT; |
... | ... | |
218 | 218 |
statusCompositeLeft.setHeight("100.0%"); |
219 | 219 |
mainLayout.addComponent(statusCompositeLeft); |
220 | 220 |
mainLayout.setExpandRatio(statusCompositeLeft, 1.0f); |
221 |
mainLayout.setComponentAlignment(statusCompositeLeft, new Alignment(20)); |
|
221 | 222 |
|
222 | 223 |
// conceptRelationshipComposite |
223 | 224 |
conceptRelationshipComposite = new ConceptRelationshipComposite(); |
224 | 225 |
conceptRelationshipComposite.setImmediate(false); |
225 |
conceptRelationshipComposite.setWidth("-1px");
|
|
226 |
conceptRelationshipComposite.setWidth("100.0%");
|
|
226 | 227 |
conceptRelationshipComposite.setHeight("100.0%"); |
227 | 228 |
mainLayout.addComponent(conceptRelationshipComposite); |
228 |
mainLayout.setExpandRatio(conceptRelationshipComposite, 2.0f);
|
|
229 |
mainLayout.setExpandRatio(conceptRelationshipComposite, 2.3f);
|
|
229 | 230 |
mainLayout.setComponentAlignment(conceptRelationshipComposite, new Alignment(20)); |
230 | 231 |
|
231 | 232 |
// statusCompositeRight |
... | ... | |
235 | 236 |
statusCompositeRight.setHeight("100.0%"); |
236 | 237 |
mainLayout.addComponent(statusCompositeRight); |
237 | 238 |
mainLayout.setExpandRatio(statusCompositeRight, 1.0f); |
238 |
mainLayout.setComponentAlignment(statusCompositeRight, new Alignment(6));
|
|
239 |
mainLayout.setComponentAlignment(statusCompositeRight, new Alignment(20));
|
|
239 | 240 |
|
240 | 241 |
return mainLayout; |
241 | 242 |
} |
Also available in: Unified diff
ConceptRelationshipComposite, ConceptRelationshipView : using source from event to set primary composite
LeafNodeTaxonContainer : checking for nulls
SelectionEvent : added source object as member
StatusComposite : adding component as source instead of in the list of objects
D3ConceptRelationshipTree, ConceptRelationshipPresenterTest (.xml) : added method to compute abbreviated name
d3.conceptrelationshiptree_connector.js : updated text with from taxon position below and differentiation with italics and color