List of usage examples for com.vaadin.ui Alignment MIDDLE_RIGHT
Alignment MIDDLE_RIGHT
To view the source code for com.vaadin.ui Alignment MIDDLE_RIGHT.
Click Source Link
From source file:de.catma.ui.tagmanager.TagsetTree.java
License:Open Source License
private void initComponents() { setSizeFull();/* ww w . j ava2 s . co m*/ tagTree = new EndorsedTreeTable(); tagTree.setImmediate(true); tagTree.setSizeFull(); tagTree.setSelectable(true); tagTree.setMultiSelect(false); tagTree.setContainerDataSource(new HierarchicalContainer()); tagTree.addContainerProperty(TagTreePropertyName.caption, String.class, null); tagTree.setColumnHeader(TagTreePropertyName.caption, "Tagsets"); tagTree.addContainerProperty(TagTreePropertyName.icon, Resource.class, null); tagTree.setItemCaptionPropertyId(TagTreePropertyName.caption); tagTree.setItemIconPropertyId(TagTreePropertyName.icon); tagTree.setItemCaptionMode(Tree.ITEM_CAPTION_MODE_PROPERTY); tagTree.setVisibleColumns(new Object[] { TagTreePropertyName.caption }); if (colorButtonListener != null) { tagTree.addGeneratedColumn(TagTreePropertyName.color, new ColorButtonColumnGenerator(colorButtonListener)); tagTree.setColumnReorderingAllowed(true); } else { tagTree.addGeneratedColumn(TagTreePropertyName.color, new ColorLabelColumnGenerator()); } tagTree.setColumnHeader(TagTreePropertyName.color, "Tag Color"); addComponent(tagTree); setExpandRatio(tagTree, 2); GridLayout buttonGrid = new GridLayout(1, 19); buttonGrid.setMargin(true); buttonGrid.setSpacing(true); buttonGrid.addStyleName("taglibrary-action-grid"); int buttonGridRowCount = 0; if (withTagsetButtons) { btReload = new Button(""); btReload.setIcon(new ClassResource("ui/resources/icon-reload.gif", getApplication())); btReload.addStyleName("icon-button"); buttonGrid.addComponent(btReload); buttonGrid.setComponentAlignment(btReload, Alignment.MIDDLE_RIGHT); buttonGridRowCount++; Label tagsetLabel = new Label(); tagsetLabel.setIcon(new ClassResource("ui/tagmanager/resources/grndiamd.gif", application)); tagsetLabel.setCaption("Tagset"); buttonGrid.addComponent(tagsetLabel); buttonGridRowCount++; btInsertTagset = new Button("Create Tagset"); btInsertTagset.setEnabled(true); btInsertTagset.setWidth("100%"); buttonGrid.addComponent(btInsertTagset); buttonGridRowCount++; btRemoveTagset = new Button("Remove Tagset"); btRemoveTagset.setWidth("100%"); buttonGrid.addComponent(btRemoveTagset); buttonGridRowCount++; btEditTagset = new Button("Edit Tagset"); btEditTagset.setWidth("100%"); buttonGrid.addComponent(btEditTagset); buttonGridRowCount++; } Label tagLabel = new Label(); tagLabel.setIcon(new ClassResource("ui/tagmanager/resources/reddiamd.gif", application)); tagLabel.setCaption("Tag"); buttonGrid.addComponent(tagLabel, 0, buttonGridRowCount, 0, buttonGridRowCount + 4); buttonGridRowCount += 5; buttonGrid.setComponentAlignment(tagLabel, Alignment.BOTTOM_LEFT); btInsertTag = new Button("Create Tag"); btInsertTag.setWidth("100%"); if (withTagsetButtons) { btInsertTag.setEnabled(true); } buttonGrid.addComponent(btInsertTag); buttonGridRowCount++; btRemoveTag = new Button("Remove Tag"); btRemoveTag.setWidth("100%"); buttonGrid.addComponent(btRemoveTag); buttonGridRowCount++; btEditTag = new Button("Edit Tag"); btEditTag.setWidth("100%"); buttonGrid.addComponent(btEditTag); buttonGridRowCount++; Label propertyLabel = new Label(); propertyLabel.setIcon(new ClassResource("ui/tagmanager/resources/ylwdiamd.gif", application)); propertyLabel.setCaption("Property"); buttonGrid.addComponent(propertyLabel, 0, buttonGridRowCount, 0, buttonGridRowCount + 4); buttonGridRowCount += 5; buttonGrid.setComponentAlignment(propertyLabel, Alignment.BOTTOM_LEFT); btInsertProperty = new Button("Create Property"); btInsertProperty.setWidth("100%"); buttonGrid.addComponent(btInsertProperty); buttonGridRowCount++; btRemoveProperty = new Button("Remove Property"); // commented out on purpose: somehow this forces all the other buttons to // show up in natural size... // btRemoveProperty.setWidth("100%"); buttonGrid.addComponent(btRemoveProperty); buttonGridRowCount++; btEditProperty = new Button("Edit Property"); btEditProperty.setWidth("100%"); buttonGrid.addComponent(btEditProperty); buttonGridRowCount++; addComponent(buttonGrid); setExpandRatio(buttonGrid, 0); if (!withButtonPanel) { buttonGrid.setVisible(false); } }
From source file:de.decidr.ui.view.windows.StartConfigurationWindow.java
License:Apache License
private void init() { VerticalLayout mainVerticalLayout = new VerticalLayout(); HorizontalLayout buttonHorizontalLayout = new HorizontalLayout(); checkBox = new CheckBox(); this.setContent(mainVerticalLayout); this.setCaption("Start configuration window"); this.setModal(true); this.setWidth("800px"); this.setHeight("500px"); this.setResizable(false); mainVerticalLayout.setSpacing(true); mainVerticalLayout.setMargin(true);//from w ww.j a v a2s .c om if (workflow.getVariables() != null && workflow.getVariables().getVariable().size() > 0) { configVariableForm = new ConfigVariableForm(workflow.getVariables()); configVariableForm.setCaption("Configuration variables"); configVariableForm.setWriteThrough(false); configVariableForm.setInvalidCommitted(false); } if (workflow.getRoles() != null) { configRoles = new ConfigRoles(workflow.getRoles()); } if (configRoles != null && configVariableForm != null) { // Set up split panel. SplitPanel splitPanel = new SplitPanel(); splitPanel.setOrientation(SplitPanel.ORIENTATION_HORIZONTAL); splitPanel.setSplitPosition(450, Sizeable.UNITS_PIXELS); splitPanel.setHeight("400px"); splitPanel.setLocked(true); splitPanel.setFirstComponent(configRoles); splitPanel.setSecondComponent(configVariableForm); mainVerticalLayout.addComponent(splitPanel); } else { // At least one of the components is unneeded, so no split panel this.setWidth("600px"); if (configRoles != null) { mainVerticalLayout.addComponent(configRoles); } else if (configVariableForm != null) { mainVerticalLayout.addComponent(configVariableForm); } } okButton = new Button("OK", new SaveStartConfigurationAction(configRoles, configVariableForm, tConfiguration, workflowModelId, checkBox.booleanValue())); cancelButton = new Button("Cancel", new HideDialogWindowAction()); mainVerticalLayout.addComponent(buttonHorizontalLayout); buttonHorizontalLayout.setSpacing(true); buttonHorizontalLayout.addComponent(checkBox); checkBox.setCaption("Start Immediately"); buttonHorizontalLayout.setComponentAlignment(checkBox, Alignment.MIDDLE_RIGHT); buttonHorizontalLayout.addComponent(okButton); buttonHorizontalLayout.addComponent(cancelButton); }
From source file:de.escidoc.admintool.view.context.ContextAddView.java
License:Open Source License
private void addFooter() { footer = new HorizontalLayout(); footer.setWidth(100, UNITS_PERCENTAGE); final HorizontalLayout hl = new HorizontalLayout(); hl.addComponent(save);/*from w ww . jav a 2s . c o m*/ hl.addComponent(cancel); footer.addComponent(hl); footer.setComponentAlignment(hl, Alignment.MIDDLE_RIGHT); form.addComponent(footer); }
From source file:de.escidoc.admintool.view.context.ContextEditForm.java
License:Open Source License
private void addFooter() { footer = new HorizontalLayout(); footer.setWidth(100, UNITS_PERCENTAGE); final HorizontalLayout hl = new HorizontalLayout(); hl.addComponent(saveButton);/*from ww w. jav a 2 s. c o m*/ hl.addComponent(cancelButton); footer.addComponent(hl); footer.setComponentAlignment(hl, Alignment.MIDDLE_RIGHT); form.addComponent(footer); }
From source file:de.escidoc.admintool.view.factory.ToolbarFactory.java
License:Open Source License
private void add(final Layout layout) { gLayout.addComponent(layout, 2, 0); gLayout.setComponentAlignment(layout, Alignment.MIDDLE_RIGHT); }
From source file:de.escidoc.admintool.view.resource.FreeFormWindow.java
License:Open Source License
private void addButtons() { fl.addComponent(buttons); fl.setComponentAlignment(buttons, Alignment.MIDDLE_RIGHT); addOkButton(); addCancelButton(); }
From source file:de.escidoc.admintool.view.resource.SaveAndCancelButtons.java
License:Open Source License
public SaveAndCancelButtons() { setCompositionRoot(footers);/*from w w w .java 2 s . c om*/ footers.setWidth(100, UNITS_PERCENTAGE); hl.addComponent(saveBtn); hl.addComponent(cancelBtn); footers.addComponent(hl); footers.setComponentAlignment(hl, Alignment.MIDDLE_RIGHT); }
From source file:de.escidoc.admintool.view.role.RoleView.java
License:Open Source License
private void addFooter() { footer.addComponent(saveBtn);//from w w w . j av a 2 s . c o m footerLayout.addComponent(footer); footerLayout.setComponentAlignment(footer, Alignment.MIDDLE_RIGHT); footer.setVisible(false); mainLayout.addComponent(footerLayout); }
From source file:de.escidoc.admintool.view.start.LandingView.java
License:Open Source License
private void addStartButton() { startButton = new Button(ViewConstants.OK_LABEL); final StartButtonListenerImpl listener = new StartButtonListenerImpl(escidocServiceUrl, app); startButton.addListener(listener);//from w w w. jav a2 s. co m footer.addComponent(startButton); footer.setComponentAlignment(startButton, Alignment.MIDDLE_RIGHT); }
From source file:de.escidoc.admintool.view.user.UserAddView.java
License:Open Source License
private void addFooter() { footer.setWidth(100, UNITS_PERCENTAGE); final HorizontalLayout hLayout = new HorizontalLayout(); hLayout.addComponent(saveButton);/*from ww w . java 2 s. co m*/ hLayout.addComponent(cancelButton); footer.addComponent(hLayout); footer.setComponentAlignment(hLayout, Alignment.MIDDLE_RIGHT); form.addComponent(footer); }