com.vaadin.polymer.iron.element.IronDropdownElement Maven / Gradle / Ivy
/*
* This code was generated with Vaadin Web Component GWT API Generator,
* from iron-dropdown project by The Polymer Authors
* that is licensed with http://polymer.github.io/LICENSE.txt license.
*/
package com.vaadin.polymer.iron.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;
/**
* <iron-dropdown>
is a generalized element that is useful when you have
hidden content (.dropdown-content
) that is revealed due to some change in
state that should cause it to do so.
* Note that this is a low-level element intended to be used as part of other
composite elements that cause dropdowns to be revealed.
* Examples of elements that might be implemented using an iron-dropdown
include comboboxes, menubuttons, selects. The list goes on.
* The <iron-dropdown>
element exposes attributes that allow the position
of the .dropdown-content
relative to the .dropdown-trigger
to be
configured.
* <iron-dropdown horizontal-align="right" vertical-align="top">
* <div class="dropdown-content">Hello!</div>
* </iron-dropdown>
*
*
*
In the above example, the <div>
with class .dropdown-content
will be
hidden until the dropdown element has opened
set to true, or when the open
method is called on the element.
*/
@JsType
public interface IronDropdownElement extends HTMLElement {
public static final String TAG = "iron-dropdown";
public static final String SRC = "iron-dropdown/iron-dropdown.html";
/**
* 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);
/**
* The element that is contained by the dropdown, if any.
*
* JavaScript Info:
* @method containedElement
*
*/
void containedElement();
/**
* If provided, this will be the element that will be focused when
the dropdown opens.
*
* JavaScript Info:
* @property focusTarget
* @type Object
*
*/
@JsProperty JavaScriptObject getFocusTarget();
/**
* If provided, this will be the element that will be focused when
the dropdown opens.
*
* JavaScript Info:
* @property focusTarget
* @type Object
*
*/
@JsProperty void setFocusTarget(JavaScriptObject value);
/**
* The orientation against which to align the dropdown content
horizontally relative to the dropdown trigger.
*
* JavaScript Info:
* @property horizontalAlign
* @type String
*
*/
@JsProperty String getHorizontalAlign();
/**
* The orientation against which to align the dropdown content
horizontally relative to the dropdown trigger.
*
* JavaScript Info:
* @property horizontalAlign
* @type String
*
*/
@JsProperty void setHorizontalAlign(String 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);
/**
* 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);
/**
* 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);
/**
* The element that should be used to position the dropdown when
it is opened.
*
* JavaScript Info:
* @property positionTarget
* @type Object
*
*/
@JsProperty JavaScriptObject getPositionTarget();
/**
* The element that should be used to position the dropdown when
it is opened.
*
* JavaScript Info:
* @property positionTarget
* @type Object
*
*/
@JsProperty void setPositionTarget(JavaScriptObject value);
/**
* The orientation against which to align the dropdown content
vertically relative to the dropdown trigger.
*
* JavaScript Info:
* @property verticalAlign
* @type String
*
*/
@JsProperty String getVerticalAlign();
/**
* The orientation against which to align the dropdown content
vertically relative to the dropdown trigger.
*
* JavaScript Info:
* @property verticalAlign
* @type String
*
*/
@JsProperty void setVerticalAlign(String 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);
/**
*
*
* JavaScript Info:
* @method attached
*
*/
void attached();
/**
*
*
* JavaScript Info:
* @property listeners
* @type Object
*
*/
@JsProperty JavaScriptObject getListeners();
/**
*
*
* JavaScript Info:
* @property listeners
* @type Object
*
*/
@JsProperty void setListeners(JavaScriptObject value);
/**
*
*
* JavaScript Info:
* @property observers
* @type Array
*
*/
@JsProperty JsArray getObservers();
/**
*
*
* JavaScript Info:
* @property observers
* @type Array
*
*/
@JsProperty void setObservers(JsArray 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);
/**
* 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);
/**
*
*
* JavaScript Info:
* @property keyBindings
* @type Object
* @behavior PaperTab
*/
@JsProperty JavaScriptObject getKeyBindings();
/**
*
*
* JavaScript Info:
* @property keyBindings
* @type Object
* @behavior PaperTab
*/
@JsProperty void setKeyBindings(JavaScriptObject value);
/**
* 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();
/**
* The backdrop element.
*
* JavaScript Info:
* @method backdropElement
* @behavior PaperDialog
*/
void backdropElement();
/**
* Cancels the overlay.
*
* JavaScript Info:
* @method cancel
* @behavior PaperDialog
*/
void cancel();
/**
* True if the overlay was canceled when it was last closed.
*
* JavaScript Info:
* @property canceled
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty boolean getCanceled();
/**
* True if the overlay was canceled when it was last closed.
*
* JavaScript Info:
* @property canceled
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty void setCanceled(boolean value);
/**
* Close the overlay.
*
* JavaScript Info:
* @method close
* @behavior PaperDialog
*/
void close();
/**
* Returns the reason this dialog was last closed.
*
* JavaScript Info:
* @property closingReason
* @type Object
* @behavior PaperDialog
*/
@JsProperty JavaScriptObject getClosingReason();
/**
* Returns the reason this dialog was last closed.
*
* JavaScript Info:
* @property closingReason
* @type Object
* @behavior PaperDialog
*/
@JsProperty void setClosingReason(JavaScriptObject value);
/**
* Set to true to disable auto-focusing the overlay or child nodes with
the autofocus
attribute` when the overlay is opened.
*
* JavaScript Info:
* @property noAutoFocus
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty boolean getNoAutoFocus();
/**
* Set to true to disable auto-focusing the overlay or child nodes with
the autofocus
attribute` when the overlay is opened.
*
* JavaScript Info:
* @property noAutoFocus
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty void setNoAutoFocus(boolean value);
/**
* Set to true to disable canceling the overlay with the ESC key.
*
* JavaScript Info:
* @property noCancelOnEscKey
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty boolean getNoCancelOnEscKey();
/**
* Set to true to disable canceling the overlay with the ESC key.
*
* JavaScript Info:
* @property noCancelOnEscKey
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty void setNoCancelOnEscKey(boolean value);
/**
* Set to true to disable canceling the overlay by clicking outside it.
*
* JavaScript Info:
* @property noCancelOnOutsideClick
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty boolean getNoCancelOnOutsideClick();
/**
* Set to true to disable canceling the overlay by clicking outside it.
*
* JavaScript Info:
* @property noCancelOnOutsideClick
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty void setNoCancelOnOutsideClick(boolean value);
/**
* Open the overlay.
*
* JavaScript Info:
* @method open
* @behavior PaperDialog
*/
void open();
/**
* True if the overlay is currently displayed.
*
* JavaScript Info:
* @property opened
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty boolean getOpened();
/**
* True if the overlay is currently displayed.
*
* JavaScript Info:
* @property opened
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty void setOpened(boolean value);
/**
* Toggle the opened state of the overlay.
*
* JavaScript Info:
* @method toggle
* @behavior PaperDialog
*/
void toggle();
/**
* Set to true to display a backdrop behind the overlay.
*
* JavaScript Info:
* @property withBackdrop
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty boolean getWithBackdrop();
/**
* Set to true to display a backdrop behind the overlay.
*
* JavaScript Info:
* @property withBackdrop
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty void setWithBackdrop(boolean value);
/**
* Set to true to auto-fit on attach.
*
* JavaScript Info:
* @property autoFitOnAttach
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty boolean getAutoFitOnAttach();
/**
* Set to true to auto-fit on attach.
*
* JavaScript Info:
* @property autoFitOnAttach
* @type Boolean
* @behavior PaperDialog
*/
@JsProperty void setAutoFitOnAttach(boolean value);
/**
* Centers horizontally and vertically if not already positioned. This also sets
position:fixed
.
*
* JavaScript Info:
* @method center
* @behavior PaperDialog
*/
void center();
/**
* Constrains the size of the element to the window or fitInfo
by setting max-height
and/or max-width
.
*
* JavaScript Info:
* @method constrain
* @behavior PaperDialog
*/
void constrain();
/**
* Fits and optionally centers the element into the window, or fitInfo
if specified.
*
* JavaScript Info:
* @method fit
* @behavior PaperDialog
*/
void fit();
/**
* The element to fit this
into.
*
* JavaScript Info:
* @property fitInto
* @type Object
* @behavior PaperDialog
*/
@JsProperty JavaScriptObject getFitInto();
/**
* The element to fit this
into.
*
* JavaScript Info:
* @property fitInto
* @type Object
* @behavior PaperDialog
*/
@JsProperty void setFitInto(JavaScriptObject value);
/**
* Equivalent to calling resetFit()
and fit()
. Useful to call this after the element,
the window, or the fitInfo
element has been resized.
*
* JavaScript Info:
* @method refit
* @behavior PaperDialog
*/
void refit();
/**
* Resets the target element’s position and size constraints, and clear
the memoized data.
*
* JavaScript Info:
* @method resetFit
* @behavior PaperDialog
*/
void resetFit();
/**
* The element that will receive a max-height
/width
. By default it is the same as this
,
but it can be set to a child element. This is useful, for example, for implementing a
scrolling region inside the element.
*
* JavaScript Info:
* @property sizingTarget
* @type !Element
* @behavior PaperDialog
*/
@JsProperty JavaScriptObject getSizingTarget();
/**
* The element that will receive a max-height
/width
. By default it is the same as this
,
but it can be set to a child element. This is useful, for example, for implementing a
scrolling region inside the element.
*
* JavaScript Info:
* @property sizingTarget
* @type !Element
* @behavior PaperDialog
*/
@JsProperty void setSizingTarget(JavaScriptObject value);
/**
* Used to assign the closest resizable ancestor to this resizable
if the ancestor detects a request for notifications.
*
* JavaScript Info:
* @method assignParentResizable
* @param {} parentResizable
* @behavior PaperTabs
*/
void assignParentResizable(JavaScriptObject parentResizable);
/**
* Can be called to manually notify a resizable and its descendant
resizables of a resize change.
*
* JavaScript Info:
* @method notifyResize
* @behavior PaperTabs
*/
void notifyResize();
/**
* This method can be overridden to filter nested elements that should or
should not be notified by the current element. Return true if an element
should be notified, or false if it should not be notified.
*
* JavaScript Info:
* @method resizerShouldNotify
* @param {HTMLElement} element
* @behavior PaperTabs
*/
void resizerShouldNotify(JavaScriptObject element);
/**
* Used to remove a resizable descendant from the list of descendants
that should be notified of a resize change.
*
* JavaScript Info:
* @method stopResizeNotificationsFor
* @param {} target
* @behavior PaperTabs
*/
void stopResizeNotificationsFor(JavaScriptObject target);
/**
* Animation configuration. See README for more info.
*
* JavaScript Info:
* @property animationConfig
* @type Object
* @behavior NeonAnimatedPages
*/
@JsProperty JavaScriptObject getAnimationConfig();
/**
* Animation configuration. See README for more info.
*
* JavaScript Info:
* @property animationConfig
* @type Object
* @behavior NeonAnimatedPages
*/
@JsProperty void setAnimationConfig(JavaScriptObject value);
/**
* Cancels the currently running animation.
*
* JavaScript Info:
* @method cancelAnimation
* @behavior NeonAnimatedPages
*/
void cancelAnimation();
/**
* Convenience property for setting an ‘entry’ animation. Do not set animationConfig.entry
manually if using this. The animated node is set to this
if using this property.
*
* JavaScript Info:
* @property entryAnimation
* @type String
* @behavior NeonAnimatedPages
*/
@JsProperty String getEntryAnimation();
/**
* Convenience property for setting an ‘entry’ animation. Do not set animationConfig.entry
manually if using this. The animated node is set to this
if using this property.
*
* JavaScript Info:
* @property entryAnimation
* @type String
* @behavior NeonAnimatedPages
*/
@JsProperty void setEntryAnimation(String value);
/**
* Convenience property for setting an ‘exit’ animation. Do not set animationConfig.exit
manually if using this. The animated node is set to this
if using this property.
*
* JavaScript Info:
* @property exitAnimation
* @type String
* @behavior NeonAnimatedPages
*/
@JsProperty String getExitAnimation();
/**
* Convenience property for setting an ‘exit’ animation. Do not set animationConfig.exit
manually if using this. The animated node is set to this
if using this property.
*
* JavaScript Info:
* @property exitAnimation
* @type String
* @behavior NeonAnimatedPages
*/
@JsProperty void setExitAnimation(String value);
/**
* An element implementing Polymer.NeonAnimationRunnerBehavior
calls this method to configure
an animation with an optional type. Elements implementing Polymer.NeonAnimatableBehavior
should define the property animationConfig
, which is either a configuration object
or a map of animation type to array of configuration objects.
*
* JavaScript Info:
* @method getAnimationConfig
* @param {} type
* @behavior NeonAnimatedPages
*/
void getAnimationConfig(JavaScriptObject type);
/**
* Plays an animation with an optional type
.
*
* JavaScript Info:
* @method playAnimation
* @param {string=} type
* @param {!Object=} cookie
* @behavior NeonAnimatedPages
*/
void playAnimation(JavaScriptObject type, JavaScriptObject cookie);
}