com.vaadin.polymer.iron.IronMultiSelectableBehavior Maven / Gradle / Ivy
/*
* This code was generated with Vaadin Web Component GWT API Generator,
* from iron-selector project by The Polymer Authors
* that is licensed with http://polymer.github.io/LICENSE.txt license.
*/
package com.vaadin.polymer.iron;
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;
/**
*
*/
@JsType(isNative=true)
public interface IronMultiSelectableBehavior {
@JsOverlay public static final String NAME = "Polymer.IronMultiSelectableBehavior";
@JsOverlay public static final String SRC = "iron-selector/iron-selector.html";
/**
* The list of items from which a selection can be made.
*
* JavaScript Info:
* @property items
* @type Array
*
*/
@JsProperty JsArray getItems();
/**
* The list of items from which a selection can be made.
*
* JavaScript Info:
* @property items
* @type Array
*
*/
@JsProperty void setItems(JsArray value);
/**
* If true, multiple selections are allowed.
*
* JavaScript Info:
* @property multi
* @type Boolean
*
*/
@JsProperty boolean getMulti();
/**
* If true, multiple selections are allowed.
*
* JavaScript Info:
* @property multi
* @type Boolean
*
*/
@JsProperty void setMulti(boolean value);
/**
* Gets or sets the selected elements. This is used instead of selected
when multi
is true.
*
* JavaScript Info:
* @property selectedValues
* @type Array
*
*/
@JsProperty JsArray getSelectedValues();
/**
* Gets or sets the selected elements. This is used instead of selected
when multi
is true.
*
* JavaScript Info:
* @property selectedValues
* @type Array
*
*/
@JsProperty void setSelectedValues(JsArray value);
/**
* Returns an array of currently selected items.
*
* JavaScript Info:
* @property selectedItems
* @type Array
*
*/
@JsProperty JsArray getSelectedItems();
/**
* Returns an array of currently selected items.
*
* JavaScript Info:
* @property selectedItems
* @type Array
*
*/
@JsProperty void setSelectedItems(JsArray value);
/**
* Gets or sets the selected element. The default is to use the index of the item.
*
* JavaScript Info:
* @property selected
* @type (string|number)
*
*/
@JsProperty Object getSelected();
/**
* Gets or sets the selected element. The default is to use the index of the item.
*
* JavaScript Info:
* @property selected
* @type (string|number)
*
*/
@JsProperty void setSelected(Object value);
/**
* Returns the currently selected item.
*
* JavaScript Info:
* @property selectedItem
* @type ?Object
*
*/
@JsProperty JavaScriptObject getSelectedItem();
/**
* Returns the currently selected item.
*
* JavaScript Info:
* @property selectedItem
* @type ?Object
*
*/
@JsProperty void setSelectedItem(JavaScriptObject value);
/**
* The class to set on elements when selected.
*
* JavaScript Info:
* @property selectedClass
* @type String
*
*/
@JsProperty String getSelectedClass();
/**
* The class to set on elements when selected.
*
* JavaScript Info:
* @property selectedClass
* @type String
*
*/
@JsProperty void setSelectedClass(String value);
/**
* The attribute to set on elements when selected.
*
* JavaScript Info:
* @property selectedAttribute
* @type String
*
*/
@JsProperty String getSelectedAttribute();
/**
* The attribute to set on elements when selected.
*
* JavaScript Info:
* @property selectedAttribute
* @type String
*
*/
@JsProperty void setSelectedAttribute(String value);
/**
* This is a CSS selector string. If this is set, only items that match the CSS selector
are selectable.
*
* JavaScript Info:
* @property selectable
* @type string
*
*/
@JsProperty String getSelectable();
/**
* This is a CSS selector string. If this is set, only items that match the CSS selector
are selectable.
*
* JavaScript Info:
* @property selectable
* @type string
*
*/
@JsProperty void setSelectable(String value);
/**
* If you want to use an attribute value or property of an element for
selected
instead of the index, set this to the name of the attribute
or property. Hyphenated values are converted to camel case when used to
look up the property of a selectable element. Camel cased values are
not converted to hyphenated values for attribute lookup. It’s
recommended that you provide the hyphenated form of the name so that
selection works in both cases. (Use attr-or-property-name
instead of
attrOrPropertyName
.)
*
* JavaScript Info:
* @property attrForSelected
* @type String
*
*/
@JsProperty String getAttrForSelected();
/**
* If you want to use an attribute value or property of an element for
selected
instead of the index, set this to the name of the attribute
or property. Hyphenated values are converted to camel case when used to
look up the property of a selectable element. Camel cased values are
not converted to hyphenated values for attribute lookup. It’s
recommended that you provide the hyphenated form of the name so that
selection works in both cases. (Use attr-or-property-name
instead of
attrOrPropertyName
.)
*
* JavaScript Info:
* @property attrForSelected
* @type String
*
*/
@JsProperty void setAttrForSelected(String value);
/**
* Default fallback if the selection based on selected with attrForSelected
is not found.
*
* JavaScript Info:
* @property fallbackSelection
* @type String
*
*/
@JsProperty String getFallbackSelection();
/**
* Default fallback if the selection based on selected with attrForSelected
is not found.
*
* JavaScript Info:
* @property fallbackSelection
* @type String
*
*/
@JsProperty void setFallbackSelection(String value);
/**
* The event that fires from items when they are selected. Selectable
will listen for this event from items and update the selection state.
Set to empty string to listen to no events.
*
* JavaScript Info:
* @property activateEvent
* @type String
*
*/
@JsProperty String getActivateEvent();
/**
* The event that fires from items when they are selected. Selectable
will listen for this event from items and update the selection state.
Set to empty string to listen to no events.
*
* JavaScript Info:
* @property activateEvent
* @type String
*
*/
@JsProperty void setActivateEvent(String value);
/**
*
*
* JavaScript Info:
* @method multiChanged
* @param {} multi
*
*
*/
void multiChanged(Object multi);
/**
* Selects the given value. If the multi
property is true, then the selected state of the
value
will be toggled; otherwise the value
will be selected.
*
* JavaScript Info:
* @method select
* @param {(string|number)} value
*
*
*/
void select(Object value);
/**
* Selects the item at the given index.
*
* JavaScript Info:
* @method selectIndex
* @param {} index
*
*
*/
void selectIndex(Object index);
/**
* Force a synchronous update of the items
property.
* NOTE: Consider listening for the iron-items-changed
event to respond to
updates to the set of selectable items after updates to the DOM list and
selection state have been made.
* WARNING: If you are using this method, you should probably consider an
alternate approach. Synchronously querying for items is potentially
slow for many use cases. The items
property will update asynchronously
on its own to reflect selectable items in the DOM.
*
* JavaScript Info:
* @method forceSynchronousItemUpdate
*
*
*/
void forceSynchronousItemUpdate();
/**
* Selects the next item.
*
* JavaScript Info:
* @method selectNext
*
*
*/
void selectNext();
/**
* Selects the previous item.
*
* JavaScript Info:
* @method selectPrevious
*
*
*/
void selectPrevious();
/**
* Returns the index of the given item.
*
* JavaScript Info:
* @method indexOf
* @param {Object} item
*
*
*/
void indexOf(JavaScriptObject item);
}