Class AbstractDraggableFactory
java.lang.Object
com.googlecode.wicket.jquery.ui.interaction.draggable.AbstractDraggableFactory
- All Implemented Interfaces:
Serializable,org.apache.wicket.util.io.IClusterable
- Direct Known Subclasses:
SelectableDraggableFactory
public abstract class AbstractDraggableFactory
extends Object
implements org.apache.wicket.util.io.IClusterable
Provides the ability to create a
The common use case is to have the ability to drag multiple
To achieve this, the role of the jQuery helper is important (see
Draggable that is related to another component (defined by its selector).The common use case is to have the ability to drag multiple
Draggable object.To achieve this, the role of the jQuery helper is important (see
getHelper(String) implementation in SelectableDraggableFactory)- Author:
- Sebastien Briquet - sebfz1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AbstractDraggableFactory
public AbstractDraggableFactory()
-
-
Method Details
-
getHelper
Gets the helper that might be used by theDraggable.
The returned value is supplied to thecreate(String, String, String)method.- Parameters:
selector- the selector- Returns:
- the helper
-
create
Creates the newDraggablefor the given selector- Parameters:
id- the markup idselector- the related component's selector- Returns:
- the
Draggableobject
-
create
Creates the newDraggableby using the selector and/or the helper.
A typical implementation is:
return new Draggable<String>(id) { protected void onConfigure(JQueryBehavior behavior) { super.onConfigure(behavior); behavior.setOption("helper", helper); } };- Parameters:
id- the markup idselector- the related component's selectorhelper- the jQuery helper- Returns:
- the
Draggableobject
-