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

com.vaadin.polymer.vaadin.VaadinComboBoxLightElement Maven / Gradle / Ivy

There is a newer version: 1.9.3.1
Show newest version
/*
 * This code was generated with Vaadin Web Component GWT API Generator, 
 * from vaadin-combo-box project by Vaadin Ltd
 * that is licensed with Apache-2.0 license.
 */
package com.vaadin.polymer.vaadin;

import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;

/**
 * 

<vaadin-combo-box-light> is a customizable version of the <vaadin-combo-box> providing
only the dropdown functionality and leaving the input field definition to the user.

*

This element is using the same ComboBoxBehavior as
<vaadin-combo-box>, so the API remains the same.

*

To create a custom input field, you need to add a child element which has a two-way
data-bindable property representing the input value. The property name is expected
to be bindValue by default. See the example below for a simplest possible example
using an <input> element extended with iron-input.

*
<vaadin-combo-box-light>
 *   <input is="iron-input">
 * </vaadin-combo-box-light>
 * 
*

If you are using other custom input fields like <paper-input>, you
need to define the name of value property with attrForValue property.
See the example below on how to create a custom input field based
on a <paper-input> decorated with a custom <iron-icon> and
two <paper-button>s to act as the clear and toggle controls.

*
<vaadin-combo-box-light attr-for-value="value">
 *   <paper-input label="Elements" class="input">
 *     <iron-icon icon="toll" prefix></iron-icon>
 *     <paper-button suffix class="clear-button">Clear</paper-button>
 *     <paper-button suffix class="toggle-button">Toggle</paper-button>
 *   </paper-input>
 * </vaadin-combo-box-light>
 * 
*/ @JsType(isNative=true) public interface VaadinComboBoxLightElement extends HTMLElement { @JsOverlay public static final String TAG = "vaadin-combo-box-light"; @JsOverlay public static final String SRC = "vaadin-combo-box/vaadin-combo-box-light.html"; /** *

If true, the user can input a value that is not present in the items list.
value property will be set to the input value in this case.
Also, when value is set programmatically, the input value will be set
to reflect that value.

* * JavaScript Info: * @property allowCustomValue * @type Boolean * */ @JsProperty boolean getAllowCustomValue(); /** *

If true, the user can input a value that is not present in the items list.
value property will be set to the input value in this case.
Also, when value is set programmatically, the input value will be set
to reflect that value.

* * JavaScript Info: * @property allowCustomValue * @type Boolean * */ @JsProperty void setAllowCustomValue(boolean value); /** *

A full set of items to filter the visible options from.
The items can be of either String or Object type.

* * JavaScript Info: * @property items * @type Array * */ @JsProperty JsArray getItems(); /** *

A full set of items to filter the visible options from.
The items can be of either String or Object type.

* * JavaScript Info: * @property items * @type Array * */ @JsProperty void setItems(JsArray value); /** *

Number of pixels used as the vertical offset in positioning of
the dropdown.

* * JavaScript Info: * @property overlayVerticalOffset * @type Number * */ @JsProperty double getOverlayVerticalOffset(); /** *

Number of pixels used as the vertical offset in positioning of
the dropdown.

* * JavaScript Info: * @property overlayVerticalOffset * @type Number * */ @JsProperty void setOverlayVerticalOffset(double value); /** *

A subset of items, filtered based on the user input. Filtered items
can be assigned directly to omit the internal filtering functionality.
The items can be of either String or Object type.

* * JavaScript Info: * @property filteredItems * @type Array * */ @JsProperty JsArray getFilteredItems(); /** *

A subset of items, filtered based on the user input. Filtered items
can be assigned directly to omit the internal filtering functionality.
The items can be of either String or Object type.

* * JavaScript Info: * @property filteredItems * @type Array * */ @JsProperty void setFilteredItems(JsArray value); /** *

The EventTarget that will be firing relevant KeyboardEvents. Set it to
null to disable the listeners.

* * JavaScript Info: * @property keyEventTarget * @type ?EventTarget * @behavior VaadinDatePicker */ @JsProperty JavaScriptObject getKeyEventTarget(); /** *

The EventTarget that will be firing relevant KeyboardEvents. Set it to
null to disable the listeners.

* * JavaScript Info: * @property keyEventTarget * @type ?EventTarget * @behavior VaadinDatePicker */ @JsProperty void setKeyEventTarget(JavaScriptObject value); /** *

Returns a reference to the input element.

* * JavaScript Info: * @property inputElement * @type HTMLElement * */ @JsProperty JavaScriptObject getInputElement(); /** *

Returns a reference to the input element.

* * JavaScript Info: * @property inputElement * @type HTMLElement * */ @JsProperty void setInputElement(JavaScriptObject value); /** *

The selected item from the items array.

* * JavaScript Info: * @property selectedItem * @type Object * */ @JsProperty JavaScriptObject getSelectedItem(); /** *

The selected item from the items array.

* * JavaScript Info: * @property selectedItem * @type Object * */ @JsProperty void setSelectedItem(JavaScriptObject value); /** *

Set to true to disable this element.

* * JavaScript Info: * @property disabled * @type Boolean * @behavior VaadinComboBox */ @JsProperty boolean getDisabled(); /** *

Set to true to disable this element.

* * JavaScript Info: * @property disabled * @type Boolean * @behavior VaadinComboBox */ @JsProperty void setDisabled(boolean value); /** *

True if the dropdown is open, false otherwise.

* * JavaScript Info: * @property opened * @type Boolean * @behavior VaadinComboBox */ @JsProperty boolean getOpened(); /** *

True if the dropdown is open, false otherwise.

* * JavaScript Info: * @property opened * @type Boolean * @behavior VaadinComboBox */ @JsProperty void setOpened(boolean value); /** *

Set to true to mark the input as required. If used in a form, a
custom element that uses this behavior should also use
Polymer.IronValidatableBehavior and define a custom validation method.
Otherwise, a required element will always be considered valid.
It’s also strongly recommended to provide a visual style for the element
when its value is invalid.

* * JavaScript Info: * @property required * @type Boolean * @behavior VaadinDatePicker */ @JsProperty boolean getRequired(); /** *

Set to true to mark the input as required. If used in a form, a
custom element that uses this behavior should also use
Polymer.IronValidatableBehavior and define a custom validation method.
Otherwise, a required element will always be considered valid.
It’s also strongly recommended to provide a visual style for the element
when its value is invalid.

* * JavaScript Info: * @property required * @type Boolean * @behavior VaadinDatePicker */ @JsProperty void setRequired(boolean value); /** *

If true, this property will cause the implementing element to
automatically stop propagation on any handled KeyboardEvents.

* * JavaScript Info: * @property stopKeyboardEventPropagation * @type Boolean * @behavior VaadinDatePicker */ @JsProperty boolean getStopKeyboardEventPropagation(); /** *

If true, this property will cause the implementing element to
automatically stop propagation on any handled KeyboardEvents.

* * JavaScript Info: * @property stopKeyboardEventPropagation * @type Boolean * @behavior VaadinDatePicker */ @JsProperty void setStopKeyboardEventPropagation(boolean value); /** *

When set to true, a loading spinner is displayed on top of the list of options.

* * JavaScript Info: * @property loading * @type Boolean * */ @JsProperty boolean getLoading(); /** *

When set to true, a loading spinner is displayed on top of the list of options.

* * JavaScript Info: * @property loading * @type Boolean * */ @JsProperty void setLoading(boolean value); /** *

A read-only property indicating whether this combo box has a value
selected or not. It can be used for example in styling of the component.

* * JavaScript Info: * @property hasValue * @type Boolean * @behavior VaadinComboBox */ @JsProperty boolean getHasValue(); /** *

A read-only property indicating whether this combo box has a value
selected or not. It can be used for example in styling of the component.

* * JavaScript Info: * @property hasValue * @type Boolean * @behavior VaadinComboBox */ @JsProperty void setHasValue(boolean value); /** *

When present, it specifies that the element field is read-only.

* * JavaScript Info: * @property readonly * @type Boolean * @behavior VaadinComboBox */ @JsProperty boolean getReadonly(); /** *

When present, it specifies that the element field is read-only.

* * JavaScript Info: * @property readonly * @type Boolean * @behavior VaadinComboBox */ @JsProperty void setReadonly(boolean value); /** *

To be used to express what combination of keys will trigger the relative
callback. e.g. keyBindings: { 'esc': '_onEscPressed'}

* * JavaScript Info: * @property keyBindings * @type !Object * @behavior VaadinDatePicker */ @JsProperty JavaScriptObject getKeyBindings(); /** *

To be used to express what combination of keys will trigger the relative
callback. e.g. keyBindings: { 'esc': '_onEscPressed'}

* * JavaScript Info: * @property keyBindings * @type !Object * @behavior VaadinDatePicker */ @JsProperty void setKeyBindings(JavaScriptObject value); /** *

The value for this element.

* * JavaScript Info: * @property value * @type String * @behavior VaadinDatePicker */ @JsProperty String getValue(); /** *

The value for this element.

* * JavaScript Info: * @property value * @type String * @behavior VaadinDatePicker */ @JsProperty void setValue(String value); /** *

Path for the value of the item. If items is an array of objects, the
itemValuePath: is used to fetch the string value for the selected
item.

*

The item value is used in the value property of the combo box,
to provide the form value.

* * JavaScript Info: * @property itemValuePath * @type String * @behavior VaadinComboBox */ @JsProperty String getItemValuePath(); /** *

Path for the value of the item. If items is an array of objects, the
itemValuePath: is used to fetch the string value for the selected
item.

*

The item value is used in the value property of the combo box,
to provide the form value.

* * JavaScript Info: * @property itemValuePath * @type String * @behavior VaadinComboBox */ @JsProperty void setItemValuePath(String value); /** *

Path for label of the item. If items is an array of objects, the
itemLabelPath is used to fetch the displayed string label for each
item.

*

The item label is also used for matching items when processing user
input, i.e., for filtering and selecting items.

*

When using item templates, the property is still needed because it is used
for filtering, and for displaying the selected item value in the input box.

* * JavaScript Info: * @property itemLabelPath * @type String * @behavior VaadinComboBox */ @JsProperty String getItemLabelPath(); /** *

Path for label of the item. If items is an array of objects, the
itemLabelPath is used to fetch the displayed string label for each
item.

*

The item label is also used for matching items when processing user
input, i.e., for filtering and selecting items.

*

When using item templates, the property is still needed because it is used
for filtering, and for displaying the selected item value in the input box.

* * JavaScript Info: * @property itemLabelPath * @type String * @behavior VaadinComboBox */ @JsProperty void setItemLabelPath(String value); /** *

Filtering string the user has typed into the input field.

* * JavaScript Info: * @property filter * @type String * @behavior VaadinComboBox */ @JsProperty String getFilter(); /** *

Filtering string the user has typed into the input field.

* * JavaScript Info: * @property filter * @type String * @behavior VaadinComboBox */ @JsProperty void setFilter(String value); /** *

The name of this element.

* * JavaScript Info: * @property name * @type String * @behavior VaadinDatePicker */ @JsProperty String getName(); /** *

The name of this element.

* * JavaScript Info: * @property name * @type String * @behavior VaadinDatePicker */ @JsProperty void setName(String value); /** *

Name of the two-way data-bindable property representing the
value of the custom input field.

* * JavaScript Info: * @property attrForValue * @type String * */ @JsProperty String getAttrForValue(); /** *

Name of the two-way data-bindable property representing the
value of the custom input field.

* * JavaScript Info: * @property attrForValue * @type String * */ @JsProperty void setAttrForValue(String value); /** * * * JavaScript Info: * @method templatize * @param {} template * @behavior VaadinInfiniteScroller * */ void templatize(Object template); /** *

Can be used to imperatively add a key binding to the implementing
element. This is the imperative equivalent of declaring a keybinding
in the keyBindings prototype property.

* * JavaScript Info: * @method addOwnKeyBinding * @param {} eventString * @param {} handlerName * @behavior VaadinDatePicker * */ void addOwnKeyBinding(Object eventString, Object handlerName); /** * * * JavaScript Info: * @method stamp * @param {} model * @behavior VaadinInfiniteScroller * */ void stamp(Object model); /** * * * JavaScript Info: * @method modelForElement * @param {} el * @behavior VaadinInfiniteScroller * */ void modelForElement(Object el); /** *

Closes the dropdown list.

* * JavaScript Info: * @method close * @behavior VaadinComboBox * */ void close(); /** *

Opens the dropdown list.

* * JavaScript Info: * @method open * * */ void open(); /** *

When called, will remove all imperatively-added key bindings.

* * JavaScript Info: * @method removeOwnKeyBindings * @behavior VaadinDatePicker * */ void removeOwnKeyBindings(); /** *

Reverts back to original value.

* * JavaScript Info: * @method cancel * * */ void cancel(); /** *

Returns true if a keyboard event matches eventString.

* * JavaScript Info: * @method keyboardEventMatchesKeys * @param {KeyboardEvent} event * @param {string} eventString * @behavior VaadinDatePicker * @return {boolean} */ boolean keyboardEventMatchesKeys(JavaScriptObject event, String eventString); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy