All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fluorumlabs.disconnect.vaadin.elements.CheckboxGroupElement Maven / Gradle / Ivy

The newest version!
package com.github.fluorumlabs.disconnect.vaadin.elements;

import com.github.fluorumlabs.disconnect.core.annotations.Import;
import com.github.fluorumlabs.disconnect.core.annotations.NpmPackage;
import com.github.fluorumlabs.disconnect.vaadin.Vaadin;
import com.github.fluorumlabs.disconnect.vaadin.elements.mixins.ThemableMixin;
import js.web.dom.HTMLElement;
import org.teavm.jso.JSByRef;
import org.teavm.jso.JSProperty;

import javax.annotation.Nullable;

/**
 * <vaadin-checkbox-group> is a Polymer element for grouping vaadin-checkboxes.
 *
 * 
<vaadin-checkbox-group label="Preferred language of contact:">
 *  <vaadin-checkbox value="en">English</vaadin-checkbox>
 *  <vaadin-checkbox value="fr">Français</vaadin-checkbox>
 *  <vaadin-checkbox value="de">Deutsch</vaadin-checkbox>
 * </vaadin-checkbox-group>
 * 
*

Styling

* The following shadow DOM parts are available for styling: * * * * * * * * * * *
Part nameDescription
labelThe label element
group-fieldThe element that wraps checkboxes
error-messageThe error message element
* The following state attributes are available for styling: * * * * * * * * * * * * * *
AttributeDescriptionPart name
disabledSet when the checkbox group and its children are disabled * .:host
focusedSet when the checkbox group contains focus:host
has-labelSet when the element has a label:host
has-valueSet when the element has a value:host
requiredSet when the element is required:host
invalidSet when the element is invalid:host
* See * ThemableMixin – how to apply styles for shadow parts */ @NpmPackage( name = "@vaadin/vaadin", version = Vaadin.VERSION ) @Import( module = "@vaadin/vaadin-checkbox/theme/lumo/vaadin-checkbox-group.js" ) public interface CheckboxGroupElement extends HTMLElement, ThemableMixin { static String TAGNAME() { return "vaadin-checkbox-group"; } /** * The current disabled state of the checkbox group. True if group and all internal checkboxes are disabled. */ @JSProperty boolean isDisabled(); /** * The current disabled state of the checkbox group. True if group and all internal checkboxes are disabled. */ @JSProperty void setDisabled(boolean disabled); /** * String used for the label element. */ @Nullable @JSProperty String getLabel(); /** * String used for the label element. */ @JSProperty void setLabel(String label); /** * Value of the checkbox group. * Note: toggling the checkboxes modifies the value by creating new * array each time, to override Polymer dirty-checking for arrays. * You can still use Polymer array mutation methods to update the value. */ @Nullable @JSProperty String[] getValue(); /** * Value of the checkbox group. * Note: toggling the checkboxes modifies the value by creating new * array each time, to override Polymer dirty-checking for arrays. * You can still use Polymer array mutation methods to update the value. */ @JSProperty void setValue(String... value); /** * Error to show when the input value is invalid. */ @Nullable @JSProperty String getErrorMessage(); /** * Error to show when the input value is invalid. */ @JSProperty void setErrorMessage(String errorMessage); /** * Specifies that the user must fill in a value. */ @JSProperty boolean isRequired(); /** * Specifies that the user must fill in a value. */ @JSProperty void setRequired(boolean required); /** * This property is set to true when the control value is invalid. */ @JSProperty boolean isInvalid(); /** * This property is set to true when the control value is invalid. */ @JSProperty void setInvalid(boolean invalid); /** * Returns true if value is valid. * <iron-form> uses this to check the validity or all its elements. * * @return True if the value is valid. */ boolean validate(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy