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:ru.codeinside.gses.webui.declarant.DeclarantFactory.java

License:Mozilla Public License

static Component createStartEventForm(final long procedureId, final ProcedureSelectListener listener,
        VerticalLayout layout) {/*from  w  w  w  .  java  2 s  .  c  o m*/
    final ProcedureProcessDefinition def = Flash.flash().getDeclarantService().selectActive(procedureId);
    if (def == null) {
        layout.getWindow().showNotification("  ");
        return null;
    }
    final String processDefinitionId = def.getProcessDefinitionId();
    String login = Flash.flash().getLogin();
    List<IdentityLink> identityLinksForProcessDefinition = Flash.flash().getProcessEngine()
            .getRepositoryService().getIdentityLinksForProcessDefinition(processDefinitionId);
    boolean ok = identityLinksForProcessDefinition.isEmpty();
    for (IdentityLink identityLink : identityLinksForProcessDefinition) {
        if (identityLink.getGroupId() != null) {
            if (Flash.flash().getAdminService().getUserItem(login).getGroups()
                    .contains(identityLink.getGroupId())) {
                ok = true;
                break;
            }
        }
        if (identityLink.getUserId() != null && identityLink.getUserId().equals(login)) {
            ok = true;
            break;
        }
    }
    if (!ok) {
        layout.getWindow().showNotification(" ? ? ");
        return null;
    }

    DataAccumulator accumulator = new DataAccumulator();
    ExecutorService executorService = Flash.flash().getExecutorService();
    final FormDescription formDescription = Functions.withEngine(new FormDescriptionBuilder(
            FormID.byProcessDefinitionId(processDefinitionId), executorService, accumulator));
    if (formDescription == null) {
        layout.getWindow().showNotification("  ");
        return null;
    }
    return new TaskForm(formDescription, new TaskForm.CloseListener() {
        @Override
        public void onFormClose(final TaskForm form) {
            final ComponentContainer container = (ComponentContainer) form.getParent();
            container.removeComponent(form);
            final HorizontalLayout layout = new HorizontalLayout();
            layout.setSizeFull();
            final Button next = new Button("C? ?...", new Button.ClickListener() {
                @Override
                public void buttonClick(Button.ClickEvent event) {
                    listener.selectProcedure(procedureId);
                }
            });
            layout.addComponent(next);
            layout.setComponentAlignment(next, Alignment.BOTTOM_RIGHT);
            container.addComponent(layout);
        }
    }, accumulator);
}

From source file:ru.codeinside.gses.webui.wizard.Wizard.java

License:Mozilla Public License

private void init() {
    mainLayout = new VerticalLayout();
    setCompositionRoot(mainLayout);/*from  w  ww.  ja v a 2s.co m*/
    setSizeFull();

    contentPanel = new Panel();
    contentPanel.setSizeFull();

    initControlButtons();

    footer = new HorizontalLayout();
    footer.setSpacing(true);
    footer.addComponent(cancelButton);
    footer.addComponent(backButton);
    footer.addComponent(nextButton);
    footer.addComponent(finishButton);

    mainLayout.addComponent(contentPanel);
    mainLayout.addComponent(footer);
    mainLayout.setComponentAlignment(footer, Alignment.BOTTOM_RIGHT);

    mainLayout.setExpandRatio(contentPanel, 1.0f);
    mainLayout.setSizeFull();

    initDefaultHeader();
}

From source file:uicomponents.MSSampleMultiplicationTable.java

License:Open Source License

private Object createComplexCellComponent(ComboBox contentBox, String propertyName, final Object i) {
    HorizontalLayout complexComponent = new HorizontalLayout();
    complexComponent.setWidth(contentBox.getWidth() + 10, contentBox.getWidthUnits());
    complexComponent.addComponent(contentBox);
    complexComponent.setExpandRatio(contentBox, 1);

    Button copy = new Button();
    Styles.iconButton(copy, FontAwesome.ARROW_CIRCLE_O_DOWN);
    copy.setStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED);
    VerticalLayout vBox = new VerticalLayout();
    vBox.setWidth("15px");
    vBox.addComponent(copy);//from www. j a  v a2 s  . co  m
    complexComponent.addComponent(vBox);
    complexComponent.setComponentAlignment(vBox, Alignment.BOTTOM_RIGHT);
    copy.addClickListener(new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            ComboBox b = parseBoxRow(i, propertyName);
            Object selection = b.getValue();
            pasteSelectionToColumn(propertyName, selection);
        }
    });
    return complexComponent;
}