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

com.vaadin.polymer.paper.element.PaperDropdownMenuElement 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 paper-dropdown-menu project by The Polymer Authors
 * that is licensed with http://polymer.github.io/LICENSE.txt license.
 */
package com.vaadin.polymer.paper.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;

/**
 * 

paper-dropdown-menu is similar to a native browser select element.
paper-dropdown-menu works with selectable content. The currently selected
item is displayed in the control. If no item is selected, the label is
displayed instead.

*

The child element with the class dropdown-content will be used as the dropdown
menu. It could be a paper-menu or element that triggers iron-select when
selecting its children.

*

Example:

*
<paper-dropdown-menu label="Your favourite pastry">
 *   <paper-menu class="dropdown-content">
 *     <paper-item>Croissant</paper-item>
 *     <paper-item>Donut</paper-item>
 *     <paper-item>Financier</paper-item>
 *     <paper-item>Madeleine</paper-item>
 *   </paper-menu>
 * </paper-dropdown-menu>
 * 
 * 
 * 

This example renders a dropdown menu with 4 options.

*

Styling

*

The following custom properties and mixins are also available for styling:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Custom propertyDescriptionDefault
--paper-dropdown-menuA mixin that is applied to the element host{}
--paper-dropdown-menu-disabledA mixin that is applied to the element host when disabled{}
--paper-dropdown-menu-rippleA mixin that is applied to the internal ripple{}
--paper-dropdown-menu-buttonA mixin that is applied to the internal menu button{}
--paper-dropdown-menu-inputA mixin that is applied to the internal paper input{}
--paper-dropdown-menu-iconA mixin that is applied to the internal icon{}
*

You can also use any of the paper-input-container and paper-menu-button
style mixins and custom properties to style the internal input and menu button
respectively.

*/ @JsType public interface PaperDropdownMenuElement extends HTMLElement { public static final String TAG = "paper-dropdown-menu"; public static final String SRC = "paper-dropdown-menu/paper-dropdown-menu.html"; /** *

Set to true to always float the label. Bind this to the
<paper-input-container>‘s alwaysFloatLabel property.

* * JavaScript Info: * @property alwaysFloatLabel * @type Boolean * */ @JsProperty boolean getAlwaysFloatLabel(); /** *

Set to true to always float the label. Bind this to the
<paper-input-container>‘s alwaysFloatLabel property.

* * JavaScript Info: * @property alwaysFloatLabel * @type Boolean * */ @JsProperty void setAlwaysFloatLabel(boolean value); /** *

Hide the dropdown content.

* * JavaScript Info: * @method close * */ void close(); /** *

The content element that is contained by the dropdown menu, if any.

* * JavaScript Info: * @method contentElement * */ void contentElement(); /** * * * JavaScript Info: * @property keyBindings * @type Object * */ @JsProperty JavaScriptObject getKeyBindings(); /** * * * JavaScript Info: * @property keyBindings * @type Object * */ @JsProperty void setKeyBindings(JavaScriptObject value); /** *

The label for the dropdown.

* * JavaScript Info: * @property label * @type String * */ @JsProperty String getLabel(); /** *

The label for the dropdown.

* * JavaScript Info: * @property label * @type String * */ @JsProperty void setLabel(String value); /** *

Set to true to disable animations when opening and closing the
dropdown.

* * JavaScript Info: * @property noAnimations * @type Boolean * */ @JsProperty boolean getNoAnimations(); /** *

Set to true to disable animations when opening and closing the
dropdown.

* * JavaScript Info: * @property noAnimations * @type Boolean * */ @JsProperty void setNoAnimations(boolean value); /** *

Set to true to disable the floating label. Bind this to the
<paper-input-container>‘s noLabelFloat property.

* * JavaScript Info: * @property noLabelFloat * @type Boolean * */ @JsProperty boolean getNoLabelFloat(); /** *

Set to true to disable the floating label. Bind this to the
<paper-input-container>‘s noLabelFloat property.

* * JavaScript Info: * @property noLabelFloat * @type Boolean * */ @JsProperty void setNoLabelFloat(boolean value); /** *

Show the dropdown content.

* * JavaScript Info: * @method open * */ void open(); /** *

True if the dropdown is open. Otherwise, false.

* * JavaScript Info: * @property opened * @type Boolean * */ @JsProperty boolean getOpened(); /** *

True if the dropdown is open. Otherwise, false.

* * JavaScript Info: * @property opened * @type Boolean * */ @JsProperty void setOpened(boolean value); /** *

The placeholder for the dropdown.

* * JavaScript Info: * @property placeholder * @type String * */ @JsProperty String getPlaceholder(); /** *

The placeholder for the dropdown.

* * JavaScript Info: * @property placeholder * @type String * */ @JsProperty void setPlaceholder(String value); /** *

The last selected item. An item is selected if the dropdown menu has
a child with class dropdown-content, and that child triggers an
iron-select event with the selected item in the detail.

* * JavaScript Info: * @property selectedItem * @type Object * */ @JsProperty JavaScriptObject getSelectedItem(); /** *

The last selected item. An item is selected if the dropdown menu has
a child with class dropdown-content, and that child triggers an
iron-select event with the selected item in the detail.

* * JavaScript Info: * @property selectedItem * @type Object * */ @JsProperty void setSelectedItem(JavaScriptObject value); /** *

The derived “label” of the currently selected item. This value
is the label property on the selected item if set, or else the
trimmed text content of the selected item.

* * JavaScript Info: * @property selectedItemLabel * @type String * */ @JsProperty String getSelectedItemLabel(); /** *

The derived “label” of the currently selected item. This value
is the label property on the selected item if set, or else the
trimmed text content of the selected item.

* * JavaScript Info: * @property selectedItemLabel * @type String * */ @JsProperty void setSelectedItemLabel(String value); /** * * * JavaScript Info: * @method attached * */ void attached(); /** * * * JavaScript Info: * @property hostAttributes * @type Object * */ @JsProperty JavaScriptObject getHostAttributes(); /** * * * JavaScript Info: * @property hostAttributes * @type Object * */ @JsProperty void setHostAttributes(JavaScriptObject value); /** * * * JavaScript Info: * @property listeners * @type Object * */ @JsProperty JavaScriptObject getListeners(); /** * * * JavaScript Info: * @property listeners * @type Object * */ @JsProperty void setListeners(JavaScriptObject value); /** *

If true, the user cannot interact with this element.

* * JavaScript Info: * @property disabled * @type Boolean * @behavior PaperTab */ @JsProperty boolean getDisabled(); /** *

If true, the user cannot interact with this element.

* * JavaScript Info: * @property disabled * @type Boolean * @behavior PaperTab */ @JsProperty void setDisabled(boolean value); /** *

If true, the element currently has focus.

* * JavaScript Info: * @property focused * @type Boolean * @behavior PaperTab */ @JsProperty boolean getFocused(); /** *

If true, the element currently has focus.

* * JavaScript Info: * @property focused * @type Boolean * @behavior PaperTab */ @JsProperty void setFocused(boolean value); /** * * * JavaScript Info: * @property observers * @type Array * @behavior PaperTab */ @JsProperty JsArray getObservers(); /** * * * JavaScript Info: * @property observers * @type Array * @behavior PaperTab */ @JsProperty void setObservers(JsArray value); /** *

If true, the button is a toggle and is currently in the active state.

* * JavaScript Info: * @property active * @type Boolean * @behavior PaperTab */ @JsProperty boolean getActive(); /** *

If true, the button is a toggle and is currently in the active state.

* * JavaScript Info: * @property active * @type Boolean * @behavior PaperTab */ @JsProperty void setActive(boolean value); /** *

The aria attribute to be set if the button is a toggle and in the
active state.

* * JavaScript Info: * @property ariaActiveAttribute * @type String * @behavior PaperTab */ @JsProperty String getAriaActiveAttribute(); /** *

The aria attribute to be set if the button is a toggle and in the
active state.

* * JavaScript Info: * @property ariaActiveAttribute * @type String * @behavior PaperTab */ @JsProperty void setAriaActiveAttribute(String value); /** *

True if the element is currently being pressed by a “pointer,” which
is loosely defined as mouse or touch input (but specifically excluding
keyboard input).

* * JavaScript Info: * @property pointerDown * @type Boolean * @behavior PaperTab */ @JsProperty boolean getPointerDown(); /** *

True if the element is currently being pressed by a “pointer,” which
is loosely defined as mouse or touch input (but specifically excluding
keyboard input).

* * JavaScript Info: * @property pointerDown * @type Boolean * @behavior PaperTab */ @JsProperty void setPointerDown(boolean value); /** *

If true, the user is currently holding down the button.

* * JavaScript Info: * @property pressed * @type Boolean * @behavior PaperTab */ @JsProperty boolean getPressed(); /** *

If true, the user is currently holding down the button.

* * JavaScript Info: * @property pressed * @type Boolean * @behavior PaperTab */ @JsProperty void setPressed(boolean value); /** *

True if the input device that caused the element to receive focus
was a keyboard.

* * JavaScript Info: * @property receivedFocusFromKeyboard * @type Boolean * @behavior PaperTab */ @JsProperty boolean getReceivedFocusFromKeyboard(); /** *

True if the input device that caused the element to receive focus
was a keyboard.

* * JavaScript Info: * @property receivedFocusFromKeyboard * @type Boolean * @behavior PaperTab */ @JsProperty void setReceivedFocusFromKeyboard(boolean value); /** *

If true, the button toggles the active state with each tap or press
of the spacebar.

* * JavaScript Info: * @property toggles * @type Boolean * @behavior PaperTab */ @JsProperty boolean getToggles(); /** *

If true, the button toggles the active state with each tap or press
of the spacebar.

* * JavaScript Info: * @property toggles * @type Boolean * @behavior PaperTab */ @JsProperty void setToggles(boolean 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 PaperTab */ void addOwnKeyBinding(JavaScriptObject eventString, JavaScriptObject handlerName); /** *

The HTMLElement that will be firing relevant KeyboardEvents.

* * JavaScript Info: * @property keyEventTarget * @type Object * @behavior PaperTab */ @JsProperty JavaScriptObject getKeyEventTarget(); /** *

The HTMLElement that will be firing relevant KeyboardEvents.

* * JavaScript Info: * @property keyEventTarget * @type Object * @behavior PaperTab */ @JsProperty void setKeyEventTarget(JavaScriptObject value); /** * * * JavaScript Info: * @method keyboardEventMatchesKeys * @param {} event * @param {} eventString * @behavior PaperTab */ void keyboardEventMatchesKeys(JavaScriptObject event, JavaScriptObject eventString); /** *

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

* * JavaScript Info: * @method removeOwnKeyBindings * @behavior PaperTab */ void removeOwnKeyBindings(); /** * * * JavaScript Info: * @method detached * @behavior PaperTab */ void detached(); /** * * * JavaScript Info: * @method registered * @behavior PaperTab */ void registered(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy