本文整理汇总了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);
}
}
示例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;
}
}
}
示例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);
}
}
}
示例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);
}
}
};
}
示例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();
}
}}
);
}
}
示例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();
}
}
示例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());
}
示例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());
}
示例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);
}
}
示例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);
}
}
示例11: valueChange
import com.vaadin.data.Property; //导入方法依赖的package包/类
@Override
public void valueChange(Property.ValueChangeEvent event) {
applyFilterPattern(
getTargetPropertyType(),
getTargetPropertyId(),
event.getProperty().getValue(),
getTargetContainer());
}
示例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");
}
}
示例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());
}
示例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);
}
}
示例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();
}