List of usage examples for com.vaadin.ui HorizontalLayout setHeight
@Override public void setHeight(String height)
From source file:org.escidoc.browser.elabsmodul.views.helpers.LabsLayoutHelper.java
License:Open Source License
public static HorizontalLayout createHorizontalLayoutWithELabsLabelAndLabelComplexData(final String labelTxt, String dataTxt, boolean required) { Preconditions.checkNotNull(labelTxt, "Label is null"); HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSizeUndefined(); horizontalLayout.setDescription(USER_DESCR_ON_HOR_LAYOUT_TO_EDIT); horizontalLayout.setEnabled(true);/*from w w w . j av a 2s . co m*/ horizontalLayout.setSpacing(true); horizontalLayout.setHeight(HOR_PANEL_HEIGHT); Label label = new Label(); label.setWidth(LABEL_WIDTH); label.setValue(DIV_ALIGN_RIGHT + (required ? ELabsViewContants.REQUIRED_SIGN : "") + labelTxt + DIV_END); label.setContentMode(Label.CONTENT_XHTML); label.setDescription(USER_DESCR_ON_LABEL_TO_EDIT); Label textLabel = new Label(dataTxt); textLabel.setWidth(TEXT_WIDTH); textLabel.setDescription(USER_DESCR_ON_LABEL_TO_EDIT); textLabel.setStyleName(STYLE_ELABS_TEXT_AS_LABEL); horizontalLayout.setStyleName(STYLE_ELABS_HOR_PANEL); horizontalLayout.addComponent(label, 0); horizontalLayout.addComponent(textLabel, 1); horizontalLayout.setComponentAlignment(label, Alignment.MIDDLE_LEFT); horizontalLayout.setComponentAlignment(textLabel, Alignment.MIDDLE_RIGHT); return horizontalLayout; }
From source file:org.escidoc.browser.elabsmodul.views.helpers.LabsLayoutHelper.java
License:Open Source License
public static HorizontalLayout createHorizontalLayoutWithELabsLabelAndCheckBoxData(final String labelTxt, final String checkBoxDescription, Property dataProperty, boolean required) { final HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSizeUndefined(); horizontalLayout.setDescription(USER_DESCR_ON_HOR_LAYOUT_TO_EDIT); horizontalLayout.setEnabled(true);/*w ww . ja v a 2 s.com*/ horizontalLayout.setSpacing(true); horizontalLayout.setHeight(HOR_PANEL_HEIGHT); horizontalLayout.setStyleName(STYLE_ELABS_HOR_PANEL); Label label = new Label(); label.setWidth(LABEL_WIDTH); label.setValue(DIV_ALIGN_RIGHT + (required ? ELabsViewContants.REQUIRED_SIGN : "") + labelTxt + DIV_END); label.setContentMode(Label.CONTENT_XHTML); label.setDescription(USER_DESCR_ON_LABEL_TO_EDIT); final CheckBox checkBox = new CheckBox(checkBoxDescription, dataProperty); checkBox.setEnabled(true); checkBox.setVisible(true); checkBox.setWidth(TEXT_WIDTH); checkBox.setStyleName(STYLE_ELABS_TEXT_AS_LABEL); checkBox.setDescription(USER_DESCR_ON_LABEL_TO_EDIT); horizontalLayout.addComponent(label, 0); horizontalLayout.addComponent(checkBox, 1); horizontalLayout.setComponentAlignment(label, Alignment.MIDDLE_LEFT); horizontalLayout.setComponentAlignment(checkBox, Alignment.MIDDLE_RIGHT); return horizontalLayout; }
From source file:org.escidoc.browser.ui.maincontent.ContainerView.java
License:Open Source License
private HorizontalLayout buildHlMetaViews() throws EscidocClientException { // common part: create layout HorizontalLayout hlMetaViews = new HorizontalLayout(); hlMetaViews.setImmediate(false);/*ww w .ja v a 2 s .co m*/ hlMetaViews.setWidth("100.0%"); hlMetaViews.setHeight("100.0%"); hlMetaViews.setMargin(false); // leftPanel Panel leftPanel = buildLeftPanel(); hlMetaViews.addComponent(leftPanel); hlMetaViews.setExpandRatio(leftPanel, 4.5f); // rightPanel Panel rightPanel = buildRightPanel(); hlMetaViews.addComponent(rightPanel); hlMetaViews.setExpandRatio(rightPanel, 5.5f); return hlMetaViews; }
From source file:org.escidoc.browser.ui.maincontent.ItemView.java
License:Open Source License
private HorizontalLayout buildHlMetaViews() { // common part: create layout HorizontalLayout hlMetaViews = new HorizontalLayout(); hlMetaViews.setImmediate(false);/*from w w w . j av a 2 s . c o m*/ hlMetaViews.setWidth("100.0%"); hlMetaViews.setHeight("100.0%"); hlMetaViews.setMargin(false); // leftPanel Panel leftPanel = buildLeftPanel(); hlMetaViews.addComponent(leftPanel); hlMetaViews.setExpandRatio(leftPanel, 0.7f); // rightPanel Panel rightPanel = buildRightPanel(); hlMetaViews.addComponent(rightPanel); hlMetaViews.setExpandRatio(rightPanel, 0.3f); return hlMetaViews; }
From source file:org.escidoc.browser.ui.view.WikiPageView.java
License:Open Source License
/** * Put ID + Modification and main Operation Icons here * /*from ww w . j ava 2s . co m*/ * @param vlContentPanel */ private void buildHeaderLayout(VerticalLayout vlContentPanel) { HorizontalLayout hl = new HorizontalLayout(); hl.setWidth("100%"); Label lblGeneralInfo = new Label( "ID: " + resourceProxy.getId() + " " + "Modified on " + resourceProxy.getModifiedOn()); hl.addComponent(lblGeneralInfo); HorizontalLayout mainOperationIcons = buildMainOperationIconsLayout(); hl.addComponent(mainOperationIcons); hl.setComponentAlignment(mainOperationIcons, Alignment.TOP_RIGHT); hl.setHeight("20px"); HorizontalLayout horizontalRuler = new HorizontalLayout(); horizontalRuler.setWidth("100%"); horizontalRuler.setHeight("9px"); horizontalRuler.addComponent(new Label("<hr>", Label.CONTENT_RAW)); vlContentPanel.addComponent(hl); vlContentPanel.addComponent(horizontalRuler); }
From source file:org.ikasan.dashboard.ui.administration.panel.RoleManagementPanel.java
License:BSD License
/** * /* w w w . ja v a 2 s .c o m*/ */ protected Layout initControlLayout() { this.newButton.setIcon(VaadinIcons.PLUS); this.newButton.setDescription("Create a New Role"); this.newButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY); this.newButton.addStyleName(ValoTheme.BUTTON_BORDERLESS); this.newButton.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { final NewRoleWindow newRoleWindow = new NewRoleWindow(securityService); UI.getCurrent().addWindow(newRoleWindow); newRoleWindow.addCloseListener(new Window.CloseListener() { // inline close-listener public void windowClose(CloseEvent e) { RoleManagementPanel.this.role = newRoleWindow.getRole(); RoleManagementPanel.this.roleItem = new BeanItem<Role>(RoleManagementPanel.this.role); RoleManagementPanel.this.roleNameField.setText(RoleManagementPanel.this.role.getName()); RoleManagementPanel.this.roleNameField .setPropertyDataSource(roleItem.getItemProperty("name")); RoleManagementPanel.this.descriptionField .setPropertyDataSource(roleItem.getItemProperty("description")); } }); } }); this.saveButton.setStyleName(ValoTheme.BUTTON_LINK); this.saveButton.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { try { RoleManagementPanel.this.save(); Notification.show("Saved"); } catch (RuntimeException e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); Notification.show("Cauget exception trying to save a Policy!", sw.toString(), Notification.Type.ERROR_MESSAGE); } } }); this.deleteButton.setIcon(VaadinIcons.TRASH); this.deleteButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY); this.deleteButton.addStyleName(ValoTheme.BUTTON_BORDERLESS); this.deleteButton.setDescription("Delete the Current Role"); this.deleteButton.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { try { RoleManagementPanel.this.securityService.deleteRole(role); RoleManagementPanel.this.roleNameField.setText(""); RoleManagementPanel.this.descriptionField.setValue(""); RoleManagementPanel.this.policyTable.removeAllItems(); Notification.show("Deleted"); } catch (RuntimeException e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); Notification.show("Cauget exception trying to delete a Policy!", sw.toString(), Notification.Type.ERROR_MESSAGE); } } }); HorizontalLayout controlLayout = new HorizontalLayout(); controlLayout.setWidth("100%"); controlLayout.setHeight("20px"); Label spacerLabel = new Label(""); controlLayout.addComponent(spacerLabel); controlLayout.setExpandRatio(spacerLabel, 0.91f); controlLayout.addComponent(newButton); controlLayout.setExpandRatio(newButton, 0.045f); controlLayout.addComponent(deleteButton); controlLayout.setExpandRatio(deleteButton, 0.045f); return controlLayout; }
From source file:org.ikasan.dashboard.ui.profile.panel.ProfilePanel.java
License:BSD License
protected void init() { this.setWidth("100%"); this.setHeight("100%"); HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setWidth("100%"); horizontalLayout.setHeight("100%"); horizontalLayout.setMargin(true);/*from w w w. j a v a2 s . co m*/ horizontalLayout.addComponent(new Label("I am the PROFILE panel!")); this.setContent(horizontalLayout); }
From source file:org.ikasan.dashboard.ui.service.error.panel.ErrorPanel.java
License:BSD License
protected void init() { this.setWidth("100%"); this.setHeight("100%"); HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setWidth("100%"); horizontalLayout.setHeight("100%"); horizontalLayout.setMargin(true);/*from w ww. ja v a2 s . co m*/ horizontalLayout.addComponent(new Label("I am the ERROR panel!")); this.setContent(horizontalLayout); }
From source file:org.ikasan.dashboard.ui.service.hospital.panel.HospitalPanel.java
License:BSD License
protected void init() { this.setWidth("100%"); this.setHeight("100%"); HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setWidth("100%"); horizontalLayout.setHeight("100%"); horizontalLayout.setMargin(true);//from ww w . j a va 2 s . com horizontalLayout.addComponent(new Label("I am the HOSPITAL panel!")); this.setContent(horizontalLayout); }
From source file:org.ikasan.dashboard.ui.service.replay.panel.ReplayPanel.java
License:BSD License
protected void init() { this.setWidth("100%"); this.setHeight("100%"); HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setWidth("100%"); horizontalLayout.setHeight("100%"); horizontalLayout.setMargin(true);/*from ww w . j a v a 2 s . c o m*/ horizontalLayout.addComponent(new Label("I am the REPLAY panel!")); this.setContent(horizontalLayout); }