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

com.vaadin.polymer.paper.widget.PaperRadioGroup Maven / Gradle / Ivy

The newest version!
/*
 * 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.widget;

import com.vaadin.polymer.paper.*;

import com.vaadin.polymer.paper.widget.event.PaperRadioGroupChangedEvent;
import com.vaadin.polymer.paper.widget.event.PaperRadioGroupChangedEventHandler;

import com.vaadin.polymer.iron.widget.event.IronActivateEvent;
import com.vaadin.polymer.iron.widget.event.IronActivateEventHandler;

import com.vaadin.polymer.iron.widget.event.IronDeselectEvent;
import com.vaadin.polymer.iron.widget.event.IronDeselectEventHandler;

import com.vaadin.polymer.iron.widget.event.IronItemsChangedEvent;
import com.vaadin.polymer.iron.widget.event.IronItemsChangedEventHandler;

import com.vaadin.polymer.iron.widget.event.IronSelectEvent;
import com.vaadin.polymer.iron.widget.event.IronSelectEventHandler;

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;

/**
 * 

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

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); } /** *

Returns the currently selected item.

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

Returns the currently selected item.

* * JavaScript Info: * @property selectedItem * @type ?Object * @behavior PaperTabs */ public void setSelectedItem(JavaScriptObject value) { getPolymerElement().setSelectedItem(value); } /** * * * JavaScript Info: * @property keyBindings * @type Object * @behavior PaperTabs */ public JavaScriptObject getKeyBindings() { return getPolymerElement().getKeyBindings(); } /** * * * JavaScript Info: * @property keyBindings * @type Object * @behavior PaperTabs */ public void setKeyBindings(JavaScriptObject value) { getPolymerElement().setKeyBindings(value); } /** *

Returns the currently focused item.

* * JavaScript Info: * @property focusedItem * @type ?Object * @behavior PaperTabs */ public JavaScriptObject getFocusedItem() { return getPolymerElement().getFocusedItem(); } /** *

Returns the currently focused item.

* * JavaScript Info: * @property focusedItem * @type ?Object * @behavior PaperTabs */ public void setFocusedItem(JavaScriptObject value) { getPolymerElement().setFocusedItem(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); } /** * * * JavaScript Info: * @property disabled * @type Boolean * @behavior PaperTabs */ public boolean getDisabled() { return getPolymerElement().getDisabled(); } /** * * * JavaScript Info: * @property disabled * @type Boolean * @behavior PaperTabs */ public void setDisabled(boolean value) { getPolymerElement().setDisabled(value); } /** *

If true, multiple selections are allowed.

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

If true, multiple selections are allowed.

* * JavaScript Info: * @property multi * @type Boolean * @behavior PaperTabs */ public void setMulti(boolean value) { getPolymerElement().setMulti(value); } /** *

If true, radio-buttons can be deselected

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

If true, radio-buttons can be deselected

* * JavaScript Info: * @property allowEmptySelection * @type Boolean * */ public void setAllowEmptySelection(boolean value) { getPolymerElement().setAllowEmptySelection(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 */ public Object 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|number) * @behavior PaperTabs */ public void setSelected(Object value) { getPolymerElement().setSelected(value); } /** *

Returns an array of currently selected items.

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

Returns an array of currently selected items.

* * JavaScript Info: * @property selectedItems * @type Array * @behavior PaperTabs */ public void setSelectedItems(JsArray value) { getPolymerElement().setSelectedItems(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 */ 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 * @behavior PaperTabs */ public void setSelectedValues(JsArray value) { getPolymerElement().setSelectedValues(value); } /** *

The list of items from which a selection can be made.

* * JavaScript Info: * @property items * @type Array * @behavior PaperTabs */ public JsArray getItems() { return getPolymerElement().getItems(); } /** *

The list of items from which a selection can be made.

* * JavaScript Info: * @property items * @type Array * @behavior PaperTabs */ public void setItems(JsArray value) { getPolymerElement().setItems(value); } /** *

Overriden from Polymer.IronSelectableBehavior

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

Overriden from Polymer.IronSelectableBehavior

* * JavaScript Info: * @property attrForSelected * @type String * */ public void setAttrForSelected(String value) { getPolymerElement().setAttrForSelected(value); } /** *

Default fallback if the selection based on selected with attrForSelected
is not found.

* * JavaScript Info: * @property fallbackSelection * @type String * @behavior PaperTabs */ public String getFallbackSelection() { return getPolymerElement().getFallbackSelection(); } /** *

Default fallback if the selection based on selected with attrForSelected
is not found.

* * JavaScript Info: * @property fallbackSelection * @type String * @behavior PaperTabs */ public void setFallbackSelection(String value) { getPolymerElement().setFallbackSelection(value); } /** *

The attribute to set on elements when selected.

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

The attribute to set on elements when selected.

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

The class to set on elements when selected.

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

The class to set on elements when selected.

* * JavaScript Info: * @property selectedClass * @type String * @behavior PaperTabs */ public void setSelectedClass(String value) { getPolymerElement().setSelectedClass(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 */ 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 * @behavior PaperTabs */ public void setActivateEvent(String value) { getPolymerElement().setActivateEvent(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 */ public String getSelectable() { return getPolymerElement().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 */ public void setSelectable(String value) { getPolymerElement().setSelectable(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 */ public String getAttrForItemTitle() { return getPolymerElement().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 */ public void setAttrForItemTitle(String value) { getPolymerElement().setAttrForItemTitle(value); } // Needed in UIBinder /** *

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

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

Returns an array of currently selected items.

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

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

* * JavaScript Info: * @attribute selected-values * @behavior PaperTabs */ public void setSelectedValues(String value) { Polymer.property(this.getPolymerElement(), "selectedValues", value); } // Needed in UIBinder /** *

The list of items from which a selection can be made.

* * JavaScript Info: * @attribute items * @behavior PaperTabs */ public void setItems(String value) { Polymer.property(this.getPolymerElement(), "items", 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 the currently focused item.

* * JavaScript Info: * @attribute focused-item * @behavior PaperTabs */ public void setFocusedItem(String value) { Polymer.property(this.getPolymerElement(), "focusedItem", value); } // Needed in UIBinder /** *

Returns the currently selected item.

* * JavaScript Info: * @attribute selected-item * @behavior PaperTabs */ public void setSelectedItem(String value) { Polymer.property(this.getPolymerElement(), "selectedItem", 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); } /** *

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 multiChanged * @param {} multi * @behavior PaperTabs * */ public void multiChanged(Object 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|number)} value * @behavior PaperTabs * */ public void select(Object value) { getPolymerElement().select(value); } /** *

Selects the item at the given index.

* * JavaScript Info: * @method selectIndex * @param {} index * @behavior PaperTabs * */ public void selectIndex(Object index) { getPolymerElement().selectIndex(index); } /** *

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

* * JavaScript Info: * @method removeOwnKeyBindings * @behavior VaadinDatePicker * */ public void removeOwnKeyBindings() { getPolymerElement().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 * */ public void forceSynchronousItemUpdate() { getPolymerElement().forceSynchronousItemUpdate(); } /** *

Selects the next item.

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

Selects the previous item.

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

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); } /** *

Returns the index of the given item.

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

Fired when the radio group selection changes.

* * JavaScript Info: * @event paper-radio-group-changed */ public HandlerRegistration addPaperRadioGroupChangedHandler(PaperRadioGroupChangedEventHandler handler) { return addDomHandler(handler, PaperRadioGroupChangedEvent.TYPE); } /** *

Fired when iron-selector is activated (selected or deselected).
It is fired before the selected items are changed.
Cancel the event to abort selection.

* * JavaScript Info: * @event iron-activate */ public HandlerRegistration addIronActivateHandler(IronActivateEventHandler handler) { return addDomHandler(handler, IronActivateEvent.TYPE); } /** *

Fired when an item is deselected

* * JavaScript Info: * @event iron-deselect */ public HandlerRegistration addIronDeselectHandler(IronDeselectEventHandler handler) { return addDomHandler(handler, IronDeselectEvent.TYPE); } /** *

Fired when the list of selectable items changes (e.g., items are
added or removed). The detail of the event is a mutation record that
describes what changed.

* * JavaScript Info: * @event iron-items-changed */ public HandlerRegistration addIronItemsChangedHandler(IronItemsChangedEventHandler handler) { return addDomHandler(handler, IronItemsChangedEvent.TYPE); } /** *

Fired when an item is selected

* * JavaScript Info: * @event iron-select */ public HandlerRegistration addIronSelectHandler(IronSelectEventHandler handler) { return addDomHandler(handler, IronSelectEvent.TYPE); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy