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

com.github.fluorumlabs.disconnect.vaadin.elements.CustomFieldElement 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.CustomFieldMixin;
import com.github.fluorumlabs.disconnect.vaadin.elements.mixins.ElementMixin;
import com.github.fluorumlabs.disconnect.vaadin.elements.mixins.ThemableMixin;
import js.web.dom.HTMLElement;
import org.teavm.jso.JSProperty;

import javax.annotation.Nullable;

/**
 * <vaadin-custom-field> is a Web Component providing field wrapper functionality.
 *
 * 
<vaadin-custom-field label="Appointment time">
 *   <vaadin-date-picker></vaadin-date-picker>
 *   <vaadin-time-picker></vaadin-time-picker>
 * </vaadin-custom-field>
 * 
*

Styling

* You may set the attribute disabled or readonly on this component to make the label * styles behave the same * way as they would on a <vaadin-text-field> which is disabled or readonly. *

* The following shadow DOM parts are available for styling: * *

* * * * * * * *
Part nameDescription
labelThe label element
error-messageThe error message element
* The following state attributes are available for styling: * * * * * * * * * * *
AttributeDescriptionPart name
has-labelSet when the field has a label:host
invalidSet when the field is invalid:host
focusedSet when the field contains focus:host
* See * ThemableMixin – how to apply styles for shadow parts */ @NpmPackage( name = "@vaadin/vaadin", version = Vaadin.VERSION ) @Import( module = "@vaadin/vaadin-custom-field/theme/lumo/vaadin-custom-field.js" ) public interface CustomFieldElement extends HTMLElement, ElementMixin, ThemableMixin, CustomFieldMixin { static String TAGNAME() { return "vaadin-custom-field"; } /** * String used for the label element. */ @Nullable @JSProperty String getLabel(); /** * String used for the label element. */ @JSProperty void setLabel(String label); /** * The name of the control, which is submitted with the form data. */ @Nullable @JSProperty String getName(); /** * The name of the control, which is submitted with the form data. */ @JSProperty void setName(String name); /** * 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); /** * The value of the field. When wrapping several inputs, it will contain \t * (Tab character) as a delimiter indicating parts intended to be used as the * corresponding inputs values. Use the * i18n * property to customize this behavior. */ @Nullable @JSProperty String getValue(); /** * The value of the field. When wrapping several inputs, it will contain \t * (Tab character) as a delimiter indicating parts intended to be used as the * corresponding inputs values. Use the * i18n * property to customize this behavior. */ @JSProperty void setValue(String value); /** * 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); /** * 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); /** * 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 inputs values satisfy all constraints (if any) */ boolean checkValidity(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy