T
- the object model typepublic class Draggable<T> extends com.googlecode.wicket.jquery.core.JQueryGenericContainer<T> implements IDraggableListener
JQueryGenericContainer
Modifier and Type | Class and Description |
---|---|
static class |
Draggable.Axis |
Constructor and Description |
---|
Draggable(String id)
Constructor
|
Draggable(String id,
org.apache.wicket.model.IModel<T> model)
Constructor
|
Draggable(String id,
org.apache.wicket.model.IModel<T> model,
com.googlecode.wicket.jquery.core.Options options)
Constructor
|
Draggable(String id,
com.googlecode.wicket.jquery.core.Options options)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected Draggable<T> |
getHint(String function)
Provides a way for customization of the drag indicator
|
boolean |
isCancelEventEnabled()
Indicates whether the 'dragcancel' event is enabled.
If true, the IDraggableListener.onDragCancel(AjaxRequestTarget, int, int) event will be triggered. |
com.googlecode.wicket.jquery.core.JQueryBehavior |
newWidgetBehavior(String selector) |
void |
onDragCancel(org.apache.wicket.ajax.AjaxRequestTarget target,
int top,
int left)
Triggered when the drag cancels
offsetTop and offsetLeft are available as RequestCycle parameters |
void |
onDragStart(org.apache.wicket.ajax.AjaxRequestTarget target,
int top,
int left)
Triggered when the drag starts
Note: offsetTop and offsetLeft are available as RequestCycle parameters |
void |
onDragStop(org.apache.wicket.ajax.AjaxRequestTarget target,
int top,
int left)
Triggered when the drag stops
offsetTop and offsetLeft are available as RequestCycle parameters |
Draggable<T> |
setAxis(Draggable.Axis axis)
Constrains the hint movement to either the horizontal (x) or vertical (y) axis.
|
Draggable<T> |
setContainer(org.apache.wicket.Component component)
If set, the hint movement is constrained to the container boundaries.
|
Draggable<T> |
setContainer(String selector)
If set, the hint movement is constrained to the container boundaries.
|
Draggable<T> |
setDistance(Integer distance)
Sets the required distance that the mouse should travel in order to initiate a drag.
|
getModel, getModelObject, setModel, setModelObject
onBeforeRender, onConfigure, onInitialize
getWebPage, getWebRequest, getWebResponse, getWebSession
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onDetach, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public Draggable(String id)
id
- the markup idpublic Draggable(String id, com.googlecode.wicket.jquery.core.Options options)
id
- the markup idoptions
- the Options
public Draggable(String id, org.apache.wicket.model.IModel<T> model)
id
- the markup idmodel
- the IModel
public boolean isCancelEventEnabled()
IDraggableListener
IDraggableListener.onDragCancel(AjaxRequestTarget, int, int)
event will be triggered.isCancelEventEnabled
in interface IDraggableListener
public void onDragStart(org.apache.wicket.ajax.AjaxRequestTarget target, int top, int left)
IDraggableListener
offsetTop
and offsetLeft
are available as RequestCycle
parametersonDragStart
in interface IDraggableListener
target
- the AjaxRequestTarget
top
- the position's top valueleft
- the position's left valuepublic void onDragStop(org.apache.wicket.ajax.AjaxRequestTarget target, int top, int left)
IDraggableListener
RequestCycle
parametersonDragStop
in interface IDraggableListener
target
- the AjaxRequestTarget
top
- the position's top valueleft
- the position's left valuepublic void onDragCancel(org.apache.wicket.ajax.AjaxRequestTarget target, int top, int left)
IDraggableListener
RequestCycle
parametersonDragCancel
in interface IDraggableListener
target
- the AjaxRequestTarget
top
- the position's top valueleft
- the position's left valueIDraggableListener.isCancelEventEnabled()
public Draggable<T> setAxis(Draggable.Axis axis)
axis
- the Draggable.Axis
valueprotected Draggable<T> getHint(String function)
function
- the javascript functionpublic Draggable<T> setDistance(Integer distance)
distance
- the distancepublic Draggable<T> setContainer(org.apache.wicket.Component component)
component
- a Component
public Draggable<T> setContainer(String selector)
selector
- the container selector (ie: '#myId')public com.googlecode.wicket.jquery.core.JQueryBehavior newWidgetBehavior(String selector)
newWidgetBehavior
in interface com.googlecode.wicket.jquery.core.IJQueryWidget
Copyright © 2015 7thWeb. All rights reserved.