List of usage examples for com.vaadin.ui Label setWidth
@Override public void setWidth(String width)
From source file:de.escidoc.admintool.view.util.LayoutHelper.java
License:Open Source License
/** * Helper method. Puts a blank in front of a component. Two labels with different size in front of two components. * /*from ww w .j ava2s. c o m*/ * @param labelLeft * the left (leading) label. * @param labelRight * the right (leading) label. * @param compLeft * the left component. * @param compRight * the right component. * @param widthLeft * the width of the left label. * @param widthRight * the width of the right label. * @param required * true if the component is required, otherwise false. * @return the customized component placed in a horizontal layout. */ public static synchronized HorizontalLayout create(final String labelLeft, final String labelRight, final Component compLeft, final Component compRight, final int widthLeft, final int widthRight, final boolean required) { // foo final HorizontalLayout hor = new HorizontalLayout(); hor.setHeight(Constants.DEFAULT_HEIGHT); hor.addComponent(new Label(" ")); final String text = Constants.P_ALIGN_RIGHT + labelLeft + Constants.P; Label ll, lr; hor.addComponent(ll = new Label(text, Label.CONTENT_XHTML)); ll.setSizeUndefined(); ll.setWidth(widthLeft + Constants.PX); hor.setComponentAlignment(ll, Alignment.MIDDLE_RIGHT); if (required) { hor.addComponent(new Label(" <span style=\"color:red; position:relative; top:13px;\">*</span>", Label.CONTENT_XHTML)); } else { hor.addComponent(new Label(" ", Label.CONTENT_XHTML)); } hor.addComponent(compLeft); hor.setComponentAlignment(compLeft, Alignment.BOTTOM_RIGHT); hor.addComponent(new Label(" ", Label.CONTENT_XHTML)); final String text2 = Constants.P_ALIGN_RIGHT + labelRight + Constants.P; hor.addComponent(lr = new Label(text2, Label.CONTENT_XHTML)); lr.setSizeUndefined(); lr.setWidth(widthRight + Constants.PX); hor.setComponentAlignment(lr, Alignment.BOTTOM_RIGHT); if (required) { hor.addComponent(new Label(" <span style=\"color:red; position:relative; top:13px;\">*</span>", Label.CONTENT_XHTML)); } else { hor.addComponent(new Label(" ", Label.CONTENT_XHTML)); } hor.addComponent(compRight); hor.setComponentAlignment(compRight, Alignment.BOTTOM_RIGHT); hor.addComponent(new Label(" ")); hor.setSpacing(false); return hor; }
From source file:de.escidoc.admintool.view.util.LayoutHelper.java
License:Open Source License
/** * Helper method for placing components. * //from w ww . j av a 2 s .com * @param labelLeft * the left (leading) label. * @param labelRight * the right (leading) label. * @param compLeft * the left component. * @param compRight * the right component. * @param width * the width of the label. * @param required * true if the component is required, otherwise false. * @return the customized component placed in a horizontal layout. */ public static synchronized HorizontalLayout create(final String labelLeft, final String labelRight, final Component compLeft, final Component compRight, final int width, final boolean required) { final HorizontalLayout hor = new HorizontalLayout(); hor.setHeight(Constants.DEFAULT_HEIGHT); hor.addComponent(new Label(" ")); final String text = Constants.P_ALIGN_RIGHT + labelLeft + Constants.P; Label ll, lr; hor.addComponent(ll = new Label(text, Label.CONTENT_XHTML)); ll.setSizeUndefined(); ll.setWidth(width + Constants.PX); hor.setComponentAlignment(ll, Alignment.MIDDLE_RIGHT); if (required) { hor.addComponent(new Label(" <span style=\"color:red; position:relative; top:13px;\">*</span>", Label.CONTENT_XHTML)); } else { hor.addComponent(new Label(" ", Label.CONTENT_XHTML)); } hor.addComponent(compLeft); hor.setComponentAlignment(compLeft, Alignment.MIDDLE_RIGHT); hor.addComponent(new Label(" ", Label.CONTENT_XHTML)); final String text2 = Constants.P_ALIGN_RIGHT + labelRight + Constants.P; hor.addComponent(lr = new Label(text2, Label.CONTENT_XHTML)); lr.setSizeUndefined(); lr.setWidth(width + Constants.PX); hor.setComponentAlignment(lr, Alignment.MIDDLE_RIGHT); if (required) { hor.addComponent(new Label(" <span style=\"color:red; position:relative; top:13px;\">*</span>", Label.CONTENT_XHTML)); } else { hor.addComponent(new Label(" ", Label.CONTENT_XHTML)); } hor.addComponent(compRight); hor.setComponentAlignment(compRight, Alignment.BOTTOM_RIGHT); hor.addComponent(new Label(" ")); hor.setSpacing(false); return hor; }
From source file:de.escidoc.admintool.view.util.LayoutHelper.java
License:Open Source License
public static Component foo(final String captionForleftLabel, final String captionForRightLabel, final Label leftLabel, final Label rightLabel, final int widthLeft, final int widthRight, final boolean required) { final HorizontalLayout hLayout = new HorizontalLayout(); hLayout.setHeight("30px"); hLayout.addComponent(new Label(" ")); final Label ll = new Label(Constants.P_ALIGN_RIGHT + captionForleftLabel + Constants.P, Label.CONTENT_XHTML); ll.setSizeUndefined();/*from w w w . j a v a 2 s .c o m*/ ll.setWidth(widthLeft + Constants.PX); hLayout.addComponent(ll); hLayout.setComponentAlignment(ll, Alignment.MIDDLE_RIGHT); if (required) { hLayout.addComponent(new Label(" <span style=\"color:red; position:relative; top:13px;\">*</span>", Label.CONTENT_XHTML)); } else { hLayout.addComponent(new Label(" ", Label.CONTENT_XHTML)); } hLayout.addComponent(leftLabel); hLayout.setComponentAlignment(leftLabel, Alignment.BOTTOM_RIGHT); hLayout.addComponent(new Label(" ", Label.CONTENT_XHTML)); Label lr; hLayout.addComponent( lr = new Label(Constants.P_ALIGN_RIGHT + captionForRightLabel + Constants.P, Label.CONTENT_XHTML)); lr.setSizeUndefined(); lr.setWidth(widthRight + Constants.PX); hLayout.setComponentAlignment(lr, Alignment.BOTTOM_RIGHT); if (required) { hLayout.addComponent(new Label(" <span style=\"color:red; position:relative; top:13px;\">*</span>", Label.CONTENT_XHTML)); } else { hLayout.addComponent(new Label(" ", Label.CONTENT_XHTML)); } hLayout.addComponent(rightLabel); hLayout.setComponentAlignment(rightLabel, Alignment.BOTTOM_RIGHT); hLayout.addComponent(new Label(" ")); hLayout.setSpacing(false); return hLayout; }
From source file:de.fzi.fhemapi.view.vaadin.ui.model.DeviceDetailEntry.java
License:Apache License
private static Label buildRichTextField(String text) { Label label = new Label(); label.setImmediate(false);/*from w ww . j av a 2s .co m*/ label.setWidth("-1px"); label.setHeight("-1px"); label.setValue(text); label.setContentMode(Label.CONTENT_XHTML); return label; }
From source file:de.fzi.fhemapi.view.vaadin.ui.NewDevicePanel.java
License:Apache License
private static HorizontalLayout getTitlePanel() { HorizontalLayout titleLayout = new HorizontalLayout(); titleLayout.setImmediate(false);/*from w w w.j a v a 2 s . c o m*/ titleLayout.setWidth("-1"); titleLayout.setHeight("-1"); titleLayout.setMargin(false); // deviceTitle Label title = new Label(); title.setImmediate(true); title.setWidth("100%"); title.setHeight("50"); title.setValue("<h1>Neues Gert..</h1>"); title.setContentMode(Label.CONTENT_XHTML); titleLayout.addComponent(title); titleLayout.setComponentAlignment(title, Alignment.TOP_CENTER); return titleLayout; }
From source file:de.fzi.fhemapi.view.vaadin.ui.NewRoomPanel.java
License:Apache License
private VerticalLayout buildMainLayout() { VerticalLayout layout = new VerticalLayout(); nameTextField = new TextField(); HorizontalLayout nameLay = UIHelper.buildAttributePanel("Name", nameTextField); layout.addComponent(nameLay);/* w w w.java 2s . c o m*/ typeComboBox = new ComboBox(); for (String type : roomTypes) { typeComboBox.addItem(type); } HorizontalLayout typeLay = UIHelper.buildAttributePanel("Typ", typeComboBox); layout.addComponent(typeLay); layout.setComponentAlignment(typeLay, Alignment.TOP_CENTER); Label devicesLabel = new Label(); devicesLabel.setImmediate(false); devicesLabel.setWidth("100%"); devicesLabel.setHeight("50"); devicesLabel.setValue("<b>Gerte</b>"); devicesLabel.setContentMode(Label.CONTENT_XHTML); layout.addComponent(devicesLabel); layout.setComponentAlignment(devicesLabel, Alignment.TOP_CENTER); List<Device> deviceList = parent.server.getDeviceManager().getDevices(); devicesCheckBox = new CheckBox[deviceList.size()]; for (int i = 0; i < deviceList.size(); i++) { devicesCheckBox[i] = new CheckBox(deviceList.get(i).getName()); layout.addComponent(devicesCheckBox[i]); layout.setComponentAlignment(devicesCheckBox[i], Alignment.MIDDLE_CENTER); } Button saveButton = new Button("Speichern"); saveButton.addListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { List<String> names = new LinkedList<String>(); for (CheckBox checkbox : devicesCheckBox) { if (checkbox.booleanValue()) names.add(checkbox.getCaption()); } Structure struc = new Structure((String) nameTextField.getValue(), (String) typeComboBox.getValue(), names); MessageResponse response = parent.server.getStructureManager().createNewStructure(struc); getWindow().showNotification(response.toString(), Notification.TYPE_TRAY_NOTIFICATION); parent.server.getStructureManager().rereadFromFHEM(); parent.reloadTree(); } }); layout.addComponent(saveButton); layout.setComponentAlignment(saveButton, Alignment.MIDDLE_CENTER); return layout; }
From source file:de.fzi.fhemapi.view.vaadin.ui.UIHelper.java
License:Apache License
/** * Builds a rich text field./*from w w w .j a v a 2s . co m*/ * @param text * @return */ public static Label buildRichTextField(String text) { Label label = new Label(); label.setImmediate(false); label.setWidth("-1px"); label.setHeight("-1px"); label.setValue(text); label.setContentMode(Label.CONTENT_XHTML); return label; }
From source file:de.uni_tuebingen.qbic.qbicmainportlet.ChangeProjectMetadataComponent.java
License:Open Source License
public void updateUI(final ProjectBean projectBean) { properties.removeAllComponents();/*from www. j ava2s . com*/ Button saveButton = new Button("Submit Changes"); saveButton.setStyleName(ValoTheme.BUTTON_FRIENDLY); currentDescription = projectBean.getDescription(); saveButton.addClickListener(new ClickListener() { @Override public void buttonClick(final ClickEvent event) { HashMap<String, Object> parameters = new HashMap<String, Object>(); Collection<Field<?>> registeredFields = fieldGroup.getFields(); // List<Property> factors = new ArrayList<Property>(); for (Field<?> field : registeredFields) { parameters.put("description", field.getValue()); } parameters.put("identifier", projectBean.getId()); parameters.put("user", LiferayAndVaadinUtils.getUser().getScreenName()); datahandler.getOpenBisClient().triggerIngestionService("update-project-metadata", parameters); Utils.Notification("Project details changed succesfully", String.format( "Details of project %s have been commited successfully.", projectBean.getId()), "success"); } }); buildFormLayout(); Label desc = new Label(String.format( "This view shows project details and can be used to change the corresponding values. \nIdentifier: %s", projectBean.getId()), Label.CONTENT_PREFORMATTED); desc.setWidth("50%"); properties.addComponent(desc); properties.addComponent(this.form); properties.addComponent(saveButton); }
From source file:de.uni_tuebingen.qbic.qbicmainportlet.QbicmainportletUI.java
License:Open Source License
/** * builds page if user is not logged in/* ww w . ja v a2 s.com*/ */ private void buildNotLoggedinLayout() { // Mail to qbic ExternalResource resource = new ExternalResource("mailto:info@qbic.uni-tuebingen.de"); Link mailToQbicLink = new Link("", resource); mailToQbicLink.setIcon(new ThemeResource("mail9.png")); ThemeDisplay themedisplay = (ThemeDisplay) VaadinService.getCurrentRequest() .getAttribute(WebKeys.THEME_DISPLAY); // redirect to liferay login page Link loginPortalLink = new Link("", new ExternalResource(themedisplay.getURLSignIn())); loginPortalLink.setIcon(new ThemeResource("lock12.png")); // left part of the page VerticalLayout signIn = new VerticalLayout(); signIn.addComponent( new Label("<h3>Sign in to manage your projects and access your data:</h3>", ContentMode.HTML)); signIn.addComponent(loginPortalLink); signIn.setStyleName("no-user-login"); // right part of the page VerticalLayout contact = new VerticalLayout(); contact.addComponent( new Label("<h3>If you are interested in doing projects get in contact:</h3>", ContentMode.HTML)); contact.addComponent(mailToQbicLink); contact.setStyleName("no-user-login"); // build final layout, with some gaps between HorizontalLayout notSignedInLayout = new HorizontalLayout(); Label expandingGap1 = new Label(); expandingGap1.setWidth("100%"); notSignedInLayout.addComponent(expandingGap1); notSignedInLayout.addComponent(signIn); notSignedInLayout.addComponent(contact); notSignedInLayout.setExpandRatio(expandingGap1, 0.16f); notSignedInLayout.setExpandRatio(signIn, 0.36f); notSignedInLayout.setExpandRatio(contact, 0.36f); notSignedInLayout.setWidth("100%"); notSignedInLayout.setSpacing(true); setContent(notSignedInLayout); }
From source file:de.uni_tuebingen.qbic.qbicmainportlet.QbicmainportletUI.java
License:Open Source License
/** * //w w w .j a va2s .c om * @param datahandler * @param request * @param user */ public void buildMainLayout(DataHandler datahandler, VaadinRequest request, String user) { State state = (State) UI.getCurrent().getSession().getAttribute("state"); MultiscaleController multiscaleController = new MultiscaleController(datahandler.getOpenBisClient(), user); final HomeView homeView = new HomeView(datahandler, "Your Projects", user, state, resUrl, manager.getTmpFolder()); DatasetView datasetView = new DatasetView(datahandler, state, resUrl); final SampleView sampleView = new SampleView(datahandler, state, resUrl, multiscaleController); // BarcodeView barcodeView = // new BarcodeView(datahandler.getOpenBisClient(), manager.getBarcodeScriptsFolder(), // manager.getBarcodePathVariable()); final ExperimentView experimentView = new ExperimentView(datahandler, state, resUrl, multiscaleController); // ChangePropertiesView changepropertiesView = new ChangePropertiesView(datahandler); final AddPatientView addPatientView = new AddPatientView(datahandler, state, resUrl); final SearchResultsView searchResultsView = new SearchResultsView(datahandler, "Search results", user, state, resUrl); Submitter submitter = null; try { submitter = WorkflowSubmitterFactory.getSubmitter(Type.guseSubmitter, manager); } catch (Exception e1) { e1.printStackTrace(); } WorkflowViewController controller = new WorkflowViewController(submitter, datahandler, user); final ProjectView projectView = new ProjectView(datahandler, state, resUrl, controller, manager); final PatientView patientView = new PatientView(datahandler, state, resUrl, controller, manager); VerticalLayout navigatorContent = new VerticalLayout(); // navigatorContent.setResponsive(true); final Navigator navigator = new Navigator(UI.getCurrent(), navigatorContent); navigator.addView(DatasetView.navigateToLabel, datasetView); navigator.addView(SampleView.navigateToLabel, sampleView); navigator.addView("", homeView); navigator.addView(ProjectView.navigateToLabel, projectView); // navigator.addView(BarcodeView.navigateToLabel, barcodeView); navigator.addView(ExperimentView.navigateToLabel, experimentView); navigator.addView(PatientView.navigateToLabel, patientView); navigator.addView(AddPatientView.navigateToLabel, addPatientView); navigator.addView(SearchResultsView.navigateToLabel, searchResultsView); setNavigator(navigator); // Production // mainLayout = new VerticalLayout(); for (Window w : getWindows()) { w.setSizeFull(); } mainLayout = new GridLayout(3, 3); mainLayout.setResponsive(true); mainLayout.setWidth(100, Unit.PERCENTAGE); mainLayout.addComponent(navigatorContent, 0, 1, 2, 1); mainLayout.setColumnExpandRatio(0, 0.2f); mainLayout.setColumnExpandRatio(1, 0.3f); mainLayout.setColumnExpandRatio(2, 0.5f); // Production // HorizontalLayout treeViewAndLevelView = new HorizontalLayout(); // HorizontalLayout headerView = new HorizontalLayout(); // headerView.setSpacing(false); HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); // final HorizontalLayout labelLayout = new HorizontalLayout(); // headerView.addComponent(buttonLayout); // headerView.addComponent(labelLayout); Button homeButton = new Button("Home"); homeButton.setIcon(FontAwesome.HOME); homeButton.setResponsive(true); homeButton.setStyleName(ValoTheme.BUTTON_LARGE); homeButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { navigator.navigateTo(""); } }); // Production buttonLayout.addComponent(homeButton); // mainLayout.addComponent(homeButton, 0, 0); Boolean includePatientCreation = false; List<Project> projects = datahandler.getOpenBisClient().getOpenbisInfoService() .listProjectsOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), user); int numberOfProjects = 0; for (Project project : projects) { if (project.getSpaceCode().contains("IVAC")) { includePatientCreation = true; } numberOfProjects += 1; } // add patient button if (includePatientCreation) { Button addPatient = new Button("Add Patient"); addPatient.setIcon(FontAwesome.PLUS); addPatient.setStyleName(ValoTheme.BUTTON_LARGE); addPatient.setResponsive(true); // addPatient.setStyleName("addpatient"); addPatient.addClickListener(new ClickListener() { @Override public void buttonClick(ClickEvent event) { UI.getCurrent().getNavigator().navigateTo(String.format(AddPatientView.navigateToLabel)); } }); // Production buttonLayout.addComponent(addPatient); // mainLayout.addComponent(addPatient, 1, 0); } mainLayout.addComponent(buttonLayout, 0, 0); Button header = new Button(String.format("Total number of projects: %s", numberOfProjects)); header.setIcon(FontAwesome.HAND_O_RIGHT); header.setStyleName(ValoTheme.BUTTON_LARGE); header.addStyleName(ValoTheme.BUTTON_BORDERLESS); // Production // labelLayout.addComponent(header); // labelLayout.setWidth(null); SearchEngineView searchBarView = new SearchEngineView(datahandler); // headerView.setWidth("100%"); // Production // headerView.addComponent(searchBarView); // headerView.setComponentAlignment(searchBarView, Alignment.TOP_RIGHT); // searchBarView.setSizeUndefined(); // treeViewAndLevelView.addComponent(navigatorContent); // mainLayout.addComponent(headerView); // mainLayout.addComponent(treeViewAndLevelView); mainLayout.addComponent(header, 1, 0); mainLayout.addComponent(searchBarView, 2, 0); // Production VerticalLayout versionLayout = new VerticalLayout(); versionLayout.setWidth(100, Unit.PERCENTAGE); Label versionLabel = new Label(String.format("version: %s", version)); Label revisionLabel = new Label(String.format("rev: %s", revision)); revisionLabel.setWidth(null); versionLabel.setWidth(null); versionLayout.addComponent(versionLabel); if (!isInProductionMode()) { versionLayout.addComponent(revisionLabel); } // versionLayout.setMargin(new MarginInfo(true, false, false, false)); // mainLayout.addComponent(versionLayout); mainLayout.addComponent(versionLayout, 0, 2, 2, 2); mainLayout.setRowExpandRatio(2, 1.0f); // mainLayout.setSpacing(true); versionLayout.setComponentAlignment(versionLabel, Alignment.MIDDLE_RIGHT); versionLayout.setComponentAlignment(revisionLabel, Alignment.BOTTOM_RIGHT); mainLayout.setComponentAlignment(searchBarView, Alignment.BOTTOM_RIGHT); setContent(mainLayout); // getContent().setSizeFull(); // "Responsive design" /* * getPage().addBrowserWindowResizeListener(new BrowserWindowResizeListener() { * * @Override public void browserWindowResized(BrowserWindowResizeEvent event) { int height = * event.getHeight(); int width = event.getWidth(); WebBrowser browser = * event.getSource().getWebBrowser(); // tv.rebuildLayout(height, width, browser); if * (currentView instanceof HomeView) { homeView.updateView(height, width, browser); } else if * (currentView instanceof ProjectView) { projectView.updateView(height, width, browser); } else * if (currentView instanceof ExperimentView) { experimentView.updateView(height, width, * browser); } else if (currentView instanceof PatientView) { patientView.updateView(height, * width, browser); } else if (currentView instanceof AddPatientView) { * addPatientView.updateView(height, width, browser); } } }); * * navigator.addViewChangeListener(new ViewChangeListener() { * * @Override public boolean beforeViewChange(ViewChangeEvent event) { int height = * getPage().getBrowserWindowHeight(); int width = getPage().getBrowserWindowWidth(); WebBrowser * browser = getPage().getWebBrowser(); // View oldView = event.getOldView(); // * this.setEnabled(oldView, false); * * currentView = event.getNewView(); if (currentView instanceof HomeView) { * homeView.updateView(height, width, browser); } if (currentView instanceof ProjectView) { * projectView.updateView(height, width, browser); } if (currentView instanceof ExperimentView) * { experimentView.updateView(height, width, browser); } if (currentView instanceof SampleView) * { sampleView.updateView(height, width, browser); } else if (currentView instanceof * PatientView) { patientView.updateView(height, width, browser); } else if (currentView * instanceof AddPatientView) { addPatientView.updateView(height, width, browser); } return * true; } * * private void setEnabled(View view, boolean enabled) { // tv.setEnabled(enabled); if (view * instanceof HomeView) { homeView.setEnabled(enabled); } if (view instanceof ProjectView) { * projectView.setEnabled(enabled); } if (view instanceof ExperimentView) { * experimentView.setEnabled(enabled); } if (view instanceof SampleView) { * sampleView.setEnabled(enabled); } } * * @Override public void afterViewChange(ViewChangeEvent event) { currentView = * event.getNewView(); // this.setEnabled(currentView, true); Object currentBean = null; if * (currentView instanceof ProjectView) { // TODO refactoring currentBean = new HashMap<String, * AbstractMap.SimpleEntry<String, Long>>(); * * // Production // labelLayout.removeAllComponents(); Button header = new * Button(projectView.getHeaderLabel()); header.setStyleName(ValoTheme.BUTTON_LARGE); * header.addStyleName(ValoTheme.BUTTON_BORDERLESS); header.setIcon(FontAwesome.HAND_O_RIGHT); * * // labelLayout.addComponent(header); } else if (currentView instanceof HomeView) { * currentBean = new HashMap<String, AbstractMap.SimpleEntry<String, Long>>(); * * // labelLayout.removeAllComponents(); Button header = new Button(homeView.getHeader()); * header.setStyleName(ValoTheme.BUTTON_LARGE); * header.addStyleName(ValoTheme.BUTTON_BORDERLESS); header.setIcon(FontAwesome.HAND_O_RIGHT); * * // labelLayout.addComponent(header); // currentBean = projectView.getCurrentBean(); } else if * (currentView instanceof ExperimentView) { currentBean = experimentView.getCurrentBean(); * * } else if (currentView instanceof SampleView) { // TODO refactoring currentBean = new * HashMap<String, AbstractMap.SimpleEntry<String, Long>>(); * * // labelLayout.removeAllComponents(); Button header = new Button(sampleView.getHeader()); * header.setStyleName(ValoTheme.BUTTON_LARGE); * header.addStyleName(ValoTheme.BUTTON_BORDERLESS); header.setIcon(FontAwesome.HAND_O_RIGHT); * * // labelLayout.addComponent(header); * * } else if (currentView instanceof DatasetView) { currentBean = new HashMap<String, * AbstractMap.SimpleEntry<String, Long>>(); } else if (currentView instanceof PatientView) { * currentBean = new HashMap<String, AbstractMap.SimpleEntry<String, Long>>(); * * // labelLayout.removeAllComponents(); Button header = new * Button(patientView.getHeaderLabel()); header.setStyleName(ValoTheme.BUTTON_LARGE); * header.addStyleName(ValoTheme.BUTTON_BORDERLESS); header.setIcon(FontAwesome.HAND_O_RIGHT); * // labelLayout.addComponent(header); } else if (currentView instanceof AddPatientView) { * currentBean = new HashMap<String, AbstractMap.SimpleEntry<String, Long>>(); * * // labelLayout.removeAllComponents(); Button header = new Button(addPatientView.getHeader()); * header.setStyleName(ValoTheme.BUTTON_LARGE); * header.addStyleName(ValoTheme.BUTTON_BORDERLESS); header.setIcon(FontAwesome.HAND_O_RIGHT); * // labelLayout.addComponent(header); } try { PortletSession portletSession = * QbicmainportletUI.getCurrent().getPortletSession(); if (portletSession != null) { * portletSession.setAttribute("qbic_download", currentBean, PortletSession.APPLICATION_SCOPE); * } } catch (NullPointerException e) { // nothing to do. during initialization that might * happen. Nothing to worry about } * * * } * * }); */ /* * // go to correct page String requestParams = Page.getCurrent().getUriFragment(); * * // LOGGER.debug("used urifragement: " + requestParams); if (requestParams != null) { * navigator.navigateTo(requestParams.startsWith("!") ? requestParams.substring(1) : * requestParams); } else { navigator.navigateTo(""); } */ }