com.vaadin.polymer.paper.PaperRadioGroupElement Maven / Gradle / Ivy
/*
* This code was generated with Vaadin Web Component GWT API Generator,
* from paper-radio-group project by The Polymer Authors
* that is licensed with http://polymer.github.io/LICENSE.txt license.
*/
package com.vaadin.polymer.paper;
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;
/**
* Material design: Radio button
* paper-radio-group
allows user to select at most one radio button from a set.
Checking one radio button that belongs to a radio group unchecks any
previously checked radio button within the same group. Use
selected
to get or set the selected radio button.
* The inside the group must have the name
attribute
set.
* Example:
* <paper-radio-group selected="small">
* <paper-radio-button name="small">Small</paper-radio-button>
* <paper-radio-button name="medium">Medium</paper-radio-button>
* <paper-radio-button name="large">Large</paper-radio-button>
* </paper-radio-group>
*
*
*
Radio-button-groups can be made optional, and allow zero buttons to be selected:
* <paper-radio-group selected="small" allow-empty-selection>
* <paper-radio-button name="small">Small</paper-radio-button>
* <paper-radio-button name="medium">Medium</paper-radio-button>
* <paper-radio-button name="large">Large</paper-radio-button>
* </paper-radio-group>
*
*
*
See paper-radio-button for more
information about paper-radio-button
.
*
*
*
* Custom property
* Description
* Default
*
*
*
*
* --paper-radio-group-item-padding
* The padding of the item
* 12px
*
*
*
*/
@JsType(isNative=true)
public interface PaperRadioGroupElement extends HTMLElement {
@JsOverlay public static final String TAG = "paper-radio-group";
@JsOverlay public static final String SRC = "paper-radio-group/paper-radio-group.html";
/**
* 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);
/**
* Returns the currently selected item.
*
* JavaScript Info:
* @property selectedItem
* @type ?Object
* @behavior PaperTabs
*/
@JsProperty JavaScriptObject getSelectedItem();
/**
* Returns the currently selected item.
*
* JavaScript Info:
* @property selectedItem
* @type ?Object
* @behavior PaperTabs
*/
@JsProperty void setSelectedItem(JavaScriptObject value);
/**
*
*
* JavaScript Info:
* @property keyBindings
* @type Object
* @behavior PaperTabs
*/
@JsProperty JavaScriptObject getKeyBindings();
/**
*
*
* JavaScript Info:
* @property keyBindings
* @type Object
* @behavior PaperTabs
*/
@JsProperty void setKeyBindings(JavaScriptObject value);
/**
* Returns the currently focused item.
*
* JavaScript Info:
* @property focusedItem
* @type ?Object
* @behavior PaperTabs
*/
@JsProperty JavaScriptObject getFocusedItem();
/**
* Returns the currently focused item.
*
* JavaScript Info:
* @property focusedItem
* @type ?Object
* @behavior PaperTabs
*/
@JsProperty void setFocusedItem(JavaScriptObject 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);
/**
*
*
* JavaScript Info:
* @property disabled
* @type Boolean
* @behavior PaperTabs
*/
@JsProperty boolean getDisabled();
/**
*
*
* JavaScript Info:
* @property disabled
* @type Boolean
* @behavior PaperTabs
*/
@JsProperty void setDisabled(boolean value);
/**
* 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);
/**
* If true, radio-buttons can be deselected
*
* JavaScript Info:
* @property allowEmptySelection
* @type Boolean
*
*/
@JsProperty boolean getAllowEmptySelection();
/**
* If true, radio-buttons can be deselected
*
* JavaScript Info:
* @property allowEmptySelection
* @type Boolean
*
*/
@JsProperty void setAllowEmptySelection(boolean value);
/**
* Gets or sets the selected element. The default is to use the index of the item.
*
* JavaScript Info:
* @property selected
* @type (string|number)
* @behavior PaperTabs
*/
@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)
* @behavior PaperTabs
*/
@JsProperty void setSelected(Object 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);
/**
* The list of items from which a selection can be made.
*
* JavaScript Info:
* @property items
* @type Array
* @behavior PaperTabs
*/
@JsProperty JsArray getItems();
/**
* The list of items from which a selection can be made.
*
* JavaScript Info:
* @property items
* @type Array
* @behavior PaperTabs
*/
@JsProperty void setItems(JsArray value);
/**
* Overriden from Polymer.IronSelectableBehavior
*
* JavaScript Info:
* @property attrForSelected
* @type String
*
*/
@JsProperty String getAttrForSelected();
/**
* Overriden from Polymer.IronSelectableBehavior
*
* 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
* @behavior PaperTabs
*/
@JsProperty String getFallbackSelection();
/**
* Default fallback if the selection based on selected with attrForSelected
is not found.
*
* JavaScript Info:
* @property fallbackSelection
* @type String
* @behavior PaperTabs
*/
@JsProperty void setFallbackSelection(String value);
/**
* The attribute to set on elements when selected.
*
* JavaScript Info:
* @property selectedAttribute
* @type String
* @behavior PaperTabs
*/
@JsProperty String getSelectedAttribute();
/**
* The attribute to set on elements when selected.
*
* JavaScript Info:
* @property selectedAttribute
* @type String
* @behavior PaperTabs
*/
@JsProperty void setSelectedAttribute(String value);
/**
* The class to set on elements when selected.
*
* JavaScript Info:
* @property selectedClass
* @type String
* @behavior PaperTabs
*/
@JsProperty String getSelectedClass();
/**
* The class to set on elements when selected.
*
* JavaScript Info:
* @property selectedClass
* @type String
* @behavior PaperTabs
*/
@JsProperty void setSelectedClass(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
* @behavior PaperTabs
*/
@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 PaperTabs
*/
@JsProperty void setActivateEvent(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
* @behavior PaperTabs
*/
@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
* @behavior PaperTabs
*/
@JsProperty void setSelectable(String value);
/**
* The attribute to use on menu items to look up the item title. Typing the first
letter of an item when the menu is open focuses that item. If unset, textContent
will be used.
*
* JavaScript Info:
* @property attrForItemTitle
* @type String
* @behavior PaperTabs
*/
@JsProperty String getAttrForItemTitle();
/**
* The attribute to use on menu items to look up the item title. Typing the first
letter of an item when the menu is open focuses that item. If unset, textContent
will be used.
*
* JavaScript Info:
* @property attrForItemTitle
* @type String
* @behavior PaperTabs
*/
@JsProperty void setAttrForItemTitle(String value);
/**
* 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 multiChanged
* @param {} multi
* @behavior PaperTabs
*
*/
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
* @behavior PaperTabs
*
*/
void select(Object value);
/**
* Selects the item at the given index.
*
* JavaScript Info:
* @method selectIndex
* @param {} index
* @behavior PaperTabs
*
*/
void selectIndex(Object index);
/**
* When called, will remove all imperatively-added key bindings.
*
* JavaScript Info:
* @method removeOwnKeyBindings
* @behavior VaadinDatePicker
*
*/
void removeOwnKeyBindings();
/**
* 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
* @behavior PaperTabs
*
*/
void forceSynchronousItemUpdate();
/**
* Selects the next item.
*
* JavaScript Info:
* @method selectNext
* @behavior PaperTabs
*
*/
void selectNext();
/**
* Selects the previous item.
*
* JavaScript Info:
* @method selectPrevious
* @behavior PaperTabs
*
*/
void selectPrevious();
/**
* 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);
/**
* Returns the index of the given item.
*
* JavaScript Info:
* @method indexOf
* @param {Object} item
* @behavior PaperTabs
*
*/
void indexOf(JavaScriptObject item);
}