当前位置: 首页>>代码示例>>Java>>正文


Java Property.ValueChangeEvent方法代码示例

本文整理汇总了Java中com.vaadin.data.Property.ValueChangeEvent方法的典型用法代码示例。如果您正苦于以下问题:Java Property.ValueChangeEvent方法的具体用法?Java Property.ValueChangeEvent怎么用?Java Property.ValueChangeEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.data.Property的用法示例。


在下文中一共展示了Property.ValueChangeEvent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void valueChange(Property.ValueChangeEvent event) {
    if (chartConfigurationLayoutLayout != null && Objects.equals(designEditorLayout, chartConfigurationLayoutLayout.getParent())) {
        designEditorLayout.removeComponent(chartConfigurationLayoutLayout);
    }
    DiagrammeChartType chartType = DiagrammeChartType.valueOf(event.getProperty().getValue().toString());
    chartConfigurationLayoutLayout = chartType.createConfigLayout(preferences);
    designEditorLayout.addComponent(chartConfigurationLayoutLayout);
    designEditorLayout.setExpandRatio(chartConfigurationLayoutLayout, 1f);
    refreshChartConfigurationLayout();

    if (bandLayout != null && Objects.equals(designEditorLayout, bandLayout.getParent())) {
        designEditorLayout.removeComponent(bandLayout);
    }

    if (Objects.equals(chartType, DiagrammeChartType.GAUGE)) {
        bandLayout = chartType.getColorLayout(preferences);
        bandLayout.bindConfigurationValues();
        designEditorLayout.addComponent(bandLayout);
        designEditorLayout.setExpandRatio(bandLayout, 1f);
    }
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:23,代码来源:ChartEditor.java

示例2: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void valueChange(Property.ValueChangeEvent event) {
    String className = (String) event.getProperty().getValue();
    if (FieldModelUtil.isSimple(className)) {
        switch (FieldModelUtil.getCLASSByCanonicalName(className)) {
            case STRING:
                editor.setValue(EDITOR_TYPE.TEXT_FIELD);
                break;
            case DATE:
                editor.setValue(EDITOR_TYPE.DATE_FIELD);
                break;
            case BIG_DECIMAL:
                editor.setValue(EDITOR_TYPE.TEXT_FIELD);
                break;
            case BOOLEAN:
                editor.setValue(EDITOR_TYPE.CHECK_BOX);
                break;
            case INTEGER:
                editor.setValue(EDITOR_TYPE.DATE_FIELD);
                break;
            default:
                editor.setValue(null);
                break;
        }
    }
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:27,代码来源:FieldForm.java

示例3: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void valueChange(final Property.ValueChangeEvent event) {
    // do not delete this method, even when removing the code inside this
    // method. This method overwrites the super method, which is
    // necessary, that parsing works correctly on pressing enter key

    if (!(event.getProperty() instanceof DurationField)) {
        return;
    }
    final Date value = (Date) event.getProperty().getValue();

    // setValue() calls valueChanged again, when the minimum is greater
    // than the maximum this can lead to an endless loop
    if (value != null && minimumDuration != null && maximumDuration != null
            && minimumDuration.before(maximumDuration)) {

        if (compareTimeOfDates(value, maximumDuration) > 0) {
            ((DateField) event.getProperty()).setValue(maximumDuration);
        }

        if (compareTimeOfDates(minimumDuration, value) > 0) {
            ((DateField) event.getProperty()).setValue(minimumDuration);
        }
    }
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:26,代码来源:DurationField.java

示例4: getValueChangeListener

import com.vaadin.data.Property; //导入方法依赖的package包/类
private Property.ValueChangeListener getValueChangeListener(final AbstractSelect templateComboBox,
                                                            final AbstractSelect supplierPageSelect) {
    final Map<String, String> parentTemplates = utils.getParentTemplates();
    return new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            String templateId = (String) templateComboBox.getValue();
            boolean requiresSupplierPage = parentTemplates.containsKey(templateId);
            if (requiresSupplierPage) {
                supplierPageSelect.removeAllItems();
                String parentTemplateId = parentTemplates.get(templateId);
                final Map<String, String> pages = utils.findPagesUsingTemplate(parentTemplateId);
                for (Map.Entry<String, String> entry : pages.entrySet()) {
                    supplierPageSelect.addItem(entry.getValue());
                    supplierPageSelect.setItemCaption(entry.getValue(), entry.getKey());
                }
                supplierPageSelect.setRequired(true);
                supplierPageSelect.setVisible(true);
            } else {
                supplierPageSelect.setValue(null);
                supplierPageSelect.setRequired(false);
                supplierPageSelect.setVisible(false);
            }
        }
    };
}
 
开发者ID:magnoliales,项目名称:magnolia-handlebars,代码行数:27,代码来源:SupplierPageSelectorFieldFactory.java

示例5: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void valueChange(Property.ValueChangeEvent event) {
    UserSessionSource uss = AppBeans.get(UserSessionSource.NAME);

    User newUser = (User) event.getProperty().getValue();
    UserSession userSession = uss.getUserSession();
    if (userSession == null) {
        throw new RuntimeException("No user session found");
    }

    User oldUser = userSession.getSubstitutedUser() == null ? userSession.getUser() : userSession.getSubstitutedUser();

    if (!oldUser.equals(newUser)) {
        String newUserName = StringUtils.isBlank(newUser.getName()) ? newUser.getLogin() : newUser.getName();

        Messages messages = AppBeans.get(Messages.NAME);

        getFrame().showOptionDialog(
                messages.getMainMessage("substUserSelectDialog.title"),
                messages.formatMainMessage("substUserSelectDialog.msg", newUserName),
                Frame.MessageType.WARNING,
                new Action[]{new ChangeSubstUserAction((User) userComboBox.getValue()) {
                    @Override
                    public void doRevert() {
                        super.doRevert();

                        revertToCurrentUser();
                    }
                }, new DoNotChangeSubstUserAction() {
                    @Override
                    public void actionPerform(com.haulmont.cuba.gui.components.Component component) {
                        super.actionPerform(component);

                        revertToCurrentUser();
                    }
                }}
        );
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:40,代码来源:WebUserIndicator.java

示例6: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void valueChange(Property.ValueChangeEvent event) {
    if (Objects.equals(TYPE.TODAY, event.getProperty().getValue())) {
        setDayView(new Date());
    } else if (Objects.equals(TYPE.WEEK, event.getProperty().getValue())) {
        GregorianCalendar gc = new GregorianCalendar(HybridbpmUI.getCurrent().getLocale());
        gc.setTime(new Date());
        setWeekView(gc.get(GregorianCalendar.WEEK_OF_YEAR), gc.get(GregorianCalendar.YEAR));
    } else if (Objects.equals(TYPE.MONTH, event.getProperty().getValue())) {
        setMonthView();
    }
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:13,代码来源:CalendarLayout.java

示例7: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void valueChange(Property.ValueChangeEvent event) {
    String moduleName = (String) event.getProperty().getValue();
    Module module = HybridbpmUI.getDevelopmentAPI().getModuleByName(moduleName);
    ConnectorModel connectorModel = HybridbpmCoreUtil.jsonToObject(module.getModel(), ConnectorModel.class);
    design.inputInParametersLayout.setConnectoModel(connectorModel);
    design.inputInParametersLayout.initUI(new VariableSuggester(this.processModelLayout.getProcessModel()), this.processModelLayout.getActiveElement().getTaskModel().getInParameters());
    design.outputOutParametersLayout.setConnectoModel(connectorModel);
    design.outputOutParametersLayout.initUI(new VariableSuggester(this.processModelLayout.getProcessModel()), this.processModelLayout.getActiveElement().getTaskModel().getOutParameters());
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:11,代码来源:TaskConfigureCustomComponent.java

示例8: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
    public void valueChange(Property.ValueChangeEvent event) {
        // remove all colors preferences, we have a new chart type selected
//        chartLayout.flushColors();

        showCurrentChartType((DiagrammeChartType) event.getProperty().getValue());
    }
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:8,代码来源:ChartTypeLayout.java

示例9: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void valueChange(Property.ValueChangeEvent event) {
    if (!Objects.equals(password1.getValue(), password2.getValue())) {
        errorLabel.setValue("Passwords should be the same!");
        errorLabel.setVisible(true);
    } else {
        errorLabel.setVisible(false);
    }
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:10,代码来源:UserLayout.java

示例10: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
/**
 * Is triggered when the checkbox value changes
 *
 * @param event
 *            change event
 */
@Override
public void valueChange(final Property.ValueChangeEvent event) {
    if (checkBox.getValue()) {
        setTableEnabled(true);
    } else {
        dsTable.select(null);
        setTableEnabled(false);
    }
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:16,代码来源:DistributionSetSelectWindow.java

示例11: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void valueChange(Property.ValueChangeEvent event) {
    applyFilterPattern(
            getTargetPropertyType(),
            getTargetPropertyId(),
            event.getProperty().getValue(),
            getTargetContainer());
}
 
开发者ID:tyl,项目名称:field-binder,代码行数:9,代码来源:SearchPatternComboBox.java

示例12: valueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void valueChange(Property.ValueChangeEvent event) {
    city.removeAllItems();
    if ("England".equals(event.getProperty().getValue())) {
        city.addItems(Arrays.asList("London", "Liverpool", "Oxford"));
        city.select("London");
    }
}
 
开发者ID:tyl,项目名称:field-binder,代码行数:9,代码来源:TutorialExtendedMore.java

示例13: serviceTableSelect

import com.vaadin.data.Property; //导入方法依赖的package包/类
private void serviceTableSelect(Property.ValueChangeEvent event) {
    // 選択がない場合はサーバ選択をクリア
    if (serviceTable.getValue() == null) {
        serverSelect.removeAllItems();
        return;
    }

    // 選択されたサービス種類で利用可能なサーバ情報を選択画面に表示
    ComponentTypeDto componentType = findComponentType(serviceTable.getValue());
    serverSelect.show(instances, componentType.getInstanceNos());
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:12,代码来源:WinServiceAdd.java

示例14: checkProtocolValueChange

import com.vaadin.data.Property; //导入方法依赖的package包/类
private void checkProtocolValueChange(Property.ValueChangeEvent event) {
    if ("HTTP".equals(checkProtocolSelect.getValue())) {
        checkPathField.setEnabled(true);
    } else {
        checkPathField.setValue("");
        checkPathField.setEnabled(false);
    }
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:9,代码来源:WinLoadBalancerEdit.java

示例15: cloudTableSelect

import com.vaadin.data.Property; //导入方法依赖的package包/类
private void cloudTableSelect(Property.ValueChangeEvent event) {
    // 選択がない場合はサーバ種別情報をクリア
    if (cloudTable.getValue() == null) {
        imageTable.removeAllItems();
        return;
    }

    // サーバ種別情報を表示
    PlatformDto platform = findPlatform(cloudTable.getValue());
    imageTable.show(platform.getImages());
    imageTable.selectFirst();
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:13,代码来源:WinServerAdd.java


注:本文中的com.vaadin.data.Property.ValueChangeEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。