List of usage examples for com.vaadin.ui HorizontalSplitPanel setSizeFull
@Override public void setSizeFull()
From source file:edu.cornell.qatarmed.planrnaseq.BrowseAndAnnotate.java
public void initLayout() { /* Root of the user interface component tree is set */ VerticalLayout mainLayout = new VerticalLayout(); Label titleLabel = new Label("<span style=\"color:rgb(255,255,255)\">MetaRNA-Seq: An interactive " + "tool to browse and annotate RNA-Seq meta-data</span>", ContentMode.HTML); titleLabel.addStyleName("maintitle"); HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); mainLayout.addComponent(titleLabel); mainLayout.addComponent(splitPanel); setContent(mainLayout);//from w w w . ja va2 s.c o m splitPanel.setSizeFull(); mainLayout.setSizeFull(); mainLayout.setExpandRatio(splitPanel, 1); /* Build the component tree */ // VerticalLayout leftLayout = new VerticalLayout(); // moved this to class level as it is been accessed by other function VerticalSplitPanel rightSplitPanel = new VerticalSplitPanel(); // VerticalSplitPanel leftSplitPanel = new VerticalSplitPanel(); splitPanel.addComponent(leftLayout); splitPanel.addComponent(rightSplitPanel); VerticalLayout rightTopLayout = new VerticalLayout(); // rightTopLayout.addComponent(rightTopForm); rightTopTabsheet.setSizeFull(); rightTopLayout.addComponent(rightTopTabsheet); rightTopTabsheet.addTab(startHelpLayout, "Start Help"); StartHelp sh = new StartHelp(); startHelpLayout.addComponent(sh); rightTopTabsheet.addTab(rightTopForm, "Study Details"); rightTopTabsheet.addTab(rightTopAnnotationForm, "Annotate"); rightTopLayout.setSizeFull(); rightSplitPanel.addComponent(rightTopLayout); HorizontalSplitPanel rightBottomLayout = new HorizontalSplitPanel(); // HorizontalLayout rightBottomLayout = new HorizontalLayout(); VerticalLayout rightBottomLeftLayout = new VerticalLayout(); VerticalLayout rightBottomRightLayout = new VerticalLayout(); rightBottomLayout.addComponent(rightBottomLeftLayout); rightBottomLayout.addComponent(rightBottomRightLayout); // rightBottomLayout.setExpandRatio(rightBottomLeftLayout, 1); // rightBottomLayout.setExpandRatio(rightBottomRightLayout, 3); rightBottomLayout.setSplitPosition(30f, Unit.PERCENTAGE); rightBottomLayout.setSizeFull(); rightBottomTabsheet.setSizeFull(); rightSplitPanel.addComponent(rightBottomLayout); splitPanel.setSplitPosition(50f, Unit.PERCENTAGE); //HorizontalLayout leftTopLayout = new HorizontalLayout(); // moved this to class level as it is been accessed by other function leftLayout.addComponent(leftTopLayout); leftTopLayout.addComponent(searchField); leftTopLayout.addComponent(searchButton); leftTopLayout.addComponent(slowSearchButton); leftTopLayout.addComponent(guidedSearchButton); leftTopLayout.setWidth("100%"); searchField.setWidth("100%"); leftTopLayout.setExpandRatio(searchField, 1); leftLayout.addComponent(bioprojectSummaryTable); // leftLayout.setExpandRatio(searchField, 0); leftLayout.setExpandRatio(bioprojectSummaryTable, 1); bioprojectSummaryTable.setSizeFull(); /* Set the contents in the left of the split panel to use all the space */ leftLayout.setSizeFull(); rightBottomLeftLayout.addComponent(tree); rightBottomRightLayout.addComponent(rightBottomTabsheet); rightBottomTabsheet.addTab(myform, "Details of selected Item"); myform.setSizeFull(); VerticalLayout rbTabBiosampleSummaryLayout = new VerticalLayout(); // Right bottom Biosample Summary // rightBottomTabsheet.addTab(rbTabBiosampleSummaryLayout, "All Biosamples"); rbTabBiosampleSummaryLayout.addComponent(biosampleSummaryTable); rbTabBiosampleSummaryLayout.setSizeFull(); initDataAndSubcomponent(); rightTopLayout.setSizeFull(); rightBottomRightLayout.setSizeFull(); }
From source file:fi.jasoft.feedreader.ui.ReaderUI.java
License:Apache License
@Override protected void init(WrappedRequest request) { // Create data tables feedTable = createFeedsTable();/* w ww.j a va2 s .c o m*/ entryTable = createEntriesTable(); // Create the main horizontal split panel HorizontalSplitPanel content = new HorizontalSplitPanel(); content.setStyleName(Reindeer.SPLITPANEL_SMALL); content.setSizeFull(); setContent(content); // Create the content of the left part of the main split panel VerticalLayout vl = new VerticalLayout(); vl.setSizeFull(); vl.addComponent(feedTable); Button addFeedBtn = new Button("Add RSS/Atom feed", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { addFeed(); } }); addFeedBtn.setWidth("100%"); vl.addComponent(addFeedBtn); vl.setExpandRatio(feedTable, 1); content.setFirstComponent(vl); content.setSplitPosition(30); // Create and set the content of the right part of the main split panel VerticalSplitPanel rightPane = new VerticalSplitPanel(); rightPane.setStyleName(Reindeer.SPLITPANEL_SMALL); rightPane.setSizeFull(); rightPane.addComponent(entryTable); entryPanel.setSizeFull(); rightPane.addComponent(entryPanel); content.addComponent(rightPane); rightPane.setSplitPosition(30); if (feeds.size() > 0) { feedTable.setValue(feeds.getItemIds().iterator().next()); } }
From source file:fi.jasoft.qrcode.demo.QRCodeDemo.java
License:Apache License
@Override protected void init(VaadinRequest request) { VerticalLayout content = new VerticalLayout(); content.setSizeFull();/* w ww.j a v a2 s . c o m*/ setContent(content); Label header = new Label("QR Code Generator"); header.setStyleName(ValoTheme.LABEL_H2); content.addComponent(header); HorizontalSplitPanel root = new HorizontalSplitPanel(); root.setSizeFull(); root.setSplitPosition(50, Unit.PERCENTAGE); root.setLocked(true); Panel panel = new Panel(root); panel.setSizeFull(); content.addComponent(panel); content.setExpandRatio(panel, 1); VerticalLayout first = new VerticalLayout(); first.setSizeFull(); root.setFirstComponent(first); first.addComponent( new HorizontalLayout(createPrimaryColorSelect(), createSecondaryColorSelect(), createSizeSelect())); code = new QRCode(); code.setWidth("100px"); code.setHeight("100px"); final TextArea text = new TextArea("Text embedded in QR Code"); text.setPlaceholder("Type the message of the QR code here"); text.setSizeFull(); text.setValueChangeMode(ValueChangeMode.LAZY); text.addValueChangeListener(e -> { code.setValue(e.getValue()); }); first.addComponent(text); first.setExpandRatio(text, 1); VerticalLayout vl = new VerticalLayout(); vl.setSizeFull(); vl.addComponent(code); vl.setComponentAlignment(code, Alignment.MIDDLE_CENTER); root.setSecondComponent(vl); }
From source file:hu.fnf.devel.wishbox.ui.MainPage.java
License:Open Source License
@Override protected void init(VaadinRequest vaadinRequest) { PropertysetItem item = new PropertysetItem(); item.addItemProperty("name", new ObjectProperty<String>("Zaphod")); item.addItemProperty("age", new ObjectProperty<Integer>(42)); // Have some layout FormLayout form = new FormLayout(); HorizontalLayout footer = new HorizontalLayout(); footer.addComponent(new Button("cica")); footer.addComponent(new Button("kutya")); // Now create a binder that can also create the fields // using the default field factory FieldGroup binder = new FieldGroup(item); form.addComponent(binder.buildAndBind("Name", "name")); form.addComponent(binder.buildAndBind("Age", "age")); HorizontalSplitPanel sample = new HorizontalSplitPanel(); sample.setSizeFull(); VerticalSplitPanel verticalSplitPanel = new VerticalSplitPanel(); verticalSplitPanel.setFirstComponent(form); verticalSplitPanel.setSecondComponent(new Label("masodik")); sample.setSecondComponent(verticalSplitPanel); Table grid = new Table(); grid.setSizeFull();/*from w ww. j av a 2 s. c om*/ for (Object i : getItemContiner().getItemIds()) { System.out.println("item ids: " + i.toString()); } grid.setContainerDataSource(getItemContiner()); grid.setSelectable(true); grid.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent valueChangeEvent) { final String valueString = String.valueOf(valueChangeEvent.getProperty().getValue()); Notification.show("Value changed:", valueString, Notification.Type.TRAY_NOTIFICATION); } }); sample.setFirstComponent(grid); setContent(sample); // Main window is the primary browser window final Window main = new Window("Hello window"); addWindow(main); // "Hello world" text is added to window as a Label component UserService userService = UserServiceFactory.getUserService(); User user = userService.getCurrentUser(); if (user != null) { String email = user.getEmail(); } else { // no user logged in } assert user != null; main.setContent(new Label(user.getUserId())); }
From source file:myGroup.gwt.client.ui.MyUI.java
License:Open Source License
@Override protected void init(VaadinRequest vaadinRequest) { HorizontalSplitPanel sample = new HorizontalSplitPanel(); sample.setSizeFull(); // sample.setSplitPosition(150.0f, PIXELS); sample.setSecondComponent(new Label("korte")); setContent(sample);/*ww w . j av a2s .c o m*/ Table grid = new Table(); grid.setSizeFull(); for (Object i : getItemContiner().getItemIds()) { System.out.println(i.toString()); } grid.setContainerDataSource(getItemContiner()); grid.setSelectable(true); grid.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent valueChangeEvent) { final String valueString = String.valueOf(valueChangeEvent.getProperty().getValue()); Notification.show("Value changed:", valueString, Notification.Type.TRAY_NOTIFICATION); } }); sample.setFirstComponent(grid); // Main window is the primary browser window final Window main = new Window("Hello window"); addWindow(main); // "Hello world" text is added to window as a Label component UserService userService = UserServiceFactory.getUserService(); User user = userService.getCurrentUser(); if (user != null) { String email = user.getEmail(); } else { // no user logged in } assert user != null; main.setContent(new Label(user.getUserId())); }
From source file:org.bull.examples.vaadin.osgi.portal.PortalOSGiApplication.java
License:Open Source License
@Override public void init(VaadinRequest request) { HorizontalSplitPanel split = new HorizontalSplitPanel(); split.setSizeFull(); split.setSplitPosition(250, Unit.PIXELS); tree = new Tree(); for (PortalModule module : getPortalModuleService().getModules()) { tree.addItem(module.getId());//ww w . j av a 2 s .c o m tree.setItemCaption(module.getId(), module.getName()); } tree.addItemClickListener(new ItemClickListener() { @Override public void itemClick(ItemClickEvent event) { PortalModule module = getPortalModuleService().getModule((String) event.getItemId()); Iterator<Component> it = tabs.iterator(); Component found = null; while (it.hasNext()) { Component c = it.next(); if (tabs.getTab(c).getCaption().equals(module.getName())) { found = c; break; } } if (found == null) { Tab addTab = tabs.addTab(module.createComponent(eventBus), module.getName()); addTab.setClosable(true); } else { tabs.setSelectedTab(found); } } }); tabs = new TabSheet(); tabs.setSizeFull(); split.setFirstComponent(tree); split.setSecondComponent(tabs); setContent(split); getPortalModuleService().addListener(this); }
From source file:org.jumpmind.metl.ui.views.AdminView.java
License:Open Source License
@PostConstruct protected void init() { setSizeFull();/*ww w . java 2 s . co m*/ tabbedPanel = new TabbedPanel(); HorizontalSplitPanel leftSplit = new HorizontalSplitPanel(); leftSplit.setSizeFull(); leftSplit.setSplitPosition(AppConstants.DEFAULT_LEFT_SPLIT, Unit.PIXELS); VerticalLayout container = new VerticalLayout(); container.setSizeFull(); container.addComponent(tabbedPanel); leftSplit.setSecondComponent(container); table = new TreeTable(); table.addStyleName(ValoTheme.TREETABLE_NO_HORIZONTAL_LINES); table.addStyleName(ValoTheme.TREETABLE_NO_STRIPES); table.addStyleName(ValoTheme.TREETABLE_NO_VERTICAL_LINES); table.addStyleName(ValoTheme.TREETABLE_BORDERLESS); table.setColumnHeaderMode(ColumnHeaderMode.HIDDEN); table.setSizeFull(); table.setCacheRate(100); table.setPageLength(100); table.setImmediate(true); table.setSelectable(true); table.addItemClickListener(this); table.addStyleName("noselect"); table.addContainerProperty("id", String.class, null); table.setVisibleColumns(new Object[] { "id" }); table.setColumnExpandRatio("id", 1); addItem("Users", Icons.USER); addItem("Groups", Icons.GROUP); addItem("REST", Icons.REST); addItem("General Settings", Icons.SETTINGS); addItem("Mail Server", Icons.EMAIL); addItem("Notifications", Icons.NOTIFICATION); addItem("Logging", Icons.LOGGING); addItem("About", FontAwesome.QUESTION); VerticalLayout navigator = new VerticalLayout(); navigator.addStyleName(ValoTheme.MENU_ROOT); navigator.setSizeFull(); leftSplit.setFirstComponent(navigator); MenuBar leftMenuBar = new MenuBar(); leftMenuBar.addStyleName(ValoTheme.MENUBAR_BORDERLESS); leftMenuBar.setWidth(100, Unit.PERCENTAGE); navigator.addComponent(leftMenuBar); navigator.addComponent(table); navigator.setExpandRatio(table, 1); addComponent(leftSplit); }
From source file:org.jumpmind.metl.ui.views.DeployView.java
License:Open Source License
@PostConstruct protected void init() { setSizeFull();//from www . jav a 2 s .c om tabbedPanel = new TabbedPanel(); HorizontalSplitPanel leftSplit = new HorizontalSplitPanel(); leftSplit.setSizeFull(); leftSplit.setSplitPosition(AppConstants.DEFAULT_LEFT_SPLIT, Unit.PIXELS); deployNavigator = new DeployNavigator(context, tabbedPanel); leftSplit.setFirstComponent(deployNavigator); VerticalLayout container = new VerticalLayout(); container.setSizeFull(); container.addComponent(tabbedPanel); leftSplit.setSecondComponent(container); addComponent(leftSplit); }
From source file:org.jumpmind.metl.ui.views.design.EditXsltPanel.java
License:Open Source License
protected void buildUI() { ButtonBar buttonBar = new ButtonBar(); addComponent(buttonBar);//from www . j a va 2s . c o m if (!readOnly) { Button testButton = buttonBar.addButton("Test", FontAwesome.FILE_CODE_O); testButton.addClickListener(new TestClickListener()); } filterField = buttonBar.addFilter(); filterField.addTextChangeListener(this); HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); splitPanel.setSplitPosition(50, Unit.PERCENTAGE); VerticalLayout leftLayout = new VerticalLayout(); editor = new AceEditor(); editor.setMode(AceMode.xml); editor.setSizeFull(); editor.setHighlightActiveLine(true); editor.setShowPrintMargin(false); editor.addTextChangeListener(new StylesheetChangeListener()); editor.setValue(component.findSetting(XsltProcessor.XSLT_PROCESSOR_STYLESHEET).getValue()); leftLayout.addComponent(new Label("XSLT Stylesheet")); leftLayout.addComponent(editor); leftLayout.setExpandRatio(editor, 1.0f); leftLayout.setSizeFull(); splitPanel.setFirstComponent(leftLayout); VerticalLayout rightLayout = new VerticalLayout(); rightLayout.setSizeFull(); rightLayout.addComponent(new Label("Sample Input XML")); textArea = new TextArea(); textArea.setEnabled(false); textArea.setSizeFull(); textArea.setValue(getSampleXml()); rightLayout.addComponent(textArea); rightLayout.setExpandRatio(textArea, 1.0f); splitPanel.setSecondComponent(rightLayout); addComponent(splitPanel); setExpandRatio(splitPanel, 1.0f); textArea.setReadOnly(readOnly); editor.setReadOnly(readOnly); }
From source file:org.jumpmind.metl.ui.views.DesignView.java
License:Open Source License
@PostConstruct protected void init() { setSizeFull();/*from w w w.ja va2 s . c o m*/ tabbedPanel = new TabbedPanel(); HorizontalSplitPanel leftSplit = new HorizontalSplitPanel(); leftSplit.setSizeFull(); leftSplit.setSplitPosition(AppConstants.DEFAULT_LEFT_SPLIT, Unit.PIXELS); projectNavigator = new DesignNavigator(context, tabbedPanel); leftSplit.setFirstComponent(projectNavigator); VerticalLayout container = new VerticalLayout(); container.setSizeFull(); container.addComponent(tabbedPanel); leftSplit.setSecondComponent(container); addComponent(leftSplit); }