List of usage examples for com.vaadin.ui Alignment BOTTOM_RIGHT
Alignment BOTTOM_RIGHT
To view the source code for com.vaadin.ui Alignment BOTTOM_RIGHT.
Click Source Link
From source file:org.opennms.netmgt.vaadin.core.ConfirmationDialog.java
License:Open Source License
public ConfirmationDialog(String caption, String description) { setCaption(caption);//from w w w . j a va 2s . co m setModal(true); setResizable(false); setClosable(false); setWidth(400, Unit.PIXELS); setHeight(200, Unit.PIXELS); addCloseListener(this); okButton = UIHelper.createButton("ok", null, null, this); okButton.setId("confirmationDialog.button.ok"); cancelButton = UIHelper.createButton("cancel", "cancels the current action.", null, this); cancelButton.setId("confirmationDialog.button.cancel"); label.setDescription(description); final HorizontalLayout buttonLayout = new HorizontalLayout(okButton, cancelButton); buttonLayout.setSpacing(true); layout.setSpacing(true); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(label); layout.addComponent(buttonLayout); layout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); setContent(layout); center(); }
From source file:org.opennms.netmgt.vaadin.core.InfoDialog.java
License:Open Source License
public InfoDialog(String caption, String description) { setCaption(caption);//from w w w . j a v a2s .c o m setModal(true); setResizable(false); setClosable(false); setWidth(400, Unit.PIXELS); setHeight(200, Unit.PIXELS); okButton = UIHelper.createButton("ok", null, null, event -> InfoDialog.this.close()); okButton.setId("infoDialog.button.ok"); label.setValue(description); final HorizontalLayout buttonLayout = new HorizontalLayout(okButton); buttonLayout.setSpacing(true); layout.setSpacing(true); layout.setMargin(true); layout.setSizeFull(); layout.addComponent(label); layout.addComponent(buttonLayout); layout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); setContent(layout); center(); }
From source file:org.ow2.sirocco.cloudmanager.AddressAssociateDialog.java
License:Open Source License
public AddressAssociateDialog(final List<MachineChoice> choices, final DialogCallback callback) { super("Associate Address"); this.callback = callback; this.center(); this.setClosable(false); this.setModal(true); this.setResizable(false); FormLayout content = new FormLayout(); content.setMargin(true);/* ww w . j a v a 2s. c o m*/ content.setWidth("400px"); content.setHeight("150px"); this.machineBox = new ComboBox("Machine"); this.machineBox.setRequired(true); this.machineBox.setTextInputAllowed(false); this.machineBox.setNullSelectionAllowed(false); this.machineBox.setInputPrompt("select machine"); this.machineBox.setImmediate(true); content.addComponent(this.machineBox); final HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); this.okButton = new Button("Ok", this); this.cancelButton = new Button("Cancel", this); this.cancelButton.focus(); buttonLayout.addComponent(this.okButton); buttonLayout.addComponent(this.cancelButton); content.addComponent(buttonLayout); content.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); this.setContent(content); for (MachineChoice choice : choices) { this.machineBox.addItem(choice.id); this.machineBox.setItemCaption(choice.id, choice.name); } }
From source file:org.ow2.sirocco.cloudmanager.ConfirmDialog.java
License:Open Source License
private ConfirmDialog(final String caption, final String question, final String option, final String okLabel, final String cancelLabel, final ConfirmationDialogCallback callback) { super(caption); this.center(); this.setClosable(false); this.setModal(true); this.setResizable(false); VerticalLayout content = new VerticalLayout(); content.setMargin(true);//w w w. ja v a 2 s . c om content.setWidth("400px"); content.setHeight("150px"); this.callback = callback; if (question != null) { Label label = new Label(question); content.addComponent(label); } if (option != null) { this.optionBox = new CheckBox(option); content.addComponent(this.optionBox); } final HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); this.okButton = new Button(okLabel, this); this.cancelButton = new Button(cancelLabel, this); this.cancelButton.focus(); buttonLayout.addComponent(this.okButton); buttonLayout.addComponent(this.cancelButton); content.addComponent(buttonLayout); content.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); this.setContent(content); }
From source file:org.ow2.sirocco.cloudmanager.KeyPairImportDialog.java
License:Open Source License
public KeyPairImportDialog(final DialogCallback callback) { super("Import Key Pair"); this.callback = callback; this.center(); this.setClosable(false); this.setModal(true); this.setResizable(false); VerticalLayout content = new VerticalLayout(); content.setSizeFull();//from w w w .ja va2 s . co m content.setMargin(true); content.setSpacing(true); content.setWidth("500px"); content.setHeight("250px"); FormLayout form = new FormLayout(); form.setWidth("100%"); form.setMargin(true); form.setSpacing(true); this.nameField = new TextField("Name"); this.nameField.setWidth("50%"); this.nameField.setRequired(true); this.nameField.setRequiredError("Please enter a name for your key pair"); form.addComponent(this.nameField); this.publicKeyField = new TextArea("Public Key"); this.publicKeyField.setWidth("100%"); this.publicKeyField.setRequired(true); this.publicKeyField.setRequiredError("Please enter a name for your key pair"); form.addComponent(this.publicKeyField); content.addComponent(form); final HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); this.okButton = new Button("Ok", this); this.cancelButton = new Button("Cancel", this); this.cancelButton.focus(); buttonLayout.addComponent(this.okButton); buttonLayout.addComponent(this.cancelButton); content.addComponent(buttonLayout); content.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); this.setContent(content); }
From source file:org.ow2.sirocco.cloudmanager.VolumeAttachDialog.java
License:Open Source License
public VolumeAttachDialog(final List<MachineChoice> choices, final DialogCallback callback) { super("Attach Volume"); this.callback = callback; this.center(); this.setClosable(false); this.setModal(true); this.setResizable(false); FormLayout content = new FormLayout(); content.setMargin(true);/*from ww w. j a v a 2 s. c o m*/ content.setWidth("400px"); content.setHeight("150px"); this.machineBox = new ComboBox("Machine"); this.machineBox.setRequired(true); this.machineBox.setTextInputAllowed(false); this.machineBox.setNullSelectionAllowed(false); this.machineBox.setInputPrompt("select machine"); this.machineBox.setImmediate(true); content.addComponent(this.machineBox); this.deviceField = new TextField("Device location"); this.deviceField.setRequired(true); this.deviceField.setWidth("80%"); this.deviceField.setRequired(true); this.deviceField.setRequiredError("Please provide a device location"); this.deviceField.setImmediate(true); content.addComponent(this.deviceField); final HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); this.okButton = new Button("Ok", this); this.cancelButton = new Button("Cancel", this); this.cancelButton.focus(); buttonLayout.addComponent(this.okButton); buttonLayout.addComponent(this.cancelButton); content.addComponent(buttonLayout); content.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT); this.setContent(content); for (MachineChoice choice : choices) { this.machineBox.addItem(choice.id); this.machineBox.setItemCaption(choice.id, choice.name); } }
From source file:org.plukh.fluffymeow.ui.Header.java
License:Open Source License
@Inject public Header(HeaderUserComponent loginComponent, LocaleChooserComponent localeChooser) { log.trace("Creating Header..."); this.loginComponent = loginComponent; this.localeChooser = localeChooser; setWidth("100%"); setMargin(true);//from w w w .j a v a 2 s. co m setSpacing(true); Resource resource = new ThemeResource("logo.png"); logoImage = new Image(null, resource); logoImage.addStyleName("pointer"); logoImage.addClickListener(this::onLogoImageClick); addComponent(logoImage); addComponent(loginComponent); addComponent(localeChooser); setExpandRatio(loginComponent, 1.0f); setComponentAlignment(loginComponent, Alignment.BOTTOM_LEFT); setComponentAlignment(localeChooser, Alignment.BOTTOM_RIGHT); log.debug("Header created"); }
From source file:org.processbase.ui.bpm.admin.CategoryWindow.java
License:Open Source License
public void initUI() { try {// w ww . j a va 2s. c om setModal(true); VerticalLayout layout = (VerticalLayout) this.getContent(); layout.setMargin(true); layout.setSpacing(true); layout.setStyleName(Reindeer.LAYOUT_WHITE); processesComboBox = new ComboBox( ProcessbaseApplication.getCurrent().getPbMessages().getString("processToCategory")); processesComboBox.setFilteringMode(Filtering.FILTERINGMODE_CONTAINS); // processesComboBox.setItemCaptionPropertyId("name"); processesComboBox.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_EXPLICIT); processesComboBox.setWidth("100%"); bar.setWidth("100%"); bar.addComponent(processesComboBox); bar.setExpandRatio(processesComboBox, 1); addBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnAdd"), this); bar.addComponent(addBtn); bar.setComponentAlignment(addBtn, Alignment.BOTTOM_RIGHT); layout.addComponent(bar); layout.addComponent(table); deleteBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnDelete"), this); deleteBtn.setDescription( ProcessbaseApplication.getCurrent().getPbMessages().getString("deleteCategory")); cancelBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnCancel"), this); saveBtn = new Button(ProcessbaseApplication.getCurrent().getPbMessages().getString("btnSave"), this); buttons.addButton(deleteBtn); buttons.setComponentAlignment(deleteBtn, Alignment.MIDDLE_RIGHT); buttons.addButton(saveBtn); buttons.setComponentAlignment(saveBtn, Alignment.MIDDLE_RIGHT); buttons.setExpandRatio(saveBtn, 1); buttons.addButton(cancelBtn); buttons.setComponentAlignment(cancelBtn, Alignment.MIDDLE_RIGHT); buttons.setMargin(false); buttons.setHeight("30px"); buttons.setWidth("100%"); addComponent(buttons); setWidth("70%"); // setHeight("70%"); setResizable(false); table.addContainerProperty("name", String.class, null, ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionProcessName"), null, null); table.setColumnExpandRatio("name", 1); table.addContainerProperty("version", String.class, null, ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionVersion"), null, null); table.setColumnWidth("version", 50); table.addContainerProperty("deployedBy", String.class, null, ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionDeployedBy"), null, null); table.addContainerProperty("actions", TableLinkButton.class, null, ProcessbaseApplication.getCurrent().getPbMessages().getString("tableCaptionActions"), null, null); table.setColumnWidth("actions", 50); table.setSelectable(false); table.setImmediate(true); table.setWidth("100%"); table.setPageLength(10); refreshTable(); } catch (Exception ex) { ex.printStackTrace(); showError(ex.getMessage()); } }
From source file:org.processbase.ui.servlet.LoginPanel.java
License:Open Source License
public void initUI() { setWidth("100%"); setHeight("100%"); addComponent(labelLeft, 0, 0);/*from ww w.ja va 2 s . com*/ addComponent(labelRight, 2, 0); addComponent(panel, 1, 1); setComponentAlignment(panel, Alignment.MIDDLE_CENTER); panel.setWidth("285px"); username.setCaption(((PbApplication) getApplication()).getPbMessages().getString("userName")); form.addComponent(username); username.setWidth("100%"); username.focus(); password.setCaption(((PbApplication) getApplication()).getPbMessages().getString("password")); password.setWidth("100%"); form.addComponent(password); btnLogin = new Button(((PbApplication) getApplication()).getPbMessages().getString("login"), this, "okHandler"); btnLogin.setStyleName(Runo.BUTTON_DEFAULT); action_ok = new ShortcutAction("Default key", ShortcutAction.KeyCode.ENTER, null); form.addComponent(btnLogin); form.setComponentAlignment(btnLogin, Alignment.BOTTOM_RIGHT); // btnLogin.addListener(this); createLogo(); vlayout.addComponent(logo); vlayout.setComponentAlignment(logo, Alignment.MIDDLE_CENTER); vlayout.addComponent(form); vlayout.setComponentAlignment(form, Alignment.MIDDLE_CENTER); vlayout.setMargin(false, true, false, true); vlayout.setSpacing(true); panel.setContent(vlayout); panel.addActionHandler(this); }
From source file:org.tylproject.vaadin.addon.fields.collectiontables.CollectionTabularView.java
License:Apache License
/** * @return adds a default button bar to the bottom right of this component *//* w w w .j a va 2s. c om*/ public CollectionTabularView<T, U> withDefaultEditorBar() { CrudButtonBar buttonBar = buildDefaultEditorBar(); compositionRoot.setSizeFull(); HorizontalLayout inner = new HorizontalLayout(buttonBar); inner.setSizeFull(); inner.setComponentAlignment(buttonBar, Alignment.BOTTOM_RIGHT); compositionRoot.addComponent(inner); return this; }