java.lang.Object
org.apache.wicket.behavior.Behavior
com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
com.googlecode.wicket.jquery.core.JQueryBehavior
com.googlecode.wicket.jquery.ui.JQueryUIBehavior
com.googlecode.wicket.jquery.ui.interaction.draggable.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:
  • Field Details

  • Constructor Details

    • DraggableBehavior

      public DraggableBehavior(IDraggableListener listener)
      Constructor
      Parameters:
      listener - the IDraggableListener
    • DraggableBehavior

      public DraggableBehavior(String selector, IDraggableListener listener)
      Constructor
      Parameters:
      selector - the html selector (ie: "#myId")
      listener - the IDraggableListener
    • 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 Details

    • bind

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

      public void onConfigure(org.apache.wicket.Component component)
      Overrides:
      onConfigure in class JQueryUIBehavior
    • 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