Class DroppableBehavior
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
-
- com.googlecode.wicket.jquery.core.JQueryBehavior
-
- com.googlecode.wicket.kendo.ui.KendoUIBehavior
-
- com.googlecode.wicket.kendo.ui.interaction.droppable.DroppableBehavior
-
- All Implemented Interfaces:
com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
,KendoDestroyListener.IDestroyable
,Serializable
,org.apache.wicket.IComponentAwareEventSink
,org.apache.wicket.markup.html.IComponentAwareHeaderContributor
,org.apache.wicket.util.io.IClusterable
- Direct Known Subclasses:
DroppableAreaBehavior
public class DroppableBehavior extends KendoUIBehavior implements com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
Provides a "kendoDropTarget" behavior- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
DroppableBehavior.DragEnterEvent
Provides an event object that will be broadcasted by theDroppableBehavior.OnDragEnterAjaxBehavior
callbackprotected static class
DroppableBehavior.DragLeaveEvent
Provides an event object that will be broadcasted by theDroppableBehavior.OnDragLeaveAjaxBehavior
callbackprotected static class
DroppableBehavior.DropEvent
Provides an event object that will be broadcasted by theDroppableBehavior.OnDropAjaxBehavior
callbackprotected static class
DroppableBehavior.OnDragEnterAjaxBehavior
Provides aJQueryAjaxBehavior
that aims to be wired to the 'dragenter' eventprotected static class
DroppableBehavior.OnDragLeaveAjaxBehavior
Provides aJQueryAjaxBehavior
that aims to be wired to the 'dragleave' eventprotected static class
DroppableBehavior.OnDropAjaxBehavior
Provides aJQueryAjaxBehavior
that aims to be wired to the 'drop' event
-
Constructor Summary
Constructors Constructor Description DroppableBehavior(String selector, com.googlecode.wicket.jquery.core.Options options, IDroppableListener listener)
ConstructorDroppableBehavior(String selector, IDroppableListener listener)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(org.apache.wicket.Component component)
protected String
getOnDragEnterStatement()
Gets the javascript statement that will we executed on 'dragenter' event
The event variable is'e'
e.target Element, The current Draggable element.
e.draggable kendo.ui.Draggable, Reference to the Draggable instance that enters a drop target.
e.dropTarget jQuery, The current DropTarget element in the area that initiated the event.protected String
getOnDragLeaveStatement()
Gets the javascript statement that will we executed on 'dragleave' event
The event variable is'e'
e.target Element, The current Draggable element.
e.draggable kendo.ui.Draggable, Reference to the Draggable instance that enters a drop target.
e.dropTarget jQuery, The current DropTarget element in the area that initiated the event.protected String
getOnDropStatement()
Gets the javascript statement that will we executed on 'drop' event
The event variable is'e'
e.target Element, The current Draggable element.
e.draggable kendo.ui.Draggable, Reference to the Draggable instance that enters a drop target.
e.dropTarget jQuery, The current DropTarget element in the area that initiated the event.protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior
newOnDragEnterAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source, String statement)
Gets a newJQueryAjaxBehavior
that will be wired to the 'dragenter' eventprotected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior
newOnDragLeaveAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source, String statement)
Gets a newJQueryAjaxBehavior
that will be wired to the 'dragleave' eventprotected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior
newOnDropAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source, String statement)
Gets a newJQueryAjaxBehavior
that will be wired to the 'drop' eventvoid
onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)
void
onConfigure(org.apache.wicket.Component component)
void
setDraggable(org.apache.wicket.Component draggable)
-
Methods inherited from class com.googlecode.wicket.kendo.ui.KendoUIBehavior
add, destroy, onDestroy, renderHead, widget, widget, widget, widget
-
Methods inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior
$, $, $, $, beforeRender, detach, getMethod, getOption, getOptions, getSelector, off, on, on, register, remove, setOption, setOption, setOption, setOptions, setSelector
-
Methods inherited from class com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
add, getJQueryLibrarySettings, renderOnDomReadyScript, renderPriorityHeaderItem, toString
-
-
-
-
Field Detail
-
METHOD
public static final String METHOD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DroppableBehavior
public DroppableBehavior(String selector, IDroppableListener listener)
Constructor- Parameters:
selector
- the html selector (ie: "#myId")listener
- theIDroppableListener
-
DroppableBehavior
public DroppableBehavior(String selector, com.googlecode.wicket.jquery.core.Options options, IDroppableListener listener)
Constructor- Parameters:
selector
- the html selector (ie: "#myId")options
- theOptions
listener
- theIDroppableListener
-
-
Method Detail
-
setDraggable
public void setDraggable(org.apache.wicket.Component draggable)
-
getOnDragEnterStatement
protected String getOnDragEnterStatement()
Gets the javascript statement that will we executed on 'dragenter' event
The event variable is'e'
e.target Element, The current Draggable element.
e.draggable kendo.ui.Draggable, Reference to the Draggable instance that enters a drop target.
e.dropTarget jQuery, The current DropTarget element in the area that initiated the event.- Returns:
- the javascript statement
-
getOnDragLeaveStatement
protected String getOnDragLeaveStatement()
Gets the javascript statement that will we executed on 'dragleave' event
The event variable is'e'
e.target Element, The current Draggable element.
e.draggable kendo.ui.Draggable, Reference to the Draggable instance that enters a drop target.
e.dropTarget jQuery, The current DropTarget element in the area that initiated the event.- Returns:
- the javascript statement
-
getOnDropStatement
protected String getOnDropStatement()
Gets the javascript statement that will we executed on 'drop' event
The event variable is'e'
e.target Element, The current Draggable element.
e.draggable kendo.ui.Draggable, Reference to the Draggable instance that enters a drop target.
e.dropTarget jQuery, The current DropTarget element in the area that initiated the event.- Returns:
- the javascript statement
-
bind
public void bind(org.apache.wicket.Component component)
- Overrides:
bind
in classorg.apache.wicket.behavior.Behavior
-
onConfigure
public void onConfigure(org.apache.wicket.Component component)
- Overrides:
onConfigure
in classKendoUIBehavior
-
onAjax
public void onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)
- Specified by:
onAjax
in interfacecom.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
-
newOnDragEnterAjaxBehavior
protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnDragEnterAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source, String statement)
Gets a newJQueryAjaxBehavior
that will be wired to the 'dragenter' event- Parameters:
source
- theIJQueryAjaxAware
statement
- the statement to execute just before the ajax call- Returns:
- a new
OnDragEnterAjaxBehavior
by default
-
newOnDragLeaveAjaxBehavior
protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnDragLeaveAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source, String statement)
Gets a newJQueryAjaxBehavior
that will be wired to the 'dragleave' event- Parameters:
source
- theIJQueryAjaxAware
statement
- the statement to execute just before the ajax call- Returns:
- a new
OnDragLeaveAjaxBehavior
by default
-
newOnDropAjaxBehavior
protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnDropAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source, String statement)
Gets a newJQueryAjaxBehavior
that will be wired to the 'drop' event- Parameters:
source
- theIJQueryAjaxAware
statement
- the statement to execute just before the ajax call- Returns:
- a new
OnDropAjaxBehavior
by default
-
-