Search in sources :

Example 26 with GridLayout

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);
}
Also used : GridLayout(com.vaadin.ui.GridLayout) Label(com.vaadin.ui.Label) PrettyTimeLabel(org.activiti.explorer.ui.custom.PrettyTimeLabel) Embedded(com.vaadin.ui.Embedded) PrettyTimeLabel(org.activiti.explorer.ui.custom.PrettyTimeLabel)

Example 27 with GridLayout

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);
    }
}
Also used : GridLayout(com.vaadin.ui.GridLayout) Label(com.vaadin.ui.Label)

Example 28 with GridLayout

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);
}
Also used : GridLayout(com.vaadin.ui.GridLayout) Label(com.vaadin.ui.Label) Embedded(com.vaadin.ui.Embedded) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 29 with GridLayout

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);
}
Also used : GridLayout(com.vaadin.ui.GridLayout)

Example 30 with GridLayout

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);
}
Also used : GridLayout(com.vaadin.ui.GridLayout)

Aggregations

GridLayout (com.vaadin.ui.GridLayout)36 Label (com.vaadin.ui.Label)21 Embedded (com.vaadin.ui.Embedded)9 HorizontalLayout (com.vaadin.ui.HorizontalLayout)9 TextField (com.vaadin.ui.TextField)7 PrettyTimeLabel (org.activiti.explorer.ui.custom.PrettyTimeLabel)6 Panel (com.vaadin.ui.Panel)4 Button (com.vaadin.ui.Button)3 PasswordField (com.vaadin.ui.PasswordField)3 VerticalLayout (com.vaadin.ui.VerticalLayout)3 ComboBox (com.vaadin.ui.ComboBox)2 Component (com.vaadin.ui.Component)2 DateField (com.vaadin.ui.DateField)2 Link (com.vaadin.ui.Link)2 TextArea (com.vaadin.ui.TextArea)2 Window (com.vaadin.ui.Window)2 Test (org.junit.Test)2 DefaultPmoBasedSectionFactory (org.linkki.core.ui.section.DefaultPmoBasedSectionFactory)2 CorpusBrowserPanel (annis.gui.CorpusBrowserPanel)1 MetaDataPanel (annis.gui.MetaDataPanel)1