Java Code Examples for com.vaadin.ui.ComboBox.setImmediate()

The following are Jave code examples for showing how to use setImmediate() of the com.vaadin.ui.ComboBox class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: hawkbit   File: ComboBoxBuilder.java   Source Code and License Vote up 7 votes
/**
 * @return a new ComboBox
 */
public ComboBox buildCombBox() {
    final ComboBox targetFilter = SPUIComponentProvider.getComboBox(null, "", null, ValoTheme.COMBOBOX_SMALL, false,
            "", prompt);
    targetFilter.setImmediate(true);
    targetFilter.setPageLength(7);
    targetFilter.setItemCaptionPropertyId(SPUILabelDefinitions.VAR_NAME);
    targetFilter.setSizeUndefined();
    if (id != null) {
        targetFilter.setId(id);
    }
    if (valueChangeListener != null) {
        targetFilter.addValueChangeListener(valueChangeListener);
    }
    return targetFilter;
}
 
Example 2
Project: esup-ecandidat   File: CandidatureViewTemplate.java   Source Code and License Vote up 6 votes
/**
 * @param liste
 * @param libNull
 * @return une combo grace a la liste
 */
private ComboBox generateComboBox(final List<String> liste, final String libNull) {
	ComboBox sampleIdCB = new ComboBox();
	sampleIdCB.setPageLength(20);
	sampleIdCB.setTextInputAllowed(false);
	BeanItemContainer<String> dataList = new BeanItemContainer<>(String.class);
	dataList.addBean(applicationContext.getMessage("filter.all", null, UI.getCurrent().getLocale()));
	if (libNull != null) {
		dataList.addBean(libNull);
	}
	dataList.addAll(liste);
	sampleIdCB
			.setNullSelectionItemId(applicationContext.getMessage("filter.all", null, UI.getCurrent().getLocale()));
	sampleIdCB.setContainerDataSource(dataList);
	sampleIdCB.setImmediate(true);
	return sampleIdCB;
}
 
Example 3
Project: esup-ecandidat   File: GridFormatting.java   Source Code and License Vote up 6 votes
/**
 * Ajoute un filtre en combobox String sur une colonne
 * 
 * @param property
 * @param cb
 */
public void addComboBoxFilters(String property, ComboBox cb, String libNull) {
	HeaderCell cell = getFilterCell(property);
	cb.addValueChangeListener(e -> {
		container.removeContainerFilters(property);
		if (cb.getValue() != null && !((String) cb.getValue()).isEmpty()
				&& !((String) cb.getValue()).equals(libNull)) {
			container.addContainerFilter(new SimpleStringFilter(property, (String) cb.getValue(), true, true));
		} else if (cb.getValue() != null && !((String) cb.getValue()).isEmpty()
				&& ((String) cb.getValue()).equals(libNull)) {
			container.addContainerFilter(new IsNull(property));
		}
		fireFilterListener();
		fireFilterListener();
	});
	cb.setImmediate(true);
	cb.setWidth(100, Unit.PERCENTAGE);
	cb.addStyleName(ValoTheme.COMBOBOX_TINY);
	cell.setComponent(cb);
}
 
Example 4
Project: osc-core   File: BindSecurityGroupWindow.java   Source Code and License Vote up 6 votes
private ComboBox getPolicyComboBox(List<PolicyDto> policyDtoList) {
	ComboBox policy = new ComboBox("Select Policy");
	policy.setTextInputAllowed(false);
	policy.setNullSelectionAllowed(false);
	policy.setImmediate(true);
	policy.setRequired(true);
	policy.setRequiredError("Policy cannot be empty");

	BeanItemContainer<PolicyDto> policyListContainer = new BeanItemContainer<>(PolicyDto.class,
			policyDtoList);
	policy.setContainerDataSource(policyListContainer);
	policy.setItemCaptionPropertyId("policyName");

	if (policyListContainer.size() > 0) {
		policy.select(policyListContainer.getIdByIndex(0));
	}

	policy.setEnabled(false);

	return policy;
}
 
Example 5
Project: incubator-openaz   File: ExpressionEditorWindow.java   Source Code and License Vote up 6 votes
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBox
	comboBox = new ComboBox();
	comboBox.setImmediate(false);
	comboBox.setWidth("-1px");
	comboBox.setHeight("-1px");
	mainLayout.addComponent(comboBox);
	
	// treeExpression
	treeExpression = new Tree();
	treeExpression.setImmediate(false);
	treeExpression.setWidth("100.0%");
	treeExpression.setHeight("-1px");
	mainLayout.addComponent(treeExpression);
	mainLayout.setExpandRatio(treeExpression, 1.0f);
	
	return mainLayout;
}
 
Example 6
Project: field-binder   File: SearchPatternComboBox.java   Source Code and License Vote up 6 votes
private void setFieldDefaults(ComboBox backingField) {
    backingField.setImmediate(true);

    backingField.removeAllItems();
    for (Object p : backingField.getContainerPropertyIds()) {
        backingField.removeContainerProperty(p);
    }

    // setup displaying property ids
    backingField.addContainerProperty(CAPTION_PROPERTY_ID, String.class, "");
    backingField.setItemCaptionPropertyId(CAPTION_PROPERTY_ID);

    @SuppressWarnings("unchecked")
    EnumSet<?> enumSet = EnumSet.allOf((Class<java.lang.Enum>) getTargetPropertyType());
    for (Object r : enumSet) {
        Item newItem = backingField.addItem(r);
        newItem.getItemProperty(CAPTION_PROPERTY_ID).setValue(r.toString());
    }
}
 
Example 7
Project: mycollab   File: DateSelectionField.java   Source Code and License Vote up 6 votes
public DateSelectionField() {
    cboMonth = new ComboBox();
    cboMonth.setNullSelectionAllowed(true);
    cboMonth.setPageLength(12);
    cboMonth.setImmediate(true);

    addMonthItems();
    cboMonth.setWidth("117px");

    cboDate = new ComboBox();
    cboDate.setNullSelectionAllowed(true);
    cboDate.setImmediate(true);

    addDayItems();
    cboDate.setWidth("80px");

    cboYear = new ComboBox();
    cboYear.setNullSelectionAllowed(true);
    cboYear.setImmediate(true);

    addYearItems();
    cboYear.setWidth("80px");
}
 
Example 8
Project: XACML   File: ExpressionEditorWindow.java   Source Code and License Vote up 6 votes
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBox
	comboBox = new ComboBox();
	comboBox.setImmediate(false);
	comboBox.setWidth("-1px");
	comboBox.setHeight("-1px");
	mainLayout.addComponent(comboBox);
	
	// treeExpression
	treeExpression = new Tree();
	treeExpression.setImmediate(false);
	treeExpression.setWidth("100.0%");
	treeExpression.setHeight("-1px");
	mainLayout.addComponent(treeExpression);
	mainLayout.setExpandRatio(treeExpression, 1.0f);
	
	return mainLayout;
}
 
Example 9
Project: gazpachoquest   File: OldLoginView.java   Source Code and License Vote up 6 votes
private ComboBox createLanguageSelector() {
    ComboBox languageSelector = new ComboBox("com.vaadin.demo.dashboard.DashboardUI.Language");
    languageSelector.setImmediate(true);
    languageSelector.setNullSelectionAllowed(false);
    addLocale(Locale.ENGLISH, languageSelector);
    addLocale(Locale.FRENCH, languageSelector);
    addLocale(new Locale("es"), languageSelector);
    // languageSelector.setValue(I18NStaticService.getI18NServive().getLocale());
    /*-languageSelector.addValueChangeListener(new ValueChangeListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void valueChange(ValueChangeEvent event) {
            Locale locale = (Locale) (event.getProperty().getValue());
            I18NStaticService.getI18NServive().setLocale(locale);
            getUI().requestRepaintAll();
        }
    });*/
    return languageSelector;
}
 
Example 10
Project: konekti   File: LocaleField.java   Source Code and License Vote up 6 votes
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("100%");
	mainLayout.setHeight("100%");
	mainLayout.setMargin(false);
	
	// top-level component properties
	setWidth("100.0%");
	setHeight("100.0%");
	
	// comboBox_1
	defaultLocaleField = new ComboBox();
	defaultLocaleField.setImmediate(false);
	defaultLocaleField.setWidth("100.0%");
	defaultLocaleField.setHeight("-1px");
	mainLayout.addComponent(defaultLocaleField);
	
	return mainLayout;
}
 
Example 11
Project: VaadinUtils   File: FormHelper.java   Source Code and License Vote up 6 votes
public ComboBox bindEnumField(ComboBox comboBox, AbstractLayout form, ValidatingFieldGroup<E> group,
		String fieldLabel, String fieldName, Class<?> clazz)
{
	ComboBox field = comboBox;
	field.setCaption(fieldLabel);
	field.setContainerDataSource(createContainerFromEnumClass(fieldName, clazz));
	field.setItemCaptionPropertyId(fieldName);
	// field.setCaption(fieldLabel);
	field.setNewItemsAllowed(false);
	field.setNullSelectionAllowed(false);
	field.setTextInputAllowed(true);
	field.setWidth(STANDARD_COMBO_WIDTH);
	field.setPopupWidth("100%");

	field.setImmediate(true);
	field.setId(fieldLabel.replace(" ", ""));
	addValueChangeListeners(field);
	doBinding(group, fieldName, field);

	form.addComponent(field);
	return field;
}
 
Example 12
Project: osc-core   File: BindSecurityGroupWindow.java   Source Code and License Vote up 5 votes
private ComboBox getFailurePolicyComboBox() {
	ComboBox failurePolicy = new ComboBox("Select Failure Policy");
	failurePolicy.setTextInputAllowed(false);
	failurePolicy.setNullSelectionAllowed(false);
	failurePolicy.setImmediate(true);
	failurePolicy.setRequired(true);
	failurePolicy.setRequiredError("Failure Policy cannot be empty");

	failurePolicy.addItems(FailurePolicyType.FAIL_OPEN, FailurePolicyType.FAIL_CLOSE);
	failurePolicy.select(FailurePolicyType.FAIL_OPEN);
	failurePolicy.setEnabled(false);

	return failurePolicy;
}
 
Example 13
Project: incubator-openaz   File: RangeEditorComponent.java   Source Code and License Vote up 5 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// comboBoxMin
	comboBoxMin = new ComboBox();
	comboBoxMin.setCaption("Minimum Type");
	comboBoxMin.setImmediate(true);
	comboBoxMin.setDescription("Select the type for the minimum.");
	comboBoxMin.setWidth("-1px");
	comboBoxMin.setHeight("-1px");
	horizontalLayout_1.addComponent(comboBoxMin);
	
	// textFieldMin
	textFieldMin = new TextField();
	textFieldMin.setCaption("Minimum Value");
	textFieldMin.setImmediate(true);
	textFieldMin.setDescription("Enter a value for the minimum.");
	textFieldMin.setWidth("-1px");
	textFieldMin.setHeight("-1px");
	textFieldMin.setInvalidAllowed(false);
	textFieldMin.setInputPrompt("eg. 1");
	horizontalLayout_1.addComponent(textFieldMin);
	horizontalLayout_1
			.setComponentAlignment(textFieldMin, new Alignment(9));
	
	return horizontalLayout_1;
}
 
Example 14
Project: incubator-openaz   File: RangeEditorComponent.java   Source Code and License Vote up 5 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_2() {
	// common part: create layout
	horizontalLayout_2 = new HorizontalLayout();
	horizontalLayout_2.setImmediate(false);
	horizontalLayout_2.setWidth("-1px");
	horizontalLayout_2.setHeight("-1px");
	horizontalLayout_2.setMargin(false);
	horizontalLayout_2.setSpacing(true);
	
	// comboBoxMax
	comboBoxMax = new ComboBox();
	comboBoxMax.setCaption("Maximum Type");
	comboBoxMax.setImmediate(true);
	comboBoxMax.setDescription("Select the type for the maximum.");
	comboBoxMax.setWidth("-1px");
	comboBoxMax.setHeight("-1px");
	horizontalLayout_2.addComponent(comboBoxMax);
	
	// textFieldMax
	textFieldMax = new TextField();
	textFieldMax.setCaption("Maximum Value");
	textFieldMax.setImmediate(true);
	textFieldMax.setDescription("Enter a value for the maxmum.");
	textFieldMax.setWidth("-1px");
	textFieldMax.setHeight("-1px");
	textFieldMax.setInvalidAllowed(false);
	textFieldMax.setInputPrompt("eg. 100");
	horizontalLayout_2.addComponent(textFieldMax);
	
	return horizontalLayout_2;
}
 
Example 15
Project: incubator-openaz   File: AttributeStandardSelectorComponent.java   Source Code and License Vote up 5 votes
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBoxCategories
	comboBoxCategories = new ComboBox();
	comboBoxCategories.setCaption("Select A Category");
	comboBoxCategories.setImmediate(false);
	comboBoxCategories.setWidth("-1px");
	comboBoxCategories.setHeight("-1px");
	comboBoxCategories.setInvalidAllowed(false);
	comboBoxCategories.setRequired(true);
	mainLayout.addComponent(comboBoxCategories);
	mainLayout.setExpandRatio(comboBoxCategories, 1.0f);
	
	// horizontalLayout_2
	horizontalLayout_2 = buildHorizontalLayout_2();
	mainLayout.addComponent(horizontalLayout_2);
	mainLayout.setExpandRatio(horizontalLayout_2, 1.0f);
	
	return mainLayout;
}
 
Example 16
Project: incubator-openaz   File: AttributeDictionarySelectorComponent.java   Source Code and License Vote up 5 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_2() {
	// common part: create layout
	horizontalLayout_2 = new HorizontalLayout();
	horizontalLayout_2.setImmediate(false);
	horizontalLayout_2.setWidth("-1px");
	horizontalLayout_2.setHeight("-1px");
	horizontalLayout_2.setMargin(false);
	horizontalLayout_2.setSpacing(true);
	
	// comboBoxCategoryFilter
	comboBoxCategoryFilter = new ComboBox();
	comboBoxCategoryFilter.setCaption("Filter Category");
	comboBoxCategoryFilter.setImmediate(false);
	comboBoxCategoryFilter.setWidth("-1px");
	comboBoxCategoryFilter.setHeight("-1px");
	horizontalLayout_2.addComponent(comboBoxCategoryFilter);
	horizontalLayout_2.setExpandRatio(comboBoxCategoryFilter, 1.0f);
	
	// buttonNewAttribute
	buttonNewAttribute = new Button();
	buttonNewAttribute.setCaption("New Attribute");
	buttonNewAttribute.setImmediate(true);
	buttonNewAttribute
			.setDescription("Click to create a new attribute in the dictionary.");
	buttonNewAttribute.setWidth("-1px");
	buttonNewAttribute.setHeight("-1px");
	horizontalLayout_2.addComponent(buttonNewAttribute);
	horizontalLayout_2.setComponentAlignment(buttonNewAttribute,
			new Alignment(10));
	
	return horizontalLayout_2;
}
 
Example 17
Project: hawkbit   File: TargetBulkUpdateWindowLayout.java   Source Code and License Vote up 5 votes
private ComboBox getDsComboField() {
    final Container container = createContainer();
    final ComboBox dsComboBox = SPUIComponentProvider.getComboBox(i18n.getMessage("bulkupload.ds.name"), "", null,
            null, false, "", i18n.getMessage("bulkupload.ds.name"));
    dsComboBox.setSizeUndefined();
    dsComboBox.addStyleName(SPUIDefinitions.BULK_UPLOD_DS_COMBO_STYLE);
    dsComboBox.setImmediate(true);
    dsComboBox.setFilteringMode(FilteringMode.STARTSWITH);
    dsComboBox.setPageLength(7);
    dsComboBox.setContainerDataSource(container);
    dsComboBox.setItemCaptionPropertyId(SPUILabelDefinitions.VAR_NAME_VERSION);
    dsComboBox.setId(UIComponentIdProvider.BULK_UPLOAD_DS_COMBO);
    dsComboBox.setWidth("100%");
    return dsComboBox;
}
 
Example 18
Project: KrishnasSpace   File: BasicFormImpl.java   Source Code and License Vote up 5 votes
/**
 * @param caption
 * @param bindName
 * @param container
 *            TODO
 * @return
 */
private ComboBox getComboBox(String caption, String bindName,
		Container container) {
	ComboBox comboBox = new ComboBox(caption);
	comboBox.setImmediate(true);
	comboBox.setValidationVisible(false);
	comboBox.setNewItemsAllowed(false);
	comboBox.setFilteringMode(FilteringMode.CONTAINS);
	comboBox.setNullSelectionAllowed(false);
	fieldGroup.bind(comboBox, bindName);
	comboBox.setContainerDataSource(container);
	return comboBox;
}
 
Example 19
Project: KrishnasSpace   File: FilterGrid.java   Source Code and License Vote up 5 votes
/**
 * @param filterRow
 * @return
 */
private HeaderCell setCategoryFilter(HeaderRow filterRow) {
	HeaderCell categoryFilter = filterRow.getCell(CATEGORY);
	ComboBox comboBox = new ComboBox();
	comboBox.setHeight(100, Unit.PERCENTAGE);
	comboBox.setImmediate(true);
	comboBox.setNewItemsAllowed(false);
	comboBox.setTextInputAllowed(false);
	comboBox.addValueChangeListener(getCategoryFilterListener());
	comboBox.setContainerDataSource(getCategoryDataSource());
	categoryFilter.setComponent(comboBox);
	return categoryFilter;
}
 
Example 20
Project: trader   File: TradingAreaView.java   Source Code and License Vote up 5 votes
private Component buildQuoteSelector() {
		quoteSelector = new ComboBox();
		
//		quoteSelector.setInputPrompt("Select Stock/Index...");
		
//		quoteSelector.setItemCaptionPropertyId(Quote.PROPERTY_NAME);
//		quoteSelector.setItemCaptionMode(ItemCaptionMode.PROPERTY);

		
        // Set full width
//		quoteSelector.setWidth(100.0f, Unit.PERCENTAGE);
		quoteSelector.addStyleName("borderless");
		
        // Set the appropriate filtering mode for this example
		quoteSelector.setFilteringMode(FilteringMode.CONTAINS);
		quoteSelector.setImmediate(true);
 
        // Disallow null selections
		quoteSelector.setNullSelectionAllowed(false);
		
		quoteSelector.addValueChangeListener(e -> {
                chart.setChartSymbol(quotes.getItem(e.getProperty().getValue()).getBean().getChartSrc());
                ticker.setSymbol(quotes.getItem(e.getProperty().getValue()).getBean().getTickerSrc());
                chartToolbar.getCharts().getChildren().get(LiveChart.ChartDrawType.LINE.ordinal()*2).setChecked(false);
                chartToolbar.getCharts().getChildren().get(LiveChart.ChartDrawType.CANDLE.ordinal()*2).setChecked(true);
		});
		
		return quoteSelector;
	}
 
Example 21
Project: metl   File: EditXmlFormatPanel.java   Source Code and License Vote up 5 votes
protected void buildGrid() {
    grid = new Grid();
    grid.setSelectionMode(SelectionMode.NONE);
    grid.setSizeFull();
    grid.setEditorEnabled(!readOnly);
    container = new BeanItemContainer<Record>(Record.class);
    grid.setContainerDataSource(container);
    grid.setColumns("entityName", "attributeName", "xpath");
    HeaderRow filterRow = grid.appendHeaderRow();

    addColumn("entityName", filterRow);

    addColumn("attributeName", filterRow);

    ComboBox combo = new ComboBox();
    combo.addValueChangeListener(e->saveXPathSettings());
    combo.setWidth(100, Unit.PERCENTAGE);
    combo.setImmediate(true);
    combo.setNewItemsAllowed(true);
    combo.setInvalidAllowed(true);
    combo.setTextInputAllowed(true);
    combo.setScrollToSelectedItem(true);
    combo.setFilteringMode(FilteringMode.CONTAINS);
    grid.getColumn("xpath").setEditorField(combo).setExpandRatio(1);
    addShowPopulatedFilter("xpath", filterRow);
    grid.setEditorBuffered(false);
    addComponent(grid);
    setExpandRatio(grid, 1);
}
 
Example 22
Project: metl   File: EditTransformerPanel.java   Source Code and License Vote up 5 votes
public Field<?> createField(final Container dataContainer, final Object itemId, final Object propertyId,
        com.vaadin.ui.Component uiContext) {
    final ComponentAttribSetting setting = (ComponentAttribSetting) itemId;
    Field<?> field = null;

    if (propertyId.equals("value") && (setting.getValue() == null || !setting.getValue().contains("\n"))) {
        final ComboBox combo = new ComboBox();
        combo.setWidth(100, Unit.PERCENTAGE);
        String[] functions = ModelAttributeScriptHelper.getSignatures();
        for (String function : functions) {
            combo.addItem(function);
        }
        combo.setPageLength(functions.length > 20 ? 20 : functions.length);
        if (setting.getValue() != null && !combo.getItemIds().contains(setting.getValue())) {
            combo.addItem(setting.getValue());
        }
        combo.setImmediate(true);
        combo.setNewItemsAllowed(true);
        combo.addValueChangeListener(new ValueChangeListener() {
            public void valueChange(ValueChangeEvent event) {
                setting.setValue((String) combo.getValue());
                context.getConfigurationService().save(setting);
            }
        });
        field = combo;
    }
    return field;
}
 
Example 23
Project: XACML   File: RangeEditorComponent.java   Source Code and License Vote up 5 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_2() {
	// common part: create layout
	horizontalLayout_2 = new HorizontalLayout();
	horizontalLayout_2.setImmediate(false);
	horizontalLayout_2.setWidth("-1px");
	horizontalLayout_2.setHeight("-1px");
	horizontalLayout_2.setMargin(false);
	horizontalLayout_2.setSpacing(true);
	
	// comboBoxMax
	comboBoxMax = new ComboBox();
	comboBoxMax.setCaption("Maximum Type");
	comboBoxMax.setImmediate(true);
	comboBoxMax.setDescription("Select the type for the maximum.");
	comboBoxMax.setWidth("-1px");
	comboBoxMax.setHeight("-1px");
	horizontalLayout_2.addComponent(comboBoxMax);
	
	// textFieldMax
	textFieldMax = new TextField();
	textFieldMax.setCaption("Maximum Value");
	textFieldMax.setImmediate(true);
	textFieldMax.setDescription("Enter a value for the maxmum.");
	textFieldMax.setWidth("-1px");
	textFieldMax.setHeight("-1px");
	textFieldMax.setInvalidAllowed(false);
	textFieldMax.setInputPrompt("eg. 100");
	horizontalLayout_2.addComponent(textFieldMax);
	
	return horizontalLayout_2;
}
 
Example 24
Project: XACML   File: AttributeStandardSelectorComponent.java   Source Code and License Vote up 5 votes
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBoxCategories
	comboBoxCategories = new ComboBox();
	comboBoxCategories.setCaption("Select A Category");
	comboBoxCategories.setImmediate(false);
	comboBoxCategories.setWidth("-1px");
	comboBoxCategories.setHeight("-1px");
	comboBoxCategories.setInvalidAllowed(false);
	comboBoxCategories.setRequired(true);
	mainLayout.addComponent(comboBoxCategories);
	mainLayout.setExpandRatio(comboBoxCategories, 1.0f);
	
	// horizontalLayout_2
	horizontalLayout_2 = buildHorizontalLayout_2();
	mainLayout.addComponent(horizontalLayout_2);
	mainLayout.setExpandRatio(horizontalLayout_2, 1.0f);
	
	return mainLayout;
}
 
Example 25
Project: XACML   File: AttributeDictionarySelectorComponent.java   Source Code and License Vote up 5 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_2() {
	// common part: create layout
	horizontalLayout_2 = new HorizontalLayout();
	horizontalLayout_2.setImmediate(false);
	horizontalLayout_2.setWidth("-1px");
	horizontalLayout_2.setHeight("-1px");
	horizontalLayout_2.setMargin(false);
	horizontalLayout_2.setSpacing(true);
	
	// comboBoxCategoryFilter
	comboBoxCategoryFilter = new ComboBox();
	comboBoxCategoryFilter.setCaption("Filter Category");
	comboBoxCategoryFilter.setImmediate(false);
	comboBoxCategoryFilter.setWidth("-1px");
	comboBoxCategoryFilter.setHeight("-1px");
	horizontalLayout_2.addComponent(comboBoxCategoryFilter);
	horizontalLayout_2.setExpandRatio(comboBoxCategoryFilter, 1.0f);
	
	// buttonNewAttribute
	buttonNewAttribute = new Button();
	buttonNewAttribute.setCaption("New Attribute");
	buttonNewAttribute.setImmediate(true);
	buttonNewAttribute
			.setDescription("Click to create a new attribute in the dictionary.");
	buttonNewAttribute.setWidth("-1px");
	buttonNewAttribute.setHeight("-1px");
	horizontalLayout_2.addComponent(buttonNewAttribute);
	horizontalLayout_2.setComponentAlignment(buttonNewAttribute,
			new Alignment(10));
	
	return horizontalLayout_2;
}
 
Example 26
Project: extacrm   File: LoanCalculatorForm.java   Source Code and License Vote up 5 votes
public LoanCalculatorForm() {
    super("Рассчет кредита и подбор кредитного продукта");

    final VerticalLayout mainLayout = new VerticalLayout();

    final ExtaFormLayout paramForm = new ExtaFormLayout();
    paramForm.addComponent(new FormGroupHeader("Параметры кредита"));
    priceField = new EditField("Стоимость техники", "Введите стоимость техники");
    priceField.setRequired(true);
    downpaymentField = new PercentOfField("Первоначальный взнос", "Введите сумму первоначального взноса по кредиту");
    downpaymentField.setRequired(true);
    paramForm.addComponent(downpaymentField);

    periodField = new ComboBox("Срок кредитования");
    periodField.setDescription("Введите период кредитования (срок кредита)");
    periodField.setImmediate(true);
    periodField.setNullSelectionAllowed(false);
    periodField.setRequired(true);
    periodField.setWidth(6, Unit.EM);
    // Наполняем возможными сроками кредита
    fillPeriodFieldItems();
    paramForm.addComponent(periodField);

    summField = new EditField("Сумма кредита", "Введите сумму кредита (Также может рассчитываться автоматически)");
    summField.setRequired(true);
    paramForm.addComponent(summField);


    mainLayout.addComponent(paramForm);

    setContent(mainLayout);
}
 
Example 27
Project: chipster   File: InputOutputUI.java   Source Code and License Vote up 5 votes
protected void initElements() {
	type2 = new ComboBox();
	type2.setImmediate(true);
	type2.setWidth(WIDTH);
	lbMeta = new Label("Meta:");
	cbMeta = new CheckBox();
	cbMeta.setDescription("Is this element Meta data");
	
	optional.setWidth(WIDTH);
	type = new ComboBox();
	type.setWidth(WIDTH);
	type.setNullSelectionAllowed(false);
	type.setImmediate(true);
	type.addItem(SINGLE_FILE);
	type.addItem(MULTI_FILE);
	type.select(SINGLE_FILE);
	type.addValueChangeListener(new ValueChangeListener() {
		private static final long serialVersionUID = -1134955257251483403L;

		@Override
		public void valueChange(ValueChangeEvent event) {
			if(type.getValue().toString().contentEquals(SINGLE_FILE)) {
				getSingleFileUI();
			} else if(type.getValue().toString().contentEquals(MULTI_FILE)){
				getMultipleFilesUI();
			}
		}
	});
}
 
Example 28
Project: VaadinUtils   File: FormHelper.java   Source Code and License Vote up 5 votes
public <L> ComboBox bindComboBox(AbstractLayout form, ValidatingFieldGroup<E> fieldGroup, String fieldName,
		String fieldLabel, Container options)
{
	ComboBox field = new SplitComboBox(fieldLabel, options);
	field.setNewItemsAllowed(false);
	field.setNullSelectionAllowed(false);
	field.setTextInputAllowed(true);
	field.setWidth(STANDARD_COMBO_WIDTH);
	field.setPopupWidth("100%");
	field.setImmediate(true);
	form.addComponent(field);
	addValueChangeListeners(field);
	doBinding(group, fieldName, field);
	return field;
}
 
Example 29
Project: VaadinUtils   File: FormHelper.java   Source Code and License Vote up 5 votes
public <L> ComboBox bindComboBox(AbstractLayout form, ValidatingFieldGroup<E> fieldGroup, String fieldName,
		String fieldLabel, Collection<?> options)
{
	ComboBox field = new SplitComboBox(fieldLabel, options);
	field.setNewItemsAllowed(false);
	field.setNullSelectionAllowed(false);
	field.setTextInputAllowed(true);
	field.setWidth(STANDARD_COMBO_WIDTH);
	field.setPopupWidth("100%");
	field.setImmediate(true);
	form.addComponent(field);
	addValueChangeListeners(field);
	doBinding(group, fieldName, field);
	return field;
}
 
Example 30
Project: esup-ecandidat   File: GridFormatting.java   Source Code and License Vote up 4 votes
/**
 * Ajoute un filtre de Boolean sur une liste de colonnes
 * 
 * @param filterRow
 * @param container
 * @param property
 * @param labelTrue
 * @param labelFalse
 * @param labelNull
 */
private void addBooleanFilter(String property, String labelTrue, String labelFalse, String labelNull) {
	HeaderCell cell = getFilterCell(property);
	ComboBox cbOuiNon = new ComboBox();
	cbOuiNon.setTextInputAllowed(false);

	List<BooleanPresentation> liste = new ArrayList<BooleanPresentation>();
	BooleanPresentation nullObject = new BooleanPresentation(BooleanValue.ALL,
			applicationContext.getMessage("filter.all", null, UI.getCurrent().getLocale()), null);
	liste.add(nullObject);

	if (labelTrue != null) {
		liste.add(new BooleanPresentation(BooleanValue.TRUE, labelTrue, FontAwesome.CHECK_SQUARE_O));
	}
	if (labelFalse != null) {
		liste.add(new BooleanPresentation(BooleanValue.FALSE, labelFalse, FontAwesome.SQUARE_O));
	}
	if (labelNull != null) {
		liste.add(new BooleanPresentation(BooleanValue.NULL, labelNull, FontAwesome.HOURGLASS_HALF));
	}

	BeanItemContainer<BooleanPresentation> containerOuiNon = new BeanItemContainer<BooleanPresentation>(
			BooleanPresentation.class, liste);
	cbOuiNon.setNullSelectionItemId(nullObject);
	cbOuiNon.setImmediate(true);
	cbOuiNon.setContainerDataSource(containerOuiNon);
	cbOuiNon.setItemCaptionPropertyId("libelle");
	cbOuiNon.setItemCaptionMode(ItemCaptionMode.PROPERTY);
	cbOuiNon.setItemIconPropertyId("icone");
	cbOuiNon.setWidth(100, Unit.PERCENTAGE);
	cbOuiNon.addStyleName(ValoTheme.COMBOBOX_TINY);

	cbOuiNon.addValueChangeListener(change -> {
		container.removeContainerFilters(property);
		if (cbOuiNon.getValue() != null) {
			BooleanPresentation value = (BooleanPresentation) cbOuiNon.getValue();
			if (value != null) {
				BooleanValue booleanValue = value.getValeur();
				switch (booleanValue) {
				case TRUE:
					container.addContainerFilter(new Equal(property, true));
					break;
				case FALSE:
					container.addContainerFilter(new Equal(property, false));
					break;
				case NULL:
					container.addContainerFilter(new Equal(property, null));
					break;
				default:
					break;
				}
			}
			fireFilterListener();
		}
	});
	cell.setComponent(cbOuiNon);
}
 
Example 31
Project: incubator-openaz   File: ApplyEditorWindow.java   Source Code and License Vote up 4 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Enter A Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("50.0%");
	textAreaDescription.setHeight("-1px");
	horizontalLayout_1.addComponent(textAreaDescription);
	
	// textFieldFilter
	textFieldFilter = new TextField();
	textFieldFilter.setCaption("Filter Function By ID");
	textFieldFilter.setImmediate(false);
	textFieldFilter.setWidth("-1px");
	textFieldFilter.setHeight("-1px");
	horizontalLayout_1.addComponent(textFieldFilter);
	horizontalLayout_1.setComponentAlignment(textFieldFilter,
			new Alignment(9));
	
	// comboBoxDatatypeFilter
	comboBoxDatatypeFilter = new ComboBox();
	comboBoxDatatypeFilter.setCaption("Filter By Data Type");
	comboBoxDatatypeFilter.setImmediate(false);
	comboBoxDatatypeFilter.setWidth("-1px");
	comboBoxDatatypeFilter.setHeight("-1px");
	horizontalLayout_1.addComponent(comboBoxDatatypeFilter);
	horizontalLayout_1.setComponentAlignment(comboBoxDatatypeFilter,
			new Alignment(9));
	
	// checkBoxFilterIsBag
	checkBoxFilterIsBag = new CheckBox();
	checkBoxFilterIsBag.setCaption("Is Bag Filter");
	checkBoxFilterIsBag.setImmediate(false);
	checkBoxFilterIsBag.setWidth("-1px");
	checkBoxFilterIsBag.setHeight("-1px");
	horizontalLayout_1.addComponent(checkBoxFilterIsBag);
	horizontalLayout_1.setComponentAlignment(checkBoxFilterIsBag,
			new Alignment(9));
	
	return horizontalLayout_1;
}
 
Example 32
Project: incubator-openaz   File: AttributeValueEditorWindow.java   Source Code and License Vote up 4 votes
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBoxDatatype
	comboBoxDatatype = new ComboBox();
	comboBoxDatatype.setCaption("Select Datatype");
	comboBoxDatatype.setImmediate(false);
	comboBoxDatatype.setWidth("-1px");
	comboBoxDatatype.setHeight("-1px");
	comboBoxDatatype.setInvalidAllowed(false);
	comboBoxDatatype.setRequired(true);
	mainLayout.addComponent(comboBoxDatatype);
	
	// textFieldValue
	textFieldValue = new TextField();
	textFieldValue.setCaption("Attribute Value");
	textFieldValue.setImmediate(false);
	textFieldValue.setWidth("100.0%");
	textFieldValue.setHeight("-1px");
	textFieldValue.setInvalidAllowed(false);
	textFieldValue.setRequired(true);
	mainLayout.addComponent(textFieldValue);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 33
Project: incubator-openaz   File: PolicyNameEditorWindow.java   Source Code and License Vote up 4 votes
@AutoGenerated
private FormLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new FormLayout();
	mainLayout.setImmediate(false);
	
	// textFieldPolicyName
	textFieldPolicyName = new TextField();
	textFieldPolicyName.setCaption("Policy File Name");
	textFieldPolicyName.setImmediate(true);
	textFieldPolicyName.setWidth("-1px");
	textFieldPolicyName.setHeight("-1px");
	textFieldPolicyName.setInputPrompt("Enter filename eg. foobar.xml");
	textFieldPolicyName.setRequired(true);
	mainLayout.addComponent(textFieldPolicyName);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100%");
	textAreaDescription.setHeight("-1px");
	textAreaDescription
			.setInputPrompt("Enter a description for the Policy/PolicySet.");
	textAreaDescription.setNullSettingAllowed(true);
	mainLayout.addComponent(textAreaDescription);
	
	// optionPolicySet
	optionPolicySet = new OptionGroup();
	optionPolicySet.setCaption("Policy or PolicySet?");
	optionPolicySet.setImmediate(true);
	optionPolicySet
			.setDescription("Is the root level a Policy or Policy Set.");
	optionPolicySet.setWidth("-1px");
	optionPolicySet.setHeight("-1px");
	optionPolicySet.setRequired(true);
	mainLayout.addComponent(optionPolicySet);
	
	// comboAlgorithms
	comboAlgorithms = new ComboBox();
	comboAlgorithms.setCaption("Combining Algorithm");
	comboAlgorithms.setImmediate(false);
	comboAlgorithms.setDescription("Select the combining algorithm.");
	comboAlgorithms.setWidth("-1px");
	comboAlgorithms.setHeight("-1px");
	comboAlgorithms.setRequired(true);
	mainLayout.addComponent(comboAlgorithms);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));

	return mainLayout;
}
 
Example 34
Project: incubator-openaz   File: SQLPIPConfigurationComponent.java   Source Code and License Vote up 4 votes
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBoxConnectionType
	comboBoxConnectionType = new ComboBox();
	comboBoxConnectionType.setCaption("Type of SQL Connection");
	comboBoxConnectionType.setImmediate(false);
	comboBoxConnectionType.setWidth("-1px");
	comboBoxConnectionType.setHeight("-1px");
	mainLayout.addComponent(comboBoxConnectionType);
	
	// textFieldDataSource
	textFieldDataSource = new TextField();
	textFieldDataSource.setCaption("Data Source");
	textFieldDataSource.setImmediate(false);
	textFieldDataSource.setWidth("-1px");
	textFieldDataSource.setHeight("-1px");
	mainLayout.addComponent(textFieldDataSource);
	mainLayout.setExpandRatio(textFieldDataSource, 1.0f);
	
	// comboBoxSQLDriver
	comboBoxSQLDriver = new ComboBox();
	comboBoxSQLDriver.setCaption("JDBC Driver");
	comboBoxSQLDriver.setImmediate(false);
	comboBoxSQLDriver.setWidth("-1px");
	comboBoxSQLDriver.setHeight("-1px");
	mainLayout.addComponent(comboBoxSQLDriver);
	mainLayout.setExpandRatio(comboBoxSQLDriver, 1.0f);
	
	// textFieldConnectionURL
	textFieldConnectionURL = new TextField();
	textFieldConnectionURL.setCaption("Connection URL");
	textFieldConnectionURL.setImmediate(false);
	textFieldConnectionURL.setWidth("-1px");
	textFieldConnectionURL.setHeight("-1px");
	mainLayout.addComponent(textFieldConnectionURL);
	mainLayout.setExpandRatio(textFieldConnectionURL, 1.0f);
	
	// textFieldUser
	textFieldUser = new TextField();
	textFieldUser.setCaption("User");
	textFieldUser.setImmediate(false);
	textFieldUser.setWidth("-1px");
	textFieldUser.setHeight("-1px");
	mainLayout.addComponent(textFieldUser);
	mainLayout.setExpandRatio(textFieldUser, 1.0f);
	
	// textFieldPassword
	textFieldPassword = new PasswordField();
	textFieldPassword.setCaption("Password");
	textFieldPassword.setImmediate(false);
	textFieldPassword.setWidth("-1px");
	textFieldPassword.setHeight("-1px");
	mainLayout.addComponent(textFieldPassword);
	mainLayout.setExpandRatio(textFieldPassword, 1.0f);
	
	// buttonTest
	buttonTest = new Button();
	buttonTest.setCaption("Test Connection");
	buttonTest.setImmediate(true);
	buttonTest.setWidth("-1px");
	buttonTest.setHeight("-1px");
	mainLayout.addComponent(buttonTest);
	mainLayout.setComponentAlignment(buttonTest, new Alignment(48));
	
	return mainLayout;
}
 
Example 35
Project: incubator-openaz   File: ObadviceDictionary.java   Source Code and License Vote up 4 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
	// common part: create layout
	horizontalLayoutToolbar = new HorizontalLayout();
	horizontalLayoutToolbar.setImmediate(false);
	horizontalLayoutToolbar.setWidth("-1px");
	horizontalLayoutToolbar.setHeight("-1px");
	horizontalLayoutToolbar.setMargin(false);
	horizontalLayoutToolbar.setSpacing(true);
	
	// buttonNew
	buttonNew = new Button();
	buttonNew.setCaption("New");
	buttonNew.setImmediate(true);
	buttonNew
			.setDescription("Add a new advice or obligation to the dictionary.");
	buttonNew.setWidth("-1px");
	buttonNew.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonNew);
	horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(
			24));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove
			.setDescription("Remove the selected advice or obligation from the dictionary.");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	horizontalLayoutToolbar.setComponentAlignment(buttonRemove,
			new Alignment(24));
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone");
	buttonClone.setImmediate(true);
	buttonClone.setDescription("Clone the selected obligation/advice.");
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonClone);
	horizontalLayoutToolbar.setComponentAlignment(buttonClone,
			new Alignment(24));
	
	// comboBoxFilter
	comboBoxFilter = new ComboBox();
	comboBoxFilter.setCaption("Filter By Type");
	comboBoxFilter.setImmediate(false);
	comboBoxFilter.setWidth("-1px");
	comboBoxFilter.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilter);
	
	return horizontalLayoutToolbar;
}
 
Example 36
Project: incubator-openaz   File: AttributeDictionary.java   Source Code and License Vote up 4 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
	// common part: create layout
	horizontalLayoutToolbar = new HorizontalLayout();
	horizontalLayoutToolbar.setImmediate(false);
	horizontalLayoutToolbar.setWidth("-1px");
	horizontalLayoutToolbar.setHeight("-1px");
	horizontalLayoutToolbar.setMargin(false);
	horizontalLayoutToolbar.setSpacing(true);
	
	// buttonNew
	buttonNew = new Button();
	buttonNew.setCaption("New");
	buttonNew.setImmediate(true);
	buttonNew.setDescription("Create a new attribute");
	buttonNew.setWidth("70px");
	buttonNew.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonNew);
	horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(
			9));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove.setDescription("Remove the selected attribute(s)");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	horizontalLayoutToolbar.setComponentAlignment(buttonRemove,
			new Alignment(9));
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone");
	buttonClone.setImmediate(true);
	buttonClone.setDescription("Clone an attribute.");
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonClone);
	horizontalLayoutToolbar.setComponentAlignment(buttonClone,
			new Alignment(9));
	
	// comboBoxFilterCategory
	comboBoxFilterCategory = new ComboBox();
	comboBoxFilterCategory.setCaption("Filter By Category");
	comboBoxFilterCategory.setImmediate(false);
	comboBoxFilterCategory.setWidth("-1px");
	comboBoxFilterCategory.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilterCategory);
	
	// comboBoxFilterDatatype
	comboBoxFilterDatatype = new ComboBox();
	comboBoxFilterDatatype.setCaption("Filter By Data Type");
	comboBoxFilterDatatype.setImmediate(false);
	comboBoxFilterDatatype.setWidth("-1px");
	comboBoxFilterDatatype.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilterDatatype);
	
	return horizontalLayoutToolbar;
}
 
Example 37
Project: metl   File: EditContentRouterPanel.java   Source Code and License Vote up 4 votes
public Field<?> createField(final Container dataContainer, final Object itemId, final Object propertyId,
        com.vaadin.ui.Component uiContext) {
    final Route route = (Route) itemId;
    Field<?> field = null;
    if (propertyId.equals("matchExpression")) {
        final TextField textField = new ImmediateUpdateTextField(null) {
            @Override
            protected void save(String text) {
                route.setMatchExpression(text);
                EditContentRouterPanel.this.save();
            }
        };
        textField.setWidth(100, Unit.PERCENTAGE);
        textField.setValue(route.getMatchExpression());
        field = textField;
    } else if (propertyId.equals("targetStepId")) {
        final ComboBox combo = new ComboBox();
        combo.setWidth(100, Unit.PERCENTAGE);
        flow = context.getConfigurationService().findFlow(flow.getId());
        List<FlowStepLink> stepLinks = flow.findFlowStepLinksWithSource(flowStep.getId());
        for (FlowStepLink flowStepLink : stepLinks) {
            FlowStep comboStep = flow.findFlowStepWithId(flowStepLink.getTargetStepId());
            combo.addItem(comboStep.getId());
            combo.setItemCaption(comboStep.getId(), comboStep.getName());

            if (flowStepLink.getTargetStepId().equals(route.getTargetStepId()) || combo.getValue() == null) {
                combo.setValue(comboStep.getId());
            }
        }

        combo.setImmediate(true);
        combo.setNewItemsAllowed(false);
        combo.setNullSelectionAllowed(false);
        combo.addValueChangeListener(new ValueChangeListener() {
            public void valueChange(ValueChangeEvent event) {
                String stepId = (String) event.getProperty().getValue();
                if (stepId != null) {
                    route.setTargetStepId(stepId);
                    EditContentRouterPanel.this.save();
                }
            }
        });
        field = combo;
    }
    if (field != null) {
        field.setReadOnly(readOnly);
    }
    return field;
}
 
Example 38
Project: primecloud-controller   File: WinLoadBalancerEdit.java   Source Code and License Vote up 4 votes
@Override
public void attach() {
    setHeight(TAB_HEIGHT);
    setMargin(false, true, true, true);
    setSpacing(false);

    // メインフォーム
    Form mainForm = new Form();
    addComponent(mainForm);

    // 監視プロトコル
    checkProtocolSelect = new ComboBox(ViewProperties.getCaption("field.checkProtocol"));
    checkProtocolSelect.setWidth(TEXT_WIDTH);
    checkProtocolSelect.setImmediate(true);
    checkProtocolSelect.setNullSelectionAllowed(false);
    checkProtocolSelect.addListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            checkProtocolValueChange(event);
        }
    });
    mainForm.getLayout().addComponent(checkProtocolSelect);

    // 監視ポート
    checkPortField = new TextField(ViewProperties.getCaption("field.checkPort"));
    checkPortField.setWidth(TEXT_WIDTH);
    mainForm.getLayout().addComponent(checkPortField);

    // 監視Path
    checkPathField = new TextField(ViewProperties.getCaption("field.checkPath"));
    checkPathField.setImmediate(true);
    mainForm.getLayout().addComponent(checkPathField);

    // ヘルスチェック詳細設定パネル
    Panel panel = new Panel(ViewProperties.getCaption("field.healthCheckDetail"));
    ((Layout) panel.getContent()).setMargin(false, false, false, true);
    ((Layout) panel.getContent()).setHeight("200px");
    ((Layout) panel.getContent()).setWidth("315px");
    mainForm.getLayout().addComponent(panel);

    // サブフォーム
    Form subForm = new Form();
    subForm.setStyleName("panel-healthcheck-setting");
    subForm.getLayout().setMargin(false, false, false, false);
    panel.addComponent(subForm);

    // タイムアウト時間
    checkTimeoutField = new TextField(ViewProperties.getCaption("field.checkTimeout"));
    checkTimeoutField.setWidth(TEXT_WIDTH);
    subForm.getLayout().addComponent(checkTimeoutField);

    // ヘルスチェック間隔
    checkIntervalField = new TextField(ViewProperties.getCaption("field.checkInterval"));
    checkIntervalField.setWidth(TEXT_WIDTH);
    subForm.getLayout().addComponent(checkIntervalField);

    // 障害閾値
    unhealthyThresholdField = new TextField(ViewProperties.getCaption("field.checkDownThreshold"));
    unhealthyThresholdField.setWidth(TEXT_WIDTH);
    subForm.getLayout().addComponent(unhealthyThresholdField);

    // 復帰閾値
    healthyThresholdField = new TextField(ViewProperties.getCaption("field.checkRecoverThreshold"));
    healthyThresholdField.setWidth(TEXT_WIDTH);
    subForm.getLayout().addComponent(healthyThresholdField);

    // UltraMonkeyロードバランサの場合、復帰閾値は設定できない
    if (PCCConstant.LOAD_BALANCER_ULTRAMONKEY.equals(loadBalancerType)) {
        healthyThresholdField.setEnabled(false);
    }

    initValidation();
}
 
Example 39
Project: primecloud-controller   File: WinServerEdit.java   Source Code and License Vote up 4 votes
public AzureDetailTab(InstanceDto instance, PlatformDto platform, ImageDto image) {
    this.instance = instance;
    this.platform = platform;
    this.image = image;

    setHeight(TAB_HEIGHT);
    setMargin(false, true, false, true);
    setSpacing(false);

    sizeSelect = new ComboBox(ViewProperties.getCaption("field.serverSize"));
    sizeSelect.setWidth(COMBOBOX_WIDTH);
    sizeSelect.setNullSelectionAllowed(false);

    availabilitySetSelect = new ComboBox(ViewProperties.getCaption("field.availabilitySet"));
    availabilitySetSelect.setWidth(COMBOBOX_WIDTH);
    availabilitySetSelect.setNullSelectionAllowed(false);

    locationField = new TextField(ViewProperties.getCaption("field.location"));
    locationField.setImmediate(true);
    locationField.setWidth(TEXT_WIDTH);

    affinityField = new TextField(ViewProperties.getCaption("field.affinityGroup"));
    affinityField.setImmediate(true);
    affinityField.setWidth(TEXT_WIDTH);

    cloudServiceField = new TextField(ViewProperties.getCaption("field.cloudService"));
    cloudServiceField.setImmediate(true);
    cloudServiceField.setWidth(TEXT_WIDTH);

    subnetSelect = new ComboBox(ViewProperties.getCaption("field.subnet"));
    subnetSelect.setImmediate(true);
    subnetSelect.setWidth(COMBOBOX_WIDTH);
    subnetSelect.setNullSelectionAllowed(false);
    subnetSelect.setItemCaptionPropertyId(CIDR_BLOCK_CAPTION_ID);
    subnetSelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);

    storageAccountField = new TextField(ViewProperties.getCaption("field.storageAccount"));
    storageAccountField.setImmediate(true);
    storageAccountField.setWidth(COMBOBOX_WIDTH);

    Label spacer = new Label(" ");
    spacer.addStyleName("desc-padding-horizontal");
    spacer.setHeight("5px");

    form.getLayout().addComponent(sizeSelect);
    form.getLayout().addComponent(availabilitySetSelect);
    form.getLayout().addComponent(subnetSelect);
    form.getLayout().addComponent(spacer);

    HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);
    layout.setMargin(false);

    form.getLayout().addComponent(layout);

    addComponent(form);

    InstanceStatus status = InstanceStatus.fromStatus(instance.getInstance().getStatus());
    if (status != InstanceStatus.STOPPED) {
        // サーバがStopped以外の場合は、詳細設定タブ自体を変更不可とする
        form.setEnabled(false);
    } else {
        // 停止時は、いくつかの項目を変更不可とする
        locationField.setEnabled(false);
        // サーバが作成済みのとき、変更不可
        if (StringUtils.isNotEmpty(instance.getAzureInstance().getInstanceName())) {
            subnetSelect.setEnabled(false);
            // TODO 可用性セットが設定済みの場合も変更可能かもしれないが、
            // 現段階では、APIから可用性セットの情報を取得できないのでサーバー作成済みの場合、変更不可とする
            availabilitySetSelect.setEnabled(false);
        }
    }
}
 
Example 40
Project: primecloud-controller   File: WinServerEdit.java   Source Code and License Vote up 4 votes
public OpenStackDetailTab(InstanceDto instance, PlatformDto platform, ImageDto image) {
    this.instance = instance;
    this.platform = platform;
    this.image = image;

    setHeight(TAB_HEIGHT);
    setMargin(false, true, false, true);
    setSpacing(false);

    sizeSelect = new ComboBox(ViewProperties.getCaption("field.serverSize"));
    sizeSelect.setWidth(COMBOBOX_WIDTH);
    sizeSelect.setNullSelectionAllowed(false);

    zoneSelect = new ComboBox(ViewProperties.getCaption("field.zone"));
    zoneSelect.setWidth(COMBOBOX_WIDTH);
    zoneSelect.setNullSelectionAllowed(false);
    zoneSelect.setItemCaptionPropertyId(ZONE_CAPTION_ID);
    zoneSelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);

    grpSelect = new ComboBox(ViewProperties.getCaption("field.securityGroup"));
    grpSelect.setWidth(COMBOBOX_WIDTH);
    grpSelect.setImmediate(true);
    grpSelect.setNullSelectionAllowed(false);

    keySelect = new ComboBox(ViewProperties.getCaption("field.keyPair"));
    keySelect.setWidth(COMBOBOX_WIDTH);
    keySelect.setNullSelectionAllowed(false);

    Label spacer = new Label(" ");
    spacer.addStyleName("desc-padding-horizontal");
    spacer.setHeight("5px");

    form.getLayout().addComponent(sizeSelect);
    form.getLayout().addComponent(zoneSelect);
    form.getLayout().addComponent(grpSelect);
    form.getLayout().addComponent(keySelect);
    form.getLayout().addComponent(spacer);

    HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);
    layout.setMargin(false);

    form.getLayout().addComponent(layout);

    addComponent(form);

    InstanceStatus status = InstanceStatus.fromStatus(instance.getInstance().getStatus());
    if (status != InstanceStatus.STOPPED) {
        // サーバがStopped以外の場合は、詳細設定タブ自体を変更不可とする
        form.setEnabled(false);
    } else {
        // 停止時は、いくつかの項目を変更不可とする
        if (StringUtils.isNotEmpty(instance.getOpenstackInstance().getInstanceId())) {
            // 一度でも起動した場合、項目を変更不可とする
            form.setEnabled(false);
        }
    }
}
 
Example 41
Project: primecloud-controller   File: WinLoadBalancerConfigListener.java   Source Code and License Vote up 4 votes
@Override
public void attach() {
    // メインフォーム
    Form mainForm = new Form();
    Layout mainLayout = mainForm.getLayout();
    addComponent(mainForm);

    // ロードバランサ名
    nameField = new TextField(ViewProperties.getCaption("field.loadBalancerName"));
    nameField.setReadOnly(true);
    mainLayout.addComponent(nameField);

    // サービス名
    serviceField = new TextField(ViewProperties.getCaption("field.loadBalancerService"));
    serviceField.setReadOnly(true);
    mainLayout.addComponent(serviceField);

    // ロードバランサ設定パネル
    Panel panel = new Panel(ViewProperties.getCaption("field.loadBalancerConfig"));
    ((Layout) panel.getContent()).setMargin(false, false, false, true);
    mainLayout.addComponent(panel);

    // サブフォーム
    subForm = new Form();
    FormLayout sublayout = (FormLayout) this.subForm.getLayout();
    sublayout.setMargin(false);
    sublayout.setSpacing(false);
    panel.getContent().addComponent(subForm);
    subForm.setHeight("200px");

    // ロードバランサポート
    loadBalancerPortField = new TextField(ViewProperties.getCaption("field.loadBalancerPort"));
    loadBalancerPortField.setWidth(TEXT_WIDTH);
    sublayout.addComponent(loadBalancerPortField);

    // サービスポート
    servicePortField = new TextField(ViewProperties.getCaption("field.loadBalancerServicePort"));
    servicePortField.setWidth(TEXT_WIDTH);
    sublayout.addComponent(servicePortField);

    // プロトコル
    protocolSelect = new ComboBox(ViewProperties.getCaption("field.loadBalancerProtocol"));
    protocolSelect.setWidth(TEXT_WIDTH);
    protocolSelect.setImmediate(true);
    sublayout.addComponent(protocolSelect);
    protocolSelect.addListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            protocolValueChange(event);
        }
    });

    // SSLキー
    sslKeySelect = new ComboBox(ViewProperties.getCaption("field.loadBalancerSSLKey"));
    sslKeySelect.setWidth(TEXT_WIDTH);
    sslKeySelect.addContainerProperty(SSLKEY_CAPTION_ID, String.class, null);
    sslKeySelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
    sslKeySelect.setItemCaptionPropertyId(SSLKEY_CAPTION_ID);
    sublayout.addComponent(sslKeySelect);

    initValidation();
}
 
Example 42
Project: XACML   File: ApplyEditorWindow.java   Source Code and License Vote up 4 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Enter A Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("50.0%");
	textAreaDescription.setHeight("-1px");
	horizontalLayout_1.addComponent(textAreaDescription);
	
	// textFieldFilter
	textFieldFilter = new TextField();
	textFieldFilter.setCaption("Filter Function By ID");
	textFieldFilter.setImmediate(false);
	textFieldFilter.setWidth("-1px");
	textFieldFilter.setHeight("-1px");
	horizontalLayout_1.addComponent(textFieldFilter);
	horizontalLayout_1.setComponentAlignment(textFieldFilter,
			new Alignment(9));
	
	// comboBoxDatatypeFilter
	comboBoxDatatypeFilter = new ComboBox();
	comboBoxDatatypeFilter.setCaption("Filter By Data Type");
	comboBoxDatatypeFilter.setImmediate(false);
	comboBoxDatatypeFilter.setWidth("-1px");
	comboBoxDatatypeFilter.setHeight("-1px");
	horizontalLayout_1.addComponent(comboBoxDatatypeFilter);
	horizontalLayout_1.setComponentAlignment(comboBoxDatatypeFilter,
			new Alignment(9));
	
	// checkBoxFilterIsBag
	checkBoxFilterIsBag = new CheckBox();
	checkBoxFilterIsBag.setCaption("Is Bag Filter");
	checkBoxFilterIsBag.setImmediate(false);
	checkBoxFilterIsBag.setWidth("-1px");
	checkBoxFilterIsBag.setHeight("-1px");
	horizontalLayout_1.addComponent(checkBoxFilterIsBag);
	horizontalLayout_1.setComponentAlignment(checkBoxFilterIsBag,
			new Alignment(9));
	
	return horizontalLayout_1;
}
 
Example 43
Project: XACML   File: AttributeValueEditorWindow.java   Source Code and License Vote up 4 votes
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBoxDatatype
	comboBoxDatatype = new ComboBox();
	comboBoxDatatype.setCaption("Select Datatype");
	comboBoxDatatype.setImmediate(false);
	comboBoxDatatype.setWidth("-1px");
	comboBoxDatatype.setHeight("-1px");
	comboBoxDatatype.setInvalidAllowed(false);
	comboBoxDatatype.setRequired(true);
	mainLayout.addComponent(comboBoxDatatype);
	
	// textFieldValue
	textFieldValue = new TextField();
	textFieldValue.setCaption("Attribute Value");
	textFieldValue.setImmediate(false);
	textFieldValue.setWidth("100.0%");
	textFieldValue.setHeight("-1px");
	textFieldValue.setInvalidAllowed(false);
	textFieldValue.setRequired(true);
	mainLayout.addComponent(textFieldValue);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 44
Project: XACML   File: PolicyNameEditorWindow.java   Source Code and License Vote up 4 votes
@AutoGenerated
private FormLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new FormLayout();
	mainLayout.setImmediate(false);
	
	// textFieldPolicyName
	textFieldPolicyName = new TextField();
	textFieldPolicyName.setCaption("Policy File Name");
	textFieldPolicyName.setImmediate(true);
	textFieldPolicyName.setWidth("-1px");
	textFieldPolicyName.setHeight("-1px");
	textFieldPolicyName.setInputPrompt("Enter filename eg. foobar.xml");
	textFieldPolicyName.setRequired(true);
	mainLayout.addComponent(textFieldPolicyName);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100%");
	textAreaDescription.setHeight("-1px");
	textAreaDescription
			.setInputPrompt("Enter a description for the Policy/PolicySet.");
	textAreaDescription.setNullSettingAllowed(true);
	mainLayout.addComponent(textAreaDescription);
	
	// optionPolicySet
	optionPolicySet = new OptionGroup();
	optionPolicySet.setCaption("Policy or PolicySet?");
	optionPolicySet.setImmediate(true);
	optionPolicySet
			.setDescription("Is the root level a Policy or Policy Set.");
	optionPolicySet.setWidth("-1px");
	optionPolicySet.setHeight("-1px");
	optionPolicySet.setRequired(true);
	mainLayout.addComponent(optionPolicySet);
	
	// comboAlgorithms
	comboAlgorithms = new ComboBox();
	comboAlgorithms.setCaption("Combining Algorithm");
	comboAlgorithms.setImmediate(false);
	comboAlgorithms.setDescription("Select the combining algorithm.");
	comboAlgorithms.setWidth("-1px");
	comboAlgorithms.setHeight("-1px");
	comboAlgorithms.setRequired(true);
	mainLayout.addComponent(comboAlgorithms);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));

	return mainLayout;
}
 
Example 45
Project: ExpressZip   File: FindLayersViewComponent.java   Source Code and License Vote up 4 votes
private void setupAddFilterWindow(Window window) {
	// General variables

	// Layouts
	GridLayout mainLayout = new GridLayout(1, 3);
	HorizontalLayout axisLayout = new HorizontalLayout();
	HorizontalLayout criteriaLayout = new HorizontalLayout();
	HorizontalLayout buttonLayout = new HorizontalLayout();
	hznCriteria = criteriaLayout;

	// Buttons
	ExpressZipButton btnAdd = new ExpressZipButton("Add", Style.ACTION);
	btnAdd.setClickShortcut(KeyCode.ENTER);
	btnAdd.addStyleName("primary");
	ExpressZipButton btnCancel = new ExpressZipButton("Cancel", Style.ACTION);

	// Fields
	ComboBox cmbAxis = new ComboBox();
	cmbAxis.setTextInputAllowed(false);
	cmbAxis.setNullSelectionAllowed(false);

	// Labels
	Label lblAxis = new Label("Axis");

	btnAdd.addListener(filterButtonListener);
	btnCancel.addListener(filterButtonListener);

	for (Filter.AxisFilters f : Filter.axisArray) {
		cmbAxis.addItem(filter.getNameOfFilter(f));
	}
	cmbAxis.setImmediate(true);
	cmbAxis.addListener(axisSelectedListener);
	cmbAxis.setValue(filter.getNameOfFilter(Filter.axisArray[0]));

	mainLayout.addComponent(axisLayout, 0, 0);
	mainLayout.addComponent(criteriaLayout, 0, 1);
	mainLayout.addComponent(buttonLayout, 0, 2);
	mainLayout.setSpacing(true);

	axisLayout.setSpacing(true);

	axisLayout.addComponent(lblAxis);
	axisLayout.addComponent(cmbAxis);
	axisLayout.setExpandRatio(lblAxis, .2f);
	axisLayout.setExpandRatio(cmbAxis, .8f);
	axisLayout.setComponentAlignment(lblAxis, Alignment.MIDDLE_LEFT);
	axisLayout.setComponentAlignment(cmbAxis, Alignment.MIDDLE_LEFT);
	axisLayout.setSizeFull();

	criteriaLayout.setSizeFull();

	buttonLayout.setSpacing(true);
	buttonLayout.addComponent(btnAdd);
	buttonLayout.addComponent(btnCancel);
	buttonLayout.setComponentAlignment(btnAdd, Alignment.BOTTOM_RIGHT);
	buttonLayout.setComponentAlignment(btnCancel, Alignment.BOTTOM_RIGHT);
	buttonLayout.setExpandRatio(btnAdd, 1f);
	buttonLayout.setExpandRatio(btnCancel, 0f);
	buttonLayout.setSizeFull();

	mainLayout.setRowExpandRatio(0, 1f);
	mainLayout.setRowExpandRatio(1, 1f);
	mainLayout.setRowExpandRatio(2, 1f);
	mainLayout.setSizeFull();

	window.addComponent(mainLayout);
	window.getContent().setSizeFull();
}
 
Example 46
Project: XACML   File: SQLPIPConfigurationComponent.java   Source Code and License Vote up 4 votes
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBoxConnectionType
	comboBoxConnectionType = new ComboBox();
	comboBoxConnectionType.setCaption("Type of SQL Connection");
	comboBoxConnectionType.setImmediate(false);
	comboBoxConnectionType.setWidth("-1px");
	comboBoxConnectionType.setHeight("-1px");
	mainLayout.addComponent(comboBoxConnectionType);
	
	// textFieldDataSource
	textFieldDataSource = new TextField();
	textFieldDataSource.setCaption("Data Source");
	textFieldDataSource.setImmediate(false);
	textFieldDataSource.setWidth("-1px");
	textFieldDataSource.setHeight("-1px");
	mainLayout.addComponent(textFieldDataSource);
	mainLayout.setExpandRatio(textFieldDataSource, 1.0f);
	
	// comboBoxSQLDriver
	comboBoxSQLDriver = new ComboBox();
	comboBoxSQLDriver.setCaption("JDBC Driver");
	comboBoxSQLDriver.setImmediate(false);
	comboBoxSQLDriver.setWidth("-1px");
	comboBoxSQLDriver.setHeight("-1px");
	mainLayout.addComponent(comboBoxSQLDriver);
	mainLayout.setExpandRatio(comboBoxSQLDriver, 1.0f);
	
	// textFieldConnectionURL
	textFieldConnectionURL = new TextField();
	textFieldConnectionURL.setCaption("Connection URL");
	textFieldConnectionURL.setImmediate(false);
	textFieldConnectionURL.setWidth("-1px");
	textFieldConnectionURL.setHeight("-1px");
	mainLayout.addComponent(textFieldConnectionURL);
	mainLayout.setExpandRatio(textFieldConnectionURL, 1.0f);
	
	// textFieldUser
	textFieldUser = new TextField();
	textFieldUser.setCaption("User");
	textFieldUser.setImmediate(false);
	textFieldUser.setWidth("-1px");
	textFieldUser.setHeight("-1px");
	mainLayout.addComponent(textFieldUser);
	mainLayout.setExpandRatio(textFieldUser, 1.0f);
	
	// textFieldPassword
	textFieldPassword = new PasswordField();
	textFieldPassword.setCaption("Password");
	textFieldPassword.setImmediate(false);
	textFieldPassword.setWidth("-1px");
	textFieldPassword.setHeight("-1px");
	mainLayout.addComponent(textFieldPassword);
	mainLayout.setExpandRatio(textFieldPassword, 1.0f);
	
	// buttonTest
	buttonTest = new Button();
	buttonTest.setCaption("Test Connection");
	buttonTest.setImmediate(true);
	buttonTest.setWidth("-1px");
	buttonTest.setHeight("-1px");
	mainLayout.addComponent(buttonTest);
	mainLayout.setComponentAlignment(buttonTest, new Alignment(48));
	
	return mainLayout;
}
 
Example 47
Project: XACML   File: ObadviceDictionary.java   Source Code and License Vote up 4 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
	// common part: create layout
	horizontalLayoutToolbar = new HorizontalLayout();
	horizontalLayoutToolbar.setImmediate(false);
	horizontalLayoutToolbar.setWidth("-1px");
	horizontalLayoutToolbar.setHeight("-1px");
	horizontalLayoutToolbar.setMargin(false);
	horizontalLayoutToolbar.setSpacing(true);
	
	// buttonNew
	buttonNew = new Button();
	buttonNew.setCaption("New");
	buttonNew.setImmediate(true);
	buttonNew
			.setDescription("Add a new advice or obligation to the dictionary.");
	buttonNew.setWidth("-1px");
	buttonNew.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonNew);
	horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(
			24));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove
			.setDescription("Remove the selected advice or obligation from the dictionary.");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	horizontalLayoutToolbar.setComponentAlignment(buttonRemove,
			new Alignment(24));
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone");
	buttonClone.setImmediate(true);
	buttonClone.setDescription("Clone the selected obligation/advice.");
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonClone);
	horizontalLayoutToolbar.setComponentAlignment(buttonClone,
			new Alignment(24));
	
	// comboBoxFilter
	comboBoxFilter = new ComboBox();
	comboBoxFilter.setCaption("Filter By Type");
	comboBoxFilter.setImmediate(false);
	comboBoxFilter.setWidth("-1px");
	comboBoxFilter.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilter);
	
	return horizontalLayoutToolbar;
}
 
Example 48
Project: XACML   File: AttributeDictionary.java   Source Code and License Vote up 4 votes
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
	// common part: create layout
	horizontalLayoutToolbar = new HorizontalLayout();
	horizontalLayoutToolbar.setImmediate(false);
	horizontalLayoutToolbar.setWidth("-1px");
	horizontalLayoutToolbar.setHeight("-1px");
	horizontalLayoutToolbar.setMargin(false);
	horizontalLayoutToolbar.setSpacing(true);
	
	// buttonNew
	buttonNew = new Button();
	buttonNew.setCaption("New");
	buttonNew.setImmediate(true);
	buttonNew.setDescription("Create a new attribute");
	buttonNew.setWidth("70px");
	buttonNew.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonNew);
	horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(
			9));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove.setDescription("Remove the selected attribute(s)");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	horizontalLayoutToolbar.setComponentAlignment(buttonRemove,
			new Alignment(9));
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone");
	buttonClone.setImmediate(true);
	buttonClone.setDescription("Clone an attribute.");
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonClone);
	horizontalLayoutToolbar.setComponentAlignment(buttonClone,
			new Alignment(9));
	
	// comboBoxFilterCategory
	comboBoxFilterCategory = new ComboBox();
	comboBoxFilterCategory.setCaption("Filter By Category");
	comboBoxFilterCategory.setImmediate(false);
	comboBoxFilterCategory.setWidth("-1px");
	comboBoxFilterCategory.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilterCategory);
	
	// comboBoxFilterDatatype
	comboBoxFilterDatatype = new ComboBox();
	comboBoxFilterDatatype.setCaption("Filter By Data Type");
	comboBoxFilterDatatype.setImmediate(false);
	comboBoxFilterDatatype.setWidth("-1px");
	comboBoxFilterDatatype.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilterDatatype);
	
	return horizontalLayoutToolbar;
}
 
Example 49
Project: extacrm   File: ProductField.java   Source Code and License Vote up 4 votes
@Override
    protected Component initContent() {
        // A vertical layout with undefined width
        final VerticalLayout box = new VerticalLayout();
        box.setSizeUndefined();

        final ComboBox productSelect = new ComboBox();
        productSelect.setInputPrompt("Выберите продукт...");
        productSelect.setImmediate(true);
        productSelect.setNullSelectionAllowed(false);

        // Инициализация контейнера
        final ExtaDbContainer<TProduct> clientsCont = new ExtaDbContainer<>(productCls);
        clientsCont.addContainerFilter(new Compare.Equal("active", true));
        clientsCont.sort(new Object[]{"name"}, new boolean[]{true});

        // Устанавливаем контент выбора
        productSelect.setFilteringMode(FilteringMode.CONTAINS);
        productSelect.setContainerDataSource(clientsCont);
        productSelect.setItemCaptionMode(ItemCaptionMode.PROPERTY);
        productSelect.setItemCaptionPropertyId("name");
        productSelect.addStyleName(ExtaTheme.COMBOBOX_BORDERLESS);

        productSelect.setPropertyDataSource(getPropertyDataSource());
        productSelect.addValueChangeListener(e -> setValue((TProduct) productSelect.getConvertedValue()));
//        productSelect.setValue(getValue());
        clientsCont.setSingleSelectConverter(productSelect);

        productSelect.setWidth(100, Unit.PERCENTAGE);
        box.addComponent(productSelect);
        // The layout shrinks to fit this label
        final Label label = new Label(getFieldTextLabel());
        label.addStyleName("ea-widthfittin-label");
        label.setWidthUndefined();
        label.setHeight("0px"); // Hide: Could be 0px
        box.addComponent(label);

        addValueChangeListener(e -> label.setValue(getFieldTextLabel()));

        return box;
    }
 
Example 50
Project: extacrm   File: InstallmentInSaleEditForm.java   Source Code and License Vote up 4 votes
/**
 * <p>createEditFields.</p>
 *
 * @return a {@link com.vaadin.ui.ComponentContainer} object.
 */
@Override
protected ComponentContainer createEditFields() {
    final ExtaFormLayout form = new ExtaFormLayout();

    form.addComponent(new FormGroupHeader("Продукт"));
    productField = new ProdInstallmentsField("Продукт", "Введите название продукта");
    productField.setRequired(true);
    productField.addValueChangeListener(e -> refreshProductFields());
    form.addComponent(productField);

    stateField = new ProdInstanceStateSelect("Статус рассмотрения", "Укажите статус рассмотрения заявки на продукт");
    form.addComponent(stateField);

    form.addComponent(new FormGroupHeader("Характеристики продукта"));
    vendorLabel = new Label();
    vendorLabel.setCaption("Эммитент");
    form.addComponent(vendorLabel);

    downpaymentLabel = new Label();
    downpaymentLabel.setCaption("Первоначальный взнос");
    form.addComponent(downpaymentLabel);

    periodLabel = new Label();
    periodLabel.setCaption("Период рассрочки");
    form.addComponent(periodLabel);

    form.addComponent(new FormGroupHeader("Параметры рассрочки"));
    downpaymentField = new PercentOfField("Первоначальный взнос", "Введите сумму первоначального взноса по рассрочке");
    downpaymentField.setRequired(true);
    form.addComponent(downpaymentField);

    periodField = new ComboBox("Срок рассрочки");
    periodField.setDescription("Введите период рассрочки (длительность рассрочки)");
    periodField.setImmediate(true);
    periodField.setNullSelectionAllowed(false);
    periodField.setRequired(true);
    periodField.setWidth(6, Unit.EM);
    // Наполняем возможными сроками кредита
    fillPeriodFieldItems();
    form.addComponent(periodField);

    summField = new EditField("Сумма рассрочки", "Введите сумму рассрочки (Также может рассчитываться автоматически)");
    summField.setRequired(true);
    form.addComponent(summField);

    // Размер ежемесячного платежа
    monthlyPayLabel = new Label();
    monthlyPayLabel.setCaption("Ежемесячный платеж");
    form.addComponent(monthlyPayLabel);

    // Ответственный со стороны банка
    responsibleField = new EmployeeField("Ответственный сотрудник", "Укажите ответственного со стороны эммитента рассрочки");
    responsibleField.setCompanySupplier(() -> {
        final ProdInstallments product = productField.getValue();
        if (product != null) {
            return product.getVendor();
        } else
            return null;
    });
    form.addComponent(responsibleField);

    // Инициализация валидаторов
    initValidators();
    // Обновление рассчетных полей
    refreshProductFields();
    refreshInstCosts();
    // Инициализация взаимосвязей
    initRelations();

    return form;
}
 
Example 51
Project: extacrm   File: InsuranceInSaleEditForm.java   Source Code and License Vote up 4 votes
/**
 * <p>createEditFields.</p>
 *
 * @return a {@link com.vaadin.ui.ComponentContainer} object.
 */
@Override
protected ComponentContainer createEditFields() {
    final ExtaFormLayout form = new ExtaFormLayout();

    form.addComponent(new FormGroupHeader("Продукт"));
    productField = new ProdInsuranceField("Продукт", "Введите название продукта");
    productField.setRequired(true);
    productField.addValueChangeListener(e -> refreshProductFields());
    form.addComponent(productField);

    form.addComponent(new FormGroupHeader("Характеристики продукта"));
    vendorLabel = new Label();
    vendorLabel.setCaption("Страховщик");
    form.addComponent(vendorLabel);

    tariffLabel = new Label();
    tariffLabel.setCaption("Тариф");
    tariffLabel.setConverter(lookup(StringToPercentConverter.class));
    form.addComponent(tariffLabel);

    form.addComponent(new FormGroupHeader("Параметры страховки"));
    periodField = new ComboBox("Период страхования");
    periodField.setDescription("Введите период страхования");
    periodField.setImmediate(true);
    periodField.setNullSelectionAllowed(false);
    periodField.setRequired(true);
    periodField.setWidth(6, Unit.EM);
    // Наполняем возможными сроками страховки
    fillPeriodFieldItems();
    form.addComponent(periodField);

    // Ответственный за оформление страховки
    responsibleField = new EmployeeField("Ответственный", "Укажите ответственного за оформление страховки");
    responsibleField.setCompanySupplier(() -> {
        final ProdInsurance product = productField.getValue();
        if (product != null) {
            return product.getVendor();
        } else
            return null;
    });
    form.addComponent(responsibleField);

    form.addComponent(new FormGroupHeader("Стоимость страховки"));
    // Размер страховой премии
    premiumLabel = new Label();
    premiumLabel.setCaption("Страховая премия");
    form.addComponent(premiumLabel);

    // Обновление рассчетных полей
    refreshProductFields();
    refreshInsCosts();
    // Инициализация взаимосвязей
    initRelations();

    return form;
}
 
Example 52
Project: extacrm   File: HirePurchaseInSaleEditForm.java   Source Code and License Vote up 4 votes
/**
 * <p>createEditFields.</p>
 *
 * @return a {@link ComponentContainer} object.
 */
@Override
protected ComponentContainer createEditFields() {
    final ExtaFormLayout form = new ExtaFormLayout();

    form.addComponent(new FormGroupHeader("Продукт"));
    productField = new ProdHirePurchaseField("Продукт", "Введите название продукта");
    productField.setRequired(true);
    productField.addValueChangeListener(e -> refreshProductFields());
    form.addComponent(productField);

    stateField = new ProdInstanceStateSelect("Статус рассмотрения", "Укажите статус рассмотрения заявки на продукт");
    form.addComponent(stateField);

    form.addComponent(new FormGroupHeader("Сопутствующие расходы"));
    expendituresField = new ProductExpendituresField("Статьи расходов",
            "Список дополнительных расходов сопровождающих продукт", (ProductInstance) getEntity());
    form.addComponent(expendituresField);

    form.addComponent(new FormGroupHeader("Характеристики продукта"));
    vendorLabel = new Label();
    vendorLabel.setCaption("Эммитент");
    form.addComponent(vendorLabel);

    downpaymentLabel = new Label();
    downpaymentLabel.setCaption("Первоначальный взнос");
    form.addComponent(downpaymentLabel);

    periodLabel = new Label();
    periodLabel.setCaption("Период рассрочки");
    form.addComponent(periodLabel);

    form.addComponent(new FormGroupHeader("Параметры рассрочки"));
    downpaymentField = new PercentOfField("Первоначальный взнос", "Введите сумму первоначального взноса по рассрочке");
    downpaymentField.setRequired(true);
    form.addComponent(downpaymentField);

    periodField = new ComboBox("Срок рассрочки");
    periodField.setDescription("Введите период рассрочки (длительность рассрочки)");
    periodField.setImmediate(true);
    periodField.setNullSelectionAllowed(false);
    periodField.setRequired(true);
    periodField.setWidth(6, Unit.EM);
    // Наполняем возможными сроками кредита
    fillPeriodFieldItems();
    form.addComponent(periodField);

    summField = new EditField("Сумма рассрочки", "Введите сумму рассрочки (Также может рассчитываться автоматически)");
    summField.setRequired(true);
    form.addComponent(summField);

    // Ответственный со стороны банка
    responsibleField = new EmployeeField("Ответственный сотрудник", "Укажите ответственного со стороны эммитента рассрочки");
    responsibleField.setCompanySupplier(() -> {
        final ProdHirePurchase product = productField.getValue();
        if (product != null) {
            return product.getVendor();
        } else
            return null;
    });
    form.addComponent(responsibleField);

    // Инициализация валидаторов
    initValidators();
    // Обновление рассчетных полей
    refreshProductFields();
    refreshInstCosts();
    // Инициализация взаимосвязей
    initRelations();

    return form;
}
 
Example 53
Project: konekti   File: ProtocolToolbar.java   Source Code and License Vote up 4 votes
@AutoGenerated
private HorizontalLayout buildToolbarLayout() {		
	toolbarLayout = new HorizontalLayout();
	toolbarLayout.setImmediate(false);
	toolbarLayout.setSpacing(true);
	
	ButtonGroup editionButtonGroup = new ButtonGroup();
	toolbarLayout.addComponent(editionButtonGroup);
	
	// btnOpenProtocol
	btnOpenProtocol = new Button();
	btnOpenProtocol.setCaption("Iniciar Job");
	btnOpenProtocol.setImmediate(true);
	btnOpenProtocol.setWidth("-1px");
	btnOpenProtocol.setHeight("-1px");
	btnOpenProtocol.setIcon(new ThemeResource("../konekti/images/icons/job-toolbar/bell--arrow.png"));
	
	editionButtonGroup.addButton(btnOpenProtocol);
	
	// btnRecoverProtocol
	btnRecoverProtocol = new Button();
	btnRecoverProtocol.setCaption("Iniciar Job");
	btnRecoverProtocol.setImmediate(true);
	btnRecoverProtocol.setWidth("-1px");
	btnRecoverProtocol.setHeight("-1px");
	btnRecoverProtocol.setIcon(new ThemeResource("../konekti/images/icons/job-toolbar/bell--arrow.png"));
	
	editionButtonGroup.addButton(btnRecoverProtocol);
	
	lblBoxProtocol = new Label("Buzón Protocolo:");
	lblBoxProtocol.setVisible(false);
	lblBoxProtocol.setWidth("-1px");
	lblBoxProtocol.setHeight("-1px");
	
	toolbarLayout.addComponent(lblBoxProtocol);
	
	cmbBoxProtocol = new ComboBox();
	cmbBoxProtocol.setVisible(false);
	cmbBoxProtocol.setImmediate(true);
	cmbBoxProtocol.setWidth("-1px");
	cmbBoxProtocol.setHeight("-1px");
	cmbBoxProtocol.setNullSelectionAllowed(false);
	cmbBoxProtocol.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);
	cmbBoxProtocol.setItemCaptionPropertyId("box");
	
	toolbarLayout.addComponent(cmbBoxProtocol);
	
	lblTypeProtocol = new Label("Tipo Protocolo:");
	lblTypeProtocol.setWidth("-1px");
	lblTypeProtocol.setHeight("-1px");
	
	toolbarLayout.addComponent(lblTypeProtocol);
	
	cmbTypeProtocol = new ComboBox();
	cmbTypeProtocol.setImmediate(true);
	cmbTypeProtocol.setWidth("-1px");
	cmbTypeProtocol.setHeight("-1px");
	cmbTypeProtocol.setNullSelectionAllowed(true);
	cmbTypeProtocol.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);
	cmbTypeProtocol.setItemCaptionPropertyId("direction");
	
	toolbarLayout.addComponent(cmbTypeProtocol);
	
	return toolbarLayout;
}
 
Example 54
Project: academ   File: PanelSesion.java   Source Code and License Vote up 4 votes
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("100%");
	mainLayout.setHeight("60px");
	
	// top-level component properties
	setWidth("100.0%");
	setHeight("60px");
	
	// botonCerrarSesion
	buttonCerrarSesion = new Button();
	buttonCerrarSesion.setCaption("Cerrar Sesión");
	buttonCerrarSesion.setImmediate(true);
	buttonCerrarSesion.setWidth("101px");
	buttonCerrarSesion.setHeight("-1px");
	mainLayout.addComponent(buttonCerrarSesion, "top:20.0px;right:19.0px;");
	
	// labelNombreUsuario
	labelNombreUsuario = new Label();
	labelNombreUsuario.setImmediate(false);
	labelNombreUsuario.setWidth("-1px");
	labelNombreUsuario.setHeight("-1px");
	labelNombreUsuario.setValue("Label");
	mainLayout
			.addComponent(labelNombreUsuario, "top:22.0px;right:533.0px;");
	
	// comboBoxPerfil
	comboBoxPerfil = new ComboBox();
	comboBoxPerfil.setImmediate(false);
	comboBoxPerfil.setWidth("158px");
	comboBoxPerfil.setHeight("-1px");
	mainLayout.addComponent(comboBoxPerfil, "top:20.0px;right:142.0px;");
	
	// buttonCambiarPerfil
	buttonCambiarPerfil = new Button();
	buttonCambiarPerfil.setCaption("Cambiar Perfil A:");
	buttonCambiarPerfil.setImmediate(false);
	buttonCambiarPerfil.setWidth("117px");
	buttonCambiarPerfil.setHeight("-1px");
	mainLayout.addComponent(buttonCambiarPerfil,
			"top:18.0px;right:317.0px;");
	
	return mainLayout;
}
 
Example 55
Project: konekti   File: AreaViewForm.java   Source Code and License Vote up 4 votes
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("560px");
	mainLayout.setHeight("280px");
	mainLayout.setMargin(true);
	
	// top-level component properties
	setWidth("560px");
	setHeight("280px");
	
	// activeField
	activeField = new CheckBox();
	activeField.setCaption("Activo");
	activeField.setImmediate(false);
	activeField.setWidth("-1px");
	activeField.setHeight("-1px");
	activeField.setTabIndex(2);
	activeField.setRequired(true);
	mainLayout.addComponent(activeField, "top:20.0px;left:486.0px;");
	
	// codeField
	codeField = new TextField();
	codeField.setCaption("Código");
	codeField.setImmediate(false);
	codeField.setWidth("120px");
	codeField.setHeight("-1px");
	codeField.setRequired(true);
	mainLayout.addComponent(codeField, "top:20.0px;left:20.0px;");
	
	// commentField
	commentField = new TextField();
	commentField.setCaption("Comentarios");
	commentField.setImmediate(false);
	commentField.setWidth("520px");
	commentField.setHeight("120px");
	commentField.setTabIndex(6);
	mainLayout.addComponent(commentField, "top:140.0px;left:20.0px;");
	
	// descriptionField
	descriptionField = new TextField();
	descriptionField.setCaption("Descripción");
	descriptionField.setImmediate(false);
	descriptionField.setWidth("520px");
	descriptionField.setHeight("-1px");
	descriptionField.setTabIndex(3);
	mainLayout.addComponent(descriptionField, "top:60.0px;left:20.0px;");
	
	// nameField
	nameField = new TextField();
	nameField.setCaption("Nombre");
	nameField.setImmediate(false);
	nameField.setWidth("320px");
	nameField.setHeight("-1px");
	nameField.setTabIndex(1);
	nameField.setRequired(true);
	mainLayout.addComponent(nameField, "top:20.0px;left:160.0px;");
	
	// areaTypeField
	areaTypeField = new ComboBox();
	areaTypeField.setCaption("Tipo Area");
	areaTypeField.setImmediate(false);
	areaTypeField.setWidth("-1px");
	areaTypeField.setHeight("-1px");
	areaTypeField.setTabIndex(4);
	areaTypeField.setRequired(true);
	mainLayout.addComponent(areaTypeField, "top:100.0px;left:19.0px;");
	
	return mainLayout;
}
 
Example 56
Project: konekti   File: OfferRequestViewForm.java   Source Code and License Vote up 4 votes
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("580px");
	mainLayout.setHeight("280px");
	mainLayout.setMargin(false);
	
	// top-level component properties
	setWidth("580px");
	setHeight("280px");
	
	// clientField
	clientField = new ComboBox();
	clientField.setCaption("Cliente");
	clientField.setImmediate(false);
	clientField.setWidth("461px");
	clientField.setHeight("-1px");
	mainLayout.addComponent(clientField, "top:96.0px;left:19.0px;");
	
	// codeField
	codeField = new TextField();
	codeField.setCaption("Código");
	codeField.setImmediate(false);
	codeField.setWidth("120px");
	codeField.setHeight("-1px");
	mainLayout.addComponent(codeField, "top:16.0px;left:20.0px;");
	
	// observationField
	observationField = new TextField();
	observationField.setCaption("Observaciones");
	observationField.setImmediate(false);
	observationField.setWidth("540px");
	observationField.setHeight("119px");
	mainLayout.addComponent(observationField, "top:141.0px;left:20.0px;");
	
	// offerRequestDateField
	offerRequestDateField = new DateField();
	offerRequestDateField.setCaption("Fecha Petición Oferta");
	offerRequestDateField.setImmediate(false);
	offerRequestDateField.setWidth("100.0%");
	offerRequestDateField.setHeight("23px");
	offerRequestDateField.setInvalidAllowed(false);
	mainLayout.addComponent(offerRequestDateField,
			"top:19.0px;right:19.0px;left:421.0px;");
	
	// offerRequestStatusField
	offerRequestStatusField = new ComboBox();
	offerRequestStatusField.setCaption("Estado");
	offerRequestStatusField.setImmediate(false);
	offerRequestStatusField.setWidth("220px");
	offerRequestStatusField.setHeight("-1px");
	mainLayout.addComponent(offerRequestStatusField,
			"top:58.0px;left:340.0px;");
	
	// offerRequestTypeField
	offerRequestTypeField = new ComboBox();
	offerRequestTypeField.setCaption("Tipo");
	offerRequestTypeField.setImmediate(false);
	offerRequestTypeField.setWidth("300px");
	offerRequestTypeField.setHeight("-1px");
	mainLayout.addComponent(offerRequestTypeField,
			"top:58.0px;left:20.0px;");
	
	// hlSearchButtons
	hlSearchButtons = buildHlSearchButtons();
	mainLayout.addComponent(hlSearchButtons, "top:96.0px;left:484.0px;");
	
	return mainLayout;
}
 
Example 57
Project: konekti   File: ConfigurationViewForm.java   Source Code and License Vote up 4 votes
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("540px");
	mainLayout.setHeight("140px");
	mainLayout.setMargin(true);
	
	// top-level component properties
	setWidth("540px");
	setHeight("140px");
	
	// descriptionField
	descriptionField = new TextField();
	descriptionField.setCaption("Description");
	descriptionField.setImmediate(false);
	descriptionField.setWidth("500px");
	descriptionField.setHeight("-1px");
	mainLayout.addComponent(descriptionField, "top:100.0px;left:20.0px;");
	
	// tagField
	tagField = new TextField();
	tagField.setCaption("Tag");
	tagField.setImmediate(false);
	tagField.setWidth("154px");
	tagField.setHeight("-1px");
	mainLayout.addComponent(tagField, "top:20.0px;left:20.0px;");
	
	// valueField
	valueField = new TextField();
	valueField.setCaption("Valor");
	valueField.setImmediate(false);
	valueField.setWidth("-1px");
	valueField.setHeight("-1px");
	mainLayout.addComponent(valueField, "top:60.0px;left:20.0px;");
	
	// typeField
	typeValField = new ComboBox();
	typeValField.setCaption("Tipo");
	typeValField.setImmediate(true);
	typeValField.setWidth("200px");
	typeValField.setHeight("-1px");
	mainLayout.addComponent(typeValField, "top:20.0px;left:320.0px;");
	
	// menuResourceField
	menuCommandResourceValField = new ComboBox();
	menuCommandResourceValField.setCaption("Recurso Menu");
	menuCommandResourceValField.setImmediate(true);
	menuCommandResourceValField.setWidth("200px");
	menuCommandResourceValField.setHeight("-1px");
	mainLayout.addComponent(menuCommandResourceValField, "top:60.0px;left:320.0px;");
	
	return mainLayout;
}
 
Example 58
Project: konekti   File: UserRoleCollectionField.java   Source Code and License Vote up 4 votes
@AutoGenerated
private HorizontalLayout buildRoleLayout() {
	// common part: create layout
	roleLayout = new HorizontalLayout();
	roleLayout.setImmediate(false);
	roleLayout.setWidth("100.0%");
	roleLayout.setHeight("-1px");
	roleLayout.setMargin(false);
	
	// cmbRoles
	cmbRoles = new ComboBox();
	cmbRoles.setCaption("Roles:");
	cmbRoles.setImmediate(false);
	cmbRoles.setWidth("-1px");
	cmbRoles.setHeight("-1px");
	roleLayout.addComponent(cmbRoles);
	
	// btnAddRole
	btnAddRole = new Button();
	btnAddRole.setIcon(new ThemeResource(
			"../konekti/images/icons/edition-toolbar/plus.png"));
	btnAddRole.setImmediate(true);
	btnAddRole.setDescription("Añadir Rol");
	btnAddRole.setWidth("-1px");
	btnAddRole.setHeight("-1px");
	roleLayout.addComponent(btnAddRole);
	roleLayout.setComponentAlignment(btnAddRole, new Alignment(9));
	
	// btnEditRole
	btnEditRole = new Button();
	btnEditRole.setIcon(new ThemeResource(
			"../konekti/images/icons/edition-toolbar/pencil.png"));
	btnEditRole.setImmediate(true);
	btnEditRole.setDescription("Editar Rol");
	btnEditRole.setWidth("-1px");
	btnEditRole.setHeight("-1px");
	roleLayout.addComponent(btnEditRole);
	roleLayout.setComponentAlignment(btnEditRole, new Alignment(9));
	
	// btnRemoveRole
	btnRemoveRole = new Button();
	btnRemoveRole.setIcon(new ThemeResource(
			"../konekti/images/icons/edition-toolbar/minus.png"));
	btnRemoveRole.setImmediate(true);
	btnRemoveRole.setDescription("Borrar Rol");
	btnRemoveRole.setWidth("-1px");
	btnRemoveRole.setHeight("-1px");
	roleLayout.addComponent(btnRemoveRole);
	roleLayout.setComponentAlignment(btnRemoveRole, new Alignment(9));
	
	// btnApply
	btnApply = new Button();
	btnApply.setCaption("Aplicar");
	btnApply.setImmediate(true);
	btnApply.setDescription("Guardar cambios");
	btnApply.setWidth("-1px");
	btnApply.setHeight("-1px");
	roleLayout.addComponent(btnApply);
	roleLayout.setComponentAlignment(btnApply, new Alignment(9));
	
	// btnCopyRole
	btnCopyRole = new Button();
	btnCopyRole.setCaption("Copiar");
	btnCopyRole.setImmediate(true);
	btnCopyRole.setDescription("Copiar acción");
	btnCopyRole.setWidth("-1px");
	btnCopyRole.setHeight("-1px");
	roleLayout.addComponent(btnCopyRole);
	roleLayout.setExpandRatio(btnCopyRole, 1.0f);
	roleLayout.setComponentAlignment(btnCopyRole, new Alignment(9));
	
	// cmbArea
	cmbArea = new ComboBox();
	cmbArea.setCaption("Area:");
	cmbArea.setImmediate(false);
	cmbArea.setWidth("-1px");
	cmbArea.setHeight("-1px");
	roleLayout.addComponent(cmbArea);
	
	return roleLayout;
}
 
Example 59
Project: konekti   File: AlarmViewForm.java   Source Code and License Vote up 4 votes
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("520px");
	mainLayout.setHeight("280px");
	mainLayout.setMargin(true);
	
	// top-level component properties
	setWidth("520px");
	setHeight("280px");
	
	// alarmDateField
	alarmDateField = new DateField();
	alarmDateField.setCaption("Fecha alarma");
	alarmDateField.setImmediate(false);
	alarmDateField.setWidth("120px");
	alarmDateField.setHeight("-1px");
	alarmDateField.setInvalidAllowed(false);
	alarmDateField.setResolution(DateField.RESOLUTION_SEC);
	mainLayout.addComponent(alarmDateField, "top:17.0px;left:380.0px;");
	
	// areaField
	areaField = new TextField();
	areaField.setCaption("Area trabajo");
	areaField.setImmediate(false);
	areaField.setWidth("160px");
	areaField.setHeight("-1px");
	mainLayout.addComponent(areaField, "top:17.0px;left:200.0px;");
	
	// messageField
	messageField = new TextField();
	messageField.setCaption("Message");
	messageField.setImmediate(false);
	messageField.setWidth("480px");
	messageField.setHeight("164px");
	mainLayout.addComponent(messageField, "top:100.0px;left:20.0px;");
	
	// organizationField
	organizationField = new TextField();
	organizationField.setCaption("Organización");
	organizationField.setImmediate(false);
	organizationField.setWidth("160px");
	organizationField.setHeight("-1px");
	mainLayout.addComponent(organizationField, "top:17.0px;left:20.0px;");
	
	// alarmTypeField
	alarmTypeField = new ComboBox();
	alarmTypeField.setCaption("Tipo alarma");
	alarmTypeField.setImmediate(false);
	alarmTypeField.setWidth("180px");
	alarmTypeField.setHeight("-1px");
	mainLayout.addComponent(alarmTypeField, "top:60.0px;left:20.0px;");
	
	// alarmStatusField
	alarmStatusField = new ComboBox();
	alarmStatusField.setCaption("Estado alarma");
	alarmStatusField.setImmediate(false);
	alarmStatusField.setWidth("180px");
	alarmStatusField.setHeight("-1px");
	mainLayout.addComponent(alarmStatusField, "top:60.0px;left:220.0px;");
	
	return mainLayout;
}
 
Example 60
Project: konekti   File: FeedbackViewForm.java   Source Code and License Vote up 4 votes
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("520px");
	mainLayout.setHeight("360px");
	mainLayout.setMargin(true);
	
	// top-level component properties
	setWidth("520px");
	setHeight("360px");
	
	// commentField
	commentField = new TextField();
	commentField.setCaption("Comentario");
	commentField.setImmediate(false);
	commentField.setWidth("480px");
	commentField.setHeight("240px");
	mainLayout.addComponent(commentField, "top:100.0px;left:20.0px;");
	
	// feedbackDateField
	feedbackDateField = new DateField();
	feedbackDateField.setCaption("Fecha sugerencia");
	feedbackDateField.setImmediate(false);
	feedbackDateField.setWidth("160px");
	feedbackDateField.setHeight("-1px");
	feedbackDateField.setInvalidAllowed(false);
	mainLayout.addComponent(feedbackDateField, "top:20.0px;left:340.0px;");
	
	// invoiceField
	invoiceField = new TextField();
	invoiceField.setCaption("Número Factura");
	invoiceField.setImmediate(false);
	invoiceField.setWidth("140px");
	invoiceField.setHeight("-1px");
	mainLayout.addComponent(invoiceField, "top:17.0px;left:20.0px;");
	
	// feedbackStatusField
	feedbackStatusField = new ComboBox();
	feedbackStatusField.setCaption("Estado");
	feedbackStatusField.setImmediate(false);
	feedbackStatusField.setWidth("280px");
	feedbackStatusField.setHeight("-1px");
	mainLayout.addComponent(feedbackStatusField, "top:60.0px;left:20.0px;");
	
	// feedbackTypeField
	feedbackTypeField = new ComboBox();
	feedbackTypeField.setCaption("Tipo");
	feedbackTypeField.setImmediate(false);
	feedbackTypeField.setWidth("180px");
	feedbackTypeField.setHeight("-1px");
	mainLayout.addComponent(feedbackTypeField, "top:60.0px;left:320.0px;");
	
	return mainLayout;
}
 
Example 61
Project: konekti   File: PermissionViewForm.java   Source Code and License Vote up 4 votes
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("580px");
	mainLayout.setHeight("280px");
	mainLayout.setMargin(true);
	
	// top-level component properties
	setWidth("580px");
	setHeight("280px");
	
	// activeField
	activeField = new CheckBox();
	activeField.setCaption("Activo");
	activeField.setImmediate(false);
	activeField.setWidth("-1px");
	activeField.setHeight("-1px");
	activeField.setRequired(true);
	mainLayout.addComponent(activeField, "top:14.0px;left:507.0px;");
	
	// commentField
	commentField = new TextField();
	commentField.setCaption("Comentario");
	commentField.setImmediate(true);
	commentField.setWidth("540px");
	commentField.setHeight("160px");
	mainLayout.addComponent(commentField, "top:100.0px;left:20.0px;");
	
	// codeField
	codeField = new TextField();
	codeField.setCaption("Código");
	codeField.setImmediate(false);
	codeField.setWidth("160px");
	codeField.setHeight("-1px");
	codeField.setRequired(true);
	mainLayout.addComponent(codeField, "top:17.0px;left:20.0px;");
	
	// descriptionField
	descriptionField = new TextField();
	descriptionField.setCaption("Descripción");
	descriptionField.setImmediate(false);
	descriptionField.setWidth("541px");
	descriptionField.setHeight("-1px");
	descriptionField.setRequired(true);
	mainLayout.addComponent(descriptionField, "top:56.0px;left:20.0px;");
	
	// menuCommandResourceField
	menuCommandResourceField = new ComboBox();
	menuCommandResourceField.setCaption("Módulo:");
	menuCommandResourceField.setImmediate(true);
	menuCommandResourceField.setWidth("280px");
	menuCommandResourceField.setHeight("-1px");
	menuCommandResourceField.setRequired(true);
	mainLayout.addComponent(menuCommandResourceField,
			"top:17.0px;left:200.0px;");
	
	return mainLayout;
}