Class SortableAdapter<T>
- java.lang.Object
-
- com.googlecode.wicket.jquery.ui.interaction.sortable.SortableAdapter<T>
-
- Type Parameters:
T
- the type of the model object
- All Implemented Interfaces:
ISortableListener<T>
,Serializable
,org.apache.wicket.util.io.IClusterable
public class SortableAdapter<T> extends Object implements ISortableListener<T>
Adapter class forISortableListener
- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SortableAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isOnReceiveEnabled()
Indicates whether the 'receive' event is enabled.
If true, theISortableListener.onReceive(AjaxRequestTarget, Object, int)
event will be triggered.boolean
isOnRemoveEnabled()
Indicates whether the 'remove' event is enabled.
If true, theISortableListener.onRemove(AjaxRequestTarget, Object)
event will be triggered.void
onReceive(org.apache.wicket.ajax.AjaxRequestTarget target, T item, int index)
Triggered when a connected sortable list has received an item from another list.void
onRemove(org.apache.wicket.ajax.AjaxRequestTarget target, T item)
Triggered when a sortable item has been dragged out from the list and into another.void
onUpdate(org.apache.wicket.ajax.AjaxRequestTarget target, T item, int index)
Triggered when the user stopped sorting and the DOM position has changed.
-
-
-
Method Detail
-
isOnReceiveEnabled
public boolean isOnReceiveEnabled()
Description copied from interface:ISortableListener
Indicates whether the 'receive' event is enabled.
If true, theISortableListener.onReceive(AjaxRequestTarget, Object, int)
event will be triggered.- Specified by:
isOnReceiveEnabled
in interfaceISortableListener<T>
- Returns:
- false by default
-
isOnRemoveEnabled
public boolean isOnRemoveEnabled()
Description copied from interface:ISortableListener
Indicates whether the 'remove' event is enabled.
If true, theISortableListener.onRemove(AjaxRequestTarget, Object)
event will be triggered.- Specified by:
isOnRemoveEnabled
in interfaceISortableListener<T>
- Returns:
- false by default
-
onUpdate
public void onUpdate(org.apache.wicket.ajax.AjaxRequestTarget target, T item, int index)
Description copied from interface:ISortableListener
Triggered when the user stopped sorting and the DOM position has changed.- Specified by:
onUpdate
in interfaceISortableListener<T>
- Parameters:
target
- theAjaxRequestTarget
item
- the item that has been sortedindex
- the item's new index (zero based)
-
onReceive
public void onReceive(org.apache.wicket.ajax.AjaxRequestTarget target, T item, int index)
Description copied from interface:ISortableListener
Triggered when a connected sortable list has received an item from another list.- Specified by:
onReceive
in interfaceISortableListener<T>
- Parameters:
target
- theAjaxRequestTarget
item
- the item that has been receivedindex
- the item's new index (zero based)
-
onRemove
public void onRemove(org.apache.wicket.ajax.AjaxRequestTarget target, T item)
Description copied from interface:ISortableListener
Triggered when a sortable item has been dragged out from the list and into another.- Specified by:
onRemove
in interfaceISortableListener<T>
- Parameters:
target
- theAjaxRequestTarget
item
- the item that has been received
-
-