Class SelectableDraggableFactory
- java.lang.Object
-
- com.googlecode.wicket.jquery.ui.interaction.draggable.AbstractDraggableFactory
-
- com.googlecode.wicket.jquery.ui.interaction.selectable.SelectableDraggableFactory
-
- All Implemented Interfaces:
Serializable,org.apache.wicket.util.io.IClusterable
public class SelectableDraggableFactory extends AbstractDraggableFactory
Provides a default implementation ofAbstractDraggableFactoryrelated to aSelectablewidget
Inspired from:
http://stackoverflow.com/questions/793559/grouping-draggable-objects-with-jquery-ui-draggable- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SelectableDraggableFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Draggable<?>create(String id, String selector, String helper)protected StringgetHelper(String selector)Gets the helper that might be used by theDraggable.
The returned value is supplied to theAbstractDraggableFactory.create(String, String, String)method.-
Methods inherited from class com.googlecode.wicket.jquery.ui.interaction.draggable.AbstractDraggableFactory
create
-
-
-
-
Method Detail
-
getHelper
protected String getHelper(String selector)
Description copied from class:AbstractDraggableFactoryGets the helper that might be used by theDraggable.
The returned value is supplied to theAbstractDraggableFactory.create(String, String, String)method.- Specified by:
getHelperin classAbstractDraggableFactory- Parameters:
selector- the selector- Returns:
- the helper
-
create
protected Draggable<?> create(String id, String selector, String helper)
Description copied from class:AbstractDraggableFactoryCreates 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); } };- Specified by:
createin classAbstractDraggableFactory- Parameters:
id- the markup idselector- the related component's selectorhelper- the jQuery helper- Returns:
- the
Draggableobject
-
-