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

com.vaadin.polymer.iron.widget.IronSelector 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 iron-selector project by The Polymer Authors
 * that is licensed with http://polymer.github.io/LICENSE.txt license.
 */
package com.vaadin.polymer.iron.widget;

import com.vaadin.polymer.iron.element.*;

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

/**
 * 

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

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 * */ public String getActivateEvent(){ return getPolymerElement().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 * */ public void setActivateEvent(String value) { getPolymerElement().setActivateEvent(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 * */ public String getAttrForSelected(){ return getPolymerElement().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 * */ public void setAttrForSelected(String value) { getPolymerElement().setAttrForSelected(value); } /** * * * JavaScript Info: * @property excludedLocalNames * @type Object * */ public JavaScriptObject getExcludedLocalNames(){ return getPolymerElement().getExcludedLocalNames(); } /** * * * JavaScript Info: * @property excludedLocalNames * @type Object * */ public void setExcludedLocalNames(JavaScriptObject value) { getPolymerElement().setExcludedLocalNames(value); } /** *

Returns the index of the given item.

* * JavaScript Info: * @method indexOf * @param {Object} item * */ public void indexOf(JavaScriptObject item) { getPolymerElement().indexOf(item); } /** *

Returns an array of selectable items.

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

If true, multiple selections are allowed.

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

If true, multiple selections are allowed.

* * JavaScript Info: * @property multi * @type Boolean * */ public void setMulti(boolean value) { getPolymerElement().setMulti(value); } /** * * * JavaScript Info: * @method multiChanged * @param {} multi * */ public void multiChanged(JavaScriptObject multi) { getPolymerElement().multiChanged(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 * */ public void select(String value) { getPolymerElement().select(value); } /** *

Selects the next item.

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

Selects the previous item.

* * JavaScript Info: * @method selectPrevious * */ public void selectPrevious() { getPolymerElement().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 * */ public String getSelectable(){ return getPolymerElement().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 * */ public void setSelectable(String value) { getPolymerElement().setSelectable(value); } /** *

Gets or sets the selected element. The default is to use the index of the item.

* * JavaScript Info: * @property selected * @type string * */ public String getSelected(){ return getPolymerElement().getSelected(); } /** *

Gets or sets the selected element. The default is to use the index of the item.

* * JavaScript Info: * @property selected * @type string * */ public void setSelected(String value) { getPolymerElement().setSelected(value); } /** *

The attribute to set on elements when selected.

* * JavaScript Info: * @property selectedAttribute * @type string * */ public String getSelectedAttribute(){ return getPolymerElement().getSelectedAttribute(); } /** *

The attribute to set on elements when selected.

* * JavaScript Info: * @property selectedAttribute * @type string * */ public void setSelectedAttribute(String value) { getPolymerElement().setSelectedAttribute(value); } /** *

The class to set on elements when selected.

* * JavaScript Info: * @property selectedClass * @type string * */ public String getSelectedClass(){ return getPolymerElement().getSelectedClass(); } /** *

The class to set on elements when selected.

* * JavaScript Info: * @property selectedClass * @type string * */ public void setSelectedClass(String value) { getPolymerElement().setSelectedClass(value); } /** *

Returns the currently selected item.

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

Returns the currently selected item.

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

Returns the currently selected item.

* * JavaScript Info: * @attribute selected-item * */ public void setSelectedItem(String value) { getPolymerElement().setAttribute("selected-item", value); } /** *

Returns an array of currently selected items.

* * JavaScript Info: * @property selectedItems * @type Array * */ public JsArray getSelectedItems(){ return getPolymerElement().getSelectedItems(); } /** *

Returns an array of currently selected items.

* * JavaScript Info: * @property selectedItems * @type Array * */ public void setSelectedItems(JsArray value) { getPolymerElement().setSelectedItems(value); } /** *

Returns an array of currently selected items.

* * JavaScript Info: * @attribute selected-items * */ public void setSelectedItems(String value) { getPolymerElement().setAttribute("selected-items", value); } /** *

Gets or sets the selected elements. This is used instead of selected when multi
is true.

* * JavaScript Info: * @property selectedValues * @type Array * */ public JsArray getSelectedValues(){ return getPolymerElement().getSelectedValues(); } /** *

Gets or sets the selected elements. This is used instead of selected when multi
is true.

* * JavaScript Info: * @property selectedValues * @type Array * */ public void setSelectedValues(JsArray value) { getPolymerElement().setSelectedValues(value); } /** *

Gets or sets the selected elements. This is used instead of selected when multi
is true.

* * JavaScript Info: * @attribute selected-values * */ public void setSelectedValues(String value) { getPolymerElement().setAttribute("selected-values", value); } /** * * * JavaScript Info: * @method attached * */ public void attached() { getPolymerElement().attached(); } /** * * * JavaScript Info: * @method detached * */ public void detached() { getPolymerElement().detached(); } /** * * * JavaScript Info: * @property observers * @type Array * */ public JsArray getObservers(){ return getPolymerElement().getObservers(); } /** * * * JavaScript Info: * @property observers * @type Array * */ public void setObservers(JsArray value) { getPolymerElement().setObservers(value); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy