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

com.github.fluorumlabs.disconnect.vaadin.elements.RadioGroupElement 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.JSProperty;

import javax.annotation.Nullable;

/**
 * <vaadin-radio-group> is a Web Component for grouping vaadin-radio-buttons.
 *
 * 
<vaadin-radio-group>
 *   <vaadin-radio-button name="foo">Foo</vaadin-radio-button>
 *   <vaadin-radio-button name="bar">Bar</vaadin-radio-button>
 *   <vaadin-radio-button name="baz">Baz</vaadin-radio-button>
 * </vaadin-radio-group>
 * 
*

Styling

* The following shadow DOM parts are available for styling: * * * * * * * * * *
Part nameDescription
labelThe label element
group-fieldThe element that wraps radio-buttons
* The following state attributes are available for styling: * * * * * * * * * * * * * *
AttributeDescriptionPart name
disabledSet when the radio group and its children are disabled.:host
readonlySet to a readonly radio group:host
invalidSet when the element is invalid:host
has-labelSet when the element has a label:host
has-valueSet when the element has a value:host
focusedSet when the element contains focus:host
* See * ThemableMixin – how to apply styles for shadow parts */ @NpmPackage( name = "@vaadin/vaadin", version = Vaadin.VERSION ) @Import( module = "@vaadin/vaadin-radio-button/theme/lumo/vaadin-radio-group.js" ) public interface RadioGroupElement extends HTMLElement, ThemableMixin { static String TAGNAME() { return "vaadin-radio-group"; } /** * The current disabled state of the radio group. True if group and all internal radio buttons are disabled. */ @JSProperty boolean isDisabled(); /** * The current disabled state of the radio group. True if group and all internal radio buttons are disabled. */ @JSProperty void setDisabled(boolean disabled); /** * This attribute indicates that the user cannot modify the value of the control. */ @JSProperty boolean isReadonly(); /** * This attribute indicates that the user cannot modify the value of the control. */ @JSProperty void setReadonly(boolean readonly); /** * This property is set to true when the value is invalid. */ @JSProperty boolean isInvalid(); /** * This property is set to true when the value is invalid. */ @JSProperty void setInvalid(boolean invalid); /** * 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); /** * 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); /** * String used for the label element. */ @Nullable @JSProperty String getLabel(); /** * String used for the label element. */ @JSProperty void setLabel(String label); /** * Value of the radio group. */ @Nullable @JSProperty String getValue(); /** * Value of the radio group. */ @JSProperty void setValue(String value); /** * 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(); /** * Returns true if the current input value satisfies all constraints (if any) */ boolean checkValidity(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy