@Override
public void ready(final YuiContext Y) {
final Node p = parent.appendChild("<p>This is a para graph.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..</p>");
p.setStyle("backgroundColor", "red");
final Anim anim1 = Y.newAnim(AnimConfig.create().
node(p).duration(2.3).
to(Style.create().width("10px")));
anim1.on("end", new EventCallback<AnimEvent>() {
@Override
public void call(AnimEvent e) {
Window.alert("anim ended ");
}
});
Widget button1 = Y.newButton(
ButtonConfig.create().label("start")
).render(parent);
button1.on("click", new EventCallback<ButtonEvent>() {
@Override
public void call(ButtonEvent e) {
anim1.run();
}
});
}
});
}