List of usage examples for com.vaadin.ui VerticalLayout setSizeFull
@Override public void setSizeFull()
From source file:com.thingtrack.konekti.view.web.workbench.Main.java
License:Apache License
@Override protected void initSpringApplication(ConfigurableWebApplicationContext context) { // set konekti theme setTheme("konekti"); // get global konekti configuration getConfiguration();/*from ww w. java 2 s .c o m*/ // set main Window window = new MainWindow(name, configureI18n()); window.setStyleName("background"); setMainWindow(window); // set full size and none margin for the default window layout VerticalLayout mainLayout = (VerticalLayout) window.getContent(); mainLayout.setSizeFull(); mainLayout.setMargin(false); // Create the views createViews(); // add Konekti Layout mainLayout.addComponent(sliderView); // add module listener to list bundle install/uninstall moduleService.addListener(this); // add user change listener konektiLayout.getMenuLayout().addListenerUserChange(this); // set jira issue collector button generateJIRAIssueCollector(); // define MenuLayout Message listeners konektiLayout.getMenuLayout().addListenerApplicationClose(new IApplicationCloseEventListener() { @Override public void close() { moduleService.removeListener(Main.this); WebApplicationContext webApplicationContext = (WebApplicationContext) getMainWindow() .getApplication().getContext(); webApplicationContext.getHttpSession().invalidate(); getMainWindow().getApplication().close(); } }); }
From source file:com.thingtrack.route.planner.MainApplication.java
License:Apache License
private VerticalLayout buildMainLayout() { VerticalLayout mainLayout = new VerticalLayout(); mainLayout.setSizeFull(); routePlannerLayout = new RoutePlannerLayout(); routePlannerLayout.setSizeFull();//from w ww. jav a 2 s. c om mainLayout.addComponent(routePlannerLayout); return mainLayout; }
From source file:com.trivago.mail.pigeon.web.components.wizard.setup.SetupWizardComponent.java
License:Apache License
public SetupWizardComponent() { wizard = new Wizard(); wizard.addStep(new WizardGreetingPageComponent(), "start"); wizard.addStep(new WizardAddSenderComponent(), "sender"); wizard.addStep(new WizardAddRecipientGroupComponent(), "recipientgroup"); wizard.addStep(new WizardFinishedComponent(), "done"); wizard.setUriFragmentEnabled(false); wizard.addListener(this); wizard.setHeight("600px"); wizard.setWidth("800px"); VerticalLayout vl = new VerticalLayout(); vl.setSizeFull(); vl.setMargin(true);//from w w w .java2s.c o m vl.addComponent(wizard); vl.setComponentAlignment(wizard, Alignment.TOP_CENTER); setCompositionRoot(vl); }
From source file:com.vaadHL.window.base.BaseWindow.java
License:Apache License
/** * Creates and sets the content of the window. Uses * {@link #getCompositeContent getCompositeContent} for the content * creation. Create content but don't bind data. */// w w w .j av a2 s . co m public void setCompositeContent() { Component c = getCompositeContent(); c.setSizeFull(); VerticalLayout l = new VerticalLayout(); l.addComponent(c); l.setSizeFull(); l.setMargin(true); setContent(l); }
From source file:com.wft.ui.welcome.WFTWelcomeWindow.java
License:Apache License
public void afterPropertiesSet() throws Exception { HorizontalLayout layout = new HorizontalLayout(); layout.setSizeFull();//from w w w. j av a 2s . c o m setContent(layout); VerticalLayout leftLayout = new VerticalLayout(); leftLayout.setSizeFull(); layout.addComponent(leftLayout); layout.setExpandRatio(leftLayout, 1); VerticalLayout middleLayout = new VerticalLayout(); middleLayout.setSizeFull(); layout.addComponent(middleLayout); layout.setExpandRatio(middleLayout, 3); VerticalLayout rightLayout = new VerticalLayout(); rightLayout.setSizeFull(); layout.addComponent(rightLayout); layout.setExpandRatio(rightLayout, 1); leftLayout.addComponent(wftWelcomeProfilePanel); leftLayout.setExpandRatio(wftWelcomeProfilePanel, 1); leftLayout.addComponent(wftWelcomeTournamentsPanel); leftLayout.setExpandRatio(wftWelcomeTournamentsPanel, 1); leftLayout.addComponent(wftWelcomeCalendarPanel); leftLayout.setExpandRatio(wftWelcomeCalendarPanel, 1); middleLayout.addComponent(wftWelcomeMainPanel); rightLayout.addComponent(wftWelcomeMessagesPanel); rightLayout.setExpandRatio(wftWelcomeMessagesPanel, 1); rightLayout.addComponent(wftWelcomeChatPanel); rightLayout.setExpandRatio(wftWelcomeChatPanel, 1); setImmediate(true); }
From source file:de.catma.ui.analyzer.MarkupResultPanel.java
License:Open Source License
private void initComponents() { setSizeFull();/*from w w w . j a v a 2 s . c o m*/ HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); VerticalLayout leftComponent = new VerticalLayout(); leftComponent.setSpacing(true); leftComponent.setSizeFull(); resultTable = new TreeTable(); resultTable.setSelectable(true); resultTable.setMultiSelect(true); HierarchicalContainer container = new HierarchicalContainer(); container.setItemSorter(new PropertyDependentItemSorter(TreePropertyName.caption, new PropertyToTrimmedStringCIComparator())); resultTable.setContainerDataSource(container); resultTable.addContainerProperty(TreePropertyName.caption, String.class, null); resultTable.setColumnHeader(TreePropertyName.caption, "Tag Definition"); resultTable.addContainerProperty(TreePropertyName.sourcedocument, String.class, null); resultTable.setColumnHeader(TreePropertyName.sourcedocument, "Source Document"); resultTable.addContainerProperty(TreePropertyName.markupcollection, String.class, null); resultTable.setColumnHeader(TreePropertyName.markupcollection, "Markup Collection"); resultTable.addContainerProperty(TreePropertyName.phrase, String.class, null); resultTable.setColumnHeader(TreePropertyName.phrase, "Phrase"); resultTable.addContainerProperty(TreePropertyName.propertyname, String.class, null); resultTable.setColumnHeader(TreePropertyName.propertyname, "Property"); resultTable.addContainerProperty(TreePropertyName.propertyvalue, String.class, null); resultTable.setColumnHeader(TreePropertyName.propertyvalue, "Property value"); resultTable.addContainerProperty(TreePropertyName.frequency, Integer.class, null); resultTable.setColumnHeader(TreePropertyName.frequency, "Frequency"); resultTable.addContainerProperty(TreePropertyName.visible, AbstractComponent.class, null); resultTable.setColumnHeader(TreePropertyName.visible, "Visible in Kwic"); resultTable.setItemCaptionPropertyId(TreePropertyName.caption); resultTable.setPageLength(10); //TODO: config resultTable.setSizeFull(); resultTable.setColumnCollapsingAllowed(true); resultTable.setColumnCollapsible(TreePropertyName.caption, false); resultTable.setColumnCollapsible(TreePropertyName.sourcedocument, true); resultTable.setColumnCollapsible(TreePropertyName.markupcollection, true); resultTable.setColumnCollapsible(TreePropertyName.phrase, true); resultTable.setColumnCollapsible(TreePropertyName.propertyname, true); resultTable.setColumnCollapsible(TreePropertyName.propertyvalue, true); resultTable.setColumnCollapsible(TreePropertyName.frequency, false); resultTable.setColumnCollapsible(TreePropertyName.visible, false); //TODO: a description generator that shows the version of a Tag // resultTable.setItemDescriptionGenerator(generator); leftComponent.addComponent(resultTable); leftComponent.setExpandRatio(resultTable, 1.0f); HorizontalLayout buttonPanel = new HorizontalLayout(); buttonPanel.setSpacing(true); buttonPanel.setWidth("100%"); btDist = new Button(); btDist.setIcon(new ClassResource("ui/analyzer/resources/chart.gif", getApplication())); buttonPanel.addComponent(btDist); btResultExcelExport = new Button(); btResultExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btResultExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); buttonPanel.addComponent(btResultExcelExport); cbFlatTable = new CheckBox("flat table", false); cbFlatTable.setImmediate(true); buttonPanel.addComponent(cbFlatTable); buttonPanel.setComponentAlignment(cbFlatTable, Alignment.MIDDLE_RIGHT); buttonPanel.setExpandRatio(cbFlatTable, 1f); btSelectAll = new Button("Select all for Kwic"); buttonPanel.addComponent(btSelectAll); buttonPanel.setComponentAlignment(btSelectAll, Alignment.MIDDLE_RIGHT); // buttonPanel.setExpandRatio(btSelectAll, 1f); btDeselectAll = new Button("Deselect all for Kwic"); buttonPanel.addComponent(btDeselectAll); buttonPanel.setComponentAlignment(btDeselectAll, Alignment.MIDDLE_RIGHT); leftComponent.addComponent(buttonPanel); splitPanel.addComponent(leftComponent); VerticalLayout rightComponent = new VerticalLayout(); rightComponent.setSpacing(true); rightComponent.setSizeFull(); this.kwicPanel = new KwicPanel(repository, relevantUserMarkupCollectionProvider, true); rightComponent.addComponent(kwicPanel); rightComponent.setExpandRatio(kwicPanel, 1f); HorizontalLayout kwicButtonPanel = new HorizontalLayout(); kwicButtonPanel.setSpacing(true); kwicButtonPanel.setWidth("100%"); btKwicExcelExport = new Button(); btKwicExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btKwicExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); kwicButtonPanel.addComponent(btKwicExcelExport); kwicButtonPanel.setComponentAlignment(btKwicExcelExport, Alignment.MIDDLE_LEFT); btUntagResults = new Button("Untag selected Kwics"); kwicButtonPanel.addComponent(btUntagResults); kwicButtonPanel.setComponentAlignment(btUntagResults, Alignment.MIDDLE_RIGHT); kwicButtonPanel.setExpandRatio(btUntagResults, 1f); Label helpLabel = new Label(); helpLabel.setIcon(new ClassResource("ui/resources/icon-help.gif", getApplication())); helpLabel.setWidth("20px"); helpLabel.setDescription("<h3>Hints</h3>" + "<h4>Tagging search results</h4>" + "You can tag the search results in the Kwic-view: " + "<p>First select one or more rows and then drag the desired " + "Tag from the Tag Manager over the Kwic-results.</p>" + "<h4>Take a closer look</h4>" + "You can jump to the location in the full text by double " + "clicking on a row in the Kwic-view."); kwicButtonPanel.addComponent(helpLabel); kwicButtonPanel.setComponentAlignment(helpLabel, Alignment.MIDDLE_RIGHT); rightComponent.addComponent(kwicButtonPanel); rightComponent.setComponentAlignment(kwicButtonPanel, Alignment.MIDDLE_RIGHT); splitPanel.addComponent(rightComponent); addComponent(splitPanel); }
From source file:de.catma.ui.analyzer.PhraseResultPanel.java
License:Open Source License
private void initComponents() { setSizeFull();//from w ww . j a v a2 s.c om HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); VerticalLayout leftComponent = new VerticalLayout(); leftComponent.setSpacing(true); leftComponent.setSizeFull(); resultTable = new TreeTable(); resultTable.setSelectable(true); resultTable.setMultiSelect(true); HierarchicalContainer container = new HierarchicalContainer(); container.setItemSorter(new PropertyDependentItemSorter(TreePropertyName.caption, new PropertyToTrimmedStringCIComparator())); resultTable.setContainerDataSource(container); resultTable.addContainerProperty(TreePropertyName.caption, String.class, null); resultTable.setColumnHeader(TreePropertyName.caption, "Phrase"); resultTable.addContainerProperty(TreePropertyName.frequency, Integer.class, null); resultTable.setColumnHeader(TreePropertyName.frequency, "Frequency"); resultTable.addContainerProperty(TreePropertyName.visibleInKwic, AbstractComponent.class, null); resultTable.setColumnHeader(TreePropertyName.visibleInKwic, "Visible in Kwic"); resultTable.setItemCaptionPropertyId(TreePropertyName.caption); resultTable.setPageLength(10); //TODO: config resultTable.setSizeFull(); leftComponent.addComponent(resultTable); leftComponent.setExpandRatio(resultTable, 1.0f); HorizontalLayout buttonPanel = new HorizontalLayout(); buttonPanel.setSpacing(true); buttonPanel.setWidth("100%"); btDist = new Button(); btDist.setIcon(new ClassResource("ui/analyzer/resources/chart.gif", getApplication())); btDist.setDescription("Show selected phrases as a distribution trend in a " + "chart like visualization."); buttonPanel.addComponent(btDist); btDoubleTree = new Button(); btDoubleTree.setIcon(new ClassResource("ui/analyzer/resources/doubletree.gif", getApplication())); btDoubleTree.setDescription("Show a selected phrase with a doubletree kwic visualization."); buttonPanel.addComponent(btDoubleTree); btExcelExport = new Button(); btExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); buttonPanel.addComponent(btExcelExport); btSelectAll = new Button("Select all for Kwic"); buttonPanel.addComponent(btSelectAll); buttonPanel.setComponentAlignment(btSelectAll, Alignment.MIDDLE_RIGHT); buttonPanel.setExpandRatio(btSelectAll, 1f); btDeselectAll = new Button("Deselect all for Kwic"); buttonPanel.addComponent(btDeselectAll); buttonPanel.setComponentAlignment(btDeselectAll, Alignment.MIDDLE_RIGHT); leftComponent.addComponent(buttonPanel); splitPanel.addComponent(leftComponent); VerticalLayout rightComponent = new VerticalLayout(); rightComponent.setSpacing(true); rightComponent.setSizeFull(); this.kwicPanel = new KwicPanel(repository, relevantUserMarkupCollectionProvider); rightComponent.addComponent(kwicPanel); rightComponent.setExpandRatio(kwicPanel, 1f); HorizontalLayout kwicButtonPanel = new HorizontalLayout(); kwicButtonPanel.setSpacing(true); kwicButtonPanel.setWidth("100%"); btKwicExcelExport = new Button(); btKwicExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btKwicExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); kwicButtonPanel.addComponent(btKwicExcelExport); Label helpLabel = new Label(); helpLabel.setIcon(new ClassResource("ui/resources/icon-help.gif", getApplication())); helpLabel.setDescription("<h3>Hints</h3>" + "<h4>Tagging search results</h4>" + "You can tag the search results in the Kwic-view: " + "<p>First select one or more rows and then drag the desired " + "Tag from the Tag Manager over the Kwic-results.</p>" + "<h4>Take a closer look</h4>" + "You can jump to the location in the full text by double " + "clicking on a row in the Kwic-view." + "<h4>Untag search results</h4>" + "The \"Results by markup\" tab gives you the opportunity " + "to untag markup for selected search results in the Kwic-view."); kwicButtonPanel.addComponent(helpLabel); kwicButtonPanel.setExpandRatio(helpLabel, 1f); kwicButtonPanel.setComponentAlignment(helpLabel, Alignment.MIDDLE_RIGHT); rightComponent.addComponent(kwicButtonPanel); rightComponent.setComponentAlignment(kwicButtonPanel, Alignment.MIDDLE_RIGHT); splitPanel.addComponent(rightComponent); addComponent(splitPanel); }
From source file:de.catma.ui.repository.SourceDocumentPanel.java
License:Open Source License
private Component createOuterDocumentsPanel() { VerticalLayout outerDocumentsPanel = new VerticalLayout(); outerDocumentsPanel.setSpacing(true); outerDocumentsPanel.setMargin(false, true, true, true); outerDocumentsPanel.setSizeFull(); Component documentsPanel = createDocumentsPanel(); outerDocumentsPanel.addComponent(documentsPanel); outerDocumentsPanel.setExpandRatio(documentsPanel, 1.0f); outerDocumentsPanel.addComponent(createDocumentButtonsPanel()); return outerDocumentsPanel; }
From source file:de.catma.ui.repository.SourceDocumentPanel.java
License:Open Source License
private Component createContentInfoPanel() { VerticalLayout contentInfoPanel = new VerticalLayout(); contentInfoPanel.setSpacing(true);//from w ww.ja v a 2s .co m contentInfoPanel.setSizeFull(); contentInfoPanel.setMargin(false, false, true, true); Component contentInfoForm = createContentInfoForm(); contentInfoPanel.addComponent(contentInfoForm); contentInfoPanel.setExpandRatio(contentInfoForm, 1.0f); contentInfoPanel.addComponent(createContentInfoButtonsPanel()); return contentInfoPanel; }
From source file:de.catma.ui.repository.TagLibraryPanel.java
License:Open Source License
private Component createTagLibraryPanel() { VerticalLayout tagLibraryPanel = new VerticalLayout(); tagLibraryPanel.setSpacing(true);//from w w w. jav a 2 s. c om tagLibraryPanel.setSizeFull(); Component tagLibraryTreePanel = createTagLibraryTreePanel(); tagLibraryPanel.addComponent(tagLibraryTreePanel); tagLibraryPanel.setExpandRatio(tagLibraryTreePanel, 1.0f); tagLibraryPanel.addComponent(createTagLibraryButtonPanel()); return tagLibraryPanel; }