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.ui;
|
11
|
|
12
|
import java.util.logging.Logger;
|
13
|
|
14
|
import javax.servlet.annotation.WebServlet;
|
15
|
|
16
|
import com.vaadin.annotations.Theme;
|
17
|
import com.vaadin.annotations.VaadinServletConfiguration;
|
18
|
import com.vaadin.server.VaadinRequest;
|
19
|
import com.vaadin.server.VaadinServlet;
|
20
|
import com.vaadin.ui.UI;
|
21
|
import com.vaadin.ui.VerticalLayout;
|
22
|
|
23
|
import eu.etaxonomy.cdm.vaadin.jscomponent.D3CTree;
|
24
|
|
25
|
/**
|
26
|
* @author cmathew
|
27
|
* @date 8 Apr 2015
|
28
|
*
|
29
|
*/
|
30
|
@Theme("edit")
|
31
|
public class D3CTreeUI extends UI {
|
32
|
|
33
|
private final static Logger logger =
|
34
|
Logger.getLogger(D3CTreeUI.class.getName());
|
35
|
|
36
|
@WebServlet(value = {"/app-test/d3ctree/*"}, asyncSupported = true)
|
37
|
@VaadinServletConfiguration(productionMode = false, ui = D3CTreeUI.class, widgetset = "eu.etaxonomy.cdm.vaadin.AppWidgetSet")
|
38
|
public static class Servlet extends VaadinServlet {
|
39
|
|
40
|
}
|
41
|
|
42
|
final VerticalLayout layout = new VerticalLayout();
|
43
|
final D3CTree d3ctree = new D3CTree();
|
44
|
|
45
|
|
46
|
@Override
|
47
|
protected void init(VaadinRequest request) {
|
48
|
layout.addComponent(d3ctree); //add the diagram like any other vaadin component, cool!
|
49
|
setContent(layout);
|
50
|
}
|
51
|
|
52
|
|
53
|
}
|