ActionsPanel actions = new ActionsPanel("actions");
add(actions);
actions.addItem(new ScriptTextLinkPanel(actions.newChildId(), "Show Explode") {
private static final long serialVersionUID = 1L;
@Override
protected JsStatement getClickAction() {
return new JsStatement().$(null, "#explode").chain(new ExplodeEffect(Mode.show, 16, 2000));
}
});
actions.addItem(new ScriptTextLinkPanel(actions.newChildId(), "Shake") {
private static final long serialVersionUID = 1L;
@Override
protected JsStatement getClickAction() {
return new JsStatement().$(null, "#explode").chain(new ShakeEffect(Direction.down));
}
});
actions.addItem(new ScriptTextLinkPanel(actions.newChildId(), "Scale UP") {
private static final long serialVersionUID = 1L;
@Override
protected JsStatement getClickAction() {
return new JsStatement().$(null, "#explode").chain(
new ScaleEffect(org.odlabs.wiquery.ui.effects.ScaleEffect.Direction.both,
Scale.box,
120, 1000));
}
});
actions.addItem(new ScriptTextLinkPanel(actions.newChildId(), "Scale Down") {
private static final long serialVersionUID = 1L;
@Override
protected JsStatement getClickAction() {
return new JsStatement().$(null, "#explode").chain(
new ScaleEffect(org.odlabs.wiquery.ui.effects.ScaleEffect.Direction.both,
Scale.box,
80, 1000));
}
});
actions.addItem(new ScriptTextLinkPanel(actions.newChildId(), "Pulsate") {
private static final long serialVersionUID = 1L;
@Override
protected JsStatement getClickAction() {
return new JsStatement().$(null, "#explode").chain(new PulsateEffect());
}
});
actions.addItem(new ScriptTextLinkPanel(actions.newChildId(), "Bounce") {
private static final long serialVersionUID = 1L;
@Override
protected JsStatement getClickAction() {
return new JsStatement().$(null, "#explode")
.chain(new BounceEffect(BounceDirection.up, BounceMode.show, 5, 40, 200));
}
});
actions.addItem(new ScriptTextLinkPanel(actions.newChildId(), "Highlight") {
private static final long serialVersionUID = 1L;
@Override
protected JsStatement getClickAction() {