Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.wintindustries.pfserver.interfaces.view.dashboard; import com.vaadin.navigator.View; import com.vaadin.navigator.ViewChangeListener; import com.vaadin.ui.Alignment; import com.vaadin.ui.CssLayout; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Label; import com.vaadin.ui.ProgressBar; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.themes.ValoTheme; /** * * @author Admin */ public class LoadingView extends VerticalLayout implements View { public LoadingView() { setSizeFull(); VerticalLayout center = new VerticalLayout(); this.addComponent(center); this.setComponentAlignment(center, Alignment.MIDDLE_CENTER); center.setHeight("180px"); HorizontalLayout info = new HorizontalLayout(); Label title = new Label("PFServer Dashboard"); title.setSizeUndefined(); title.addStyleName(ValoTheme.LABEL_H4); title.addStyleName(ValoTheme.LABEL_COLORED); // center.addComponent(title); // center.setComponentAlignment(title, Alignment.BOTTOM_CENTER); Label loading = new Label("Initalizing"); loading.addStyleName(ValoTheme.LABEL_H1); loading.addStyleName(ValoTheme.LABEL_LIGHT); info.addComponent(loading); info.addComponent(title); info.setComponentAlignment(title, Alignment.MIDDLE_RIGHT); center.addComponent(info); info.setComponentAlignment(loading, Alignment.MIDDLE_LEFT); loading.setWidth("160px"); center.setComponentAlignment(info, Alignment.MIDDLE_CENTER); // center.addComponent(loading); // center.setComponentAlignment(loading, Alignment.TOP_CENTER); ProgressBar indeterminate = new ProgressBar(); indeterminate.setIndeterminate(true); center.addComponent(indeterminate); center.setComponentAlignment(indeterminate, Alignment.TOP_CENTER); } @Override public void enter(ViewChangeListener.ViewChangeEvent event) { // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } }