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

com.vaadin.polymer.paper.PaperMenuButtonElement Maven / Gradle / Ivy

The newest version!
/*
 * This code was generated with Vaadin Web Component GWT API Generator, 
 * from paper-menu-button 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: Dropdown buttons

*

paper-menu-button allows one to compose a designated “trigger” element with
another element that represents “content”, to create a dropdown menu that
displays the “content” when the “trigger” is clicked.

*

The child element with the class dropdown-trigger will be used as the
“trigger” element. The child element with the class dropdown-content will be
used as the “content” element.

*

The paper-menu-button is sensitive to its content’s iron-select events. If
the “content” element triggers an iron-select event, the paper-menu-button
will close automatically.

*

Example:

*
<paper-menu-button>
 *   <paper-icon-button icon="menu" class="dropdown-trigger"></paper-icon-button>
 *   <paper-menu class="dropdown-content">
 *     <paper-item>Share</paper-item>
 *     <paper-item>Settings</paper-item>
 *     <paper-item>Help</paper-item>
 *   </paper-menu>
 * </paper-menu-button>
 * 
 * 
 * 

Styling

*

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

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Custom propertyDescriptionDefault
--paper-menu-button-dropdown-backgroundBackground color of the paper-menu-button dropdown--primary-background-color
--paper-menu-buttonMixin applied to the paper-menu-button{}
--paper-menu-button-disabledMixin applied to the paper-menu-button when disabled{}
--paper-menu-button-dropdownMixin applied to the paper-menu-button dropdown{}
--paper-menu-button-contentMixin applied to the paper-menu-button content{}
*/ @JsType(isNative=true) public interface PaperMenuButtonElement extends HTMLElement { @JsOverlay public static final String TAG = "paper-menu-button"; @JsOverlay public static final String SRC = "paper-menu-button/paper-menu-button.html"; /** *

By default, the dropdown will constrain scrolling on the page
to itself when opened.
Set to true in order to prevent scroll from being constrained
to the dropdown when it opens.

* * JavaScript Info: * @property allowOutsideScroll * @type Boolean * */ @JsProperty boolean getAllowOutsideScroll(); /** *

By default, the dropdown will constrain scrolling on the page
to itself when opened.
Set to true in order to prevent scroll from being constrained
to the dropdown when it opens.

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

A pixel value that will be added to the position calculated for the
given horizontalAlign. Use a negative value to offset to the
left, or a positive value to offset to the right.

* * JavaScript Info: * @property horizontalOffset * @type Number * */ @JsProperty double getHorizontalOffset(); /** *

A pixel value that will be added to the position calculated for the
given horizontalAlign. Use a negative value to offset to the
left, or a positive value to offset to the right.

* * JavaScript Info: * @property horizontalOffset * @type Number * */ @JsProperty void setHorizontalOffset(double value); /** *

An animation config. If provided, this will be used to animate the
opening of the dropdown.

* * JavaScript Info: * @property openAnimationConfig * @type Object * */ @JsProperty JavaScriptObject getOpenAnimationConfig(); /** *

An animation config. If provided, this will be used to animate the
opening of the dropdown.

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

An animation config. If provided, this will be used to animate the
closing of the dropdown.

* * JavaScript Info: * @property closeAnimationConfig * @type Object * */ @JsProperty JavaScriptObject getCloseAnimationConfig(); /** *

An animation config. If provided, this will be used to animate the
closing of the dropdown.

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

To be used to express what combination of keys will trigger the relative
callback. e.g. keyBindings: { 'esc': '_onEscPressed'}

* * JavaScript Info: * @property keyBindings * @type !Object * @behavior VaadinDatePicker */ @JsProperty JavaScriptObject getKeyBindings(); /** *

To be used to express what combination of keys will trigger the relative
callback. e.g. keyBindings: { 'esc': '_onEscPressed'}

* * JavaScript Info: * @property keyBindings * @type !Object * @behavior VaadinDatePicker */ @JsProperty void setKeyBindings(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); /** *

A pixel value that will be added to the position calculated for the
given verticalAlign. Use a negative value to offset towards the
top, or a positive value to offset towards the bottom.

* * JavaScript Info: * @property verticalOffset * @type Number * */ @JsProperty double getVerticalOffset(); /** *

A pixel value that will be added to the position calculated for the
given verticalAlign. Use a negative value to offset towards the
top, or a positive value to offset towards the bottom.

* * JavaScript Info: * @property verticalOffset * @type Number * */ @JsProperty void setVerticalOffset(double value); /** *

Set to true to disable automatically closing the dropdown after
a selection has been made.

* * JavaScript Info: * @property ignoreSelect * @type Boolean * */ @JsProperty boolean getIgnoreSelect(); /** *

Set to true to disable automatically closing the dropdown after
a selection has been made.

* * JavaScript Info: * @property ignoreSelect * @type Boolean * */ @JsProperty void setIgnoreSelect(boolean 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); /** *

If true, the dropdown will be positioned so that it doesn’t overlap
the button.

* * JavaScript Info: * @property noOverlap * @type Boolean * */ @JsProperty boolean getNoOverlap(); /** *

If true, the dropdown will be positioned so that it doesn’t overlap
the button.

* * JavaScript Info: * @property noOverlap * @type Boolean * */ @JsProperty void setNoOverlap(boolean 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 horizontalAlign and verticalAlign properties will
be considered preferences instead of strict requirements when
positioning the dropdown and may be changed if doing so reduces
the area of the dropdown falling outside of fitInto.

* * JavaScript Info: * @property dynamicAlign * @type Boolean * */ @JsProperty boolean getDynamicAlign(); /** *

If true, the horizontalAlign and verticalAlign properties will
be considered preferences instead of strict requirements when
positioning the dropdown and may be changed if doing so reduces
the area of the dropdown falling outside of fitInto.

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

True if the content is currently displayed.

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

True if the content is currently displayed.

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

Whether focus should be restored to the button when the menu closes.

* * JavaScript Info: * @property restoreFocusOnClose * @type Boolean * */ @JsProperty boolean getRestoreFocusOnClose(); /** *

Whether focus should be restored to the button when the menu closes.

* * JavaScript Info: * @property restoreFocusOnClose * @type Boolean * */ @JsProperty void setRestoreFocusOnClose(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); /** *

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

Set to true to enable automatically closing the dropdown after an
item has been activated, even if the selection did not change.

* * JavaScript Info: * @property closeOnActivate * @type Boolean * */ @JsProperty boolean getCloseOnActivate(); /** *

Set to true to enable automatically closing the dropdown after an
item has been activated, even if the selection did not change.

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

The orientation against which to align the menu dropdown
vertically relative to the dropdown trigger.

* * JavaScript Info: * @property verticalAlign * @type String * */ @JsProperty String getVerticalAlign(); /** *

The orientation against which to align the menu dropdown
vertically relative to the dropdown trigger.

* * JavaScript Info: * @property verticalAlign * @type String * */ @JsProperty void setVerticalAlign(String value); /** *

The orientation against which to align the menu dropdown
horizontally relative to the dropdown trigger.

* * JavaScript Info: * @property horizontalAlign * @type String * */ @JsProperty String getHorizontalAlign(); /** *

The orientation against which to align the menu dropdown
horizontally relative to the dropdown trigger.

* * JavaScript Info: * @property horizontalAlign * @type String * */ @JsProperty void setHorizontalAlign(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); /** *

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

* * JavaScript Info: * @method removeOwnKeyBindings * @behavior VaadinDatePicker * */ void removeOwnKeyBindings(); /** *

Make the dropdown content appear as an overlay positioned relative
to the dropdown trigger.

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

Hide the dropdown content.

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

Toggles the drowpdown content between opened and closed.

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy