List of usage examples for com.vaadin.ui HorizontalSplitPanel setSplitPosition
public void setSplitPosition(float pos)
From source file:com.esspl.datagen.ui.SettingsView.java
License:Open Source License
private Component createWorkArea() { HorizontalSplitPanel split = new HorizontalSplitPanel(); split.setSizeFull();// w w w. j a v a 2 s . c o m split.setSplitPosition(30); List<ConnectionProfile> profiles = SettingsManager.get().getConfiguration().getProfiles(); list = new ListSelect(null, new BeanItemContainer<ConnectionProfile>(ConnectionProfile.class, profiles)); list.setSizeFull(); list.setNullSelectionAllowed(false); list.setImmediate(true); if (!profiles.isEmpty()) { list.select(profiles.get(0)); } list.addListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { refreshDetails(); } }); panel = new Panel(); panel.setSizeFull(); split.addComponent(list); split.addComponent(panel); return split; }
From source file:com.oodrive.nuage.webui.VvrManagerUi.java
License:Apache License
/** * Add a VVR user interface.//from w ww . j a v a2 s . c om * * @param vvrUuid * the vvr unique identifier * */ public final void addVvr(final UUID vvrUuid) { // Create a vvr model final VvrModel vvrModel = jmxHandler.createVvrModel(vvrUuid); vvrModels.put(vvrUuid, vvrModel); // Layout for the first component final VerticalLayout vvrLayout = new VerticalLayout(); vvrLayout.setWidth("100%"); vvrsTabsheet.addTab(vvrLayout, vvrModel.getVvrName(), null, vvrsTabsheet.getComponentCount() - 1); vvrLayouts.put(vvrUuid, vvrLayout); // Create component for vvr operations final VvrOperationComponent op = new VvrOperationComponent(vvrManagerModel); final AbstractComponent opComponent = op.createComponent(vvrModel, jmxHandler); opComponent.setHeight(opLayoutHeight); vvrLayout.addComponent(opComponent); final Label label = new Label(" ", ContentMode.HTML); label.setHeight(labelLayoutHeight); vvrLayout.addComponent(label); vvrLayout.addComponent(new Label("<hr />", ContentMode.HTML)); // Create Tool tip for attributes final VvrAttributesComponent attr = new VvrAttributesComponent(vvrUuid); vvrsTabsheet.getTab(vvrLayout).setDescription(attr.createComponent(vvrModel)); // If there was only the + sheet, select the new vvr sheet if (vvrsTabsheet.getComponentCount() == 2) { vvrsTabsheet.setSelectedTab(0); } // Create its panel final HorizontalSplitPanel panel = new HorizontalSplitPanel(); vvrLayout.addComponent(panel); panel.setWidth("100%"); panel.setHeight(panelLayoutHeight); panel.setSplitPosition(35); // Component to display snapshot/device atributes final VerticalLayout vvrTreeLayout = new VerticalLayout(); final VvrTreeComponent vvrTreeComponent = new VvrTreeComponent(vvrTreeLayout); panel.setFirstComponent(vvrTreeComponent.createComponent(vvrModel, jmxHandler)); panel.setSecondComponent(vvrTreeLayout); vvrTreeComponents.put(vvrUuid, vvrTreeComponent); }
From source file:com.vaushell.treetasker.application.window.UserWindow.java
License:Open Source License
/** * Displays the user's view.// w w w . java2 s .c om */ public void setUserView() { mainLayout.removeComponent(controller.getLoginLayout()); mainLayout.addComponent(controller.getActionBar()); HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setWidth("1000px"); splitPanel.setHeight("100%"); splitPanel.setSplitPosition(30); splitPanel.setLocked(true); splitPanel.setMargin(true); splitPanel.setStyleName("content"); splitPanel.addComponent(controller.getTree()); splitPanel.addComponent(controller.getContent()); controller.refresh(); mainLayout.addComponent(splitPanel); mainLayout.setExpandRatio(splitPanel, 1); mainLayout.setComponentAlignment(splitPanel, Alignment.TOP_CENTER); }
From source file:de.catma.ui.analyzer.AnalyzerView.java
License:Open Source License
private void initComponents() { setSizeFull();/*from w ww .ja v a 2s . c o m*/ Component searchPanel = createSearchPanel(); Component convenienceButtonPanel = createConvenienceButtonPanel(); VerticalLayout searchAndConveniencePanel = new VerticalLayout(); searchAndConveniencePanel.setSpacing(true); searchAndConveniencePanel.setMargin(true); searchAndConveniencePanel.addComponent(searchPanel); searchAndConveniencePanel.addComponent(convenienceButtonPanel); Component documentsPanel = createDocumentsPanel(); HorizontalSplitPanel topPanel = new HorizontalSplitPanel(); topPanel.setSplitPosition(70); topPanel.addComponent(searchAndConveniencePanel); topPanel.addComponent(documentsPanel); addComponent(topPanel); setExpandRatio(topPanel, 0.25f); Component resultPanel = createResultPanel(); resultPanel.setSizeFull(); addComponent(resultPanel); setExpandRatio(resultPanel, 0.75f); }
From source file:de.catma.ui.repository.RepositoryView.java
License:Open Source License
private Component createDocumentsManagerPanel() { HorizontalSplitPanel documentsManagerPanel = new HorizontalSplitPanel(); documentsManagerPanel.setSplitPosition(25); documentsManagerPanel.setSizeFull(); sourceDocumentPanel = new SourceDocumentPanel(repository); corpusPanel = new CorpusPanel(repository, new ValueChangeListener() { public void valueChange(ValueChangeEvent event) { Object value = event.getProperty().getValue(); sourceDocumentPanel.setSourceDocumentsFilter((Corpus) value); }//ww w. ja v a 2 s . c om }); documentsManagerPanel.addComponent(corpusPanel); documentsManagerPanel.addComponent(sourceDocumentPanel); return documentsManagerPanel; }
From source file:fi.jasoft.feedreader.ui.ReaderUI.java
License:Apache License
@Override protected void init(WrappedRequest request) { // Create data tables feedTable = createFeedsTable();//from w w w . j a v a2s .co 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:org.escidoc.browser.ui.maincontent.ItemView2.java
License:Open Source License
private HorizontalSplitPanel buildHorizontalSplit() { final HorizontalSplitPanel horiz = new HorizontalSplitPanel(); horiz.setStyleName(Runo.SPLITPANEL_SMALL); horiz.setSplitPosition(80); // percent horiz.addComponent(new ItemContent(repositories, resourceProxy, router, controller)); VerticalLayout sidebar = buildSidebar(); horiz.addComponent(sidebar);/*from w ww. j a v a2 s . c om*/ return horiz; }
From source file:org.ow2.sirocco.cloudmanager.MyUI.java
License:Open Source License
@Override protected void init(final VaadinRequest request) { this.userName = request.getUserPrincipal().getName(); this.identityContext.setUserName(this.userName); this.getPage().setTitle("Sirocco Dashboard"); final VerticalLayout layout = new VerticalLayout(); layout.setSizeFull();/* ww w .j a v a2s . c o m*/ this.setContent(layout); // Top header ********************* HorizontalLayout header = new HorizontalLayout(); header.setMargin(true); header.setWidth("100%"); header.setHeight("70px"); header.setStyleName("topHeader"); // logo Image image = new Image(null, new ThemeResource("img/sirocco_small_logo.png")); header.addComponent(image); // spacer Label spacer = new Label(); spacer.setWidth("100%"); header.addComponent(spacer); header.setExpandRatio(spacer, 1.0f); HorizontalLayout rightButtons = new HorizontalLayout(); rightButtons.setStyleName("topHeader"); rightButtons.setSpacing(true); this.userName = request.getUserPrincipal().getName(); User user = null; try { user = this.userManager.getUserByUsername(this.userName); } catch (CloudProviderException e) { e.printStackTrace(); } Label label = new Label("Tenant:"); label.setStyleName("topHeaderLabel"); rightButtons.addComponent(label); final ComboBox tenantSelect = new ComboBox(); tenantSelect.setTextInputAllowed(false); tenantSelect.setNullSelectionAllowed(false); for (Tenant tenant : user.getTenants()) { tenantSelect.addItem(tenant.getName()); } tenantSelect.setValue(user.getTenants().iterator().next().getName()); tenantSelect.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(final ValueChangeEvent event) { Notification.show("Switching to tenant " + tenantSelect.getValue()); } }); tenantSelect.setImmediate(true); rightButtons.addComponent(tenantSelect); this.tenantId = user.getTenants().iterator().next().getUuid(); this.identityContext.setTenantId(this.tenantId); // logged user name label = new Label("Logged in as: " + this.userName); label.setStyleName("topHeaderLabel"); rightButtons.addComponent(label); // sign out button Button button = new Button("Sign Out"); // button.setStyleName(BaseTheme.BUTTON_LINK); button.addClickListener(new Button.ClickListener() { public void buttonClick(final ClickEvent event) { MyUI.this.logout(); } }); rightButtons.addComponent(button); header.addComponent(rightButtons); layout.addComponent(header); // Split view HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); splitPanel.setFirstComponent(this.createLeftMenu()); this.inventoryContainer = new VerticalLayout(); this.inventoryContainer.setSizeFull(); this.inventoryContainer.addComponent(this.machineView); splitPanel.setSecondComponent(this.inventoryContainer); splitPanel.setSplitPosition(15); layout.addComponent(splitPanel); layout.setExpandRatio(splitPanel, 1.0f); this.listenToNotifications(); }
From source file:org.vaadin.example.MyVaadinApplication.java
License:Apache License
@Override public void init() { window = new Window("My Vaadin Application"); setMainWindow(window);/*from www.j a va 2 s. co m*/ HorizontalSplitPanel horizontalSplitPanel = new HorizontalSplitPanel(); horizontalSplitPanel.setSplitPosition(30); window.setContent(horizontalSplitPanel); VerticalLayout verticalLayout = new VerticalLayout(); final PojoOne pojoOne = new PojoOne(); pojoOne.setName("My pojo one"); Button button = new Button("Edit pojo one"); button.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { editPojo(pojoOne); } }); verticalLayout.addComponent(button); final PojoTwo pojoTwo = new PojoTwo(); button = new Button("Edit pojo two"); pojoTwo.setName("My second pojo"); button.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { editPojo(pojoTwo); } }); verticalLayout.addComponent(button); horizontalSplitPanel.setFirstComponent(verticalLayout); form.setLayout(layout); form.setFormFieldFactory(preCreatedFieldsHelper); form.setVisible(false); horizontalSplitPanel.setSecondComponent(form); }
From source file:ru.codeinside.adm.ui.TableGroup.java
License:Mozilla Public License
TableGroup(String typeGroup) { setSizeFull();/*from www. j a v a 2 s .c o m*/ this.typeGroup = typeGroup; setMargin(false, false, false, true); table = new FilterTable(); table.setSizeFull(); table.setSelectable(true); table.setMultiSelect(false); table.addListener(this); table.setImmediate(true); table.addContainerProperty("", String.class, ""); table.addContainerProperty("?", String.class, ""); table.setFilterBarVisible(true); table.setFilterDecorator(new FilterDecorator_()); Set<String> groupNames = null; if (typeGroup.equals(GroupTab.ORGANIZATION)) { groupNames = AdminServiceProvider.get().getOrgGroupNames(); } else if (typeGroup.equals(GroupTab.EMPLOYEE)) { groupNames = AdminServiceProvider.get().getEmpGroupNames(); } for (String groupName : groupNames) { List<Group> groups = AdminServiceProvider.get().findGroupByName(groupName); for (Group group : groups) { table.addItem(new Object[] { groupName, group.getTitle() }, groupName); } } panel.setStyleName(Reindeer.PANEL_LIGHT); panel.setSizeFull(); final HorizontalSplitPanel horiz = new HorizontalSplitPanel(); horiz.setSplitPosition(35); // percent horiz.setSizeFull(); addComponent(horiz); horiz.addComponent(table); horiz.addComponent(panel); }