當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。