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:com.hybridbpm.ui.component.bpm.window.TransitionConfigureWindow.java

License:Apache License

public void initUI(ProcessModelLayout processModelLayout) {
    this.processModelLayout = processModelLayout;
    nameTextField.setCaption(("Name"));
    nameTextField.setWidth(300, Unit.PIXELS);
    nameTextField.setNullRepresentation("");

    expressionTextField.setCaption(("Condition Expression"));
    expressionTextField.setWidth(100, Unit.PERCENTAGE);
    expressionTextField.setHeight(50, Unit.PIXELS);
    expressionTextField.setMode(AceMode.groovy);
    expressionTextField.setTheme(AceTheme.chrome);
    expressionTextField.setShowGutter(false);
    SuggestionExtension extension = new SuggestionExtension(
            new VariableSuggester(this.processModelLayout.getProcessModel()));
    extension.setSuggestOnDot(false);/*from www.j av  a  2s  .  c o m*/
    extension.extend(expressionTextField);

    defaultCheckBox.setCaption(("Default Transition"));

    yTextField.setCaption(("Y"));
    yTextField.setWidth(100, Unit.PIXELS);
    yTextField.setNullRepresentation("");
    yTextField.setVisible(false);

    xTextField.setCaption(("Y"));
    xTextField.setWidth(100, Unit.PIXELS);
    xTextField.setNullRepresentation("");
    xTextField.setVisible(false);

    //        configurationLayout.setCaption("Transition properties");
    //        configurationLayout.addStyleName("process-config");
    configurationLayout.setMargin(new MarginInfo(true, true, true, true));
    configurationLayout.setSpacing(true);
    configurationLayout.addComponent(nameTextField, 0, 0, 0, 0);
    configurationLayout.addComponent(defaultCheckBox, 1, 0, 1, 0);
    configurationLayout.setComponentAlignment(defaultCheckBox, Alignment.BOTTOM_RIGHT);
    configurationLayout.addComponent(expressionTextField, 0, 1, 1, 1);
    configurationLayout.addComponent(xTextField, 0, 2, 0, 2);
    configurationLayout.addComponent(yTextField, 1, 2, 1, 2);
    configurationLayout.setColumnExpandRatio(0, 1f);
    configurationLayout.setColumnExpandRatio(1, 1f);
    configurationLayout.setColumnExpandRatio(2, 1f);

    fieldGroup.setBuffered(true); //important
    fieldGroup.bind(xTextField, "x");
    fieldGroup.bind(yTextField, "y");
    fieldGroup.bind(nameTextField, "name");
    fieldGroup.bind(expressionTextField, "expression");
    fieldGroup.bind(defaultCheckBox, "defaultTransition");
    fieldGroup.setItemDataSource(processModelLayout.getActiveElement().getTransitionModel());

    toolbar.setSpacing(true);
    toolbar.setWidth(100, Unit.PERCENTAGE);
    toolbar.addStyleName("toolbar");

    btnShowMore.setCaption(("Show more"));
    btnShowMore.setStyleName(ValoTheme.BUTTON_LINK);
    toolbar.addComponent(btnShowMore);
    toolbar.setComponentAlignment(btnShowMore, Alignment.MIDDLE_LEFT);
    toolbar.setExpandRatio(btnShowMore, 1f);

    btnOk.addStyleName(ValoTheme.BUTTON_PRIMARY);
    btnOk.setCaption(("OK"));
    toolbar.addComponent(btnOk);
    toolbar.setComponentAlignment(btnOk, Alignment.MIDDLE_RIGHT);

    btnClose.setCaption(("Close"));
    toolbar.addComponent(btnClose);
    toolbar.setComponentAlignment(btnClose, Alignment.MIDDLE_RIGHT);

    layout.addStyleName("process-config-layout");
    layout.setSpacing(true);
    layout.setMargin(true);
    layout.addComponent(configurationLayout);
    layout.addComponent(toolbar);
    layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT);

    setCaption("Transition");
    center();
    setResizable(false);
    //        setClosable(false);
    setModal(true);
    addStyleName("no-vertical-drag-hints");
    addStyleName("no-horizontal-drag-hints");
    addStyleName("process-config-window");
    setContent(layout);
}

From source file:com.hybridbpm.ui.component.ConfigureWindow.java

License:Apache License

public ConfigureWindow(Component dataLayout, String caption) {
    this.dataLayout = dataLayout;
    setCaption(caption);/*from  ww w. j a va2s . co  m*/

    errorMessage.setVisible(false);
    errorMessage.setStyleName(ValoTheme.LABEL_FAILURE);

    toolbar.setSpacing(true);
    toolbar.addStyleName("toolbar");

    btnOk.addStyleName(ValoTheme.BUTTON_PRIMARY);
    btnOk.addStyleName(ValoTheme.BUTTON_SMALL);
    btnOk.setCaption("OK");
    toolbar.addComponent(btnOk);
    toolbar.setComponentAlignment(btnOk, Alignment.MIDDLE_RIGHT);

    btnClose.setCaption("Close");
    btnClose.addStyleName(ValoTheme.BUTTON_SMALL);

    toolbar.addComponent(btnClose);
    toolbar.setComponentAlignment(btnClose, Alignment.MIDDLE_RIGHT);

    cssLayout.addComponent(this.dataLayout);
    cssLayout.setSizeFull();
    cssLayout.addStyleName("scrollable");

    layout.setSizeFull();
    layout.setMargin(true);
    layout.addComponent(cssLayout);
    layout.setExpandRatio(cssLayout, 1f);
    layout.addComponent(errorMessage);
    layout.addComponent(toolbar);
    layout.setComponentAlignment(toolbar, Alignment.BOTTOM_RIGHT);

    center();
    setResizable(false);
    //        setClosable(false);
    setModal(true);
    addStyleName("no-vertical-drag-hints");
    addStyleName("no-horizontal-drag-hints");
    setContent(layout);
    setWidth(80, Unit.PERCENTAGE);
    setHeight(80, Unit.PERCENTAGE);
}

From source file:com.javalego.ui.vaadin.component.util.MessageBox.java

License:Apache License

/**
 * Mostrar un componente con informacin que deseamos mostrar en un mensaje
 * de dilogo.//from   w  ww .ja va2s .c o  m
 * 
 * @param component
 */
public static void information(String title, Component component) {

    MessageBox m = new MessageBox(title, Icon.INFO, component, Alignment.BOTTOM_RIGHT,
            new MessageBox.ButtonConfig(ButtonType.CLOSE, UIContext.getText(LocaleEditor.EXIT)));
    m.show(true, new EventListener() {
        private static final long serialVersionUID = 1298634606186258527L;

        @Override
        public boolean buttonClicked(ButtonType buttonType) {
            return true;
        }
    });
}

From source file:com.klwork.explorer.project.MyCalendarView.java

License:Apache License

private void createCalendarEventPopup() {
    VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);//from w ww.  j a  v  a  2s .co  m
    layout.setSpacing(true);

    scheduleEventPopup = new Window(null, layout);
    scheduleEventPopup.setWidth("400px");
    scheduleEventPopup.setModal(true);
    scheduleEventPopup.center();

    layout.addComponent(scheduleEventFieldLayout);

    applyEventButton = new Button("?", new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            try {
                commitCalendarEvent();
            } catch (CommitException e) {
                e.printStackTrace();
            }
        }
    });
    Button cancel = new Button("?", new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            discardCalendarEvent();
        }
    });
    deleteEventButton = new Button("", new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            deleteCalendarEvent();
        }
    });
    scheduleEventPopup.addCloseListener(new Window.CloseListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void windowClose(Window.CloseEvent e) {
            discardCalendarEvent();
        }
    });

    HorizontalLayout buttons = new HorizontalLayout();
    buttons.setSpacing(true);
    buttons.addComponent(deleteEventButton);
    buttons.addComponent(applyEventButton);
    buttons.addComponent(cancel);
    layout.addComponent(buttons);
    layout.setComponentAlignment(buttons, Alignment.BOTTOM_RIGHT);
}

From source file:com.klwork.explorer.ui.business.project.MyCalendarView.java

License:Apache License

private void createCalendarEventPopup() {
    VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);//from w  ww  .j  av a 2 s . com
    layout.setSpacing(true);
    layout.addStyleName("social");

    scheduleEventPopup = new Window(null, layout);
    scheduleEventPopup.setWidth("400px");
    scheduleEventPopup.setModal(true);
    scheduleEventPopup.center();

    layout.addComponent(scheduleEventFieldLayout);

    applyEventButton = new Button("?", new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            try {
                commitCalendarEvent();
            } catch (CommitException e) {
                e.printStackTrace();
            }
        }
    });
    Button cancel = new Button("?", new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            discardCalendarEvent();
        }
    });
    deleteEventButton = new Button("", new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            deleteCalendarEvent();
        }
    });
    scheduleEventPopup.addCloseListener(new Window.CloseListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void windowClose(Window.CloseEvent e) {
            discardCalendarEvent();
        }
    });

    HorizontalLayout buttons = new HorizontalLayout();
    buttons.setSpacing(true);
    buttons.addComponent(deleteEventButton);
    buttons.addComponent(applyEventButton);
    buttons.addComponent(cancel);
    layout.addComponent(buttons);
    layout.setComponentAlignment(buttons, Alignment.BOTTOM_RIGHT);
}

From source file:com.klwork.explorer.ui.content.CreateAttachmentPopupWindow.java

License:Apache License

protected void initActions() {
    okButton = new Button(i18nManager.getMessage(Messages.RELATED_CONTENT_CREATE));
    detailLayout.addComponent(okButton, 0, 1);
    okButton.setEnabled(false);/*from  w  w w .j  a va 2  s  .c o m*/
    okButton.addClickListener(new ClickListener() {

        private static final long serialVersionUID = 1L;

        public void buttonClick(ClickEvent event) {
            // WW_TODO ?
            saveAttachment();
        }
    });
    detailLayout.setComponentAlignment(okButton, Alignment.BOTTOM_RIGHT);
}

From source file:com.klwork.explorer.ui.custom.ConfirmationDialogPopupWindow.java

License:Apache License

protected void initButtons(I18nManager i18nManager) {
    yesButton = new Button(i18nManager.getMessage(Messages.CONFIRMATION_DIALOG_YES));
    layout.addComponent(yesButton, 0, 1);
    layout.setComponentAlignment(yesButton, Alignment.BOTTOM_RIGHT);
    yesButton.addClickListener(new ClickListener() {
        private static final long serialVersionUID = 1L;

        public void buttonClick(ClickEvent event) {
            close();//  ww  w . jav  a2s .  com
            fireEvent(new ConfirmationEvent(ConfirmationDialogPopupWindow.this, true));
        }
    });

    noButton = new Button(i18nManager.getMessage(Messages.CONFIRMATION_DIALOG_NO));
    layout.addComponent(noButton, 1, 1);
    layout.setComponentAlignment(noButton, Alignment.BOTTOM_LEFT);
    noButton.addClickListener(new ClickListener() {
        private static final long serialVersionUID = 1L;

        public void buttonClick(ClickEvent event) {
            close();
            fireEvent(new ConfirmationEvent(ConfirmationDialogPopupWindow.this, false));
        }
    });
}

From source file:com.klwork.explorer.ui.form.FormPropertiesForm.java

License:Apache License

protected void initButtons() {
    submitFormButton = new Button();
    cancelFormButton = new Button();

    HorizontalLayout buttons = new HorizontalLayout();
    buttons.setSpacing(true);/*from   ww  w . j a v a  2s .  c o m*/
    buttons.setWidth(100, Unit.PERCENTAGE);
    buttons.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
    buttons.addComponent(submitFormButton);
    buttons.setComponentAlignment(submitFormButton, Alignment.BOTTOM_RIGHT);

    buttons.addComponent(cancelFormButton);
    buttons.setComponentAlignment(cancelFormButton, Alignment.BOTTOM_RIGHT);

    Label buttonSpacer = new Label();
    buttons.addComponent(buttonSpacer);
    buttons.setExpandRatio(buttonSpacer, 1.0f);
    addComponent(buttons);
}

From source file:com.klwork.explorer.ui.task.NewTaskPopupWindow.java

License:Apache License

protected void initCreateTaskButton() {
    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setWidth(100, UNITS_PERCENTAGE);
    form.getFooter().setWidth(100, UNITS_PERCENTAGE);
    form.getFooter().addComponent(buttonLayout);

    Button createButton = new Button(i18nManager.getMessage(Messages.BUTTON_CREATE));
    buttonLayout.addComponent(createButton);
    buttonLayout.setComponentAlignment(createButton, Alignment.BOTTOM_RIGHT);

    createButton.addListener(new ClickListener() {
        public void buttonClick(ClickEvent event) {
            handleFormSubmit();//from   www .  j a  v a2 s. c  om
        }
    });
}

From source file:com.klwork.explorer.ui.task.NewTodoToTaskPopupWindow.java

License:Apache License

protected void initCreateTaskButton() {
    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setWidth(100, Unit.PERCENTAGE);
    form.addComponent(buttonLayout);/*from  ww w.jav  a  2  s  .c  o m*/

    Button createButton = new Button(i18nManager.getMessage(Messages.BUTTON_CREATE));
    buttonLayout.addComponent(createButton);
    buttonLayout.setComponentAlignment(createButton, Alignment.BOTTOM_RIGHT);

    createButton.addClickListener(new ClickListener() {
        public void buttonClick(ClickEvent event) {
            handleFormSubmit();
        }
    });
}