List of usage examples for com.vaadin.ui HorizontalSplitPanel setStyleName
@Override public void setStyleName(String style)
From source file:com.m4gik.views.MainView.java
/** * @param root//w w w . jav a 2 s. c o m */ private void addSplitPanel(VerticalLayout root) { final HorizontalSplitPanel split = new HorizontalSplitPanel(); split.setStyleName(Runo.SPLITPANEL_REDUCED); split.setSplitPosition(1, Sizeable.Unit.PIXELS); split.setLocked(true); root.addComponent(split); root.setExpandRatio(split, 1); addPanelLeft(split); addPanelRight(split); }
From source file:com.vaushell.treetasker.application.window.UserWindow.java
License:Open Source License
/** * Displays the user's view./*from www. jav a 2 s .co m*/ */ 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:fi.jasoft.feedreader.ui.ReaderUI.java
License:Apache License
@Override protected void init(WrappedRequest request) { // Create data tables feedTable = createFeedsTable();/*www . j a v a2s . com*/ 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 w w . j a v a2 s . c om*/ return horiz; }
From source file:org.ikasan.dashboard.ui.topology.panel.TopologyViewPanel.java
License:BSD License
protected void init() { this.tabsheetPanel = new Panel(); this.tabsheetPanel.addStyleName(ValoTheme.PANEL_BORDERLESS); this.tabsheetPanel.setSizeFull(); this.createModuleTreePanel(); this.setWidth("100%"); this.setHeight("100%"); this.businessStreamCombo = new ComboBox(); HorizontalSplitPanel hsplit = new HorizontalSplitPanel(); hsplit.setStyleName(ValoTheme.SPLITPANEL_LARGE); HorizontalLayout leftLayout = new HorizontalLayout(); leftLayout.setSizeFull();/* www .j ava 2 s .c o m*/ leftLayout.setMargin(true); leftLayout.addComponent(this.topologyTreePanel); hsplit.setFirstComponent(leftLayout); HorizontalLayout rightLayout = new HorizontalLayout(); rightLayout.setSizeFull(); rightLayout.setMargin(true); rightLayout.addComponent(this.tabsheetPanel); hsplit.setSecondComponent(rightLayout); hsplit.setSplitPosition(30, Unit.PERCENTAGE); this.flowStates = this.topologyCache.getStateMap(); this.setContent(hsplit); }
From source file:org.ripla.web.controllers.RiplaBody.java
License:Open Source License
/** * Arranges the body window's views (i.e. <code>header</code>, * <code>footer</code>, <code>toolbar</code>, <code>menubar</code>, * <code>sidebar</code>, <code>content</code>).<br /> * Subclasses may override for a different arrangement of the views. *///from ww w . j a v a 2 s . c o m protected void initializeLayout() { Page.getCurrent().setTitle(application.getAppName()); if (skin.hasHeader()) { final Component lHeader = skin.getHeader(application.getAppName()); layout.addComponent(lHeader); layout.setExpandRatio(lHeader, 0); } if (skin.hasToolBar()) { final Component lToolbar = createToolbar(skin.getToolbarSeparator()); layout.addComponent(lToolbar); } if (skin.hasMenuBar()) { final Component lMenubar = createMenubar(skin.getMenuBarMedium(), skin.getMenuBar(), skin.getSubMenuIcon()); layout.addComponent(lMenubar); } final HorizontalSplitPanel lPanel = new HorizontalSplitPanel(); layout.addComponent(lPanel); layout.setExpandRatio(lPanel, 1); lPanel.setSplitPosition(10, Unit.PERCENTAGE); // lPanel.setHeight(SIZE_UNDEFINED, Unit.PIXELS); lPanel.setStyleName("ripla-split"); //$NON-NLS-1$ sidebar = new VerticalLayout(); sidebar.setStyleName("ripla-sidebar"); sidebar.setSizeFull(); lPanel.setFirstComponent(sidebar); content = new VerticalLayout(); content.setStyleName("ripla-content"); lPanel.setSecondComponent(content); content.setMargin(true); lPanel.setSizeFull(); layout.setSizeFull(); }
From source file:org.vaadin.spring.samples.sidebar.SideBarUI.java
License:Apache License
@Override protected void init(VaadinRequest vaadinRequest) { getPage().setTitle("Vaadin4Spring Side Bar Sample"); final HorizontalSplitPanel rootLayout = new HorizontalSplitPanel(); rootLayout.setStyleName(Reindeer.SPLITPANEL_SMALL); rootLayout.setSizeFull();//from w w w.j a va2s. c o m setContent(rootLayout); final Navigator navigator = new Navigator(this, new ViewDisplay() { @Override public void showView(View view) { System.out.println("Showing view " + view); rootLayout.setSecondComponent((com.vaadin.ui.Component) view); } }); navigator.setErrorView(new ErrorView()); navigator.addProvider(viewProvider); setNavigator(navigator); rootLayout.setFirstComponent(sideBar); rootLayout.setSplitPosition(150, Unit.PIXELS); }