List of usage examples for com.vaadin.ui VerticalLayout VerticalLayout
public VerticalLayout(Component... children)
From source file:annis.gui.docbrowser.DocBrowserController.java
License:Apache License
public void openDocVis(String corpus, String doc, Visualizer visConfig, Button btn) { final String canonicalTitle = corpus + " > " + doc + " - " + "Visualizer: " + visConfig.getDisplayName(); final String tabCaption = StringUtils.substring(canonicalTitle, 0, 15) + "..."; if (visibleVisHolder.containsKey(canonicalTitle)) { Panel visHolder = visibleVisHolder.get(canonicalTitle); ui.getSearchView().getTabSheet().setSelectedTab(visHolder); return;// w w w . j a va2 s. com } Panel visHolder = new Panel(); visHolder.setSizeFull(); visHolder.addDetachListener(new ClientConnector.DetachListener() { @Override public void detach(ClientConnector.DetachEvent event) { visibleVisHolder.remove(canonicalTitle); } }); // first set loading indicator ProgressBar progressBar = new ProgressBar(1.0f); progressBar.setIndeterminate(true); progressBar.setSizeFull(); VerticalLayout layoutProgress = new VerticalLayout(progressBar); layoutProgress.setSizeFull(); layoutProgress.setComponentAlignment(progressBar, Alignment.MIDDLE_CENTER); visHolder.setContent(layoutProgress); Tab visTab = ui.getSearchView().getTabSheet().addTab(visHolder, tabCaption); visTab.setDescription(canonicalTitle); visTab.setIcon(EYE_ICON); visTab.setClosable(true); ui.getSearchView().getTabSheet().setSelectedTab(visTab); // register visible visHolder this.visibleVisHolder.put(canonicalTitle, visHolder); Background.run(new DocVisualizerFetcher(corpus, doc, canonicalTitle, visConfig.getType(), visHolder, visConfig, btn, UI.getCurrent())); }
From source file:ch.bfh.ti.soed.hs16.srs.black.view.reservationView.ReservationTableView.java
License:Open Source License
public ReservationTableView() { Panel panel = new Panel("My Reservations"); table = new Table(); table.addContainerProperty("RoomEntity", Integer.class, null); table.addContainerProperty("Start Time", Date.class, null); table.addContainerProperty("End Time", Date.class, null); table.addContainerProperty("Cancel", Button.class, null); table.setPageLength(table.size());/* w w w . j av a 2 s . c om*/ panel.setContent(table); listReservations = new VerticalLayout(panel); listReservations.setSizeUndefined(); listReservations.setMargin(true); }
From source file:com.constellio.app.ui.pages.management.updates.UpdateManagerViewImpl.java
@Override protected Component buildMainComponent(ViewChangeEvent event) { layout = new VerticalLayout( buildInfoItem($("UpdateManagerViewImpl.version"), presenter.getCurrentVersion())); layout.setSpacing(true);/*from w ww. j ava2s .c o m*/ layout.setWidth("100%"); LicenseInfo info = presenter.getLicenseInfo(); if (info != null) { layout.addComponents(buildInfoItem($("UpdateManagerViewImpl.clientName"), info.getClientName()), buildInfoItem($("UpdateManagerViewImpl.expirationDate"), info.getExpirationDate())); } Component messagePanel = buildMessagePanel(); layout.addComponent(messagePanel); panel = new VerticalLayout(); layout.addComponent(panel); layout.setSpacing(true); showStandardUpdatePanel(); return layout; }
From source file:com.github.carljmosca.ui.EventsView.java
@PostConstruct private void init() { sdf = new SimpleDateFormat("MM/dd/yy HH:mm"); setCaption("Events"); grid = new Grid<>(Events.class); grid.addColumn(p -> p.getName() + ": " + sdf.format(p.getStartTime()) + " " + p.getCause()) .setCaption("Name/Start").setId("nameAndStart"); grid.setColumns("nameAndStart"); grid.setHeightMode(HeightMode.ROW);//from w ww . j av a 2 s . c o m grid.setHeightByRows(10.0d); grid.setSelectionMode(Grid.SelectionMode.SINGLE); grid.addSelectionListener((SelectionEvent<Events> event) -> { DemoUI demoUI = (DemoUI) UI.getCurrent(); demoUI.setEventId(grid.getSelectedItems().stream().findFirst().get().getEventsPK().getId()); getNavigationManager().navigateTo(framesView); }); grid.setSizeUndefined(); VerticalLayout gridLayout = new VerticalLayout(grid); gridLayout.setSizeFull(); SimpleDateFormat dtf = new SimpleDateFormat("yy-MM-dd hh:mm"); setContent(gridLayout); }