com.vaadin.polymer.neon.widget.HeroAnimation 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.*;
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;
/**
* <hero-animation>
is a shared element animation that scales and transform an element such that it
appears to be shared between two pages. Use this in <neon-animated-pages>
. The source page
should use this animation in an ‘exit’ animation and set the fromPage
configuration property to
itself, and the destination page should use this animation in an entry
animation and set the
toPage
configuration property to itself. They should also define the hero elements in the
sharedElements
property (not a configuration property, see
Polymer.NeonSharedElementAnimatableBehavior
).
* Configuration:
* {
* name: 'hero-animation',
* id: <shared-element-id>,
* timing: <animation-timing>,
* toPage: <node>, /* define for the destination page * /
* fromPage: <node>, /* define for the source page * /
* }
*
*/
public class HeroAnimation extends PolymerWidget {
/**
* Default Constructor.
*/
public HeroAnimation() {
this("");
}
/**
* Constructor used by UIBinder to create widgets with content.
*/
public HeroAnimation(String html) {
super(HeroAnimationElement.TAG, HeroAnimationElement.SRC, html);
}
/**
* Gets a handle to the Polymer object's underlying DOM element.
*/
public HeroAnimationElement getPolymerElement() {
return (HeroAnimationElement) getElement();
}
/**
* Defines the animation timing.
*
* JavaScript Info:
* @property animationTiming
* @type Object
*
*/
public JavaScriptObject getAnimationTiming() {
return getPolymerElement().getAnimationTiming();
}
/**
* Defines the animation timing.
*
* JavaScript Info:
* @property animationTiming
* @type Object
*
*/
public void setAnimationTiming(JavaScriptObject value) {
getPolymerElement().setAnimationTiming(value);
}
/**
* Can be used to determine that elements implement this behavior.
*
* JavaScript Info:
* @property isNeonAnimation
* @type boolean
*
*/
public boolean getIsNeonAnimation() {
return getPolymerElement().getIsNeonAnimation();
}
/**
* Can be used to determine that elements implement this behavior.
*
* JavaScript Info:
* @property isNeonAnimation
* @type boolean
*
*/
public void setIsNeonAnimation(boolean value) {
getPolymerElement().setIsNeonAnimation(value);
}
/**
* Cached copy of shared elements.
*
* JavaScript Info:
* @property sharedElements
* @type Object
*
*/
public JavaScriptObject getSharedElements() {
return getPolymerElement().getSharedElements();
}
/**
* Cached copy of shared elements.
*
* JavaScript Info:
* @property sharedElements
* @type Object
*
*/
public void setSharedElements(JavaScriptObject value) {
getPolymerElement().setSharedElements(value);
}
// Needed in UIBinder
/**
* Defines the animation timing.
*
* JavaScript Info:
* @attribute animation-timing
*
*/
public void setAnimationTiming(String value) {
Polymer.property(this.getPolymerElement(), "animationTiming", value);
}
// Needed in UIBinder
/**
* Cached copy of shared elements.
*
* JavaScript Info:
* @attribute shared-elements
*
*/
public void setSharedElements(String value) {
Polymer.property(this.getPolymerElement(), "sharedElements", value);
}
/**
* Finds shared elements based on config
.
*
* JavaScript Info:
* @method findSharedElements
* @param {} config
* @behavior ReverseRippleAnimation
*
*/
public void findSharedElements(Object config) {
getPolymerElement().findSharedElements(config);
}
/**
* Sets transform
and transformOrigin
properties along with the prefixed versions.
*
* JavaScript Info:
* @method setPrefixedProperty
* @param {} node
* @param {} property
* @param {} value
* @behavior PaperMenuShrinkHeightAnimation
*
*/
public void setPrefixedProperty(Object node, Object property, Object value) {
getPolymerElement().setPrefixedProperty(node, property, value);
}
/**
* Returns the animation timing by mixing in properties from config
to the defaults defined
by the animation.
*
* JavaScript Info:
* @method timingFromConfig
* @param {} config
*
*
*/
public void timingFromConfig(Object config) {
getPolymerElement().timingFromConfig(config);
}
/**
*
*
* JavaScript Info:
* @method complete
* @param {} config
*
*
*/
public void complete(Object config) {
getPolymerElement().complete(config);
}
/**
* Called when the animation finishes.
*
* JavaScript Info:
* @method complete
* @behavior ReverseRippleAnimation
*
*/
public void complete() {
getPolymerElement().complete();
}
}