Search in sources :

Example 21 with Component

use of com.vaadin.ui.Component in project charts by vaadin.

the class AbstractVaadinChartExample method setup.

protected void setup() {
    if (content.getComponentCount() == 0) {
        final Component map = getChart();
        content.addComponent(map);
        content.setExpandRatio(map, 1);
    }
}
Also used : Component(com.vaadin.ui.Component)

Example 22 with Component

use of com.vaadin.ui.Component in project charts by vaadin.

the class ContainerWithLotsOfData method getChart.

@Override
protected Component getChart() {
    HorizontalLayout lo = new HorizontalLayout();
    ContainerDataSeries container = createContainer();
    Component table = createTable(container.getVaadinContainer());
    Component chart = createChart(container);
    lo.addComponents(table);
    lo.addComponent(chart);
    table.setSizeFull();
    chart.setSizeFull();
    lo.setSizeFull();
    lo.setExpandRatio(table, 1);
    lo.setExpandRatio(chart, 5);
    return lo;
}
Also used : Component(com.vaadin.ui.Component) ContainerDataSeries(com.vaadin.v7.addon.charts.model.ContainerDataSeries) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 23 with Component

use of com.vaadin.ui.Component in project charts by vaadin.

the class ChartWithExternalDataProvider method getChart.

@Override
protected Component getChart() {
    HorizontalLayout lo = new HorizontalLayout();
    lo.setSpacing(true);
    DataProvider<Order, ?> dp = getOrderDataProvider();
    DataProviderSeries<Order> chartDataSeries1 = createChartDataSeries1(dp);
    DataProviderSeries<Order> chartDataSeries2 = createChartDataSeries2(dp);
    Component table = createGrid(dp);
    table.setSizeFull();
    Chart chart1 = createChart1(chartDataSeries1);
    chart1.setSizeFull();
    Chart chart2 = createChart2(chartDataSeries2);
    chart2.setSizeFull();
    lo.setWidth("100%");
    lo.setHeight("450px");
    lo.addComponents(table);
    lo.addComponent(chart1);
    lo.addComponent(chart2);
    lo.setExpandRatio(table, 0.2f);
    lo.setExpandRatio(chart1, 0.4f);
    lo.setExpandRatio(chart2, 0.4f);
    return lo;
}
Also used : Component(com.vaadin.ui.Component) Chart(com.vaadin.addon.charts.Chart) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 24 with Component

use of com.vaadin.ui.Component in project charts by vaadin.

the class DataProviderWithLotsOfData method getChart.

@Override
protected Component getChart() {
    HorizontalLayout lo = new HorizontalLayout();
    DataProviderSeries<Data> ds = createChartDS();
    Component grid = createGrid();
    Component chart = createChart(ds);
    lo.addComponents(grid);
    lo.addComponent(chart);
    grid.setSizeFull();
    chart.setSizeFull();
    lo.setSizeFull();
    lo.setExpandRatio(grid, 1);
    lo.setExpandRatio(chart, 5);
    return lo;
}
Also used : Component(com.vaadin.ui.Component) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 25 with Component

use of com.vaadin.ui.Component in project charts by vaadin.

the class SimpleChartWithDataProviderSeries method getChart.

@Override
protected Component getChart() {
    HorizontalLayout lo = new HorizontalLayout();
    Component table = createGrid();
    DataProviderSeries<Browser> ds = createChartDS();
    Component chart = createChart(ds);
    table.setSizeFull();
    chart.setSizeFull();
    lo.setWidth("100%");
    lo.setHeight("450px");
    lo.addComponents(table);
    lo.addComponent(chart);
    return lo;
}
Also used : Component(com.vaadin.ui.Component) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Aggregations

Component (com.vaadin.ui.Component)96 HorizontalLayout (com.vaadin.ui.HorizontalLayout)11 WebAbstractComponent (com.haulmont.cuba.web.gui.components.WebAbstractComponent)10 VerticalLayout (com.vaadin.ui.VerticalLayout)10 Button (com.vaadin.ui.Button)9 Label (com.vaadin.ui.Label)9 Test (org.junit.Test)8 Window (com.haulmont.cuba.gui.components.Window)6 CssLayout (com.vaadin.ui.CssLayout)6 List (java.util.List)6 WebWindow (com.haulmont.cuba.web.gui.WebWindow)5 Item (com.vaadin.data.Item)5 ClickEvent (com.vaadin.ui.Button.ClickEvent)5 ClickListener (com.vaadin.ui.Button.ClickListener)5 com.haulmont.cuba.gui.components (com.haulmont.cuba.gui.components)4 WebAppWorkArea (com.haulmont.cuba.web.gui.components.mainwindow.WebAppWorkArea)4 WindowBreadCrumbs (com.haulmont.cuba.web.sys.WindowBreadCrumbs)4 CubaFileUpload (com.haulmont.cuba.web.toolkit.ui.CubaFileUpload)4 com.vaadin.ui (com.vaadin.ui)4 com.haulmont.cuba.web.toolkit.ui (com.haulmont.cuba.web.toolkit.ui)3