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

com.vaadin.polymer.vaadin.widget.VaadinComboBoxLight 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.widget;

import com.vaadin.polymer.vaadin.*;

import com.vaadin.polymer.vaadin.widget.event.ChangeEvent;
import com.vaadin.polymer.vaadin.widget.event.ChangeEventHandler;

import com.vaadin.polymer.vaadin.widget.event.CustomValueSetEvent;
import com.vaadin.polymer.vaadin.widget.event.CustomValueSetEventHandler;

import com.vaadin.polymer.vaadin.widget.event.SelectedItemChangedEvent;
import com.vaadin.polymer.vaadin.widget.event.SelectedItemChangedEventHandler;

import com.vaadin.polymer.vaadin.widget.event.VaadinDropdownClosedEvent;
import com.vaadin.polymer.vaadin.widget.event.VaadinDropdownClosedEventHandler;

import com.vaadin.polymer.vaadin.widget.event.VaadinDropdownOpenedEvent;
import com.vaadin.polymer.vaadin.widget.event.VaadinDropdownOpenedEventHandler;

import com.vaadin.polymer.vaadin.widget.event.ValueChangedEvent;
import com.vaadin.polymer.vaadin.widget.event.ValueChangedEventHandler;

import com.vaadin.polymer.iron.widget.event.IronFormElementRegisterEvent;
import com.vaadin.polymer.iron.widget.event.IronFormElementRegisterEventHandler;

import com.vaadin.polymer.iron.widget.event.IronFormElementUnregisterEvent;
import com.vaadin.polymer.iron.widget.event.IronFormElementUnregisterEventHandler;

import com.vaadin.polymer.*;
import com.vaadin.polymer.elemental.*;
import com.vaadin.polymer.PolymerWidget;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.core.client.JavaScriptObject;

/**
 * 

<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>
 * 
*/ public class VaadinComboBoxLight extends PolymerWidget { /** * Default Constructor. */ public VaadinComboBoxLight() { this(""); } /** * Constructor used by UIBinder to create widgets with content. */ public VaadinComboBoxLight(String html) { super(VaadinComboBoxLightElement.TAG, VaadinComboBoxLightElement.SRC, html); } /** * Gets a handle to the Polymer object's underlying DOM element. */ public VaadinComboBoxLightElement getPolymerElement() { return (VaadinComboBoxLightElement) getElement(); } /** *

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 * */ public boolean getAllowCustomValue() { return getPolymerElement().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 * */ public void setAllowCustomValue(boolean value) { getPolymerElement().setAllowCustomValue(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 * */ public JsArray getItems() { return getPolymerElement().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 * */ public void setItems(JsArray value) { getPolymerElement().setItems(value); } /** *

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

* * JavaScript Info: * @property overlayVerticalOffset * @type Number * */ public double getOverlayVerticalOffset() { return getPolymerElement().getOverlayVerticalOffset(); } /** *

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

* * JavaScript Info: * @property overlayVerticalOffset * @type Number * */ public void setOverlayVerticalOffset(double value) { getPolymerElement().setOverlayVerticalOffset(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 * */ public JsArray getFilteredItems() { return getPolymerElement().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 * */ public void setFilteredItems(JsArray value) { getPolymerElement().setFilteredItems(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 */ public JavaScriptObject getKeyEventTarget() { return getPolymerElement().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 */ public void setKeyEventTarget(JavaScriptObject value) { getPolymerElement().setKeyEventTarget(value); } /** *

Returns a reference to the input element.

* * JavaScript Info: * @property inputElement * @type HTMLElement * */ public JavaScriptObject getInputElement() { return getPolymerElement().getInputElement(); } /** *

Returns a reference to the input element.

* * JavaScript Info: * @property inputElement * @type HTMLElement * */ public void setInputElement(JavaScriptObject value) { getPolymerElement().setInputElement(value); } /** *

The selected item from the items array.

* * JavaScript Info: * @property selectedItem * @type Object * */ public JavaScriptObject getSelectedItem() { return getPolymerElement().getSelectedItem(); } /** *

The selected item from the items array.

* * JavaScript Info: * @property selectedItem * @type Object * */ public void setSelectedItem(JavaScriptObject value) { getPolymerElement().setSelectedItem(value); } /** *

Set to true to disable this element.

* * JavaScript Info: * @property disabled * @type Boolean * @behavior VaadinComboBox */ public boolean getDisabled() { return getPolymerElement().getDisabled(); } /** *

Set to true to disable this element.

* * JavaScript Info: * @property disabled * @type Boolean * @behavior VaadinComboBox */ public void setDisabled(boolean value) { getPolymerElement().setDisabled(value); } /** *

True if the dropdown is open, false otherwise.

* * JavaScript Info: * @property opened * @type Boolean * @behavior VaadinComboBox */ public boolean getOpened() { return getPolymerElement().getOpened(); } /** *

True if the dropdown is open, false otherwise.

* * JavaScript Info: * @property opened * @type Boolean * @behavior VaadinComboBox */ public void setOpened(boolean value) { getPolymerElement().setOpened(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 */ public boolean getRequired() { return getPolymerElement().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 */ public void setRequired(boolean value) { getPolymerElement().setRequired(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 */ public boolean getStopKeyboardEventPropagation() { return getPolymerElement().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 */ public void setStopKeyboardEventPropagation(boolean value) { getPolymerElement().setStopKeyboardEventPropagation(value); } /** *

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

* * JavaScript Info: * @property loading * @type Boolean * */ public boolean getLoading() { return getPolymerElement().getLoading(); } /** *

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

* * JavaScript Info: * @property loading * @type Boolean * */ public void setLoading(boolean value) { getPolymerElement().setLoading(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 */ public boolean getHasValue() { return getPolymerElement().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 */ public void setHasValue(boolean value) { getPolymerElement().setHasValue(value); } /** *

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

* * JavaScript Info: * @property readonly * @type Boolean * @behavior VaadinComboBox */ public boolean getReadonly() { return getPolymerElement().getReadonly(); } /** *

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

* * JavaScript Info: * @property readonly * @type Boolean * @behavior VaadinComboBox */ public void setReadonly(boolean value) { getPolymerElement().setReadonly(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 */ public JavaScriptObject getKeyBindings() { return getPolymerElement().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 */ public void setKeyBindings(JavaScriptObject value) { getPolymerElement().setKeyBindings(value); } /** *

The value for this element.

* * JavaScript Info: * @property value * @type String * @behavior VaadinDatePicker */ public String getValue() { return getPolymerElement().getValue(); } /** *

The value for this element.

* * JavaScript Info: * @property value * @type String * @behavior VaadinDatePicker */ public void setValue(String value) { getPolymerElement().setValue(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 */ public String getItemValuePath() { return getPolymerElement().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 */ public void setItemValuePath(String value) { getPolymerElement().setItemValuePath(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 */ public String getItemLabelPath() { return getPolymerElement().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 */ public void setItemLabelPath(String value) { getPolymerElement().setItemLabelPath(value); } /** *

Filtering string the user has typed into the input field.

* * JavaScript Info: * @property filter * @type String * @behavior VaadinComboBox */ public String getFilter() { return getPolymerElement().getFilter(); } /** *

Filtering string the user has typed into the input field.

* * JavaScript Info: * @property filter * @type String * @behavior VaadinComboBox */ public void setFilter(String value) { getPolymerElement().setFilter(value); } /** *

The name of this element.

* * JavaScript Info: * @property name * @type String * @behavior VaadinDatePicker */ public String getName() { return getPolymerElement().getName(); } /** *

The name of this element.

* * JavaScript Info: * @property name * @type String * @behavior VaadinDatePicker */ public void setName(String value) { getPolymerElement().setName(value); } /** *

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

* * JavaScript Info: * @property attrForValue * @type String * */ public String getAttrForValue() { return getPolymerElement().getAttrForValue(); } /** *

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

* * JavaScript Info: * @property attrForValue * @type String * */ public void setAttrForValue(String value) { getPolymerElement().setAttrForValue(value); } // Needed in UIBinder /** *

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: * @attribute filtered-items * @behavior VaadinComboBox */ public void setFilteredItems(String value) { Polymer.property(this.getPolymerElement(), "filteredItems", value); } // Needed in UIBinder /** *

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

* * JavaScript Info: * @attribute items * @behavior VaadinComboBox */ public void setItems(String value) { Polymer.property(this.getPolymerElement(), "items", value); } // Needed in UIBinder /** *

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

* * JavaScript Info: * @attribute overlay-vertical-offset * */ public void setOverlayVerticalOffset(String value) { Polymer.property(this.getPolymerElement(), "overlayVerticalOffset", value); } // Needed in UIBinder /** *

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

* * JavaScript Info: * @attribute key-event-target * @behavior VaadinDatePicker */ public void setKeyEventTarget(String value) { Polymer.property(this.getPolymerElement(), "keyEventTarget", value); } // Needed in UIBinder /** *

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

* * JavaScript Info: * @attribute key-bindings * @behavior VaadinDatePicker */ public void setKeyBindings(String value) { Polymer.property(this.getPolymerElement(), "keyBindings", value); } // Needed in UIBinder /** *

Returns a reference to the input element.

* * JavaScript Info: * @attribute input-element * @behavior VaadinComboBox */ public void setInputElement(String value) { Polymer.property(this.getPolymerElement(), "inputElement", value); } // Needed in UIBinder /** *

The selected item from the items array.

* * JavaScript Info: * @attribute selected-item * */ public void setSelectedItem(String value) { Polymer.property(this.getPolymerElement(), "selectedItem", value); } /** * * * JavaScript Info: * @method templatize * @param {} template * @behavior VaadinInfiniteScroller * */ public void templatize(Object template) { getPolymerElement().templatize(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 * */ public void addOwnKeyBinding(Object eventString, Object handlerName) { getPolymerElement().addOwnKeyBinding(eventString, handlerName); } /** * * * JavaScript Info: * @method stamp * @param {} model * @behavior VaadinInfiniteScroller * */ public void stamp(Object model) { getPolymerElement().stamp(model); } /** * * * JavaScript Info: * @method modelForElement * @param {} el * @behavior VaadinInfiniteScroller * */ public void modelForElement(Object el) { getPolymerElement().modelForElement(el); } /** *

Closes the dropdown list.

* * JavaScript Info: * @method close * @behavior VaadinComboBox * */ public void close() { getPolymerElement().close(); } /** *

Opens the dropdown list.

* * JavaScript Info: * @method open * * */ public void open() { getPolymerElement().open(); } /** *

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

* * JavaScript Info: * @method removeOwnKeyBindings * @behavior VaadinDatePicker * */ public void removeOwnKeyBindings() { getPolymerElement().removeOwnKeyBindings(); } /** *

Reverts back to original value.

* * JavaScript Info: * @method cancel * * */ public void cancel() { getPolymerElement().cancel(); } /** *

Returns true if a keyboard event matches eventString.

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

Fired when value changes.
To comply with https://developer.mozilla.org/en-US/docs/Web/Events/change

* * JavaScript Info: * @event change */ public HandlerRegistration addChangeHandler(ChangeEventHandler handler) { return addDomHandler(handler, ChangeEvent.TYPE); } /** *

Fired when the user sets a custom value.

* * JavaScript Info: * @event custom-value-set */ public HandlerRegistration addCustomValueSetHandler(CustomValueSetEventHandler handler) { return addDomHandler(handler, CustomValueSetEvent.TYPE); } /** *

Fired when selected item changes.

* * JavaScript Info: * @event selected-item-changed */ public HandlerRegistration addSelectedItemChangedHandler(SelectedItemChangedEventHandler handler) { return addDomHandler(handler, SelectedItemChangedEvent.TYPE); } /** *

Fired after the vaadin-dropdown closes.

* * JavaScript Info: * @event vaadin-dropdown-closed */ public HandlerRegistration addVaadinDropdownClosedHandler(VaadinDropdownClosedEventHandler handler) { return addDomHandler(handler, VaadinDropdownClosedEvent.TYPE); } /** *

Fired after the vaadin-dropdown opens.

* * JavaScript Info: * @event vaadin-dropdown-opened */ public HandlerRegistration addVaadinDropdownOpenedHandler(VaadinDropdownOpenedEventHandler handler) { return addDomHandler(handler, VaadinDropdownOpenedEvent.TYPE); } /** *

Fired when the value changes.

* * JavaScript Info: * @event value-changed */ public HandlerRegistration addValueChangedHandler(ValueChangedEventHandler handler) { return addDomHandler(handler, ValueChangedEvent.TYPE); } /** *

Fired when the element is added to an iron-form.

* * JavaScript Info: * @event iron-form-element-register */ public HandlerRegistration addIronFormElementRegisterHandler(IronFormElementRegisterEventHandler handler) { return addDomHandler(handler, IronFormElementRegisterEvent.TYPE); } /** *

Fired when the element is removed from an iron-form.

* * JavaScript Info: * @event iron-form-element-unregister */ public HandlerRegistration addIronFormElementUnregisterHandler(IronFormElementUnregisterEventHandler handler) { return addDomHandler(handler, IronFormElementUnregisterEvent.TYPE); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy