List of usage examples for com.vaadin.ui HorizontalLayout setSizeFull
@Override public void setSizeFull()
From source file:org.vaadin.spring.samples.sidebar.AbstractSideBarUI.java
License:Apache License
@Override protected void init(VaadinRequest vaadinRequest) { getPage().setTitle("Vaadin4Spring Side Bar Sample"); final HorizontalLayout rootLayout = new HorizontalLayout(); rootLayout.setSizeFull(); setContent(rootLayout);/*from www.j a va 2s . c o m*/ final VerticalLayout viewContainer = new VerticalLayout(); viewContainer.setSizeFull(); final Navigator navigator = new Navigator(this, viewContainer); navigator.setErrorView(new ErrorView()); navigator.addProvider(viewProvider); setNavigator(navigator); rootLayout.addComponent(getSideBar()); rootLayout.addComponent(viewContainer); rootLayout.setExpandRatio(viewContainer, 1.0f); }
From source file:org.vaadin.tori.component.RecentBar.java
License:Apache License
public RecentBar() { if (messaging != null) { messaging.addUserAuthoredListener(this); ToriUI.getCurrent().addDetachListener(new DetachListener() { @Override/*from w ww . j a v a 2s . co m*/ public void detach(final DetachEvent event) { messaging.removeUserAuthoredListener(RecentBar.this); } }); } addStyleName("recentbar"); setWidth(100.0f, Unit.PERCENTAGE); setHeight(35.0f, Unit.PIXELS); CssLayout layout = new CssLayout(); layout.setSizeFull(); setCompositionRoot(layout); HorizontalLayout barLayout = new HorizontalLayout(); barLayout.setMargin(new MarginInfo(false, true, false, true)); barLayout.setSizeFull(); addTitleLabel(barLayout); addNotificationsLayout(barLayout); addRecentLink(barLayout); if (dataSource.isLoggedInUser()) { addMyPostsLink(barLayout); } layout.addComponent(barLayout); floatingComponent.extend(floatingNotification); layout.addComponent(floatingNotification); floatingNotification.setId("floatingnotification"); ToriScheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { refresh(); } }); }
From source file:org.vaadin.tori.view.thread.ThreadUpdatesComponent.java
License:Apache License
public ThreadUpdatesComponent(final ThreadPresenter presenter) { setStyleName("threadupdates"); HorizontalLayout layout = new HorizontalLayout(); layout.setSizeFull(); layout.addStyleName("threadupdateslayout"); setCompositionRoot(layout);/*from w w w.j av a 2 s. c o m*/ setWidth(100.0f, Unit.PERCENTAGE); layout.setMargin(true); layout.setSpacing(true); setVisible(false); newPostsLabel.setSizeUndefined(); newPostsLabel.addStyleName("newposts"); layout.addComponent(newPostsLabel); showAllLabel.addStyleName("showall"); layout.addComponent(showAllLabel); layout.setExpandRatio(showAllLabel, 1.0f); pendingRepliesLabel.setWidth(280.0f, Unit.PIXELS); layout.addComponent(pendingRepliesLabel); layout.setComponentAlignment(pendingRepliesLabel, Alignment.MIDDLE_RIGHT); layout.addLayoutClickListener(new LayoutClickListener() { @Override public void layoutClick(final LayoutClickEvent event) { if (event.getChildComponent() == showAllLabel) { presenter.showNewPostsRequested(); } } }); }
From source file:pt.ist.vaadinframework.ui.ApplicationWindow.java
License:Open Source License
public ApplicationWindow(String theme, Property applicationTitle, Property applicationSubtitle, Property copyright) {/* w ww .j a va 2s . com*/ setTheme(theme); this.applicationTitle = applicationTitle; this.applicationSubtitle = applicationSubtitle; this.copyright = copyright; VerticalLayout main = new VerticalLayout(); main.setWidth(90, UNITS_PERCENTAGE); main.setHeight(98, UNITS_PERCENTAGE); main.addStyleName("application-container"); VerticalLayout header = new VerticalLayout(); header.setMargin(true, true, false, true); header.setSpacing(true); main.addComponent(header); HorizontalLayout iconAndTitle = new HorizontalLayout(); iconAndTitle.setSizeFull(); iconAndTitle.setSpacing(true); header.addComponent(iconAndTitle); Embedded logo = new Embedded(null, new ThemeResource("../runo/icons/64/globe.png")); iconAndTitle.addComponent(logo); iconAndTitle.setComponentAlignment(logo, Alignment.MIDDLE_LEFT); VerticalLayout titles = new VerticalLayout(); titles.setSpacing(true); iconAndTitle.addComponent(titles); iconAndTitle.setExpandRatio(titles, 0.8f); Label title = new Label(applicationTitle); title.addStyleName("application-title"); titles.addComponent(title); Label subtitle = new Label(applicationSubtitle); subtitle.addStyleName("application-subtitle"); titles.addComponent(subtitle); HorizontalLayout controls = new HorizontalLayout(); controls.setSpacing(true); iconAndTitle.addComponent(controls); iconAndTitle.setComponentAlignment(controls, Alignment.TOP_RIGHT); Label user = new Label("ist148357"); controls.addComponent(user); Link logout = new Link("logout", new ExternalResource("#")); controls.addComponent(logout); MenuBar menu = new MenuBar(); menu.addStyleName("application-menu"); header.addComponent(menu); MenuItem hello = menu.addItem("hello", null); hello.addItem("sdgjk", new Command() { @Override public void menuSelected(MenuItem selectedItem) { getWindow().showNotification("skjhfgksjdfhglksdjh"); } }); MenuItem hello1 = menu.addItem("hello", null); hello1.addItem("sdgjk", new Command() { @Override public void menuSelected(MenuItem selectedItem) { getWindow().showNotification("skjhfgksjdfhglksdjh"); } }); MenuItem hello2 = menu.addItem("hello", null); hello2.addItem("sdgjk", new Command() { @Override public void menuSelected(MenuItem selectedItem) { getWindow().showNotification("skjhfgksjdfhglksdjh"); } }); body = new VerticalLayout(); body.setSizeFull(); body.setMargin(true); body.addStyleName("application-body"); main.addComponent(body); main.setExpandRatio(body, 1f); body.addComponent(createDefaultPageBody()); VerticalLayout footer = new VerticalLayout(); main.addComponent(footer); main.setComponentAlignment(footer, Alignment.MIDDLE_CENTER); Label copyrightLabel = new Label(copyright); copyrightLabel.setSizeUndefined(); copyrightLabel.addStyleName("application-footer"); footer.addComponent(copyrightLabel); footer.setComponentAlignment(copyrightLabel, Alignment.MIDDLE_CENTER); VerticalLayout outer = (VerticalLayout) getContent(); outer.setSizeFull(); outer.addComponent(main); outer.setComponentAlignment(main, Alignment.MIDDLE_CENTER); }
From source file:qbic.vaadincomponents.InputFilesComponent.java
License:Open Source License
/** * DAVID/*from w w w .ja v a 2 s . c o m*/ * * @param wfparameters * @param datasets */ public void buildLayout(Map<String, Parameter> wfparameters, BeanItemContainer<DatasetBean> datasets) { wfmap = wfparameters; for (Map.Entry<String, Parameter> entry : wfmap.entrySet()) { GeneratedPropertyContainer gpcontainer = null; Grid newGrid = new Grid(gpcontainer); if (entry.getValue() instanceof FileParameter || entry.getValue() instanceof FileListParameter) { // TODO also do filtering on filetype level List<String> range = getRange(entry.getValue()); if (range.contains("fasta") || range.contains("gtf")) { gpcontainer = fastaContainer(); // show only bwaIndex references for bwa } else if (range.contains("bwaIndex")) { gpcontainer = fastaContainerFiltered("bwa"); } else if (range.contains("barcodes")) { gpcontainer = fastaContainerFiltered("barcodes"); } else if (range.contains("shRNAlibrary")) { gpcontainer = fastaContainerFiltered("shRNAlibrary"); } else { gpcontainer = filter(datasets, range); } newGrid.setContainerDataSource(gpcontainer); newGrid.setSelectionMode(getSelectionMode(entry.getValue())); } else { // showError(String.format("Invalid Inputfile Parameter!", entry.getKey())); helpers.Utils.Notification("Invalid Inputfile Parameter", "Invalid value for inputfile parameter has been provided." + entry.getKey(), "error"); } HorizontalLayout layout = new HorizontalLayout(); layout.setMargin(new MarginInfo(true, true, true, true)); layout.setSizeFull(); newGrid.setWidth("100%"); layout.addComponent(newGrid); // if (newGrid.getContainerDataSource().size() == 0) { // Notification.show( // String.format("No dataset of type %s available in this project!", entry.getKey()), // Type.WARNING_MESSAGE); // helpers.Utils // .Notification( // "Missing Dataset Type", // String // .format( // "Workflow submission might not be possible because no dataset of type %s is available in // this project", // entry.getKey()), "warning"); layout.addComponent(newGrid); // } helpers.GridFunctions.addColumnFilters(newGrid, gpcontainer); inputFileForm.addTab(layout, entry.getKey()); } }
From source file:qbic.vaadincomponents.InputFilesComponent.java
License:Open Source License
public void buildForm(Set<Entry<String, Parameter>> wfparameters, BeanItemContainer<DatasetBean> datasets) { inputFileForm.removeAllComponents(); inputFileForm.setSizeFull();/*from ww w .j a va 2 s . c o m*/ wfmap.clear(); for (Map.Entry<String, Parameter> entry : wfparameters) { wfmap.put(entry.getKey(), entry.getValue()); GeneratedPropertyContainer gpcontainer = null; Grid newGrid = new Grid(gpcontainer); if (entry.getValue() instanceof FileParameter) { FileParameter fileParam = (FileParameter) entry.getValue(); List<String> associatedDataTypes = fileParam.getRange(); // String associatedDataType = fileParam.getTitle(); if (associatedDataTypes.contains("fasta") || associatedDataTypes.contains("gtf")) { // if (associatedDataType.toLowerCase().equals("fasta")) { BeanItemContainer<FastaBean> subContainer = new BeanItemContainer<FastaBean>(FastaBean.class); FastaDB db = new FastaDB(); subContainer.addAll(db.getAll()); gpcontainer = new GeneratedPropertyContainer(subContainer); gpcontainer.addGeneratedProperty("Type", new PropertyValueGenerator<String>() { @Override public Class<String> getType() { return String.class; } @Override public String getValue(Item item, Object itemId, Object propertyId) { String detailedType = item.getItemProperty("detailedType").getValue().toString(); return detailedType; } }); gpcontainer.removeContainerProperty("path"); gpcontainer.removeContainerProperty("detailedType"); } else { BeanItemContainer<DatasetBean> subContainer = new BeanItemContainer<DatasetBean>( DatasetBean.class); for (java.util.Iterator<DatasetBean> i = datasets.getItemIds().iterator(); i.hasNext();) { DatasetBean dataset = i.next(); if (associatedDataTypes.contains(dataset.getFileType().toLowerCase())) { // if (associatedDataType.toLowerCase().equals(dataset.getFileType().toLowerCase())) { subContainer.addBean(dataset); } } gpcontainer = new GeneratedPropertyContainer(subContainer); gpcontainer.removeContainerProperty("fullPath"); gpcontainer.removeContainerProperty("openbisCode"); } newGrid.setContainerDataSource(gpcontainer); newGrid.setSelectionMode(SelectionMode.SINGLE); } else if (entry.getValue() instanceof FileListParameter) { FileListParameter fileParam = (FileListParameter) entry.getValue(); List<String> associatedDataTypes = fileParam.getRange(); BeanItemContainer<DatasetBean> subContainer = new BeanItemContainer<DatasetBean>(DatasetBean.class); for (java.util.Iterator<DatasetBean> i = datasets.getItemIds().iterator(); i.hasNext();) { DatasetBean dataset = i.next(); if (associatedDataTypes.contains(dataset.getFileType().toLowerCase())) { subContainer.addBean(dataset); } } gpcontainer = new GeneratedPropertyContainer(subContainer); gpcontainer.removeContainerProperty("fullPath"); gpcontainer.removeContainerProperty("openbisCode"); newGrid.setContainerDataSource(gpcontainer); newGrid.setSelectionMode(SelectionMode.MULTI); } else { helpers.Utils.Notification("Invalid Inputfile Parameter", "Invalid inputfile parameter has been selected: " + entry.getKey(), "error"); } HorizontalLayout layout = new HorizontalLayout(); layout.setMargin(new MarginInfo(true, true, true, true)); layout.setSizeFull(); newGrid.setWidth("100%"); layout.addComponent(newGrid); // if (newGrid.getContainerDataSource().size() == 0) { // helpers.Utils // .Notification( // "Missing Dataset Type", // String // .format( // "Workflow submission might not be possible because no dataset of type %s is available in // this project", // entry.getKey()), "warning"); // Notification.show( // String.format("No dataset of type %s available in this project!", entry.getKey()), // Type.WARNING_MESSAGE); layout.addComponent(newGrid); // } inputFileForm.addTab(layout, entry.getKey()); } }
From source file:ro.zg.netcell.vaadin.action.application.UpdateEntityHandler.java
License:Apache License
private void displaySuccessfulMessage(final Entity entity, final UserAction ua, final OpenGroupsApplication app, final ComponentContainer targetComponent, final ActionContext ac) { /* store current target component */ // final ComponentContainer targetComponent = app.getTargetComponent(); targetComponent.removeAllComponents(); String entityTypeLowerCase = ua.getTargetEntityType().toLowerCase(); String createdSuccessfullyMessage = app.getMessage(entityTypeLowerCase + ".updated.successfully"); String newUpdateMessage = app.getMessage("new.update"); HorizontalLayout container = new HorizontalLayout(); container.setSizeFull(); container.setSpacing(true);/*w ww . ja v a 2s. c om*/ targetComponent.addComponent(container); Label success = new Label(createdSuccessfullyMessage); container.addComponent(success); Button newUpdate = new Button(newUpdateMessage); container.addComponent(newUpdate); newUpdate.addListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { // Entity entity = new Entity(entityId); // app.pushSelectedEntity(entity); // app.executeAction(ActionsManager.OPEN_ENTITY_IN_WINDOW); ua.executeHandler(entity, app, targetComponent, ac); } }); }
From source file:ro.zg.netcell.vaadin.action.user.LoginHandler.java
License:Apache License
private ComponentContainer getLoginView(ActionContext actionContext) { OpenGroupsApplication app = actionContext.getApp(); Map<String, Map<String, String>> loginTypes = (Map<String, Map<String, String>>) app.getAppConfigManager() .getApplicationConfigParam(ApplicationConfigParam.LOGIN_TYPES); System.out.println("login types: " + loginTypes); HorizontalLayout hl = new HorizontalLayout(); hl.setSizeFull(); if (loginTypes == null || loginTypes.containsKey(LOCAL_LOGIN_TYPE)) { Component localView = getLocalLoginView(actionContext); hl.addComponent(localView);/*from w ww . j a va 2 s . c o m*/ hl.setExpandRatio(localView, 2f); } if (loginTypes != null) { Map<String, String> openIdProviders = loginTypes.get(OPENID_LOGIN_TYPE); if (openIdProviders != null) { CssLayout openIdLayout = new CssLayout(); openIdLayout.setSizeFull(); openIdLayout.addStyleName("openid-login-pane"); VerticalLayout openIdContainer = new VerticalLayout(); openIdContainer.setSizeFull(); openIdContainer.setMargin(true); openIdLayout.addComponent(openIdContainer); // Label openIdLoginMessage = new Label(OpenGroupsResources.getMessage("openid.login.message")); // openIdLoginMessage.addStyleName("openid-title"); // openIdContainer.addComponent(openIdLoginMessage); // openIdContainer.setExpandRatio(openIdLoginMessage, 0.1f); for (Map.Entry<String, String> e : openIdProviders.entrySet()) { Component providerLink = getOpenidLoginComponent(actionContext, e); openIdContainer.addComponent(providerLink); openIdContainer.setComponentAlignment(providerLink, Alignment.MIDDLE_CENTER); openIdContainer.setExpandRatio(providerLink, 1f); } hl.addComponent(openIdLayout); hl.setComponentAlignment(openIdLayout, Alignment.MIDDLE_CENTER); hl.setExpandRatio(openIdLayout, 1f); } } return hl; }
From source file:rs.co.micro.bwNet.navigationMenu.java
public navigationMenu() { //Main Panel// w w w .ja va 2s . co m setResponsive(true); setSpacing(true); setMargin(false); HorizontalLayout topMenu = new HorizontalLayout(); topMenu.setSizeFull(); //Logout Dugme MenuBar logout = new MenuBar(); logout.setId("logoutDugme"); logout.setSizeFull(); logout.setResponsive(true); logout.setDescription("Izadjite iz programa"); MenuBar.MenuItem logoutDugme = logout.addItem("Logout", FontAwesome.SIGN_OUT, new MenuBar.Command() { @Override public void menuSelected(MenuBar.MenuItem selectedItem) { getUI().getSession().close(); navigator.addView("login", new login()); navigator.navigateTo("login"); } }); //Navigacioni meni MenuBar navMeni = new MenuBar(); navMeni.setId("navMeni"); navMeni.setSizeFull(); navMeni.setResponsive(true); // A top-level menu item that opens a submenu MenuBar.MenuItem uvidi = navMeni.addItem("Uvidi", null, null); //Nesto poput click listenera MenuBar.Command mycommand = new MenuBar.Command() { @Override public void menuSelected(MenuBar.MenuItem selectedItem) { Notification.show("radi"); } }; // karticaPartnera.addItem("Tea", // FontAwesome.DROPBOX, mycommand); // karticaPartnera.addItem("Coffee", // FontAwesome.COFFEE, mycommand); // Another top-level item MenuBar.MenuItem snacks = navMeni.addItem("Snacks", null, null); snacks.addItem("Weisswurst", null, mycommand); snacks.addItem("Bratwurst", null, mycommand); snacks.addItem("Currywurst", null, mycommand); snacks.addItem("Test1", null, mycommand); snacks.addItem("test2", null, mycommand); // Yet another top-level item MenuBar.MenuItem servs = navMeni.addItem("Services", null, null); servs.addItem("Car Service", null, mycommand); topMenu.addComponents(navMeni, logout); addComponents(topMenu); // Kreira Kartica Partnera submeni i pokazuje Karticu MenuBar.MenuItem karticaPartnera; karticaPartnera = uvidi.addItem("Kartica Partnera", null, new MenuBar.Command() { @Override public void menuSelected(MenuBar.MenuItem selectedItem) { try { navigator.addView("BWKarticaPartnera", new BWkarticaPartnera()); } catch (SQLException ex) { System.out.println("Greska (BWnFinex klasa)" + SQLException.class); } navigator.navigateTo("BWKarticaPartnera"); } }); System.out.println("ubacen meni"); }
From source file:ru.codeinside.adm.ui.AdminApp.java
License:Mozilla Public License
private RefreshableTab createSettings() { final Form systemForm; {//from w w w. jav a2s. c o m final ComboBox serviceLocation; { String[][] defs = { { "? ", "http://195.245.214.33:7777/esv" }, { "? ", "http://oraas.rt.ru:7777/gateway/services/SID0003318" } }; serviceLocation = new ComboBox("?? ?? "); serviceLocation.setItemCaptionMode(ComboBox.ITEM_CAPTION_MODE_EXPLICIT); for (String[] def : defs) { addOption(serviceLocation, def[1], def[0], false); } serviceLocation.setImmediate(true); serviceLocation.setInputPrompt("http://"); serviceLocation.setNewItemsAllowed(true); serviceLocation.setNewItemHandler(new AbstractSelect.NewItemHandler() { @Override public void addNewItem(String newItemCaption) { addOption(serviceLocation, newItemCaption, newItemCaption, true); } }); String href = AdminServiceProvider.get() .getSystemProperty(CertificateVerifier.VERIFY_SERVICE_LOCATION); addOption(serviceLocation, href, href, true); } final CheckBox allowValidate; { allowValidate = new CheckBox(" ? "); allowValidate.setRequired(true); allowValidate.setImmediate(true); allowValidate.addListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { serviceLocation.setRequired(Boolean.TRUE.equals(event.getProperty().getValue())); } }); allowValidate.setValue(AdminServiceProvider .getBoolProperty(CertificateVerifier.ALLOW_VERIFY_CERTIFICATE_PROPERTY)); } systemForm = new Form(); systemForm.addField("location", serviceLocation); systemForm.addField("allowVerify", allowValidate); systemForm.setImmediate(true); systemForm.setWriteThrough(false); systemForm.setInvalidCommitted(false); Button commit = new Button("", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { try { systemForm.commit(); set(CertificateVerifier.VERIFY_SERVICE_LOCATION, serviceLocation.getValue()); set(CertificateVerifier.ALLOW_VERIFY_CERTIFICATE_PROPERTY, allowValidate.getValue()); event.getButton().getWindow().showNotification("?? ?", Window.Notification.TYPE_HUMANIZED_MESSAGE); } catch (Validator.InvalidValueException ignore) { } } }); HorizontalLayout buttons = new HorizontalLayout(); buttons.setSpacing(true); buttons.addComponent(commit); systemForm.getFooter().addComponent(buttons); } Panel b1 = new Panel(); b1.setSizeFull(); Label b1label = new Label(" ?"); b1label.addStyleName(Reindeer.LABEL_H2); b1.addComponent(b1label); b1.addComponent(systemForm); VerticalLayout certificates = new VerticalLayout(); certificates.setSizeFull(); certificates.setSpacing(true); HorizontalLayout topHl = new HorizontalLayout(); topHl.setSizeFull(); topHl.setSpacing(true); Panel certificatesPanel = new Panel("", certificates); certificatesPanel.setSizeFull(); certificatesPanel.addStyleName(Reindeer.PANEL_LIGHT); boolean linkCertificate = AdminServiceProvider.getBoolProperty(CertificateVerifier.LINK_CERTIFICATE); final CheckBox switchLink = new CheckBox("? "); switchLink.setValue(linkCertificate); switchLink.setImmediate(true); switchLink.addListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { set(CertificateVerifier.LINK_CERTIFICATE, switchLink.getValue()); event.getButton().getWindow().showNotification("?? ?", Window.Notification.TYPE_HUMANIZED_MESSAGE); } }); Panel b2 = new Panel(); b2.setSizeFull(); Label b2label = new Label("? ?"); b2label.addStyleName(Reindeer.LABEL_H2); b2.addComponent(b2label); b2.addComponent(switchLink); certificates.addComponent(b1); certificates.addComponent(b2); certificates.setExpandRatio(b1, 0.7f); certificates.setExpandRatio(b2, 0.3f); CheckBox productionMode = new CheckBox("? ", AdminServiceProvider.getBoolProperty(API.PRODUCTION_MODE)); productionMode.setImmediate(true); productionMode.setDescription( " ? ? ?? ?? testMsg"); productionMode.addListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { boolean value = Boolean.TRUE.equals(event.getProperty().getValue()); set(API.PRODUCTION_MODE, value); } }); Panel smevPanel = new Panel(" "); smevPanel.setSizeFull(); smevPanel.addComponent(productionMode); HorizontalLayout bottomHl = new HorizontalLayout(); bottomHl.setSizeFull(); bottomHl.setSpacing(true); LogSettings logSettings = new LogSettings(); Panel emailDatesPanel = createEmailDatesPanel(); Panel mailTaskConfigPanel = createMilTaskConfigPanel(); topHl.addComponent(certificatesPanel); topHl.addComponent(emailDatesPanel); topHl.addComponent(mailTaskConfigPanel); topHl.setExpandRatio(certificatesPanel, 0.4f); topHl.setExpandRatio(emailDatesPanel, 0.6f); topHl.setExpandRatio(mailTaskConfigPanel, 0.5f); Panel esiaPanel = buildEsiaPanel(); Panel printTemplatesPanel = buildPrintTemplatesPanel(); bottomHl.addComponent(smevPanel); bottomHl.addComponent(esiaPanel); bottomHl.addComponent(printTemplatesPanel); bottomHl.setExpandRatio(smevPanel, 0.2f); bottomHl.setExpandRatio(esiaPanel, 0.4f); bottomHl.setExpandRatio(printTemplatesPanel, 0.4f); final VerticalLayout layout = new VerticalLayout(); layout.setSpacing(true); layout.setSizeFull(); layout.addComponent(topHl); layout.addComponent(logSettings); layout.addComponent(bottomHl); layout.setExpandRatio(topHl, 0.40f); layout.setExpandRatio(logSettings, 0.40f); layout.setExpandRatio(bottomHl, 0.20f); layout.setMargin(true); layout.setSpacing(true); return new RefreshableTab(layout, logSettings); }