use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class DeploymentDetailPanel method addDeploymentName.
protected void addDeploymentName() {
GridLayout taskDetails = new GridLayout(3, 2);
taskDetails.setWidth(100, UNITS_PERCENTAGE);
taskDetails.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
taskDetails.setSpacing(true);
taskDetails.setMargin(false, false, true, false);
// Add image
Embedded image = new Embedded(null, Images.DEPLOYMENT_50);
taskDetails.addComponent(image, 0, 0, 0, 1);
// Add deployment name
Label nameLabel = new Label();
if (deployment.getName() != null) {
nameLabel.setValue(deployment.getName());
} else {
nameLabel.setValue(i18nManager.getMessage(Messages.DEPLOYMENT_NO_NAME));
}
nameLabel.addStyleName(Reindeer.LABEL_H2);
taskDetails.addComponent(nameLabel, 1, 0, 2, 0);
// Add deploy time
PrettyTimeLabel deployTimeLabel = new PrettyTimeLabel(i18nManager.getMessage(Messages.DEPLOYMENT_DEPLOY_TIME), deployment.getDeploymentTime(), null, true);
deployTimeLabel.addStyleName(ExplorerLayout.STYLE_DEPLOYMENT_HEADER_DEPLOY_TIME);
taskDetails.addComponent(deployTimeLabel, 1, 1);
taskDetails.setColumnExpandRatio(1, 1.0f);
taskDetails.setColumnExpandRatio(2, 1.0f);
addDetailComponent(taskDetails);
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class AdminDatabaseSettingsPanel method initSettingsProperties.
protected void initSettingsProperties() {
detailsGrid = new GridLayout(2, 3);
detailsGrid.setSpacing(true);
detailLayout.setMargin(true, true, true, false);
detailLayout.addComponent(detailsGrid);
// Database type
Label typeLabel = new Label(i18nManager.getMessage(Messages.DATABASE_TYPE) + ": ");
typeLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD);
detailsGrid.addComponent(typeLabel);
Label typeValueLabel = new Label(engineConfiguration.getDatabaseType());
detailsGrid.addComponent(typeValueLabel);
// Database schema update
Label schemaUpdateLabel = new Label(i18nManager.getMessage(Messages.DATABASE_UPDATE) + ": ");
schemaUpdateLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD);
detailsGrid.addComponent(schemaUpdateLabel);
Label schemaUpdateValueLabel = new Label(engineConfiguration.getDatabaseSchemaUpdate());
detailsGrid.addComponent(schemaUpdateValueLabel);
// Config type
Label configTypeLabel = new Label(i18nManager.getMessage(Messages.DATABASE_CONFIG_TYPE) + ": ");
configTypeLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD);
detailsGrid.addComponent(configTypeLabel);
String databaseConfigType = getDatabaseType();
Label configTypeValueLabel = new Label(databaseConfigType);
detailsGrid.addComponent(configTypeValueLabel);
if ("JNDI".equals(databaseConfigType)) {
// JNDI
Label jndiLabel = new Label(i18nManager.getMessage(Messages.DATABASE_JNDI) + ": ");
jndiLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD);
detailsGrid.addComponent(jndiLabel);
Label jndiValueLabel = new Label(engineConfiguration.getDataSourceJndiName());
detailsGrid.addComponent(jndiValueLabel);
} else if ("Datasource".equals(databaseConfigType)) {
// Datasource class
Label datasourceLabel = new Label(i18nManager.getMessage(Messages.DATABASE_DATASOURCE_CLASS) + ": ");
datasourceLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD);
detailsGrid.addComponent(datasourceLabel);
Label datasourceValueLabel = new Label(engineConfiguration.getDataSource().getClass().getName());
detailsGrid.addComponent(datasourceValueLabel);
} else {
// JDBC URL
Label jdbcURLLabel = new Label(i18nManager.getMessage(Messages.DATABASE_JDBC_URL) + ": ");
jdbcURLLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD);
detailsGrid.addComponent(jdbcURLLabel);
Label jdbcURLValueLabel = new Label(engineConfiguration.getJdbcUrl());
detailsGrid.addComponent(jdbcURLValueLabel);
}
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class EditorProcessDefinitionDetailPanel method initHeader.
protected void initHeader() {
GridLayout details = new GridLayout(2, 2);
details.setWidth(100, UNITS_PERCENTAGE);
details.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK);
details.setSpacing(true);
details.setMargin(false, false, true, false);
details.setColumnExpandRatio(1, 1.0f);
detailPanelLayout.addComponent(details);
// Image
Embedded image = new Embedded(null, Images.PROCESS_50);
details.addComponent(image, 0, 0, 0, 1);
// Name
Label nameLabel = new Label(modelData.getName());
nameLabel.addStyleName(Reindeer.LABEL_H2);
details.addComponent(nameLabel, 1, 0);
// Properties
HorizontalLayout propertiesLayout = new HorizontalLayout();
propertiesLayout.setSpacing(true);
details.addComponent(propertiesLayout);
// Version
String versionString = i18nManager.getMessage(Messages.PROCESS_VERSION, modelData.getVersion());
Label versionLabel = new Label(versionString);
versionLabel.addStyleName(ExplorerLayout.STYLE_PROCESS_HEADER_VERSION);
propertiesLayout.addComponent(versionLabel);
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class AbstractOneViewPage method addMainLayout.
protected void addMainLayout() {
grid = new GridLayout(1, 2);
grid.setSizeFull();
// Height division
grid.setRowExpandRatio(1, 1.0f);
setCompositionRoot(grid);
}
use of com.vaadin.ui.GridLayout in project Activiti by Activiti.
the class AbstractPage method addMainLayout.
protected void addMainLayout() {
if (showEvents) {
grid = new GridLayout(3, 3);
grid.setColumnExpandRatio(0, .25f);
grid.setColumnExpandRatio(1, .52f);
grid.setColumnExpandRatio(2, .23f);
} else {
grid = new GridLayout(2, 3);
grid.setColumnExpandRatio(0, .25f);
grid.setColumnExpandRatio(1, .75f);
}
grid.addStyleName(Reindeer.SPLITPANEL_SMALL);
grid.setSizeFull();
// Height division
grid.setRowExpandRatio(2, 1.0f);
setCompositionRoot(grid);
}
Aggregations