|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.behavior.Behavior
org.odlabs.wiquery.core.behavior.WiQueryAbstractBehavior
org.odlabs.wiquery.ui.draggable.DraggableBehavior
public class DraggableBehavior
$Id$
Sets the attached component draggable.
Nested Class Summary | |
---|---|
static class |
DraggableBehavior.AxisEnum
Enumeration for the axis option |
static class |
DraggableBehavior.CursorAtEnum
Enumeration for the cursorAt option |
static class |
DraggableBehavior.SnapModeEnum
Enumeration for the snapMode option |
Field Summary | |
---|---|
static String |
UI_HELPER
Properties on the ui parameter (use it into callback functions) : the jQuery object representing the helper that's being dragged |
static String |
UI_OFFSET
Properties on the ui parameter (use it into callback functions) : current absolute position of the helper as { top, left } object, relative to page |
static String |
UI_POSITION
Properties on the ui parameter (use it into callback functions) : current position of the helper as { top, left } object, relative to the offset element |
Constructor Summary | |
---|---|
DraggableBehavior()
Default constructor |
Method Summary | |
---|---|
JsStatement |
destroy()
Method to destroy the draggable This will return the element back to its pre-init state. |
void |
destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to destroy the draggable within the ajax request |
void |
detach(org.apache.wicket.Component component)
|
JsStatement |
disable()
Method to disable the draggable |
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to disable the draggable within the ajax request |
JsStatement |
enable()
Method to enable the draggable |
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to enable the draggable within the ajax request |
String |
getAppendTo()
|
DraggableBehavior.AxisEnum |
getAxis()
|
String |
getCancel()
|
String |
getConnectToSortable()
|
DraggableContainment |
getContainment()
|
String |
getCursor()
|
DraggableBehavior.CursorAtEnum |
getCursorAt()
Deprecated. will be changed in 1.2 to return a ListItemOptions |
ListItemOptions<DraggableCursorAt> |
getCursorAtComplex()
|
int |
getDelay()
|
int |
getDistance()
|
ICollectionItemOptions |
getGrid()
|
String |
getHandle()
|
DraggableHelper |
getHelper()
|
DraggableIframeFix |
getIframeFix()
|
float |
getOpacity()
|
protected Options |
getOptions()
Method retrieving the options of the component |
DraggableRevert |
getRevert()
|
int |
getRevertDuration()
|
String |
getScope()
|
int |
getScrollSensitivity()
|
int |
getScrollSpeed()
|
DraggableSnap |
getSnap()
|
DraggableBehavior.SnapModeEnum |
getSnapMode()
Returns the snapMode option |
int |
getSnapTolerance()
|
String |
getStack()
|
int |
getZIndex()
|
boolean |
isAddClasses()
|
boolean |
isDisabled()
|
boolean |
isRefreshPositions()
|
boolean |
isScroll()
|
String |
isStack()
Deprecated. will be removed in 1.2 |
void |
onBind()
Called when the component was bound to it's host component. |
void |
renderHead(org.apache.wicket.Component component,
org.apache.wicket.markup.html.IHeaderResponse response)
|
DraggableBehavior |
setAddClasses(boolean addClasses)
If set to false, will prevent the ui-draggable class from being added. |
DraggableBehavior |
setAppendTo(String appendTo)
The element passed to or selected by the appendTo option will be used as the draggable helper's container during dragging. |
DraggableBehavior |
setAxis(DraggableBehavior.AxisEnum axis)
Constrains dragging to either the horizontal (x) or vertical (y) axis. |
DraggableBehavior |
setCancel(String cancel)
Set's the prevent selecting if you start on elements matching the selector |
DraggableBehavior |
setConnectToSortable(String connectToSortable)
Allows the draggable to be dropped onto the specified sortables. |
DraggableBehavior |
setContainment(DraggableContainment containment)
Set's the constrains dragging to within the bounds of the specified element or region. |
DraggableBehavior |
setCursor(String cursor)
Set the css cursor during the drag operation. |
DraggableBehavior |
setCursorAt(DraggableBehavior.CursorAtEnum cusorAt)
Deprecated. will be removed in 1.2 |
DraggableBehavior |
setCursorAt(ListItemOptions<DraggableCursorAt> cusorAt)
Moves the dragging helper so the cursor always appears to drag from the same position. |
DraggableBehavior |
setDelay(int delay)
Time in milliseconds after mousedown until dragging should start. |
DraggableBehavior |
setDisabled(boolean disabled)
Disables (true) or enables (false) the draggable. |
DraggableBehavior |
setDistance(int distance)
Set's the distance in pixels after mousedown the mouse must move before dragging should start. |
DraggableBehavior |
setDragEvent(JsScopeUiEvent drag)
Set's the callback when the mouse is moved during the dragging |
DraggableBehavior |
setGrid(int x,
int y)
Snaps the dragging helper to a grid, every x and y pixels. |
DraggableBehavior |
setHandle(String handle)
Restricts sort start click to the specified element. |
DraggableBehavior |
setHelper(DraggableHelper helper)
Allows for a helper element to be used for dragging display. |
DraggableBehavior |
setIframeFix(DraggableIframeFix iframeFix)
Prevent iframes from capturing the mousemove events during a drag. |
DraggableBehavior |
setOpacity(float opacity)
Set's the opacity for the helper while being dragged. |
DraggableBehavior |
setRefreshPositions(boolean refreshPositions)
If set to true, all droppable positions are calculated on every mousemove. |
DraggableBehavior |
setRevert(DraggableRevert revert)
If set to true, the element will return to its start position when dragging stops. |
DraggableBehavior |
setRevertDuration(int revertDuration)
Set's the duration of the revert animation, in milliseconds. |
DraggableBehavior |
setScope(String scope)
Used to group sets of draggable and droppable items, in addition to droppable's accept option. |
DraggableBehavior |
setScroll(boolean scroll)
If set to true, container auto-scrolls while dragging. |
DraggableBehavior |
setScrollSensitivity(int scrollSensitivity)
Set's the distance in pixels from the edge of the viewport after which the viewport should scroll. |
DraggableBehavior |
setScrollSpeed(int scrollSpeed)
Set's speed at which the window should scroll once the mouse pointer gets within the scrollSensitivity distance. |
DraggableBehavior |
setSnap(DraggableSnap snap)
If set to a selector or to true (equivalent to '.ui-draggable'), the draggable will snap to the edges of the selected elements when near an edge of the element. |
DraggableBehavior |
setSnapMode(DraggableBehavior.SnapModeEnum snapMode)
Sets the edges of snap elements the draggable will snap to. |
DraggableBehavior |
setSnapTolerance(int snapTolerance)
Set's distance in pixels from the snap element edges at which snapping should occur. |
DraggableBehavior |
setStack(String stack)
Controls the z-Index of the defined group (key 'group' in the hash, accepts jQuery selector) automatically, always brings to front the dragged item. |
DraggableBehavior |
setStartEvent(JsScopeUiEvent start)
Set's the callback when the user starts dragging. |
DraggableBehavior |
setStopEvent(JsScopeUiEvent stop)
Set's the callback when the user stops dragging. |
DraggableBehavior |
setZIndex(int zIndex)
Set's the starting z-index |
JsStatement |
statement()
Returns the main JsStatement used to create the plugin. |
JsStatement |
widget()
Method to returns the .ui-draggable element |
void |
widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to returns the .ui-draggable element within the ajax request |
Methods inherited from class org.odlabs.wiquery.core.behavior.WiQueryAbstractBehavior |
---|
bind, getComponent |
Methods inherited from class org.apache.wicket.behavior.Behavior |
---|
afterRender, beforeRender, canCallListenerInterface, canCallListenerInterface, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, unbind |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String UI_HELPER
public static final String UI_POSITION
public static final String UI_OFFSET
Constructor Detail |
---|
public DraggableBehavior()
Method Detail |
---|
public void detach(org.apache.wicket.Component component)
detach
in class org.apache.wicket.behavior.Behavior
public void onBind()
WiQueryAbstractBehavior
onBind
in class WiQueryAbstractBehavior
public void renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.html.IHeaderResponse response)
renderHead
in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributor
renderHead
in class org.apache.wicket.behavior.Behavior
public JsStatement statement()
IWiQueryPlugin
JsStatement
used to create the plugin.
statement
in interface IWiQueryPlugin
statement
in class WiQueryAbstractBehavior
JsStatement
corresponding to this component.protected Options getOptions()
public DraggableBehavior setAddClasses(boolean addClasses)
addClasses
-
public boolean isAddClasses()
public DraggableBehavior setAppendTo(String appendTo)
appendTo
-
public String getAppendTo()
public DraggableBehavior setAxis(DraggableBehavior.AxisEnum axis)
axis
-
public DraggableBehavior.AxisEnum getAxis()
public DraggableBehavior setCancel(String cancel)
cancel
- Selector (default : ':input,option')
public String getCancel()
public DraggableBehavior setConnectToSortable(String connectToSortable)
connectToSortable
-
public String getConnectToSortable()
public DraggableBehavior setContainment(DraggableContainment containment)
containment
-
public DraggableContainment getContainment()
public DraggableBehavior setCursor(String cursor)
cursor
-
public String getCursor()
@Deprecated public DraggableBehavior setCursorAt(DraggableBehavior.CursorAtEnum cusorAt)
cusorAt
-
public DraggableBehavior setCursorAt(ListItemOptions<DraggableCursorAt> cusorAt)
cusorAt
-
@Deprecated public DraggableBehavior.CursorAtEnum getCursorAt()
public ListItemOptions<DraggableCursorAt> getCursorAtComplex()
public DraggableBehavior setDelay(int delay)
delay
-
public int getDelay()
public DraggableBehavior setDisabled(boolean disabled)
disabled
-
public boolean isDisabled()
public DraggableBehavior setDistance(int distance)
distance
-
public int getDistance()
public DraggableBehavior setGrid(int x, int y)
x
- y
-
public ICollectionItemOptions getGrid()
public DraggableBehavior setHandle(String handle)
handle
-
public String getHandle()
public DraggableBehavior setHelper(DraggableHelper helper)
helper
-
public DraggableHelper getHelper()
public DraggableBehavior setIframeFix(DraggableIframeFix iframeFix)
iframeFix
-
public DraggableIframeFix getIframeFix()
public DraggableBehavior setOpacity(float opacity)
opacity
-
public float getOpacity()
public DraggableBehavior setRefreshPositions(boolean refreshPositions)
refreshPositions
-
public boolean isRefreshPositions()
public DraggableBehavior setRevert(DraggableRevert revert)
revert
-
public DraggableRevert getRevert()
public DraggableBehavior setRevertDuration(int revertDuration)
revertDuration
-
public int getRevertDuration()
public DraggableBehavior setScope(String scope)
scope
-
public String getScope()
public DraggableBehavior setScroll(boolean scroll)
scroll
-
public boolean isScroll()
public DraggableBehavior setScrollSensitivity(int scrollSensitivity)
scrollSensitivity
-
public int getScrollSensitivity()
public DraggableBehavior setScrollSpeed(int scrollSpeed)
scrollSpeed
-
public int getScrollSpeed()
public DraggableBehavior setSnap(DraggableSnap snap)
snap
-
public DraggableSnap getSnap()
public DraggableBehavior setSnapMode(DraggableBehavior.SnapModeEnum snapMode)
snapMode
-
public DraggableBehavior.SnapModeEnum getSnapMode()
public DraggableBehavior setSnapTolerance(int snapTolerance)
snapTolerance
-
public int getSnapTolerance()
public DraggableBehavior setStack(String stack)
stack
-
public String getStack()
@Deprecated public String isStack()
public DraggableBehavior setZIndex(int zIndex)
zIndex
-
public int getZIndex()
public DraggableBehavior setDragEvent(JsScopeUiEvent drag)
drag
-
public DraggableBehavior setStartEvent(JsScopeUiEvent start)
start
-
public DraggableBehavior setStopEvent(JsScopeUiEvent stop)
stop
-
public JsStatement destroy()
public void destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public JsStatement disable()
public void disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public JsStatement enable()
public void enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public JsStatement widget()
public void widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |