Al Maw a écrit :
Martijn Dashorst wrote:
On 4/13/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
I'm mainly thinking nice but do you have any concrete plans
(components, behavior) for it?

I think just a behavior (or class) with some examples. The philosophy
of the library is to not create 200 classes for every effect known to
man, which is what moo, rico, dojo and scriptaculous do. This library
is an enabling library for effects.

What about a simple Behavior, I think behavior is easier to use for the end user

class onRefreshAnimationBehavior extends AbstractBehavior{
onRendered(){
      if(AjaxRequestTarget){
          target.prependJavascript(getFromEffect())
target.appendJavascript(getToEffect()); }
   }

   CharSequence getFromEffect();

   CharSequance getToEffect();

}

so user can extend it, ie

onRefreshAnimatedClassBehavior(fromClass, toClass)
in order to do
component.add(new onRefreshAnimatedClassBehavior("yellow", "default"));

--
Vincent


We could use it to provide an AccordionPanel without constraining you to prototype or moo or whatever.

We could easily provide framework support for fade-from-yellow highlights (the standard draw-attention-to-updated-items AJAX idiom).

A simple Java API to invoke transitions with AjaxRequestTarget would be really cool (we could provide some predefined ones, I guess).

target.appendAnimation(component, new Highlight());

target.appendAnimation(component, new Highlight().setColour("#ff0000"));

target.appendAnimation(component, new FromClass("yellow"));

target.prependAnimation(component,
    new Animation[] {
        new ToClass("wider"), new ToClass("taller")
    }
);

That sort of thing. :-)

Al

Reply via email to