Search in sources :

Example 31 with HorizontalLayout

use of com.vaadin.ui.HorizontalLayout in project Activiti by Activiti.

the class NewGroupPopupWindow method initCreateButton.

protected void initCreateButton() {
    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.GROUP_CREATE));
    buttonLayout.addComponent(createButton);
    buttonLayout.setComponentAlignment(createButton, Alignment.BOTTOM_RIGHT);
    createButton.addListener(new ClickListener() {

        public void buttonClick(ClickEvent event) {
            handleFormSubmit();
        }
    });
}
Also used : Button(com.vaadin.ui.Button) ClickEvent(com.vaadin.ui.Button.ClickEvent) ClickListener(com.vaadin.ui.Button.ClickListener) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 32 with HorizontalLayout

use of com.vaadin.ui.HorizontalLayout in project Activiti by Activiti.

the class NewUserPopupWindow method initCreateButton.

protected void initCreateButton() {
    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.USER_CREATE));
    buttonLayout.addComponent(createButton);
    buttonLayout.setComponentAlignment(createButton, Alignment.BOTTOM_RIGHT);
    createButton.addListener(new ClickListener() {

        public void buttonClick(ClickEvent event) {
            handleFormSubmit();
        }
    });
}
Also used : Button(com.vaadin.ui.Button) ClickEvent(com.vaadin.ui.Button.ClickEvent) ClickListener(com.vaadin.ui.Button.ClickListener) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 33 with HorizontalLayout

use of com.vaadin.ui.HorizontalLayout in project Activiti by Activiti.

the class UserDetailPanel method initGroups.

protected void initGroups() {
    HorizontalLayout groupHeader = new HorizontalLayout();
    groupHeader.setWidth(100, UNITS_PERCENTAGE);
    groupHeader.setSpacing(true);
    groupHeader.setMargin(false, false, true, false);
    groupHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
    addDetailComponent(groupHeader);
    initGroupTitle(groupHeader);
    initAddGroupsButton(groupHeader);
    // we wrap the table in a simple layout so we can remove the table easy later on
    groupLayout = new HorizontalLayout();
    groupLayout.setWidth(100, UNITS_PERCENTAGE);
    addDetailComponent(groupLayout);
    initGroupsTable();
}
Also used : HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 34 with HorizontalLayout

use of com.vaadin.ui.HorizontalLayout in project Activiti by Activiti.

the class UserDetailPanel method loadUserDetails.

protected void loadUserDetails() {
    // Grid of details
    GridLayout detailGrid = new GridLayout();
    detailGrid.setColumns(2);
    detailGrid.setSpacing(true);
    detailGrid.setMargin(true, true, false, true);
    userDetailsLayout.addComponent(detailGrid);
    // Details
    // details are non-editable
    addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_ID), new Label(user.getId()));
    if (!editingDetails) {
        addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_FIRSTNAME), new Label(user.getFirstName()));
        addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_LASTNAME), new Label(user.getLastName()));
        addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_EMAIL), new Label(user.getEmail()));
    } else {
        firstNameField = new TextField(null, user.getFirstName() != null ? user.getFirstName() : "");
        addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_FIRSTNAME), firstNameField);
        firstNameField.focus();
        lastNameField = new TextField(null, user.getLastName() != null ? user.getLastName() : "");
        addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_LASTNAME), lastNameField);
        emailField = new TextField(null, user.getEmail() != null ? user.getEmail() : "");
        addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_EMAIL), emailField);
        passwordField = new PasswordField();
        Label cautionLabel = new Label(i18nManager.getMessage(Messages.USER_RESET_PASSWORD));
        cautionLabel.addStyleName(Reindeer.LABEL_SMALL);
        HorizontalLayout passwordLayout = new HorizontalLayout();
        passwordLayout.setSpacing(true);
        passwordLayout.addComponent(passwordField);
        passwordLayout.addComponent(cautionLabel);
        passwordLayout.setComponentAlignment(cautionLabel, Alignment.MIDDLE_LEFT);
        addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_PASSWORD), passwordLayout);
    }
}
Also used : GridLayout(com.vaadin.ui.GridLayout) Label(com.vaadin.ui.Label) TextField(com.vaadin.ui.TextField) PasswordField(com.vaadin.ui.PasswordField) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 35 with HorizontalLayout

use of com.vaadin.ui.HorizontalLayout in project Activiti by Activiti.

the class DeleteDeploymentPopupWindow method addButtons.

protected void addButtons() {
    // Cancel
    Button cancelButton = new Button(i18nManager.getMessage(Messages.BUTTON_CANCEL));
    cancelButton.addStyleName(Reindeer.BUTTON_SMALL);
    cancelButton.addListener(new ClickListener() {

        public void buttonClick(ClickEvent event) {
            close();
        }
    });
    // Delete
    Button deleteButton = new Button(i18nManager.getMessage(Messages.DEPLOYMENT_DELETE_POPUP_DELETE_BUTTON));
    deleteButton.addStyleName(Reindeer.BUTTON_SMALL);
    deleteButton.addListener(new ClickListener() {

        public void buttonClick(ClickEvent event) {
            // Delete deployment, close popup window and refresh deployment list
            repositoryService.deleteDeployment(deployment.getId(), true);
            close();
            deploymentPage.refreshSelectNext();
        }
    });
    // Alignment
    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setSpacing(true);
    buttonLayout.addComponent(cancelButton);
    buttonLayout.addComponent(deleteButton);
    addComponent(buttonLayout);
    windowLayout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT);
}
Also used : Button(com.vaadin.ui.Button) ClickEvent(com.vaadin.ui.Button.ClickEvent) ClickListener(com.vaadin.ui.Button.ClickListener) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Aggregations

HorizontalLayout (com.vaadin.ui.HorizontalLayout)85 Label (com.vaadin.ui.Label)45 Button (com.vaadin.ui.Button)26 VerticalLayout (com.vaadin.ui.VerticalLayout)20 Embedded (com.vaadin.ui.Embedded)19 ClickEvent (com.vaadin.ui.Button.ClickEvent)17 ClickListener (com.vaadin.ui.Button.ClickListener)15 ExternalResource (com.vaadin.terminal.ExternalResource)7 GridLayout (com.vaadin.ui.GridLayout)7 TextField (com.vaadin.ui.TextField)6 PrettyTimeLabel (org.activiti.explorer.ui.custom.PrettyTimeLabel)6 StreamResource (com.vaadin.terminal.StreamResource)5 Link (com.vaadin.ui.Link)5 Panel (com.vaadin.ui.Panel)5 InputStream (java.io.InputStream)4 URL (java.net.URL)4 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)3 ValueChangeEvent (com.vaadin.data.Property.ValueChangeEvent)3 ExternalResource (com.vaadin.server.ExternalResource)3