1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2015 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.cdm.vaadin.view;
|
11
|
|
12
|
import com.vaadin.annotations.AutoGenerated;
|
13
|
import com.vaadin.navigator.View;
|
14
|
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
|
15
|
import com.vaadin.ui.Alignment;
|
16
|
import com.vaadin.ui.CustomComponent;
|
17
|
import com.vaadin.ui.HorizontalLayout;
|
18
|
|
19
|
import eu.etaxonomy.cdm.vaadin.component.ConceptRelationshipComposite;
|
20
|
import eu.etaxonomy.cdm.vaadin.component.StatusComposite;
|
21
|
|
22
|
/**
|
23
|
* @author cmathew
|
24
|
* @date 9 Apr 2015
|
25
|
*
|
26
|
*/
|
27
|
public class ConceptRelationshipView extends CustomComponent implements View {
|
28
|
|
29
|
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */
|
30
|
|
31
|
@AutoGenerated
|
32
|
private HorizontalLayout mainLayout;
|
33
|
@AutoGenerated
|
34
|
private StatusComposite statusCompositeRight;
|
35
|
@AutoGenerated
|
36
|
private ConceptRelationshipComposite conceptRelationshipComposite;
|
37
|
@AutoGenerated
|
38
|
private StatusComposite statusCompositeLeft;
|
39
|
/**
|
40
|
* The constructor should first build the main layout, set the
|
41
|
* composition root and then do any custom initialization.
|
42
|
*
|
43
|
* The constructor will not be automatically regenerated by the
|
44
|
* visual editor.
|
45
|
*/
|
46
|
public ConceptRelationshipView() {
|
47
|
|
48
|
buildMainLayout();
|
49
|
setCompositionRoot(mainLayout);
|
50
|
|
51
|
conceptRelationshipComposite.setSizeFull();
|
52
|
}
|
53
|
|
54
|
/* (non-Javadoc)
|
55
|
* @see com.vaadin.navigator.View#enter(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent)
|
56
|
*/
|
57
|
@Override
|
58
|
public void enter(ViewChangeEvent event) {
|
59
|
// TODO Auto-generated method stub
|
60
|
|
61
|
}
|
62
|
|
63
|
@AutoGenerated
|
64
|
private HorizontalLayout buildMainLayout() {
|
65
|
// common part: create layout
|
66
|
mainLayout = new HorizontalLayout();
|
67
|
mainLayout.setImmediate(false);
|
68
|
mainLayout.setWidth("100%");
|
69
|
mainLayout.setHeight("100%");
|
70
|
mainLayout.setMargin(true);
|
71
|
|
72
|
// top-level component properties
|
73
|
setWidth("100.0%");
|
74
|
setHeight("100.0%");
|
75
|
|
76
|
// statusCompositeLeft
|
77
|
statusCompositeLeft = new StatusComposite();
|
78
|
statusCompositeLeft.setImmediate(false);
|
79
|
statusCompositeLeft.setWidth("-1px");
|
80
|
statusCompositeLeft.setHeight("-1px");
|
81
|
mainLayout.addComponent(statusCompositeLeft);
|
82
|
|
83
|
// conceptRelationshipComposite
|
84
|
conceptRelationshipComposite = new ConceptRelationshipComposite();
|
85
|
conceptRelationshipComposite.setImmediate(false);
|
86
|
conceptRelationshipComposite.setWidth("-1px");
|
87
|
conceptRelationshipComposite.setHeight("-1px");
|
88
|
mainLayout.addComponent(conceptRelationshipComposite);
|
89
|
mainLayout.setExpandRatio(conceptRelationshipComposite, 1.0f);
|
90
|
mainLayout.setComponentAlignment(conceptRelationshipComposite, new Alignment(20));
|
91
|
|
92
|
// statusCompositeRight
|
93
|
statusCompositeRight = new StatusComposite();
|
94
|
statusCompositeRight.setImmediate(false);
|
95
|
statusCompositeRight.setWidth("-1px");
|
96
|
statusCompositeRight.setHeight("-1px");
|
97
|
mainLayout.addComponent(statusCompositeRight);
|
98
|
|
99
|
return mainLayout;
|
100
|
}
|
101
|
|
102
|
}
|