Class JQueryEffectBehavior

  • All Implemented Interfaces:
    com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware, JQueryDestroyListener.IDestroyable, Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable

    public class JQueryEffectBehavior
    extends JQueryUIBehavior
    implements com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
    Provides a specific jQuery behavior for playing effects.
    Author:
    Sebastien Briquet - sebfz1
    See Also:
    Serialized Form
    • Constructor Detail

      • JQueryEffectBehavior

        public JQueryEffectBehavior​(String selector,
                                    String effect,
                                    IEffectListener listener)
        Constructor, with no option and a default speed of SPEED
        Parameters:
        selector - the html selector (ie: '#myId')
        effect - the effect to be played
        listener - the IEffectListener
      • JQueryEffectBehavior

        public JQueryEffectBehavior​(String selector,
                                    String effect,
                                    com.googlecode.wicket.jquery.core.Options options,
                                    IEffectListener listener)
        Constructor, with a default speed of SPEED
        Parameters:
        selector - the html selector (ie: '#myId')
        effect - the effect to be played
        options - the options to be applied
        listener - the IEffectListener
      • JQueryEffectBehavior

        public JQueryEffectBehavior​(String selector,
                                    String effect,
                                    int speed,
                                    IEffectListener listener)
        Constructor, with no option
        Parameters:
        selector - the html selector (ie: '#myId')
        effect - the effect to be played
        speed - the speed of the effect
        listener - the IEffectListener
      • JQueryEffectBehavior

        public JQueryEffectBehavior​(String selector,
                                    String effect,
                                    com.googlecode.wicket.jquery.core.Options options,
                                    int speed,
                                    IEffectListener listener)
        Constructor
        Parameters:
        selector - the html selector (ie: '#myId')
        effect - the effect to be played
        options - the options to be applied
        speed - the speed of the effect
        listener - the IEffectListener
    • Method Detail

      • toString

        public static String toString​(String selector,
                                      Effect effect)
        Helper method that returns the JQueryEffectBehavior string representation
        Parameters:
        selector - the html selector (ie: '#myId')
        effect - the effect to be played
        Returns:
        the effect javascript statement
      • toString

        public static String toString​(String selector,
                                      String effect)
        Helper method that returns the JQueryEffectBehavior string representation
        Parameters:
        selector - the html selector (ie: '#myId')
        effect - the effect to be played
        Returns:
        the effect javascript statement
      • bind

        public void bind​(org.apache.wicket.Component component)
        Overrides:
        bind in class org.apache.wicket.behavior.Behavior
      • onAjax

        public void onAjax​(org.apache.wicket.ajax.AjaxRequestTarget target,
                           com.googlecode.wicket.jquery.core.JQueryEvent event)
        Specified by:
        onAjax in interface com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
      • $

        protected String $()
        Overrides:
        $ in class com.googlecode.wicket.jquery.core.JQueryBehavior
      • $

        public String $​(String effect)
        Gets the jQuery statement.
        Overrides:
        $ in class com.googlecode.wicket.jquery.core.JQueryBehavior
        Parameters:
        effect - the effect to be played
        Returns:
        the jQuery statement
      • $

        public String $​(String effect,
                        String options)
        Gets the jQuery statement.
        Parameters:
        effect - the effect to be played
        options - the options to be applied
        Returns:
        the jQuery statement
      • newCallbackBehavior

        protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newCallbackBehavior()
        Gets the ajax behavior that will be triggered when the user has selected items
        Returns:
        the JQueryAjaxBehavior