com.vaadin.polymer.iron.element.IronSelectorElement 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.element;
import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.core.client.js.JsProperty;
import com.google.gwt.core.client.js.JsType;
/**
* iron-selector
is an element which can be used to manage a list of elements
that can be selected. Tapping on the item will make the item selected. The selected
indicates
which item is being selected. The default is to use the index of the item.
* Example:
* <iron-selector selected="0">
* <div>Item 1</div>
* <div>Item 2</div>
* <div>Item 3</div>
* </iron-selector>
*
*
*
If you want to use the attribute value of an element for selected
instead of the index,
set attrForSelected
to the name of the attribute. For example, if you want to select item by
name
, set attrForSelected
to name
.
* Example:
* <iron-selector attr-for-selected="name" selected="foo">
* <div name="foo">Foo</div>
* <div name="bar">Bar</div>
* <div name="zot">Zot</div>
* </iron-selector>
*
*
*
iron-selector
is not styled. Use the iron-selected
CSS class to style the selected element.
* Example:
* <style>
* .iron-selected {
* background: #eee;
* }
* </style>
*
* ...
*
* <iron-selector selected="0">
* <div>Item 1</div>
* <div>Item 2</div>
* <div>Item 3</div>
* </iron-selector>
*
*
*
*/
@JsType
public interface IronSelectorElement extends HTMLElement {
public static final String TAG = "iron-selector";
public static final String SRC = "iron-selector/iron-selector.html";
/**
* If true, multiple selections are allowed.
*
* JavaScript Info:
* @property multi
* @type Boolean
* @behavior PaperTabs
*/
@JsProperty boolean getMulti();
/**
* If true, multiple selections are allowed.
*
* JavaScript Info:
* @property multi
* @type Boolean
* @behavior PaperTabs
*/
@JsProperty void setMulti(boolean value);
/**
*
*
* JavaScript Info:
* @method multiChanged
* @param {} multi
* @behavior PaperTabs
*/
void multiChanged(JavaScriptObject 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} value
* @behavior PaperTabs
*/
void select(String value);
/**
* Returns an array of currently selected items.
*
* JavaScript Info:
* @property selectedItems
* @type Array
* @behavior PaperTabs
*/
@JsProperty JsArray getSelectedItems();
/**
* Returns an array of currently selected items.
*
* JavaScript Info:
* @property selectedItems
* @type Array
* @behavior PaperTabs
*/
@JsProperty void setSelectedItems(JsArray value);
/**
* Gets or sets the selected elements. This is used instead of selected
when multi
is true.
*
* JavaScript Info:
* @property selectedValues
* @type Array
* @behavior PaperTabs
*/
@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
* @behavior PaperTabs
*/
@JsProperty void setSelectedValues(JsArray value);
/**
*
*
* JavaScript Info:
* @property observers
* @type Array
* @behavior PaperTabs
*/
@JsProperty JsArray getObservers();
/**
*
*
* JavaScript Info:
* @property observers
* @type Array
* @behavior PaperTabs
*/
@JsProperty void setObservers(JsArray 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
* @behavior NeonAnimatedPages
*/
@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
* @behavior NeonAnimatedPages
*/
@JsProperty void setActivateEvent(String value);
/**
* If you want to use the attribute value of an element for selected
instead of the index,
set this to the name of the attribute.
*
* JavaScript Info:
* @property attrForSelected
* @type string
* @behavior NeonAnimatedPages
*/
@JsProperty String getAttrForSelected();
/**
* If you want to use the attribute value of an element for selected
instead of the index,
set this to the name of the attribute.
*
* JavaScript Info:
* @property attrForSelected
* @type string
* @behavior NeonAnimatedPages
*/
@JsProperty void setAttrForSelected(String value);
/**
*
*
* JavaScript Info:
* @property excludedLocalNames
* @type Object
* @behavior NeonAnimatedPages
*/
@JsProperty JavaScriptObject getExcludedLocalNames();
/**
*
*
* JavaScript Info:
* @property excludedLocalNames
* @type Object
* @behavior NeonAnimatedPages
*/
@JsProperty void setExcludedLocalNames(JavaScriptObject value);
/**
* Returns the index of the given item.
*
* JavaScript Info:
* @method indexOf
* @param {Object} item
* @behavior NeonAnimatedPages
*/
void indexOf(JavaScriptObject item);
/**
* Returns an array of selectable items.
*
* JavaScript Info:
* @method items
* @behavior NeonAnimatedPages
*/
void items();
/**
* Selects the next item.
*
* JavaScript Info:
* @method selectNext
* @behavior NeonAnimatedPages
*/
void selectNext();
/**
* Selects the previous item.
*
* JavaScript Info:
* @method selectPrevious
* @behavior NeonAnimatedPages
*/
void selectPrevious();
/**
* This is a CSS selector sting. If this is set, only items that matches the CSS selector
are selectable.
*
* JavaScript Info:
* @property selectable
* @type string
* @behavior NeonAnimatedPages
*/
@JsProperty String getSelectable();
/**
* This is a CSS selector sting. If this is set, only items that matches the CSS selector
are selectable.
*
* JavaScript Info:
* @property selectable
* @type string
* @behavior NeonAnimatedPages
*/
@JsProperty void setSelectable(String value);
/**
* Gets or sets the selected element. The default is to use the index of the item.
*
* JavaScript Info:
* @property selected
* @type string
* @behavior NeonAnimatedPages
*/
@JsProperty String getSelected();
/**
* Gets or sets the selected element. The default is to use the index of the item.
*
* JavaScript Info:
* @property selected
* @type string
* @behavior NeonAnimatedPages
*/
@JsProperty void setSelected(String value);
/**
* The attribute to set on elements when selected.
*
* JavaScript Info:
* @property selectedAttribute
* @type string
* @behavior NeonAnimatedPages
*/
@JsProperty String getSelectedAttribute();
/**
* The attribute to set on elements when selected.
*
* JavaScript Info:
* @property selectedAttribute
* @type string
* @behavior NeonAnimatedPages
*/
@JsProperty void setSelectedAttribute(String value);
/**
* The class to set on elements when selected.
*
* JavaScript Info:
* @property selectedClass
* @type string
* @behavior NeonAnimatedPages
*/
@JsProperty String getSelectedClass();
/**
* The class to set on elements when selected.
*
* JavaScript Info:
* @property selectedClass
* @type string
* @behavior NeonAnimatedPages
*/
@JsProperty void setSelectedClass(String value);
/**
* Returns the currently selected item.
*
* JavaScript Info:
* @property selectedItem
* @type Object
* @behavior NeonAnimatedPages
*/
@JsProperty JavaScriptObject getSelectedItem();
/**
* Returns the currently selected item.
*
* JavaScript Info:
* @property selectedItem
* @type Object
* @behavior NeonAnimatedPages
*/
@JsProperty void setSelectedItem(JavaScriptObject value);
/**
*
*
* JavaScript Info:
* @method attached
* @behavior NeonAnimatedPages
*/
void attached();
/**
*
*
* JavaScript Info:
* @method detached
* @behavior NeonAnimatedPages
*/
void detached();
}