public class DroppableBehavior extends AbstractDragDropBehavior
Component to make it
a droppable Component i.e. the target of a drag operation.
An instance of this class can be added to one and only one
Component. Another Component that should have exactly the
same behavior needs it's own instance.| Modifier and Type | Class and Description |
|---|---|
static class |
DroppableBehavior.DropTolerance |
AbstractDragDropBehavior.EventTypeJQueryAjaxBehavior.JsAjaxCallbackFunction, JQueryAjaxBehavior.JsBuilder, JQueryAjaxBehavior.JsFunction| Modifier and Type | Field and Description |
|---|---|
static JQueryResourceReference |
uiDroppableJs |
jQueryUiAccordionCss, jQueryUiBaseCss, jQueryUiCoreJs, jQueryUiCss, jQueryUiCustomCss, jQueryUiMouseJs, jQueryUiPositionJs, jQueryUiThemeCss, jQueryUiWidgetJsrenderedrawOptions| Constructor and Description |
|---|
DroppableBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget target)
Disable the dropping
|
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget target)
Enable the dropping
|
protected org.apache.wicket.util.visit.IVisitor<org.apache.wicket.Component,org.apache.wicket.Component> |
getComponentFindingVisitor(String markupId) |
protected JQueryAjaxBehavior.JsBuilder |
getJsBuilder() |
protected void |
onActivate(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.Component draggedComponent,
SpecialKeys specialKeys)
This method is called when a draggable
Component is starting to
drag and the dragging Component's name is accepted to be
dropped onto this. |
protected void |
onDeactivate(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.Component draggedComponent,
SpecialKeys specialKeys)
This method is called when a draggable
Component has stopped
dragging and the dragging Component's name was accepted to be
dropped onto this. |
protected void |
onDrop(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.Component draggedComponent,
SpecialKeys specialKeys)
This method is called when a draggable
Component is dropped onto
a Component marked with this behavior. |
void |
renderHead(org.apache.wicket.Component component,
org.apache.wicket.markup.head.IHeaderResponse response)
Do not override this method unless you know exactly what you do.
|
protected void |
respond(org.apache.wicket.ajax.AjaxRequestTarget target)
handles the event processing during dragging.
|
DroppableBehavior |
setActiveClass(org.apache.wicket.ajax.AjaxRequestTarget target,
String activeClass) |
DroppableBehavior |
setActiveClass(String activeClass)
Sets the 'activeClass' property for this draggable.
|
DroppableBehavior |
setAddClasses(org.apache.wicket.ajax.AjaxRequestTarget target,
boolean value) |
DroppableBehavior |
setAddClasses(boolean value)
Sets the 'addClasses' property for this draggable.
|
DroppableBehavior |
setDraggablesAcceptedByDroppable(DraggablesAcceptedByDroppable accepted)
You can restrict the
Components that can be dragged and dropped to
a Component marked with this behavior. |
DroppableBehavior |
setGreedy(org.apache.wicket.ajax.AjaxRequestTarget target,
boolean value) |
DroppableBehavior |
setGreedy(boolean value)
Sets the 'greedy' property for this draggable.
|
DroppableBehavior |
setHoverClass(org.apache.wicket.ajax.AjaxRequestTarget target,
String hoverClass) |
DroppableBehavior |
setHoverClass(String hoverClass)
Sets the 'hoverClass' property for this draggable.
|
DroppableBehavior |
setScope(org.apache.wicket.ajax.AjaxRequestTarget target,
DroppableBehavior.DropTolerance tolerance) |
DroppableBehavior |
setScope(org.apache.wicket.ajax.AjaxRequestTarget target,
String scope) |
DroppableBehavior |
setScope(String scope)
Sets the 'scope' property for this draggable.
|
DroppableBehavior |
setTolerance(DroppableBehavior.DropTolerance tolerance)
Sets the 'tolerance' property for this droppable.
|
DroppableBehavior |
setWantOnActivatedNotification(boolean value)
If set to
true, the callback-Method onActivate(AjaxRequestTarget, Component, SpecialKeys)
is called when the drag operation ends. |
DroppableBehavior |
setWantOnDeactivateNotification(boolean value)
If set to
true, the callback-Method onDeactivate(AjaxRequestTarget, Component, SpecialKeys)
is called when the drag operation ends. |
isAlreadyRendered, setRestoreAfterRedraw, updateBehavioraddCssResources, addUserProvidedResourceReferences, addUserProvidedResourceReferences, getUserProvidedResourceReferences, printParameters, printParameters, setRawOptionsfindIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes, updateAjaxAttributesafterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbindpublic static final JQueryResourceReference uiDroppableJs
public DroppableBehavior setWantOnActivatedNotification(boolean value)
true, the callback-Method onActivate(AjaxRequestTarget, Component, SpecialKeys)
is called when the drag operation ends.value - true or false.public DroppableBehavior setWantOnDeactivateNotification(boolean value)
true, the callback-Method onDeactivate(AjaxRequestTarget, Component, SpecialKeys)
is called when the drag operation ends.value - true or false.public DroppableBehavior setDraggablesAcceptedByDroppable(DraggablesAcceptedByDroppable accepted)
Components that can be dragged and dropped to
a Component marked with this behavior. See DraggablesAcceptedByDroppable
for more information. If the DraggablesAcceptedByDroppable is empty (i.e. it
contains no names) then the droppable does not accept any draggables.accepted - the acceptedpublic DroppableBehavior setActiveClass(String activeClass)
activeClass - the CSS class' namepublic DroppableBehavior setActiveClass(org.apache.wicket.ajax.AjaxRequestTarget target, String activeClass)
public DroppableBehavior setAddClasses(boolean value)
value - true or false.public DroppableBehavior setAddClasses(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
public DroppableBehavior setGreedy(boolean value)
value - true or false.public DroppableBehavior setGreedy(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
public DroppableBehavior setHoverClass(String hoverClass)
hoverClass - the CSS class' namepublic DroppableBehavior setHoverClass(org.apache.wicket.ajax.AjaxRequestTarget target, String hoverClass)
public DroppableBehavior setScope(String scope)
scope - the scodepublic DroppableBehavior setScope(org.apache.wicket.ajax.AjaxRequestTarget target, String scope)
public DroppableBehavior setTolerance(DroppableBehavior.DropTolerance tolerance)
tolerance - the tolerancepublic DroppableBehavior setScope(org.apache.wicket.ajax.AjaxRequestTarget target, DroppableBehavior.DropTolerance tolerance)
protected void respond(org.apache.wicket.ajax.AjaxRequestTarget target)
respond in class JQueryAjaxBehaviorprotected org.apache.wicket.util.visit.IVisitor<org.apache.wicket.Component,org.apache.wicket.Component> getComponentFindingVisitor(String markupId)
protected void onDrop(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.Component draggedComponent,
SpecialKeys specialKeys)
Component is dropped onto
a Component marked with this behavior.target - the AjaxRequestTarget of the drop operation.draggedComponent - The dragged componentspecialKeys - the special keys that were pressed when the event occursprotected void onActivate(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.Component draggedComponent,
SpecialKeys specialKeys)
Component is starting to
drag and the dragging Component's name is accepted to be
dropped onto this.target - The AjaxRequestTarget associated with this
drop operation.draggedComponent - The dragged componentspecialKeys - the special keys that were pressed when the event occursprotected void onDeactivate(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.Component draggedComponent,
SpecialKeys specialKeys)
Component has stopped
dragging and the dragging Component's name was accepted to be
dropped onto this.target - The AjaxRequestTarget associated with this
drop operation.draggedComponent - The dragged componentspecialKeys - the special keys that were pressed when the event occurspublic void disable(org.apache.wicket.ajax.AjaxRequestTarget target)
target - An AjaxRequestTargetpublic void enable(org.apache.wicket.ajax.AjaxRequestTarget target)
target - An AjaxRequestTargetpublic void renderHead(org.apache.wicket.Component component,
org.apache.wicket.markup.head.IHeaderResponse response)
JQueryDurableAjaxBehaviorsuper.renderHead(response).renderHead in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributorrenderHead in class JQueryDurableAjaxBehaviorprotected JQueryAjaxBehavior.JsBuilder getJsBuilder()
getJsBuilder in class JQueryDurableAjaxBehaviorCopyright © 2015. All rights reserved.