com.vaadin.polymer.neon.widget.NeonAnimatedPages Maven / Gradle / Ivy
/*
* This code was generated with Vaadin Web Component GWT API Generator,
* from neon-animation project by The Polymer Authors
* that is licensed with http://polymer.github.io/LICENSE.txt license.
*/
package com.vaadin.polymer.neon.widget;
import com.vaadin.polymer.neon.*;
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: Meaningful transitions
* neon-animated-pages
manages a set of pages and runs an animation when switching between them. Its
children pages should implement Polymer.NeonAnimatableBehavior
and define entry
and exit
animations to be run when switching to or switching out of the page.
*/
public class NeonAnimatedPages extends PolymerWidget {
/**
* Default Constructor.
*/
public NeonAnimatedPages() {
this("");
}
/**
* Constructor used by UIBinder to create widgets with content.
*/
public NeonAnimatedPages(String html) {
super(NeonAnimatedPagesElement.TAG, NeonAnimatedPagesElement.SRC, html);
}
/**
* Gets a handle to the Polymer object's underlying DOM element.
*/
public NeonAnimatedPagesElement getPolymerElement() {
return (NeonAnimatedPagesElement) getElement();
}
/**
* if true, the initial page selection will also be animated according to its animation config.
*
* JavaScript Info:
* @property animateInitialSelection
* @type Boolean
*
*/
public boolean getAnimateInitialSelection() {
return getPolymerElement().getAnimateInitialSelection();
}
/**
* if true, the initial page selection will also be animated according to its animation config.
*
* JavaScript Info:
* @property animateInitialSelection
* @type Boolean
*
*/
public void setAnimateInitialSelection(boolean value) {
getPolymerElement().setAnimateInitialSelection(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);
}
/**
* Animation configuration. See README for more info.
*
* JavaScript Info:
* @property animationConfig
* @type Object
*
*/
public JavaScriptObject getAnimationConfig() {
return getPolymerElement().getAnimationConfig();
}
/**
* Animation configuration. See README for more info.
*
* JavaScript Info:
* @property animationConfig
* @type Object
*
*/
public void setAnimationConfig(JavaScriptObject value) {
getPolymerElement().setAnimationConfig(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);
}
/**
* 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);
}
/**
* 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 PaperTooltip
*/
public String getExitAnimation() {
return getPolymerElement().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 PaperTooltip
*/
public void setExitAnimation(String value) {
getPolymerElement().setExitAnimation(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);
}
/**
* 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);
}
/**
* 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);
}
/**
* If you want to use an attribute value or property of an element for
selected
instead of the index, set this to the name of the attribute
or property. Hyphenated values are converted to camel case when used to
look up the property of a selectable element. Camel cased values are
not converted to hyphenated values for attribute lookup. It’s
recommended that you provide the hyphenated form of the name so that
selection works in both cases. (Use attr-or-property-name
instead of
attrOrPropertyName
.)
*
* JavaScript Info:
* @property attrForSelected
* @type String
* @behavior PaperTabs
*/
public String getAttrForSelected() {
return getPolymerElement().getAttrForSelected();
}
/**
* If you want to use an attribute value or property of an element for
selected
instead of the index, set this to the name of the attribute
or property. Hyphenated values are converted to camel case when used to
look up the property of a selectable element. Camel cased values are
not converted to hyphenated values for attribute lookup. It’s
recommended that you provide the hyphenated form of the name so that
selection works in both cases. (Use attr-or-property-name
instead of
attrOrPropertyName
.)
*
* JavaScript Info:
* @property attrForSelected
* @type String
* @behavior PaperTabs
*/
public void setAttrForSelected(String value) {
getPolymerElement().setAttrForSelected(value);
}
/**
* 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 PaperTooltip
*/
public String getEntryAnimation() {
return getPolymerElement().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 PaperTooltip
*/
public void setEntryAnimation(String value) {
getPolymerElement().setEntryAnimation(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 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);
}
// 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
/**
* Animation configuration. See README for more info.
*
* JavaScript Info:
* @attribute animation-config
*
*/
public void setAnimationConfig(String value) {
Polymer.property(this.getPolymerElement(), "animationConfig", 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 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);
}
/**
* Selects the given value.
*
* 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);
}
/**
* 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 VaadinSplitLayout
*
*/
public void assignParentResizable(Object parentResizable) {
getPolymerElement().assignParentResizable(parentResizable);
}
/**
* 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 VaadinSplitLayout
*
*/
public void stopResizeNotificationsFor(Object target) {
getPolymerElement().stopResizeNotificationsFor(target);
}
/**
* Cancels the currently running animations.
*
* JavaScript Info:
* @method cancelAnimation
*
*
*/
public void cancelAnimation() {
getPolymerElement().cancelAnimation();
}
/**
* 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();
}
/**
* Can be called to manually notify a resizable and its descendant
resizables of a resize change.
*
* JavaScript Info:
* @method notifyResize
* @behavior VaadinSplitLayout
*
*/
public void notifyResize() {
getPolymerElement().notifyResize();
}
/**
* Returns the index of the given item.
*
* JavaScript Info:
* @method indexOf
* @param {Object} item
* @behavior PaperTabs
*
*/
public void indexOf(JavaScriptObject item) {
getPolymerElement().indexOf(item);
}
/**
* Plays an animation with an optional type
.
*
* JavaScript Info:
* @method playAnimation
* @param {string=} type
* @param {!Object=} cookie
*
*
*/
public void playAnimation(String type, JavaScriptObject cookie) {
getPolymerElement().playAnimation(type, cookie);
}
/**
* 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 VaadinSplitLayout
* @return {boolean}
*/
public boolean resizerShouldNotify(JavaScriptObject element) {
return getPolymerElement().resizerShouldNotify(element);
}
/**
* 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);
}
}