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();
}
});
}
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();
}
});
}
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();
}
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);
}
}
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);
}
Aggregations