Example usage for com.vaadin.ui ProgressBar setIndeterminate

List of usage examples for com.vaadin.ui ProgressBar setIndeterminate

Introduction

In this page you can find the example usage for com.vaadin.ui ProgressBar setIndeterminate.

Prototype

public void setIndeterminate(boolean indeterminate) 

Source Link

Document

Sets whether or not this progress indicator is indeterminate.

Usage

From source file:de.uni_tuebingen.qbic.qbicmainportlet.ProjectView.java

License:Open Source License

/**
 * /*from w  w  w  .j a  va2  s . c om*/
 */
public void loadGraph() {
    if (graphSectionContent.getComponentCount() == 0
            || !(graphSectionContent.getComponent(0) instanceof Image)) {
        ProgressBar progress = new ProgressBar();
        progress.setIndeterminate(true);
        Label info = new Label(
                "Computing the project graph can take several seconds on big projects. Please be patient.");
        info.setStyleName(ValoTheme.LABEL_SUCCESS);
        graphSectionContent.removeAllComponents();
        graphSectionContent.addComponent(progress);
        graphSectionContent.setComponentAlignment(progress, Alignment.MIDDLE_CENTER);
        Worker worker = new Worker(getCurrent());
        worker.start();
        UI.getCurrent().setPollInterval(500);
    }
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.ProjectView.java

License:Open Source License

/**
 * //from   w ww  . jav  a2s .c om
 * @param list
 * @return
 */
private Component getMembersComponent() {
    membersLayout = new HorizontalLayout();
    membersLayout.setWidth("100%");

    ProgressBar progress = new ProgressBar();
    progress.setIndeterminate(true);
    Label info = new Label(
            "Searching for members. Can take several seconds on big projects. Please be patient.");
    info.setStyleName(ValoTheme.LABEL_SUCCESS);
    membersLayout.addComponent(progress);
    MemberWorker worker = new MemberWorker();
    worker.start();
    UI.getCurrent().setPollInterval(500);

    return membersLayout;
}

From source file:eu.eco2clouds.portal.E2CPortal.java

License:Apache License

public ProgressBarWindow() {
    ProgressBar progress = new ProgressBar();
    progress.setIndeterminate(true);
    this.setContent(progress);

}

From source file:fr.univlorraine.mondossierweb.views.windows.LoadingIndicatorWindow.java

License:Apache License

public LoadingIndicatorWindow() {
    super();//w  w w .  j a  v a2 s .co  m
    setModal(true);
    setDraggable(false);
    setResizable(false);
    setClosable(false);
    addStyleName("loadingIndicatorWindow");

    VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    setContent(layout);

    ProgressBar busyIndicator = new ProgressBar();
    busyIndicator.setIndeterminate(true);
    layout.addComponent(busyIndicator);
    layout.setComponentAlignment(busyIndicator, Alignment.MIDDLE_CENTER);

    center();
}

From source file:org.ikasan.dashboard.ui.framework.window.ProgressBarWindow.java

License:BSD License

protected void init() {
    this.setModal(true);
    this.setWidth("15%");
    this.setHeight("15%");

    ProgressBar progressBar = new ProgressBar();
    progressBar.setIndeterminate(true);
    progressBar.setEnabled(true);/*from  w w w .  j a  va 2s  .  co m*/

    VerticalLayout layout = new VerticalLayout();
    layout.addComponent(progressBar);
    layout.setComponentAlignment(progressBar, Alignment.MIDDLE_CENTER);

    this.setContent(layout);
}

From source file:org.jumpmind.vaadin.ui.sqlexplorer.TableInfoPanel.java

License:Open Source License

protected void refreshData(final org.jumpmind.db.model.Table table, final String user, final IDb db,
        final Settings settings, boolean isInit) {

    if (!isInit) {
        tabSheet.removeTab(tabSheet.getTab(1));
    }//from w  w  w . j  a v  a2s. c o  m

    IDatabasePlatform platform = db.getPlatform();
    DmlStatement dml = platform.createDmlStatement(DmlType.SELECT_ALL, table, null);

    final HorizontalLayout executingLayout = new HorizontalLayout();
    executingLayout.setSizeFull();
    final ProgressBar p = new ProgressBar();
    p.setIndeterminate(true);
    final int oldPollInterval = UI.getCurrent().getPollInterval();
    UI.getCurrent().setPollInterval(100);
    executingLayout.addComponent(p);
    executingLayout.setData(isInit);
    tabSheet.addTab(executingLayout, "Data", isInit ? null : FontAwesome.SPINNER, 1);
    if (!isInit) {
        tabSheet.setSelectedTab(executingLayout);
    }

    SqlRunner runner = new SqlRunner(dml.getSql(), false, user, db, settings, explorer,
            new ISqlRunnerListener() {

                private static final long serialVersionUID = 1L;

                @Override
                public void writeSql(String sql) {
                    explorer.openQueryWindow(db).appendSql(sql);
                }

                @Override
                public void reExecute(String sql) {
                    refreshData(table, user, db, settings, false);
                }

                @Override
                public void finished(final FontAwesome icon, final List<Component> results,
                        long executionTimeInMs, boolean transactionStarted, boolean transactionEnded) {
                    VaadinSession.getCurrent().access(new Runnable() {

                        @Override
                        public void run() {
                            tabSheet.removeComponent(executingLayout);
                            VerticalLayout layout = new VerticalLayout();
                            layout.setMargin(true);
                            layout.setSizeFull();
                            if (results.size() > 0) {
                                layout.addComponent(results.get(0));
                            }
                            tabSheet.addTab(layout, "Data", null, 1);
                            UI.getCurrent().setPollInterval(oldPollInterval);
                            tabSheet.setSelectedTab(layout);
                        }
                    });
                }
            });
    runner.setShowSqlOnResults(false);
    runner.setLogAtDebug(true);
    if (!isInit) {
        runner.start();
    }

}