Java Code Examples for com.vaadin.ui.CheckBox#getValue()

The following examples show how to use com.vaadin.ui.CheckBox#getValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AuthenticationConfigurationView.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void valueChange(final ValueChangeEvent event) {

    if (!(event.getProperty() instanceof CheckBox)) {
        return;
    }

    notifyConfigurationChanged();

    final CheckBox checkBox = (CheckBox) event.getProperty();
    BooleanConfigurationItem configurationItem;

    if (gatewaySecTokenCheckBox.equals(checkBox)) {
        configurationItem = gatewaySecurityTokenAuthenticationConfigurationItem;
    } else if (targetSecTokenCheckBox.equals(checkBox)) {
        configurationItem = targetSecurityTokenAuthenticationConfigurationItem;
    } else if (certificateAuthCheckbox.equals(checkBox)) {
        configurationItem = certificateAuthenticationConfigurationItem;
    } else if (downloadAnonymousCheckBox.equals(checkBox)) {
        configurationItem = anonymousDownloadAuthenticationConfigurationItem;
    } else {
        return;
    }

    if (checkBox.getValue()) {
        configurationItem.configEnable();
    } else {
        configurationItem.configDisable();
    }
}
 
Example 2
Source File: RepositoryConfigurationView.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
@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 if (actionAutocleanupCheckBox.equals(checkBox)) {
        configurationItem = actionAutocleanupConfigurationItem;
    } else if (multiAssignmentsCheckBox.equals(checkBox)) {
        configurationItem = multiAssignmentsConfigurationItem;
        actionAutocloseCheckBox.setEnabled(!checkBox.getValue());
        actionAutocloseConfigurationItem.setEnabled(!checkBox.getValue());
    } else {
        return;
    }

    if (checkBox.getValue()) {
        configurationItem.configEnable();
    } else {
        configurationItem.configDisable();
    }
}
 
Example 3
Source File: DistributionSetTypeSoftwareModuleSelectLayout.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
protected static boolean isMandatoryModuleType(final Item item) {
    final CheckBox mandatoryCheckBox = (CheckBox) item.getItemProperty(getDistTypeMandatory()).getValue();
    return mandatoryCheckBox.getValue();
}