Project

General

Profile

Download (2.38 KB) Statistics
| Branch: | Tag: | Revision:
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.CustomComponent;
16
import com.vaadin.ui.GridLayout;
17

    
18
import eu.etaxonomy.cdm.vaadin.component.StatusComposite;
19
import eu.etaxonomy.cdm.vaadin.presenter.StatusPresenter;
20

    
21
/**
22
 * @author cmathew
23
 * @date 11 Mar 2015
24
 *
25
 */
26
public class StatusEditorView extends CustomComponent implements View {
27

    
28
    /*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */
29

    
30
    @AutoGenerated
31
    private GridLayout mainLayout;
32
    @AutoGenerated
33
    private StatusComposite statusComposite;
34
    /**
35
     * The constructor should first build the main layout, set the
36
     * composition root and then do any custom initialization.
37
     *
38
     * The constructor will not be automatically regenerated by the
39
     * visual editor.
40
     */
41
    public StatusEditorView() {
42
        buildMainLayout();
43
        setCompositionRoot(mainLayout);
44

    
45
        new StatusPresenter(statusComposite);
46
        statusComposite.init();
47
    }
48

    
49
    @AutoGenerated
50
    private GridLayout buildMainLayout() {
51
        // common part: create layout
52
        mainLayout = new GridLayout();
53
        mainLayout.setImmediate(false);
54
        mainLayout.setWidth("100%");
55
        mainLayout.setHeight("100%");
56
        mainLayout.setMargin(true);
57
        mainLayout.setSpacing(true);
58

    
59
        // top-level component properties
60
        setWidth("100.0%");
61
        setHeight("100.0%");
62

    
63
        // statusComposite
64
        statusComposite = new StatusComposite();
65
        statusComposite.setImmediate(false);
66
        statusComposite.setWidth("-1px");
67
        statusComposite.setHeight("-1px");
68
        mainLayout.addComponent(statusComposite, 0, 0);
69

    
70
        return mainLayout;
71
    }
72

    
73
    /* (non-Javadoc)
74
     * @see com.vaadin.navigator.View#enter(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent)
75
     */
76
    @Override
77
    public void enter(ViewChangeEvent event) {
78
        // TODO Auto-generated method stub
79

    
80
    }
81

    
82
}
(4-4/4)