本文整理了Java中com.vaadin.ui.CheckBox.setValue()
方法的一些代码示例,展示了CheckBox.setValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CheckBox.setValue()
方法的具体详情如下:
包路径:com.vaadin.ui.CheckBox
类名称:CheckBox
方法名:setValue
[英]Sets the value of this CheckBox. If the new value is not equal to getValue(), fires a ValueChangeEvent. Throws NullPointerException if the value is null.
[中]设置此复选框的值。如果新值不等于getValue(),则激发ValueChangeEvent。如果值为null,则引发NullPointerException。
代码示例来源:origin: com.vaadin/vaadin-server
/**
* Creates a new checkbox with a caption and a set initial state.
*
* @param caption
* the caption of the checkbox
* @param initialState
* the initial state of the checkbox
*/
public CheckBox(String caption, boolean initialState) {
this(caption);
setValue(initialState);
}
代码示例来源:origin: com.vaadin/vaadin-server
/**
* Creates a new checkbox.
*/
public CheckBox() {
registerRpc(rpc);
registerRpc(new FocusAndBlurServerRpcDecorator(this, this::fireEvent));
setValue(Boolean.FALSE);
}
代码示例来源:origin: com.vaadin/vaadin-server
@Override
public void readDesign(Element design, DesignContext designContext) {
super.readDesign(design, designContext);
if (design.hasAttr("checked")) {
this.setValue(DesignAttributeHandler.readAttribute("checked",
design.attributes(), Boolean.class), false);
}
}
代码示例来源:origin: org.opencms/opencms-core
@SuppressWarnings("synthetic-access")
protected void updateCheckboxesWithSelectedIds(Set<Object> selectedIds) {
for (Map.Entry<Object, CheckBox> entry : m_checkBoxes.entrySet()) {
if (!(selectedIds.contains(entry.getKey()))) {
entry.getValue().setValue(Boolean.FALSE);
}
}
for (Object id : selectedIds) {
getCheckBox(id).setValue(Boolean.TRUE);
}
}
});
代码示例来源:origin: org.opennms.features.topology.plugins/org.opennms.features.topology.plugins.browsers
public void clearSelectedIds(Table source) {
m_selectAll = false;
// Uncheck all of the checkboxes
for (CheckBox button : m_checkboxes) {
button.setValue(false);
}
m_selectedCheckboxes.clear();
m_notSelectedCheckboxes.clear();
}
代码示例来源:origin: org.opennms.features.topology.plugins/org.opennms.features.topology.plugins.browsers
public void selectAll(Table source) {
m_selectAll = true;
m_selectedCheckboxes.clear();
m_notSelectedCheckboxes.clear();
// Check all of the checkboxes
for (CheckBox button : m_checkboxes) {
button.setValue(true);
m_selectedCheckboxes.add((Integer)button.getData());
}
}
代码示例来源:origin: org.activiti/activiti-explorer
public void buttonClick(ClickEvent event) {
if (dateCheckBox.booleanValue() == true) {
dateField.setValue(new Date());
nowCheckBox.setValue(false);
} else {
dateField.setValue(null);
nowCheckBox.setValue(true);
}
}
});
代码示例来源:origin: org.activiti/activiti-explorer
public void buttonClick(ClickEvent event) {
if (nowCheckBox.booleanValue() == true) {
dateField.setValue(null);
dateCheckBox.setValue(false);
} else {
dateCheckBox.setValue(true);
dateField.setValue(new Date());
}
}
});
代码示例来源:origin: eclipse/hawkbit
@Override
public void undo() {
actionAutocloseConfigurationItem.undo();
actionAutocloseCheckBox.setValue(actionAutocloseConfigurationItem.isConfigEnabled());
actionAutocleanupConfigurationItem.undo();
actionAutocleanupCheckBox.setValue(actionAutocleanupConfigurationItem.isConfigEnabled());
}
代码示例来源:origin: eclipse/hawkbit
@Override
public void undo() {
certificateAuthenticationConfigurationItem.undo();
targetSecurityTokenAuthenticationConfigurationItem.undo();
gatewaySecurityTokenAuthenticationConfigurationItem.undo();
anonymousDownloadAuthenticationConfigurationItem.undo();
certificateAuthCheckbox.setValue(certificateAuthenticationConfigurationItem.isConfigEnabled());
targetSecTokenCheckBox.setValue(targetSecurityTokenAuthenticationConfigurationItem.isConfigEnabled());
gatewaySecTokenCheckBox.setValue(gatewaySecurityTokenAuthenticationConfigurationItem.isConfigEnabled());
downloadAnonymousCheckBox.setValue(anonymousDownloadAuthenticationConfigurationItem.isConfigEnabled());
}
代码示例来源:origin: org.aperteworkflow/gui-commons
@Override
protected void setInternalValue(Object newValue) {
maxRangeCheckBox.setValue(newValue == null);
toggleDateField(newValue);
super.setInternalValue(newValue);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
@Override
public void undo() {
certificateAuthenticationConfigurationItem.undo();
targetSecurityTokenAuthenticationConfigurationItem.undo();
gatewaySecurityTokenAuthenticationConfigurationItem.undo();
anonymousDownloadAuthenticationConfigurationItem.undo();
certificateAuthCheckbox.setValue(certificateAuthenticationConfigurationItem.isConfigEnabled());
targetSecTokenCheckBox.setValue(targetSecurityTokenAuthenticationConfigurationItem.isConfigEnabled());
gatewaySecTokenCheckBox.setValue(gatewaySecurityTokenAuthenticationConfigurationItem.isConfigEnabled());
downloadAnonymousCheckBox.setValue(anonymousDownloadAuthenticationConfigurationItem.isConfigEnabled());
}
代码示例来源:origin: org.opennms.features/vaadin-jmxconfiggenerator
private void updateCheckBox(CheckBox checkBox, Object rowId, boolean enabled) {
checkBox.setValue(enabled);
Collection<Field<?>> columns = getFieldsForItemId(rowId);
columns.remove(checkBox);
enableFields(columns, checkBox.getValue());
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void setValue(final Long distSet) {
checkBox.setValue(distSet != null);
dsTable.setValue(distSet);
dsTable.setCurrentPageFirstItemId(distSet);
dsTable.setNullSelectionAllowed(false);
}
代码示例来源:origin: org.opennms.features/vaadin-jmxconfiggenerator
@Override
public void selectionValueChanged(SelectionValueChangedEvent selectionValueChangedEvent) {
if (selectionValueChangedEvent.getBean() == getData()) {
selectedField.setValue(selectionValueChangedEvent.getNewValue());
}
}
代码示例来源:origin: org.aperteworkflow/base-widgets
private CheckBox createCheckBoxField(CheckBoxWidgetElement we) {
CheckBox cb = new CheckBox();
if (we.getDefaultSelect() != null && we.getDefaultSelect()) {
cb.setValue(we.getDefaultSelect());
}
if (we.getValue() != null)
cb.setValue(we.getValue());
return cb;
}
代码示例来源:origin: org.aperteworkflow/gui-commons
public static CheckBox checkBox(String caption) {
CheckBox cb = new CheckBox();
if (caption != null) {
cb.setCaption(caption);
}
cb.setValue(false);
cb.setImmediate(true);
cb.setWidth(100, Sizeable.UNITS_PERCENTAGE);
return cb;
}
代码示例来源:origin: org.activiti/activiti-explorer
@Override
public Field getPropertyField(FormProperty formProperty) {
CheckBox checkBox = new CheckBox(getPropertyLabel(formProperty));
checkBox.setRequired(formProperty.isRequired());
checkBox.setEnabled(formProperty.isWritable());
if (formProperty.getValue() != null) {
Boolean value = new Boolean(Boolean.parseBoolean(formProperty.getValue()));
checkBox.setValue(value);
}
return checkBox;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
@Override
protected Item popualateKeyValue(final Object metadataCompositeKey) {
final Item item = super.popualateKeyValue(metadataCompositeKey);
if (item != null) {
targetVisibleField.setValue((Boolean) item.getItemProperty(TARGET_VISIBLE).getValue());
if (hasUpdatePermission()) {
targetVisibleField.setEnabled(true);
}
}
return item;
}
代码示例来源:origin: eclipse/hawkbit
@Override
protected Item popualateKeyValue(final Object metadataCompositeKey) {
final Item item = super.popualateKeyValue(metadataCompositeKey);
if (item != null) {
targetVisibleField.setValue((Boolean) item.getItemProperty(TARGET_VISIBLE).getValue());
if (hasUpdatePermission()) {
targetVisibleField.setEnabled(true);
}
}
return item;
}
内容来源于网络,如有侵权,请联系作者删除!