List of usage examples for com.vaadin.ui HorizontalSplitPanel setSizeFull
@Override public void setSizeFull()
From source file:annis.gui.SearchUI.java
License:Apache License
@Override protected void init(VaadinRequest request) { super.init(request); this.instanceConfig = getInstanceConfig(request); getPage().setTitle(instanceConfig.getInstanceDisplayName() + " (ANNIS Corpus Search)"); queryController = new QueryController(this); refresh = new Refresher(); // deactivate refresher by default refresh.setRefreshInterval(-1);// w w w. j av a2s . co m refresh.addListener(queryController); addExtension(refresh); // always get the resize events directly setImmediate(true); VerticalLayout mainLayout = new VerticalLayout(); setContent(mainLayout); mainLayout.setSizeFull(); mainLayout.setMargin(false); final ScreenshotMaker screenshot = new ScreenshotMaker(this); addExtension(screenshot); css = new CSSInject(this); HorizontalLayout layoutToolbar = new HorizontalLayout(); layoutToolbar.setWidth("100%"); layoutToolbar.setHeight("-1px"); mainLayout.addComponent(layoutToolbar); layoutToolbar.addStyleName("toolbar"); layoutToolbar.addStyleName("border-layout"); Button btAboutAnnis = new Button("About ANNIS"); btAboutAnnis.addStyleName(ChameleonTheme.BUTTON_SMALL); btAboutAnnis.setIcon(new ThemeResource("info.gif")); btAboutAnnis.addClickListener(new AboutClickListener()); btBugReport = new Button("Report Bug"); btBugReport.addStyleName(ChameleonTheme.BUTTON_SMALL); btBugReport.setDisableOnClick(true); btBugReport.setIcon(new ThemeResource("../runo/icons/16/email.png")); btBugReport.addListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { screenshot.makeScreenshot(); btBugReport.setCaption("bug report is initialized..."); } }); String bugmail = (String) VaadinSession.getCurrent().getAttribute("bug-e-mail"); if (bugmail != null && !bugmail.isEmpty() && !bugmail.startsWith("${") && new EmailValidator("").isValid(bugmail)) { this.bugEMailAddress = bugmail; } btBugReport.setVisible(this.bugEMailAddress != null); lblUserName = new Label("not logged in"); lblUserName.setWidth("-1px"); lblUserName.setHeight("-1px"); lblUserName.addStyleName("right-aligned-text"); btLoginLogout = new Button("Login", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { if (isLoggedIn()) { // logout Helper.setUser(null); Notification.show("Logged out", Notification.Type.TRAY_NOTIFICATION); updateUserInformation(); } else { showLoginWindow(); } } }); btLoginLogout.setSizeUndefined(); btLoginLogout.setStyleName(ChameleonTheme.BUTTON_SMALL); btLoginLogout.setIcon(new ThemeResource("../runo/icons/16/user.png")); Button btOpenSource = new Button("Help us to make ANNIS better!"); btOpenSource.setStyleName(BaseTheme.BUTTON_LINK); btOpenSource.addListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { Window w = new HelpUsWindow(); w.setCaption("Help us to make ANNIS better!"); w.setModal(true); w.setResizable(true); w.setWidth("600px"); w.setHeight("500px"); addWindow(w); w.center(); } }); layoutToolbar.addComponent(btAboutAnnis); layoutToolbar.addComponent(btBugReport); layoutToolbar.addComponent(btOpenSource); layoutToolbar.addComponent(lblUserName); layoutToolbar.addComponent(btLoginLogout); layoutToolbar.setSpacing(true); layoutToolbar.setComponentAlignment(btAboutAnnis, Alignment.MIDDLE_LEFT); layoutToolbar.setComponentAlignment(btBugReport, Alignment.MIDDLE_LEFT); layoutToolbar.setComponentAlignment(btOpenSource, Alignment.MIDDLE_CENTER); layoutToolbar.setComponentAlignment(lblUserName, Alignment.MIDDLE_RIGHT); layoutToolbar.setComponentAlignment(btLoginLogout, Alignment.MIDDLE_RIGHT); layoutToolbar.setExpandRatio(btOpenSource, 1.0f); //HorizontalLayout hLayout = new HorizontalLayout(); final HorizontalSplitPanel hSplit = new HorizontalSplitPanel(); hSplit.setSizeFull(); mainLayout.addComponent(hSplit); mainLayout.setExpandRatio(hSplit, 1.0f); AutoGeneratedQueries autoGenQueries = new AutoGeneratedQueries("example queries", this); controlPanel = new ControlPanel(queryController, instanceConfig, autoGenQueries); controlPanel.setWidth(100f, Layout.Unit.PERCENTAGE); controlPanel.setHeight(100f, Layout.Unit.PERCENTAGE); hSplit.setFirstComponent(controlPanel); tutorial = new TutorialPanel(); tutorial.setHeight("99%"); mainTab = new TabSheet(); mainTab.setSizeFull(); mainTab.addTab(autoGenQueries, "example queries"); mainTab.addTab(tutorial, "Tutorial"); queryBuilder = new QueryBuilderChooser(queryController, this, instanceConfig); mainTab.addTab(queryBuilder, "Query Builder"); hSplit.setSecondComponent(mainTab); hSplit.setSplitPosition(CONTROL_PANEL_WIDTH, Unit.PIXELS); hSplit.addSplitterClickListener(new AbstractSplitPanel.SplitterClickListener() { @Override public void splitterClick(AbstractSplitPanel.SplitterClickEvent event) { if (event.isDoubleClick()) { if (hSplit.getSplitPosition() == CONTROL_PANEL_WIDTH) { // make small hSplit.setSplitPosition(0.0f, Unit.PIXELS); } else { // reset to default width hSplit.setSplitPosition(CONTROL_PANEL_WIDTH, Unit.PIXELS); } } } }); // hLayout.setExpandRatio(mainTab, 1.0f); addAction(new ShortcutListener("^Query builder") { @Override public void handleAction(Object sender, Object target) { mainTab.setSelectedTab(queryBuilder); } }); addAction(new ShortcutListener("Tutor^eial") { @Override public void handleAction(Object sender, Object target) { mainTab.setSelectedTab(tutorial); } }); getPage().addUriFragmentChangedListener(this); getSession().addRequestHandler(new RequestHandler() { @Override public boolean handleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) throws IOException { checkCitation(request); if (request.getPathInfo() != null && request.getPathInfo().startsWith("/vis-iframe-res/")) { String uuidString = StringUtils.removeStart(request.getPathInfo(), "/vis-iframe-res/"); UUID uuid = UUID.fromString(uuidString); IFrameResourceMap map = VaadinSession.getCurrent().getAttribute(IFrameResourceMap.class); if (map == null) { response.setStatus(404); } else { IFrameResource res = map.get(uuid); if (res != null) { response.setStatus(200); response.setContentType(res.getMimeType()); response.getOutputStream().write(res.getData()); } } return true; } return false; } }); getSession().setAttribute(MediaController.class, new MediaControllerImpl()); getSession().setAttribute(PDFController.class, new PDFControllerImpl()); loadInstanceFonts(); checkCitation(request); lastQueriedFragment = ""; evaluateFragment(getPage().getUriFragment()); updateUserInformation(); }
From source file:com.esspl.datagen.ui.ExplorerView.java
License:Open Source License
public ExplorerView(final DataGenApplication dataApp, DatabaseSessionManager databaseSessionManager) { log.debug("ExplorerView - constructor start"); dataGenApplication = dataApp;// w w w . j a va 2s. c o m setCaption("Tables"); setSizeFull(); final HorizontalSplitPanel sp = new HorizontalSplitPanel(); sp.setSizeFull(); sp.setLocked(true); TableSelectorView tableSelectorView = new TableSelectorView(databaseSessionManager, dataGenApplication); tableSelectorView.setDetailsListener(new DetailsListener() { @Override public void showDetails(Component component) { component.setSizeFull(); sp.setSecondComponent(component); } }); sp.setFirstComponent(tableSelectorView); sp.setSplitPosition(210, UNITS_PIXELS); setCompositionRoot(sp); }
From source file:com.esspl.datagen.ui.SettingsView.java
License:Open Source License
private Component createWorkArea() { HorizontalSplitPanel split = new HorizontalSplitPanel(); split.setSizeFull(); split.setSplitPosition(30);/* ww w . j av a 2s. com*/ 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.garyclayburg.vconsole.VConsole.java
License:Open Source License
protected void init(VaadinRequest vaadinRequest) { final Refresher refresher = new Refresher(); refresher.addListener(new Refresher.RefreshListener() { @Override/*w w w .ja v a 2 s . c o m*/ public void refresh(Refresher refresher) { // log.debug("refreshing UI..."); } }); addExtension(refresher); addStyleName("dashboard-view"); final VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); setContent(layout); searchStatus = new Label("0 users matching: "); TextField searchField = new TextField(); searchField.setInputPrompt("first or last name"); searchField.setTextChangeEventMode(AbstractTextField.TextChangeEventMode.LAZY); searchField.addTextChangeListener(new FieldEvents.TextChangeListener() { @Override public void textChange(FieldEvents.TextChangeEvent event) { String searchText = event.getText(); log.debug("search: {}", searchText); QUser qUser = new QUser("user"); long startSearch = System.nanoTime(); if (searchText.length() > 2) { Iterable<User> searchedUsers = autoUserRepo.findAll(qUser.firstname .containsIgnoreCase(searchText).or(qUser.lastname.containsIgnoreCase(searchText))); long endSearch = System.nanoTime(); log.info("Finshed searching for \"{}\" in {} secs", searchText, ((endSearch - startSearch) / 1000000000.0)); searchStatus.setValue("? users matching: " + searchText); updateUserList(searchedUsers, searchText); } else if (searchText.equals("*")) { Iterable<User> searchedUsers = autoUserRepo.findAll(); long endSearch = System.nanoTime(); log.info("Searched for \"{}\" in {} secs", searchText, ((endSearch - startSearch) / 1000000000.0)); searchStatus.setValue("? users matching: " + searchText); updateUserList(searchedUsers, searchText); } else { log.debug("not enough chars"); searchStatus.setValue("* for all users..."); } } }); createExceptionWindow("no errors yet..."); final User finalFirstUser = firstUser; policyChangeController.addChangeListener(new PolicyChangeListener() { @Override public void policyChanged() { log.info("policy is changing"); BeanContainer beanContainer = (BeanContainer) userTable.getContainerDataSource(); List itemIds = beanContainer.getItemIds(); boolean refreshedSelected = false; for (Object itemId : itemIds) { String id = (String) itemId; BeanItem item = beanContainer.getItem(itemId); log.debug("refreshing user id: " + id); User user = (User) item.getBean(); log.debug("refreshing user: " + user.getFirstname()); if (userTable.isSelected(itemId)) { refreshUserValues(user); refreshedSelected = true; } } log.debug("forcing table update"); updateRightClickItems(); log.debug("forcing table update complete"); if (!refreshedSelected && finalFirstUser != null) { refreshUserValues(finalFirstUser); } int numErrors = populatePolicyExceptionList(); // this will catch runtime errors not caught during groovy compile if (numErrors == 0) { showPolicyUpdated(); } } @Override public void policyException(Throwable e) { populatePolicyExceptionList(); //cannot compile operator supplied groovy? } }); attributeTable = new Table(); attributeTable.setSizeFull(); attributeTable.setSelectable(true); attributeTable.setMultiSelect(false); attributeTable.setImmediate(true); attributesBeanContainer = new BeanContainer<>(GeneratedAttributesBean.class); attributesBeanContainer.setBeanIdProperty("attributeName"); attributeTable.setContainerDataSource(attributesBeanContainer); BeanContainer<String, User> userBeanContainer = new BeanContainer<>(User.class); userBeanContainer.setBeanIdProperty("id"); userTable = createUserTable(userBeanContainer); userTable.addItemClickListener(new ItemClickEvent.ItemClickListener() { @Override public void itemClick(ItemClickEvent event) { User selectedUser = (User) ((BeanItem) event.getItem()).getBean(); refreshUserValues(selectedUser); populatePolicyExceptionList(); // maybe this user clicked on causes runtime exception in groovy? } }); HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); splitPanel.setSplitPosition(150, Unit.PIXELS); splitPanel.setFirstComponent(userTable); splitPanel.setSecondComponent(attributeTable); // MenuBar menuBar = createMenu(); // layout.addComponent(menuBar); HorizontalLayout top = createTop(); populatePolicyExceptionList(); //initial check for groovy errors layout.addComponent(top); layout.addComponent(searchField); layout.addComponent(searchStatus); layout.addComponent(splitPanel); populateItems(firstUser, attributesBeanContainer); }
From source file:com.rdonasco.datamanager.view.DataManagerView.java
License:Apache License
@Override public void initWidget() throws WidgetInitalizeException { HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSplitPosition(300f, UNITS_PIXELS); getListView().getTable().setDataManager(dataManager); refreshData();/* w w w . j a v a 2s. c o m*/ getListView().setSizeFull(); splitPanel.setFirstComponent(getListView()); getDataForm().setSizeFull(); getDataForm().setDataManager(dataManager); getDataForm().setView(this); splitPanel.setSecondComponent(getDataForm()); splitPanel.setSizeFull(); addComponent(splitPanel); setExpandRatio(splitPanel, 1.0f); setMargin(false); // setup listeners getListView().getTable().addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { displaySelectedRecordInTheForm(); } }); }
From source file:de.catma.ui.analyzer.MarkupResultPanel.java
License:Open Source License
private void initComponents() { setSizeFull();//from www. j a va 2 s . c om HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); VerticalLayout leftComponent = new VerticalLayout(); leftComponent.setSpacing(true); leftComponent.setSizeFull(); resultTable = new TreeTable(); resultTable.setSelectable(true); resultTable.setMultiSelect(true); HierarchicalContainer container = new HierarchicalContainer(); container.setItemSorter(new PropertyDependentItemSorter(TreePropertyName.caption, new PropertyToTrimmedStringCIComparator())); resultTable.setContainerDataSource(container); resultTable.addContainerProperty(TreePropertyName.caption, String.class, null); resultTable.setColumnHeader(TreePropertyName.caption, "Tag Definition"); resultTable.addContainerProperty(TreePropertyName.sourcedocument, String.class, null); resultTable.setColumnHeader(TreePropertyName.sourcedocument, "Source Document"); resultTable.addContainerProperty(TreePropertyName.markupcollection, String.class, null); resultTable.setColumnHeader(TreePropertyName.markupcollection, "Markup Collection"); resultTable.addContainerProperty(TreePropertyName.phrase, String.class, null); resultTable.setColumnHeader(TreePropertyName.phrase, "Phrase"); resultTable.addContainerProperty(TreePropertyName.propertyname, String.class, null); resultTable.setColumnHeader(TreePropertyName.propertyname, "Property"); resultTable.addContainerProperty(TreePropertyName.propertyvalue, String.class, null); resultTable.setColumnHeader(TreePropertyName.propertyvalue, "Property value"); resultTable.addContainerProperty(TreePropertyName.frequency, Integer.class, null); resultTable.setColumnHeader(TreePropertyName.frequency, "Frequency"); resultTable.addContainerProperty(TreePropertyName.visible, AbstractComponent.class, null); resultTable.setColumnHeader(TreePropertyName.visible, "Visible in Kwic"); resultTable.setItemCaptionPropertyId(TreePropertyName.caption); resultTable.setPageLength(10); //TODO: config resultTable.setSizeFull(); resultTable.setColumnCollapsingAllowed(true); resultTable.setColumnCollapsible(TreePropertyName.caption, false); resultTable.setColumnCollapsible(TreePropertyName.sourcedocument, true); resultTable.setColumnCollapsible(TreePropertyName.markupcollection, true); resultTable.setColumnCollapsible(TreePropertyName.phrase, true); resultTable.setColumnCollapsible(TreePropertyName.propertyname, true); resultTable.setColumnCollapsible(TreePropertyName.propertyvalue, true); resultTable.setColumnCollapsible(TreePropertyName.frequency, false); resultTable.setColumnCollapsible(TreePropertyName.visible, false); //TODO: a description generator that shows the version of a Tag // resultTable.setItemDescriptionGenerator(generator); leftComponent.addComponent(resultTable); leftComponent.setExpandRatio(resultTable, 1.0f); HorizontalLayout buttonPanel = new HorizontalLayout(); buttonPanel.setSpacing(true); buttonPanel.setWidth("100%"); btDist = new Button(); btDist.setIcon(new ClassResource("ui/analyzer/resources/chart.gif", getApplication())); buttonPanel.addComponent(btDist); btResultExcelExport = new Button(); btResultExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btResultExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); buttonPanel.addComponent(btResultExcelExport); cbFlatTable = new CheckBox("flat table", false); cbFlatTable.setImmediate(true); buttonPanel.addComponent(cbFlatTable); buttonPanel.setComponentAlignment(cbFlatTable, Alignment.MIDDLE_RIGHT); buttonPanel.setExpandRatio(cbFlatTable, 1f); btSelectAll = new Button("Select all for Kwic"); buttonPanel.addComponent(btSelectAll); buttonPanel.setComponentAlignment(btSelectAll, Alignment.MIDDLE_RIGHT); // buttonPanel.setExpandRatio(btSelectAll, 1f); btDeselectAll = new Button("Deselect all for Kwic"); buttonPanel.addComponent(btDeselectAll); buttonPanel.setComponentAlignment(btDeselectAll, Alignment.MIDDLE_RIGHT); leftComponent.addComponent(buttonPanel); splitPanel.addComponent(leftComponent); VerticalLayout rightComponent = new VerticalLayout(); rightComponent.setSpacing(true); rightComponent.setSizeFull(); this.kwicPanel = new KwicPanel(repository, relevantUserMarkupCollectionProvider, true); rightComponent.addComponent(kwicPanel); rightComponent.setExpandRatio(kwicPanel, 1f); HorizontalLayout kwicButtonPanel = new HorizontalLayout(); kwicButtonPanel.setSpacing(true); kwicButtonPanel.setWidth("100%"); btKwicExcelExport = new Button(); btKwicExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btKwicExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); kwicButtonPanel.addComponent(btKwicExcelExport); kwicButtonPanel.setComponentAlignment(btKwicExcelExport, Alignment.MIDDLE_LEFT); btUntagResults = new Button("Untag selected Kwics"); kwicButtonPanel.addComponent(btUntagResults); kwicButtonPanel.setComponentAlignment(btUntagResults, Alignment.MIDDLE_RIGHT); kwicButtonPanel.setExpandRatio(btUntagResults, 1f); Label helpLabel = new Label(); helpLabel.setIcon(new ClassResource("ui/resources/icon-help.gif", getApplication())); helpLabel.setWidth("20px"); helpLabel.setDescription("<h3>Hints</h3>" + "<h4>Tagging search results</h4>" + "You can tag the search results in the Kwic-view: " + "<p>First select one or more rows and then drag the desired " + "Tag from the Tag Manager over the Kwic-results.</p>" + "<h4>Take a closer look</h4>" + "You can jump to the location in the full text by double " + "clicking on a row in the Kwic-view."); kwicButtonPanel.addComponent(helpLabel); kwicButtonPanel.setComponentAlignment(helpLabel, Alignment.MIDDLE_RIGHT); rightComponent.addComponent(kwicButtonPanel); rightComponent.setComponentAlignment(kwicButtonPanel, Alignment.MIDDLE_RIGHT); splitPanel.addComponent(rightComponent); addComponent(splitPanel); }
From source file:de.catma.ui.analyzer.PhraseResultPanel.java
License:Open Source License
private void initComponents() { setSizeFull();//www .ja va 2 s. c o m HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); VerticalLayout leftComponent = new VerticalLayout(); leftComponent.setSpacing(true); leftComponent.setSizeFull(); resultTable = new TreeTable(); resultTable.setSelectable(true); resultTable.setMultiSelect(true); HierarchicalContainer container = new HierarchicalContainer(); container.setItemSorter(new PropertyDependentItemSorter(TreePropertyName.caption, new PropertyToTrimmedStringCIComparator())); resultTable.setContainerDataSource(container); resultTable.addContainerProperty(TreePropertyName.caption, String.class, null); resultTable.setColumnHeader(TreePropertyName.caption, "Phrase"); resultTable.addContainerProperty(TreePropertyName.frequency, Integer.class, null); resultTable.setColumnHeader(TreePropertyName.frequency, "Frequency"); resultTable.addContainerProperty(TreePropertyName.visibleInKwic, AbstractComponent.class, null); resultTable.setColumnHeader(TreePropertyName.visibleInKwic, "Visible in Kwic"); resultTable.setItemCaptionPropertyId(TreePropertyName.caption); resultTable.setPageLength(10); //TODO: config resultTable.setSizeFull(); leftComponent.addComponent(resultTable); leftComponent.setExpandRatio(resultTable, 1.0f); HorizontalLayout buttonPanel = new HorizontalLayout(); buttonPanel.setSpacing(true); buttonPanel.setWidth("100%"); btDist = new Button(); btDist.setIcon(new ClassResource("ui/analyzer/resources/chart.gif", getApplication())); btDist.setDescription("Show selected phrases as a distribution trend in a " + "chart like visualization."); buttonPanel.addComponent(btDist); btDoubleTree = new Button(); btDoubleTree.setIcon(new ClassResource("ui/analyzer/resources/doubletree.gif", getApplication())); btDoubleTree.setDescription("Show a selected phrase with a doubletree kwic visualization."); buttonPanel.addComponent(btDoubleTree); btExcelExport = new Button(); btExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); buttonPanel.addComponent(btExcelExport); btSelectAll = new Button("Select all for Kwic"); buttonPanel.addComponent(btSelectAll); buttonPanel.setComponentAlignment(btSelectAll, Alignment.MIDDLE_RIGHT); buttonPanel.setExpandRatio(btSelectAll, 1f); btDeselectAll = new Button("Deselect all for Kwic"); buttonPanel.addComponent(btDeselectAll); buttonPanel.setComponentAlignment(btDeselectAll, Alignment.MIDDLE_RIGHT); leftComponent.addComponent(buttonPanel); splitPanel.addComponent(leftComponent); VerticalLayout rightComponent = new VerticalLayout(); rightComponent.setSpacing(true); rightComponent.setSizeFull(); this.kwicPanel = new KwicPanel(repository, relevantUserMarkupCollectionProvider); rightComponent.addComponent(kwicPanel); rightComponent.setExpandRatio(kwicPanel, 1f); HorizontalLayout kwicButtonPanel = new HorizontalLayout(); kwicButtonPanel.setSpacing(true); kwicButtonPanel.setWidth("100%"); btKwicExcelExport = new Button(); btKwicExcelExport.setIcon(new ThemeResource("../images/table-excel.png")); btKwicExcelExport.setDescription("Export all Query result data as an Excel spreadsheet."); kwicButtonPanel.addComponent(btKwicExcelExport); Label helpLabel = new Label(); helpLabel.setIcon(new ClassResource("ui/resources/icon-help.gif", getApplication())); helpLabel.setDescription("<h3>Hints</h3>" + "<h4>Tagging search results</h4>" + "You can tag the search results in the Kwic-view: " + "<p>First select one or more rows and then drag the desired " + "Tag from the Tag Manager over the Kwic-results.</p>" + "<h4>Take a closer look</h4>" + "You can jump to the location in the full text by double " + "clicking on a row in the Kwic-view." + "<h4>Untag search results</h4>" + "The \"Results by markup\" tab gives you the opportunity " + "to untag markup for selected search results in the Kwic-view."); kwicButtonPanel.addComponent(helpLabel); kwicButtonPanel.setExpandRatio(helpLabel, 1f); kwicButtonPanel.setComponentAlignment(helpLabel, Alignment.MIDDLE_RIGHT); rightComponent.addComponent(kwicButtonPanel); rightComponent.setComponentAlignment(kwicButtonPanel, Alignment.MIDDLE_RIGHT); splitPanel.addComponent(rightComponent); addComponent(splitPanel); }
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); }/*from w ww. jav a 2s. co m*/ }); documentsManagerPanel.addComponent(corpusPanel); documentsManagerPanel.addComponent(sourceDocumentPanel); return documentsManagerPanel; }
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 w w . j a v a 2s.c o 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 .java2 s .c om // 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(); }