本文整理汇总了Java中com.vaadin.data.Property.ValueChangeEvent类的典型用法代码示例。如果您正苦于以下问题:Java ValueChangeEvent类的具体用法?Java ValueChangeEvent怎么用?Java ValueChangeEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ValueChangeEvent类属于com.vaadin.data.Property包,在下文中一共展示了ValueChangeEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getView
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
@Override
public Component getView(final WidgetContext widgetContext) {
Tree tree = new Tree("Services", new FilterableHierarchicalContainer(new NCSServiceContainer(m_ncsComponentRepository)));
tree.setMultiSelect(true);
tree.setImmediate(true);
tree.setItemCaptionMode(Tree.ITEM_CAPTION_MODE_PROPERTY);
tree.setItemCaptionPropertyId("name");
tree.addListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
Collection<Long> selectedIds = (Collection<Long>) event.getProperty().getValue();
Criteria criteria = NCSEdgeProvider.createCriteria(selectedIds);
widgetContext.getGraphContainer().setCriteria(criteria);
}
});
return tree;
}
示例2: valueChange
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
@Override
public void valueChange(final ValueChangeEvent event) {
if (!(event.getProperty() instanceof CheckBox)) {
return;
}
notifyConfigurationChanged();
final CheckBox checkBox = (CheckBox) event.getProperty();
BooleanConfigurationItem configurationItem;
if (actionAutocloseCheckBox.equals(checkBox)) {
configurationItem = actionAutocloseConfigurationItem;
} else {
return;
}
if (checkBox.getValue()) {
configurationItem.configEnable();
} else {
configurationItem.configDisable();
}
}
示例3: createAttributeCheckBox
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
protected CheckBox createAttributeCheckBox(final AttributeSettings settings, final String key) {
final CheckBox checkBox = new CheckBox();
checkBox.setImmediate(true);
checkBox.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(ValueChangeEvent event) {
ComponentAttribSetting setting = component.getSingleAttributeSetting(settings.getAttributeId(), key);
String oldValue = setting == null ? Boolean.FALSE.toString() : setting.getValue();
if (setting == null) {
setting = new ComponentAttribSetting(settings.getAttributeId(), component.getId(), key, Boolean.TRUE.toString());
component.addAttributeSetting(setting);
}
setting.setValue(checkBox.getValue().toString());
if (!oldValue.equals(setting.getValue())) {
context.getConfigurationService().save(setting);
}
}
});
checkBox.setReadOnly(readOnly);
return checkBox;
}
示例4: createCheckBox
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
private CheckBox createCheckBox(final AttributeSettings settings, final String key) {
final CheckBox checkBox = new CheckBox();
checkBox.setImmediate(true);
checkBox.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
ComponentAttribSetting setting = component.getSingleAttributeSetting(settings.getAttributeId(), key);
String oldValue = setting == null ? Boolean.FALSE.toString() : setting.getValue();
if (setting == null) {
setting = new ComponentAttribSetting(settings.getAttributeId(), component.getId(), key, Boolean.TRUE.toString());
component.addAttributeSetting(setting);
}
setting.setValue(checkBox.getValue().toString());
if (!oldValue.equals(setting.getValue())) {
context.getConfigurationService().save(setting);
}
}
});
checkBox.setReadOnly(readOnly);
return checkBox;
}
示例5: getUserOptions
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
@SuppressWarnings("serial")
protected OptionGroup getUserOptions() {
this.userOption = new OptionGroup("Selection Criterion:");
this.userOption.addItem(NONE);
this.userOption.addItem(AVAILABILITY_ZONES);
this.userOption.addItem(HOST_AGGREGATES);
this.userOption.addItem(HOSTS);
this.userOption.select(NONE);
this.userOption.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
populateOptionTable();
}
});
return this.userOption;
}
示例6: createCheckBox
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
@SuppressWarnings("serial")
private CheckBox createCheckBox() {
this.checkbox = new CheckBox(VmidcMessages.getString(VmidcMessages_.SUMMARY_DOWNLOAD_INCLUDE_DB));
this.checkbox.setImmediate(true);
this.checkbox.setValue(false);
this.checkbox.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
if (SummaryLayout.this.checkbox.getValue()) {
SummaryLayout.this.download
.setCaption(VmidcMessages.getString(VmidcMessages_.SUMMARY_DOWNLOAD_BUNDLE));
} else {
SummaryLayout.this.download
.setCaption(VmidcMessages.getString(VmidcMessages_.SUMMARY_DOWNLOAD_LOG));
}
}
});
return this.checkbox;
}
示例7: createOptionGroup
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
@SuppressWarnings("serial")
private OptionGroup createOptionGroup() {
this.mode = new OptionGroup();
this.mode.addItem("DHCP");
this.mode.addItem("Static");
this.mode.addStyleName("network-options");
this.mode.setImmediate(true);
this.mode.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
if (NetworkLayout.this.mode.getValue().equals("DHCP")) {
NetworkLayout.this.editIPSettings.setEnabled(false);
populateNetworkTable();
NetworkLayout.this.mode.setEnabled(true);
}
if (NetworkLayout.this.mode.getValue().equals("Static")) {
NetworkLayout.this.editIPSettings.setEnabled(true);
NetworkLayout.this.mode.setEnabled(false);
}
}
});
return this.mode;
}
示例8: getType
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
@SuppressWarnings("serial")
private Component getType() {
this.protectionTypeOption = new OptionGroup("Selection Type:");
this.protectionTypeOption.addItem(TYPE_ALL);
this.protectionTypeOption.addItem(TYPE_SELECTION);
this.protectionTypeOption.select(TYPE_ALL);
this.protectionTypeOption.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
if (BaseSecurityGroupWindow.this.protectionTypeOption.getValue() == TYPE_ALL) {
enableSelection(false);
} else if (BaseSecurityGroupWindow.this.protectionTypeOption.getValue() == TYPE_SELECTION) {
enableSelection(true);
}
// Populate to list first and then the from list since we use the 'to' list items to exclude them from
// the 'from' list
populateToList();
populateFromList();
}
});
return this.protectionTypeOption;
}
示例9: initializeOption
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
protected void initializeOption() {
//
// Setup datasource and GUI properties
//
this.optionGroupAttribute.setImmediate(true);
this.optionGroupAttribute.addItem(ATTRIBUTE_OPTION_DICTIONARY);
this.optionGroupAttribute.addItem(ATTRIBUTE_OPTION_STANDARD);
this.optionGroupAttribute.addItem(ATTRIBUTE_OPTION_INPUT);
//
// Respond to events
//
this.optionGroupAttribute.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(ValueChangeEvent event) {
self.resetAttributeOption();
}
});
}
示例10: initializeCheckBox
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
protected void initializeCheckBox() {
this.checkBoxShortIds.setValue(true);
this.checkBoxShortIds.setImmediate(true);
this.checkBoxShortIds.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(ValueChangeEvent event) {
if (self.checkBoxShortIds.getValue()) {
self.tableRequiredAttributes.setColumnCollapsed("id", true);
self.tableRequiredAttributes.setColumnCollapsed("category", true);
self.tableRequiredAttributes.setColumnCollapsed("datatype", true);
self.tableRequiredAttributes.setColumnCollapsed("shortId", false);
self.tableRequiredAttributes.setColumnCollapsed("shortCategory", false);
self.tableRequiredAttributes.setColumnCollapsed("shortDatatype", false);
} else {
self.tableRequiredAttributes.setColumnCollapsed("id", false);
self.tableRequiredAttributes.setColumnCollapsed("category", false);
self.tableRequiredAttributes.setColumnCollapsed("datatype", false);
self.tableRequiredAttributes.setColumnCollapsed("shortId", true);
self.tableRequiredAttributes.setColumnCollapsed("shortCategory", true);
self.tableRequiredAttributes.setColumnCollapsed("shortDatatype", true);
}
}
});
}
示例11: initializeSelect
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
protected void initializeSelect(Map<VariableDefinitionType, PolicyType> vars) {
//
// Add existing variables into the table
//
if (vars != null) {
for (VariableDefinitionType var : vars.keySet()) {
this.listSelectVariables.addItem(var.getVariableId());
}
}
//
// Respond to changes
//
this.listSelectVariables.setImmediate(true);
this.listSelectVariables.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(ValueChangeEvent event) {
Object value = self.listSelectVariables.getValue();
if (value != null) {
self.textFieldVariable.setValue(value.toString());
}
}
});
}
示例12: initializeCheckboxes
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
protected void initializeCheckboxes(boolean readOnly) {
//
// The readonly check box
//
this.checkBoxReadOnly.setImmediate(true);
this.checkBoxReadOnly.setValue(readOnly);
this.checkBoxReadOnly.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(ValueChangeEvent event) {
self.resetComponents();
self.setupCaption();
}
});
//
// The autosave check box
//
this.checkBoxAutoSave.setImmediate(true);
this.checkBoxAutoSave.setValue(true);
}
示例13: bindConfigurationValues
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
@Override
public void bindConfigurationValues() {
super.bindConfigurationValues();
bindField(minValue, MIN_VALUE, preferences);
bindField(maxValue, MAX_VALUE, preferences);
valuesChoiceHandler = new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
checkMaxValue((DiagrammePreferenceValue) event.getProperty().getValue());
}
};
valuesColumnChoice.addValueChangeListener(valuesChoiceHandler);
minValue.addValueChangeListener(new MinMaxValueChangeListener(minValue));
maxValue.addValueChangeListener(new MinMaxValueChangeListener(maxValue));
}
示例14: onGroupNumberChange
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
private void onGroupNumberChange(final ValueChangeEvent event) {
if (editRolloutEnabled) {
return;
}
if (event.getProperty().getValue() != null && noOfGroups.isValid() && totalTargetsCount != null
&& isNumberOfGroups()) {
groupSizeLabel.setValue(getTargetPerGroupMessage(String.valueOf(getGroupSize())));
groupSizeLabel.setVisible(true);
updateGroupsChart(Integer.parseInt(noOfGroups.getValue()));
} else {
groupSizeLabel.setVisible(false);
if (isNumberOfGroups()) {
updateGroupsChart(0);
}
}
}
示例15: addValueChangeListener
import com.vaadin.data.Property.ValueChangeEvent; //导入依赖的package包/类
private void addValueChangeListener() {
autoStartOptionGroup.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@Override
public void valueChange(final ValueChangeEvent event) {
if (event.getProperty().getValue().equals(AutoStartOption.SCHEDULED)) {
startAtDateField.setEnabled(true);
startAtDateField.setRequired(true);
} else {
startAtDateField.setEnabled(false);
startAtDateField.setRequired(false);
}
}
});
}