Example usage for com.vaadin.ui Alignment BOTTOM_RIGHT

List of usage examples for com.vaadin.ui Alignment BOTTOM_RIGHT

Introduction

In this page you can find the example usage for com.vaadin.ui Alignment BOTTOM_RIGHT.

Prototype

Alignment BOTTOM_RIGHT

To view the source code for com.vaadin.ui Alignment BOTTOM_RIGHT.

Click Source Link

Usage

From source file:org.eclipse.emf.ecp.controls.vaadin.AbstractVaadinSimpleControlRenderer.java

License:Open Source License

protected void createSetOrUnsetComponent(final Component component, final HorizontalLayout horizontalLayout,
        final Setting setting) {
    final Label unsetLabel = getUnsetComponent();
    final Button setButton = getUnsetButton(component, horizontalLayout, setting);
    setButton.setEnabled(getVElement().isEnabled());
    setButton.setVisible(getVElement().isVisible());
    setButton.setReadOnly(getVElement().isReadonly());
    horizontalLayout.addStyleName("textheight");
    horizontalLayout.removeAllComponents();
    Component addComponent = component;
    if (setting.isSet()) {
        setButton.setCaption(VaadinRendererMessages.AbstractVaadinSimpleControlRenderer_Set);
        unsetLabel.setCaption(getUnsetLabel());
        addComponent = unsetLabel;//www  . j a v  a 2s.  co  m

    } else {
        setButton.setCaption(VaadinRendererMessages.AbstractVaadinSimpleControlRenderer_Unset);

    }
    horizontalLayout.setData(addComponent);
    horizontalLayout.addComponent(addComponent);
    horizontalLayout.setExpandRatio(addComponent, 1f);
    horizontalLayout.addComponent(setButton);
    horizontalLayout.setComponentAlignment(setButton, Alignment.BOTTOM_RIGHT);

}

From source file:org.eclipse.hawkbit.ui.management.targettable.BulkUploadHandler.java

License:Open Source License

void buildLayout() {
    final HorizontalLayout horizontalLayout = new HorizontalLayout();
    upload = new Upload();
    upload.setEnabled(false);/*from  w w  w. j ava 2s. c  om*/
    upload.setButtonCaption(i18n.getMessage("caption.bulk.upload"));
    upload.setReceiver(this);
    upload.setImmediate(true);
    upload.setWidthUndefined();
    upload.addSucceededListener(this);
    upload.addFailedListener(this);
    upload.addStartedListener(this);
    horizontalLayout.addComponent(upload);
    horizontalLayout.setComponentAlignment(upload, Alignment.BOTTOM_RIGHT);
    setCompositionRoot(horizontalLayout);
}

From source file:org.eclipse.hawkbit.ui.management.targettable.TargetBulkUpdateWindowLayout.java

License:Open Source License

private void buildLayout() {
    mainLayout = new VerticalLayout();
    mainLayout.setSpacing(Boolean.TRUE);
    mainLayout.setSizeUndefined();/*from  w w w  . jav  a2s  . c o  m*/
    mainLayout.setWidth("200px");

    final HorizontalLayout captionLayout = new HorizontalLayout();
    captionLayout.setSizeFull();
    captionLayout.addComponents(windowCaption, minimizeButton, closeButton);
    captionLayout.setExpandRatio(windowCaption, 1.0F);
    captionLayout.addStyleName("v-window-header");

    final HorizontalLayout uploaderLayout = new HorizontalLayout();
    uploaderLayout.addComponent(bulkUploader);
    uploaderLayout.addComponent(linkToSystemConfigHelp);
    uploaderLayout.setComponentAlignment(linkToSystemConfigHelp, Alignment.BOTTOM_RIGHT);
    uploaderLayout.setExpandRatio(bulkUploader, 1.0F);
    uploaderLayout.setSizeFull();
    mainLayout.addComponents(captionLayout, dsNamecomboBox, descTextArea, tokenVerticalLayout, descTextArea,
            progressBar, targetsCountLabel, uploaderLayout);
}

From source file:org.eclipse.hawkbit.ui.tenantconfiguration.AuthenticationConfigurationView.java

License:Open Source License

private void init() {

    final Panel rootPanel = new Panel();
    rootPanel.setSizeFull();//from  ww  w.  j a v a 2s .c om

    rootPanel.addStyleName("config-panel");

    final VerticalLayout vLayout = new VerticalLayout();
    vLayout.setMargin(true);
    vLayout.setSizeFull();

    final Label header = new Label(i18n.getMessage("configuration.authentication.title"));
    header.addStyleName("config-panel-header");
    vLayout.addComponent(header);

    final GridLayout gridLayout = new GridLayout(3, 4);
    gridLayout.setSpacing(true);
    gridLayout.setImmediate(true);
    gridLayout.setSizeFull();
    gridLayout.setColumnExpandRatio(1, 1.0F);

    certificateAuthCheckbox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
    certificateAuthCheckbox.setValue(certificateAuthenticationConfigurationItem.isConfigEnabled());
    certificateAuthCheckbox.addValueChangeListener(this);
    certificateAuthenticationConfigurationItem.addChangeListener(this);
    gridLayout.addComponent(certificateAuthCheckbox, 0, 0);
    gridLayout.addComponent(certificateAuthenticationConfigurationItem, 1, 0);

    targetSecTokenCheckBox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
    targetSecTokenCheckBox.setValue(targetSecurityTokenAuthenticationConfigurationItem.isConfigEnabled());
    targetSecTokenCheckBox.addValueChangeListener(this);
    targetSecurityTokenAuthenticationConfigurationItem.addChangeListener(this);
    gridLayout.addComponent(targetSecTokenCheckBox, 0, 1);
    gridLayout.addComponent(targetSecurityTokenAuthenticationConfigurationItem, 1, 1);

    gatewaySecTokenCheckBox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
    gatewaySecTokenCheckBox.setId("gatewaysecuritycheckbox");
    gatewaySecTokenCheckBox.setValue(gatewaySecurityTokenAuthenticationConfigurationItem.isConfigEnabled());
    gatewaySecTokenCheckBox.addValueChangeListener(this);
    gatewaySecurityTokenAuthenticationConfigurationItem.addChangeListener(this);
    gridLayout.addComponent(gatewaySecTokenCheckBox, 0, 2);
    gridLayout.addComponent(gatewaySecurityTokenAuthenticationConfigurationItem, 1, 2);

    downloadAnonymousCheckBox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
    downloadAnonymousCheckBox.setId(UIComponentIdProvider.DOWNLOAD_ANONYMOUS_CHECKBOX);
    downloadAnonymousCheckBox.setValue(anonymousDownloadAuthenticationConfigurationItem.isConfigEnabled());
    downloadAnonymousCheckBox.addValueChangeListener(this);
    anonymousDownloadAuthenticationConfigurationItem.addChangeListener(this);
    gridLayout.addComponent(downloadAnonymousCheckBox, 0, 3);
    gridLayout.addComponent(anonymousDownloadAuthenticationConfigurationItem, 1, 3);

    final Link linkToSecurityHelp = SPUIComponentProvider.getHelpLink(i18n,
            uiProperties.getLinks().getDocumentation().getSecurity());
    gridLayout.addComponent(linkToSecurityHelp, 2, 3);
    gridLayout.setComponentAlignment(linkToSecurityHelp, Alignment.BOTTOM_RIGHT);

    vLayout.addComponent(gridLayout);
    rootPanel.setContent(vLayout);
    setCompositionRoot(rootPanel);
}

From source file:org.eclipse.hawkbit.ui.tenantconfiguration.RolloutConfigurationView.java

License:Open Source License

private void init() {

    final Panel rootPanel = new Panel();
    rootPanel.setSizeFull();//from w  w w. ja  v  a2s .c  o  m

    rootPanel.addStyleName("config-panel");

    final VerticalLayout vLayout = new VerticalLayout();
    vLayout.setMargin(true);
    vLayout.setSizeFull();

    final Label header = new Label(i18n.getMessage("configuration.rollout.title"));
    header.addStyleName("config-panel-header");
    vLayout.addComponent(header);

    final HorizontalLayout hLayout = new HorizontalLayout();
    hLayout.setSpacing(true);
    hLayout.setImmediate(true);

    approvalCheckbox = SPUIComponentProvider.getCheckBox("", "", null, false, "");
    approvalCheckbox.setId(UIComponentIdProvider.ROLLOUT_APPROVAL_ENABLED_CHECKBOX);
    approvalCheckbox.setValue(approvalConfigurationItem.isConfigEnabled());
    approvalCheckbox.addValueChangeListener(this);
    approvalConfigurationItem.addChangeListener(this);
    hLayout.addComponent(approvalCheckbox);
    hLayout.addComponent(approvalConfigurationItem);

    final Link linkToApprovalHelp = SPUIComponentProvider.getHelpLink(i18n,
            uiProperties.getLinks().getDocumentation().getRollout());
    hLayout.addComponent(linkToApprovalHelp);
    hLayout.setComponentAlignment(linkToApprovalHelp, Alignment.BOTTOM_RIGHT);

    vLayout.addComponent(hLayout);
    rootPanel.setContent(vLayout);
    setCompositionRoot(rootPanel);
}

From source file:org.escidoc.browser.ui.useraccount.OnAddPreference.java

License:Open Source License

@Override
public void buttonClick(@SuppressWarnings("unused") final com.vaadin.ui.Button.ClickEvent event) {
    addPreference.setEnabled(false);/*from ww  w. j  a  v a2s  .c o  m*/
    final HorizontalLayout hl = new HorizontalLayout();
    final TextField key = new TextField();
    key.setCaption("Name");
    key.setImmediate(false);
    key.setWidth("-1px");
    key.setHeight("-1px");
    key.setInvalidAllowed(false);
    key.setRequired(true);

    final TextField value = new TextField();
    value.setCaption("Value");
    value.setImmediate(false);
    value.setWidth("-1px");
    value.setHeight("-1px");
    value.setInvalidAllowed(false);
    value.setRequired(true);

    final Button addButton = new Button();
    addButton.setIcon(new ThemeResource("images/assets/plus.png"));
    addButton.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(@SuppressWarnings("unused") final com.vaadin.ui.Button.ClickEvent event) {
            if (UserAccountView.isNotValid(key, value)) {
                OnAddPreference.this.userAccountView.showMessage();
            } else {
                try {
                    OnAddPreference.this.userAccountView.ur.createPreference(
                            OnAddPreference.this.userAccountView.userProxy,
                            new Preference(key.getValue().toString(), value.getValue().toString()));
                    OnAddPreference.this.userAccountView.router.getMainWindow().showNotification(
                            "Preference added successfully ", Window.Notification.TYPE_TRAY_NOTIFICATION);
                    hl.removeAllComponents();
                    addPreference.setEnabled(true);
                    userPrefTable.createItem(userPrefTable.getTableContainer(), key.getValue().toString(),
                            key.getValue().toString(), value.getValue().toString());
                } catch (final EscidocClientException e) {
                    OnAddPreference.this.userAccountView.router.getMainWindow().showNotification(
                            ViewConstants.ERROR_CREATING_USER_PREFERENCE + e.getLocalizedMessage(),
                            Window.Notification.TYPE_ERROR_MESSAGE);
                }
            }
        }

    });
    hl.addComponent(key);
    hl.addComponent(value);
    hl.addComponent(addButton);
    hl.setComponentAlignment(addButton, Alignment.BOTTOM_RIGHT);
    preferencePanel.addComponent(hl);
}

From source file:org.generationcp.breeding.manager.crossingmanager.EmbeddedGermplasmListDetailComponent.java

License:Open Source License

@Override
public void afterPropertiesSet() throws Exception {
    setMargin(false);/*from  w  ww  .j  a  v a2s  .  co  m*/
    setSpacing(true);
    setWidth("800px");

    Tool tool = null;
    try {
        tool = workbenchDataManager.getToolWithName(ToolName.germplasm_list_browser.toString());
    } catch (MiddlewareQueryException qe) {
        LOG.error("QueryException", qe);
    }

    ExternalResource listBrowserLink = null;
    if (tool == null) {
        listBrowserLink = new ExternalResource(
                "http://localhost:18080/GermplasmStudyBrowser/main/germplasmlist-" + listId);
    } else {
        listBrowserLink = new ExternalResource(
                tool.getPath().replace("germplasmlist/", "germplasmlist-") + listId);
    }

    VerticalLayout layoutForList = new VerticalLayout();
    layoutForList.setMargin(false);
    layoutForList.setSpacing(false);

    Embedded listInfoPage = new Embedded("", listBrowserLink);
    listInfoPage.setType(Embedded.TYPE_BROWSER);
    listInfoPage.setSizeFull();
    layoutForList.setHeight("550px");
    layoutForList.addComponent(listInfoPage);

    CrossingManagerImportButtonClickListener listener = new CrossingManagerImportButtonClickListener(this);

    exportButton = new Button();
    exportButton.setData(EXPORT_BUTTON_ID);
    exportButton.addListener(listener);

    makeCrossesButton = new Button();
    makeCrossesButton.setData(MAKE_CROSSES_BUTTON_ID);
    makeCrossesButton.addListener(listener);

    HorizontalLayout buttonArea = new HorizontalLayout();
    buttonArea.setMargin(true);
    buttonArea.setSpacing(true);
    buttonArea.addComponent(exportButton);
    buttonArea.addComponent(makeCrossesButton);

    addComponent(layoutForList);
    addComponent(buttonArea);
    setComponentAlignment(buttonArea, Alignment.BOTTOM_RIGHT);
}

From source file:org.generationcp.breeding.manager.listimport.EmbeddedGermplasmListDetailComponent.java

License:Open Source License

@Override
public void afterPropertiesSet() throws Exception {
    setMargin(false);//ww  w  .  j  av a 2 s.c  om
    setSpacing(true);
    setWidth("800px");

    Tool tool = null;
    try {
        tool = workbenchDataManager.getToolWithName(ToolName.germplasm_list_browser.toString());
    } catch (MiddlewareQueryException qe) {
        LOG.error("QueryException", qe);
    }

    ExternalResource listBrowserLink = null;
    if (tool == null) {
        listBrowserLink = new ExternalResource(
                "http://localhost:18080/GermplasmStudyBrowser/main/germplasmlist-" + listId);
    } else {
        listBrowserLink = new ExternalResource(
                tool.getPath().replace("germplasmlist/", "germplasmlist-") + listId);
    }

    VerticalLayout layoutForList = new VerticalLayout();
    layoutForList.setMargin(false);
    layoutForList.setSpacing(false);

    BrowserFrame listInfoPage = new BrowserFrame("", listBrowserLink);
    listInfoPage.setSizeFull();
    layoutForList.setHeight("550px");
    layoutForList.addComponent(listInfoPage);

    GermplasmImportButtonClickListener listener = new GermplasmImportButtonClickListener(this);
    /*
    exportButton = new Button();
    exportButton.setData(EXPORT_BUTTON_ID);
    exportButton.addListener(listener);
    */
    makeImportButton = new Button();
    makeImportButton.setData(NEW_IMPORT_BUTTON_ID);
    makeImportButton.addListener(listener);

    HorizontalLayout buttonArea = new HorizontalLayout();
    buttonArea.setMargin(true);
    buttonArea.setSpacing(true);
    buttonArea.addComponent(makeImportButton);

    addComponent(layoutForList);
    addComponent(buttonArea);
    setComponentAlignment(buttonArea, Alignment.BOTTOM_RIGHT);
}

From source file:org.hip.vif.admin.groupadmin.ui.AbstractQuestionView.java

License:Open Source License

/**
 * Renders the display of the whole question context.
 * //from  w w  w  . jav  a2  s  . c om
 * @param inQuestion
 *            {@link Question}
 * @param inTitle
 *            String
 * @param inCodeList
 *            {@link CodeList}
 * @param inAuthors
 *            {@link QueryResult}
 * @param inReviewers
 *            {@link QueryResult}
 * @param inMessages
 *            {@link IMessages}
 * @param inIsGuest
 *            boolean
 * @param inTask
 *            {@link IPluggableWithLookup}
 * @return {@link Component} the view component with the rendered question
 * @throws VException
 * @throws SQLException
 */
protected Component createQuestion(final Question inQuestion, final String inTitle, final CodeList inCodeList,
        final QueryResult inAuthors, final QueryResult inReviewers, final IMessages inMessages,
        final IPluggableWithLookup inTask) throws VException, SQLException {
    final VerticalLayout outLayout = new VerticalLayout();

    // question title and state
    final HorizontalLayout lTitleView = new HorizontalLayout();
    lTitleView.setStyleName("vif-title-bar"); //$NON-NLS-1$
    lTitleView.setSpacing(true);

    lTitleView.addComponent(RiplaViewHelper.makeUndefinedWidth(
            new Label(String.format(VIFViewHelper.TMPL_TITLE, "vif-title", inTitle), ContentMode.HTML))); //$NON-NLS-1$
    final String lState = getState(BeanWrapperHelper.getString(QuestionHome.KEY_STATE, inQuestion), inCodeList,
            inMessages);
    final Label lNote = new Label(String.format(VIFViewHelper.TMPL_TITLE, "vif-note", lState), //$NON-NLS-1$
            ContentMode.HTML);
    lTitleView.addComponent(RiplaViewHelper.makeUndefinedWidth(lNote));
    lTitleView.setComponentAlignment(lNote, Alignment.BOTTOM_RIGHT);

    outLayout.addComponent(lTitleView);

    addProperQuestion(inQuestion, inMessages, outLayout);

    // author/reviewer
    final AuthorReviewerRenderer lRenderer = AuthorReviewerRenderHelper.createRenderer(inAuthors, inReviewers,
            inTask);
    outLayout.addComponent(lRenderer.render(inMessages.getMessage("ui.discussion.question.view.label.author"), //$NON-NLS-1$
            inMessages.getMessage("ui.discussion.question.view.label.reviewer"), //$NON-NLS-1$
            BeanWrapperHelper.getFormattedDate(QuestionHome.KEY_MUTATION, inQuestion))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    return outLayout;
}

From source file:org.investovator.ui.nngaming.QuoteUI.java

License:Open Source License

private void setupUI() {

    //Trade Button
    tradeButton = new Button("Place Order");
    tradeButton.addClickListener(tradeButtonClickListener);
    tradeButton.setWidth("100%");

    //Price Layout
    price = new TextField("Price");
    price.addValueChangeListener(priceValueChangedListener);
    price.setImmediate(true);/* w ww.j  av a 2  s. c  om*/
    price.setWidth("100%");

    amount = new Label();
    amount.setCaption("Amount");
    amount.addStyleName("outlined");
    amount.setWidth("100%");

    stocks = new TextField("Stocks");
    stocks.addValueChangeListener(stocksChangedListener);
    stocks.setImmediate(true);
    stocks.setWidth("100%");

    //Stock Select
    stockSelect = new ComboBox();
    stockSelect.setCaption("Select stock to trade");
    stockSelect.setNullSelectionAllowed(false);
    stockSelect.setImmediate(true);
    stockSelect.setWidth("100%");
    stockSelect.addValueChangeListener(selectSymbolValueChange);

    VerticalLayout column1 = new VerticalLayout();
    column1.setSpacing(true);
    column1.setWidth("100%");
    column1.addComponent(stockSelect);
    column1.setComponentAlignment(stockSelect, Alignment.MIDDLE_LEFT);
    column1.addComponent(price);
    column1.setComponentAlignment(price, Alignment.MIDDLE_LEFT);
    column1.addComponent(amount);
    column1.setComponentAlignment(amount, Alignment.MIDDLE_LEFT);

    //Side Select
    sideSelect = new ComboBox("Select Order Type");
    sideSelect.addItem("Buy Order");
    sideSelect.addItem("Sell Order");
    sideSelect.select("Buy Order");
    isBuy = true;
    sideSelect.setNullSelectionAllowed(false);
    sideSelect.addValueChangeListener(sideSelectValueChangeListener);
    sideSelect.setImmediate(true);
    sideSelect.setWidth("100%");

    VerticalLayout column2 = new VerticalLayout();

    column2.setSpacing(true);
    column2.setWidth("100%");
    column2.addComponent(sideSelect);
    column2.setComponentAlignment(sideSelect, Alignment.MIDDLE_RIGHT);
    column2.addComponent(stocks);
    column2.setComponentAlignment(stocks, Alignment.MIDDLE_RIGHT);
    column2.addComponent(tradeButton);
    column2.setComponentAlignment(tradeButton, Alignment.BOTTOM_RIGHT);

    HorizontalLayout layout = new HorizontalLayout();
    layout.addComponent(column1);
    layout.addComponent(column2);
    layout.setSpacing(true);

    this.addComponent(layout);
    this.setComponentAlignment(layout, Alignment.MIDDLE_RIGHT);
    this.setSpacing(true);
    this.setMargin(new MarginInfo(false, false, false, true));
    this.setImmediate(true);
    this.setWidth("100%");

}