Class DraggableBehavior

  • 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 DraggableBehavior
    extends JQueryUIBehavior
    implements com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
    Provides a jQuery draggable behavior

    Warning: not thread-safe: the instance of this behavior should only be used once
    Author:
    Sebastien Briquet - sebfz1
    See Also:
    Serialized Form
    • Constructor Detail

      • DraggableBehavior

        public DraggableBehavior​(com.googlecode.wicket.jquery.core.Options options,
                                 IDraggableListener listener)
        Constructor
        Parameters:
        options - the Options
        listener - the IDraggableListener
      • DraggableBehavior

        public DraggableBehavior​(String selector,
                                 com.googlecode.wicket.jquery.core.Options options,
                                 IDraggableListener listener)
        Constructor
        Parameters:
        selector - the html selector (ie: "#myId")
        options - the Options
        listener - the IDraggableListener
    • Method Detail

      • 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
      • newOnDragStartAjaxBehavior

        protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnDragStartAjaxBehavior​(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
        Gets a new JQueryAjaxBehavior that will be wired to the 'start' event
        Parameters:
        source - the IJQueryAjaxAware
        Returns:
        a new OnDragStartAjaxBehavior by default
      • newOnDragStopAjaxBehavior

        protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnDragStopAjaxBehavior​(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
        Gets a new JQueryAjaxBehavior that will be wired to the 'stop' event
        Parameters:
        source - the IJQueryAjaxAware
        Returns:
        a new OnDragStopAjaxBehavior by default