List of usage examples for com.vaadin.ui VerticalSplitPanel VerticalSplitPanel
public VerticalSplitPanel()
From source file:dhbw.ka.mwi.businesshorizon2.ui.parameterScreen.ParameterScreenViewImpl.java
License:Open Source License
/** * Diese Methode setzt das Layout fr den Screen fest sowie den Titel der Anwendung. * * @author Christian Scherer, Mirko Gpfrich, Marco Glaser */// w w w . j av a2 s . c om private void generateUi() { mainLayout.setSizeFull(); mainLayout.setStyleName("mainLayout"); leftLayout.setSizeFull(); leftLayout.setStyleName("leftContainer"); rightLayout.setSizeFull(); bottomLayout.setSizeFull(); bottomLeftLayout.setSizeFull(); //leftContentLayout.setWidth(85, UNITS_PERCENTAGE); //leftContentLayout.setHeight(100, UNITS_PERCENTAGE); topRightLayout.setStyleName("topBar"); leftContentLayout.setSizeFull(); horizontalSplitPanel = new HorizontalSplitPanel(); horizontalSplitPanel.setSplitPosition(30, UNITS_PERCENTAGE); horizontalSplitPanel.setLocked(true); horizontalSplitPanel.setStyleName("horizontalMain"); verticalSplitPanel = new VerticalSplitPanel(); verticalSplitPanel.setSplitPosition(15, UNITS_PERCENTAGE); verticalSplitPanel.setLocked(true); verticalSplitPanel.setWidth(90, UNITS_PERCENTAGE); verticalSplitPanel.setHeight(100, UNITS_PERCENTAGE); horizontalSplitPanelRight = new HorizontalSplitPanel(); horizontalSplitPanelRight.setSplitPosition(30, UNITS_PERCENTAGE); horizontalSplitPanelRight.setLocked(true); horizontalSplitPanelRight.addStyleName("horizontalBottom"); horizontalSplitPanelRight.setHeight(90, UNITS_PERCENTAGE); horizontalSplitPanelRight.setWidth(100, UNITS_PERCENTAGE); leftL = new Label("links"); rightTopL = new Label("rechts Oben"); rightBottomL = new Label("rechts Unten"); leftBottomL = new Label("links Unten"); rightLayout.addComponent(verticalSplitPanel); // topRightLayout.addComponent(rightTopL); // bottomRightLayout.addComponent(rightBottomL); // bottomLeftLayout.addComponent(leftBottomL); bottomLayout.addComponent(horizontalSplitPanelRight); horizontalSplitPanel.addComponent(leftLayout); horizontalSplitPanel.addComponent(rightLayout); verticalSplitPanel.addComponent(topRightLayout); verticalSplitPanel.addComponent(bottomLayout); horizontalSplitPanelRight.addComponent(bottomLeftLayout); horizontalSplitPanelRight.addComponent(bottomRightLayout); rightLayout.setComponentAlignment(verticalSplitPanel, Alignment.MIDDLE_CENTER); bottomLayout.setComponentAlignment(horizontalSplitPanelRight, Alignment.MIDDLE_CENTER); mainLayout.addComponent(horizontalSplitPanel); setContent(mainLayout); //linke Seite Logo leftLogolayout = new VerticalLayout(); leftLogolayout.setWidth(Sizeable.SIZE_UNDEFINED, 0); leftLogolayout.setHeight(100, UNITS_PERCENTAGE); logo = new Embedded(null, new ThemeResource("images/Logo_businesshorizon.png")); leftLogolayout.addComponent(logo); leftLogolayout.setComponentAlignment(logo, Alignment.MIDDLE_CENTER); //linke Seite Infos gap = new Label(); gap.setHeight("10px"); titleIcon = new Embedded(null, new ThemeResource( "./images/icons/newIcons/1418775155_device_board_presentation_content_chart-128.png")); titleIcon.setWidth(70, UNITS_PIXELS); titleIcon.setHeight(70, UNITS_PIXELS); seitenLabel = new Label("Schritt 2"); seitenLabel.setStyleName("seitenLabel"); seitenLabel.setWidth(Sizeable.SIZE_UNDEFINED, 0); splitter = new Label("<hr style='border:none;background-color:black;height:2px'>", Label.CONTENT_XHTML); splitter.setWidth(98, UNITS_PERCENTAGE); descriptionLabel = new Label("Stochastische Methode:"); descriptionLabel.setStyleName("descriptionLabel"); descriptionLabel.setWidth(Sizeable.SIZE_UNDEFINED, 0); descriptionLabel2 = new Label("Bitte geben Sie die Parameter ein"); descriptionLabel2.setStyleName("descriptionLabel"); descriptionLabel2.setWidth(Sizeable.SIZE_UNDEFINED, 0); descriptionLayout = new VerticalLayout(); descriptionLayout.addComponent(descriptionLabel); descriptionLayout.addComponent(descriptionLabel2); descriptionLayout.setComponentAlignment(descriptionLabel, Alignment.TOP_CENTER); descriptionLayout.setComponentAlignment(descriptionLabel2, Alignment.MIDDLE_CENTER); descriptionLayout.setWidth(100, UNITS_PERCENTAGE); descriptionLayout.setHeight(60, UNITS_PIXELS); splitter2 = new Label("<hr style='border:none;background-color:black;height:2px'>", Label.CONTENT_XHTML); splitter2.setWidth(98, UNITS_PERCENTAGE); middleGap = new Label(); middleGap.setHeight("10px"); menuButtonsLayout = new HorizontalLayout(); menuButtonsLayout.setWidth(100, UNITS_PERCENTAGE); menuButtonsLayout.setHeight(Sizeable.SIZE_UNDEFINED, 0); homeButtonLayout = new VerticalLayout(); homeButtonLayout.setSizeFull(); homeButton = new Button(); homeButton.setHeight(30, UNITS_PIXELS); homeButton.setWidth(30, UNITS_PIXELS); homeButton.setStyleName("homeButton"); homeButtonLabel = new Label("Startseite"); homeButtonLabel.setWidth(Sizeable.SIZE_UNDEFINED, 0); homeButtonLabel.setStyleName("topBarButtonLabel"); homeButtonLayout.addComponent(homeButton); homeButtonLayout.addComponent(homeButtonLabel); homeButtonLayout.setComponentAlignment(homeButton, Alignment.TOP_CENTER); homeButtonLayout.setComponentAlignment(homeButtonLabel, Alignment.MIDDLE_CENTER); menuButtonsLayout.addComponent(homeButtonLayout); // // accountButtonLayout = new VerticalLayout(); // accountButtonLayout.setSizeFull(); // // accountButton = new Button(); // accountButton.setHeight(30, UNITS_PIXELS); // accountButton.setWidth(30, UNITS_PIXELS); // accountButton.setStyleName("accountButton"); // // accountButtonLabel = new Label("Mein Konto"); // accountButtonLabel.setWidth(Sizeable.SIZE_UNDEFINED, 0); // accountButtonLabel.setStyleName("topBarButtonLabel"); // // accountButtonLayout.addComponent(accountButton); // accountButtonLayout.addComponent(accountButtonLabel); // accountButtonLayout.setComponentAlignment(accountButton, Alignment.TOP_CENTER);; // accountButtonLayout.setComponentAlignment(accountButtonLabel, Alignment.MIDDLE_CENTER); // // menuButtonsLayout.addComponent(accountButtonLayout); bottomGap = new Label(); bottomGap.setHeight("380px"); leftContentLayout.addComponent(gap); leftContentLayout.addComponent(titleIcon); leftContentLayout.addComponent(seitenLabel); leftContentLayout.addComponent(splitter); leftContentLayout.addComponent(descriptionLayout); leftContentLayout.addComponent(splitter2); leftContentLayout.addComponent(middleGap); leftContentLayout.addComponent(menuButtonsLayout); leftContentLayout.addComponent(bottomGap); leftContentLayout.setComponentAlignment(seitenLabel, Alignment.TOP_CENTER); leftContentLayout.setComponentAlignment(titleIcon, Alignment.TOP_CENTER); leftLayout.addComponent(leftLogolayout); leftLayout.addComponent(leftContentLayout); leftLayout.setExpandRatio(leftContentLayout, 1.0f); //Buttonleiste oben TopBarButton button = new TopBarButton("saveButton", "Speichern"); addTopButton(button.getButtonComponent()); button = new TopBarButton("resetInput", "Daten zurcksetzen"); addTopButton(button.getButtonComponent()); button = new TopBarButton("back", "Zurck"); addTopButton(button.getButtonComponent()); button = new TopBarButton("abbort", "Abbrechen"); addTopButton(button.getButtonComponent()); button.getButton().addListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { System.out.println("cancel on safe"); presenter.abbrechen(); } }); }
From source file:dhbw.ka.mwi.businesshorizon2.ui.process.ProcessViewImpl.java
License:Open Source License
/** * Diese Methode setzt den Titel (im Browser-Fenster) zu "Business Horizon 2.1" und * erstellt das zugehoerige Vertikale Splitpanel, in dem oben die Navigation und * unten die anzuzeigende Maske eingefuegt werden koennen. * //ww w .j a v a 2 s.c o m * @author Julius Hacker, Mirko Gpfrich */ private void generateUi() { setCaption("Business Horizon 2.1"); logger.debug("Ueberschrift fuer Browser erstellt"); //Teilt das Fenster vertikal in zwei Bereiche auf und erstellt eine horizontale Trennlinie (nicht verstellbar). verticalSplitPanel = new VerticalSplitPanel(); verticalSplitPanel.setSplitPosition(100, Sizeable.UNITS_PIXELS); verticalSplitPanel.setLocked(true); verticalSplitPanel.setStyleName("small"); logger.debug("Neues Vertikales SplitPanel erstellt"); // Setzt das vertikale Splitpanel (ueres Panel) inkl innere Panels als Inhalt fr das Fenster. setContent(verticalSplitPanel); logger.debug("Vertikales SplitPanel mit allen Elementen an das Hauptfenster bergeben"); }
From source file:edu.cornell.qatarmed.planrnaseq.AnnotateRNAseqSQL.java
private void initLayout() { /* Root of the user interface component tree is set */ HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); setContent(splitPanel);//from w ww . j a v a2 s. co m /* Build the component tree */ VerticalLayout leftLayout = new VerticalLayout(); 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(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); // rightSplitPanel.setWidth("20%"); /* //make form asking parameters and add it to leftLaayout VerticalLayout formLayout = new VerticalLayout(); // TextField studyName = new TextField("RNAseq Study Name"); formLayout.addComponent(studyName); List replist = new ArrayList(); ComboBox numReplicates = new ComboBox("Replicates", replist); formLayout.addComponent(numReplicates); leftLayout.addComponent(formLayout); */ HorizontalLayout leftTopLayout = new HorizontalLayout(); leftLayout.addComponent(leftTopLayout); leftTopLayout.addComponent(searchField); leftTopLayout.addComponent(searchButton); 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(); /* VerticalLayout resultLayout = new VerticalLayout(); rightLayout.addComponent(resultLayout); VerticalLayout chartLayout = new VerticalLayout(); rightLayout.addComponent(chartLayout); chartLayout.setVisible(false); */ rightBottomLeftLayout.addComponent(tree); rightBottomRightLayout.addComponent(rightBottomTabsheet); rightBottomTabsheet.addTab(myform, "Selected Biosample"); 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:edu.cornell.qatarmed.planrnaseq.AnnotateView.java
public void initLayout() { /* Root of the user interface component tree is set */ HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); addComponent(splitPanel);/* w w w . j ava 2 s. c o m*/ // panel = new Panel(); // panel.setContent(splitPanel); splitPanel.setSizeFull(); //setCompositionRoot(splitPanel); // panel.setContent(splitPanel); /* Build the component tree */ VerticalLayout leftLayout = new VerticalLayout(); 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(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); // rightSplitPanel.setWidth("20%"); /* //make form asking parameters and add it to leftLaayout VerticalLayout formLayout = new VerticalLayout(); // TextField studyName = new TextField("RNAseq Study Name"); formLayout.addComponent(studyName); List replist = new ArrayList(); ComboBox numReplicates = new ComboBox("Replicates", replist); formLayout.addComponent(numReplicates); leftLayout.addComponent(formLayout); */ HorizontalLayout leftTopLayout = new HorizontalLayout(); leftLayout.addComponent(leftTopLayout); leftTopLayout.addComponent(searchField); leftTopLayout.addComponent(searchButton); 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(); /* VerticalLayout resultLayout = new VerticalLayout(); rightLayout.addComponent(resultLayout); VerticalLayout chartLayout = new VerticalLayout(); rightLayout.addComponent(chartLayout); chartLayout.setVisible(false); */ rightBottomLeftLayout.addComponent(tree); rightBottomRightLayout.addComponent(rightBottomTabsheet); rightBottomTabsheet.addTab(myform, "Selected Biosample"); 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: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. jav a 2 s . com 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.hip.sicx.vaadin.GUIComponent.java
License:Open Source License
@AutoGenerated private VerticalSplitPanel buildConsoleSplit() { // common part: create layout consoleSplit = new VerticalSplitPanel(); consoleSplit.setImmediate(false);// w ww . java 2s . co m consoleSplit.setWidth("100.0%"); consoleSplit.setHeight("100.0%"); consoleSplit.setMargin(false); // HorizontalSplitPanel HorizontalSplitPanel = buildHorizontalSplitPanel(); consoleSplit.addComponent(HorizontalSplitPanel); // consoleWindow consoleWindow = new TextArea(); consoleWindow.setImmediate(false); consoleWindow.setWidth("100.0%"); consoleWindow.setHeight("100.0%"); consoleSplit.addComponent(consoleWindow); return consoleSplit; }
From source file:fi.jasoft.dragdroplayouts.demo.DemoUI.java
License:Apache License
@Override protected void init(VaadinRequest request) { VerticalLayout content = new VerticalLayout(); content.setSizeFull();// w w w . j a v a 2s.com setContent(content); Label header = new Label("DragDropLayouts for Vaadin 8"); header.setStyleName(ValoTheme.LABEL_H1); content.addComponent(header); HorizontalLayout hl = new HorizontalLayout(); hl.setSizeFull(); content.addComponent(hl); content.setExpandRatio(hl, 1); VerticalSplitPanel split = new VerticalSplitPanel(); hl.addComponent(split); hl.setExpandRatio(split, 1); CssLayout placeHolder = new CssLayout(new Label("No view selected.")); placeHolder.setSizeFull(); split.setFirstComponent(placeHolder); Panel codePanel = new Panel(codeLabel); codePanel.setSizeFull(); split.setSecondComponent(codePanel); navigator = new Navigator(this, placeHolder); navigator.addViewChangeListener(new ViewChangeListener() { @Override public boolean beforeViewChange(ViewChangeEvent event) { DemoView view = (DemoView) event.getNewView(); selection.getSelectionModel().select(view); codeLabel.setValue(getFormattedSourceCode(view.getSource())); return true; } @Override public void afterViewChange(ViewChangeEvent event) { // TODO Auto-generated method stub } }); try { addView(new DragdropAbsoluteLayoutDemo(navigator)); addView(new DragdropVerticalLayoutDemo(navigator)); addView(new DragdropHorizontalLayoutDemo(navigator)); addView(new DragdropGridLayoutDemo(navigator)); addView(new DragdropCssLayoutDemo(navigator)); addView(new DragdropFormLayoutDemo(navigator)); addView(new DragdropPanelDemo(navigator)); addView(new DragdropLayoutDraggingDemo(navigator)); addView(new DragdropHorizontalSplitPanelDemo(navigator)); addView(new DragdropVerticalSplitPanelDemo(navigator)); addView(new DragdropTabsheetDemo(navigator)); addView(new DragdropAccordionDemo(navigator)); addView(new DragdropDragFilterDemo(navigator)); addView(new DragdropCaptionModeDemo(navigator)); addView(new DragdropV7VerticalLayoutDemo(navigator)); addView(new DragdropV7HorizontalLayoutDemo(navigator)); // addView(new DragdropIframeDragging(navigator)); } catch (Exception e) { e.printStackTrace(); return; } hl.addComponent(selection = createViewSelection(), 0); String fragment = Page.getCurrent().getUriFragment(); if (fragment == null || fragment.equals("")) { navigator.navigateTo(DragdropAbsoluteLayoutDemo.NAME); } }
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 ww . j a v a 2s .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: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();/* w ww . ja va 2 s . c om*/ VerticalSplitPanel verticalSplitPanel = new VerticalSplitPanel(); verticalSplitPanel.setFirstComponent(form); verticalSplitPanel.setSecondComponent(new Label("masodik")); sample.setSecondComponent(verticalSplitPanel); Table grid = new Table(); grid.setSizeFull(); 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:module.pandabox.presentation.PandaBox.java
License:Open Source License
private Layout getSplitPreviews() { Layout grid = getPreviewLayout("Split panels"); AbstractSplitPanel panel = new VerticalSplitPanel(); panel.setWidth("230px"); panel.setHeight("130px"); grid.addComponent(panel);//from w w w. j a v a 2 s. c o m panel = new VerticalSplitPanel(); panel.setWidth("230px"); panel.setHeight("130px"); panel.setStyleName("small"); grid.addComponent(panel); panel = new HorizontalSplitPanel(); panel.setWidth("230px"); panel.setHeight("130px"); grid.addComponent(panel); panel = new HorizontalSplitPanel(); panel.setWidth("230px"); panel.setHeight("130px"); panel.setStyleName("small"); grid.addComponent(panel); return grid; }