|
||||||||||
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.droppable.DroppableBehavior
public class DroppableBehavior
$Id$
Sets the attached component droppable, e.g. it can accept draggable elements.
Nested Class Summary | |
---|---|
static class |
DroppableBehavior.ToleranceEnum
Enumeration for the tolerance option |
Field Summary | |
---|---|
static String |
UI_DRAGGABLE
Properties on the ui parameter (use it into callback functions) : current draggable element, a jQuery object. |
static String |
UI_HELPER
Properties on the ui parameter (use it into callback functions) : current draggable helper, a jQuery object |
static String |
UI_OFFSET
Properties on the ui parameter (use it into callback functions) : current absolute position of the draggable helper { top: , left: } |
static String |
UI_POSITION
Properties on the ui parameter (use it into callback functions) : current position of the draggable helper { top: , left: } |
Constructor Summary | |
---|---|
DroppableBehavior()
|
Method Summary | |
---|---|
JsStatement |
destroy()
Method to destroy the droppable This will return the element back to its pre-init state. |
void |
destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to destroy the droppable within the ajax request |
void |
detach(org.apache.wicket.Component component)
|
JsStatement |
disable()
Method to disable the droppable |
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to disable the droppable within the ajax request |
JsStatement |
enable()
Method to enable the droppable |
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to enable the droppable within the ajax request |
DroppableAccept |
getAccept()
|
String |
getActiveClass()
|
String |
getHoverClass()
|
protected Options |
getOptions()
Method retrieving the options of the component |
String |
getScope()
|
DroppableBehavior.ToleranceEnum |
getTolerance()
|
boolean |
isAddClasses()
|
boolean |
isDisabled()
|
boolean |
isGreedy()
|
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)
|
DroppableBehavior |
setAccept(DroppableAccept accept)
All draggables that match the selector will be accepted. |
DroppableBehavior |
setActivateEvent(JsScopeUiEvent activate)
Set's the callback when an accepted draggable starts dragging. |
DroppableBehavior |
setActiveClass(String activeClass)
If specified, the class will be added to the droppable while an acceptable draggable is being dragged. |
DroppableBehavior |
setAddClasses(boolean addClasses)
If true, will prevent event propagation on nested droppables. |
DroppableBehavior |
setDeactivateEvent(JsScopeUiEvent deactivate)
Set's the callback when an accepted draggable stops dragging. |
DroppableBehavior |
setDisabled(boolean disabled)
Disables (true) or enables (false) the droppable. |
DroppableBehavior |
setDropEvent(JsScopeUiEvent drop)
Set's the callback when an accepted draggable is dropped 'over' (within the tolerance of) this droppable. |
DroppableBehavior |
setGreedy(boolean greedy)
If true, will prevent event propagation on nested droppables. |
DroppableBehavior |
setHoverClass(String hoverClass)
If specified, the class will be added to the droppable while an acceptable draggable is being hovered. |
DroppableBehavior |
setOutEvent(JsScopeUiEvent out)
Set's the callback when an accepted draggable is dragged out (within the tolerance of) this droppable. |
DroppableBehavior |
setOverEvent(JsScopeUiEvent over)
Set's the callback when an accepted draggable is dragged 'over' (within the tolerance of) this droppable. |
DroppableBehavior |
setScope(String scope)
Used to group sets of draggable and droppable items, in addition to droppable's accept option. |
DroppableBehavior |
setTolerance(DroppableBehavior.ToleranceEnum tolerance)
Set's the mode to use for testing whether a draggable is 'over' a droppable. |
JsStatement |
statement()
Returns the main JsStatement used to create the plugin. |
JsStatement |
widget()
Method to returns the .ui-droppable element |
void |
widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to returns the .ui-droppable 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_DRAGGABLE
public static final String UI_HELPER
public static final String UI_POSITION
public static final String UI_OFFSET
Constructor Detail |
---|
public DroppableBehavior()
Method Detail |
---|
public void onBind()
WiQueryAbstractBehavior
onBind
in class WiQueryAbstractBehavior
public void detach(org.apache.wicket.Component component)
detach
in class org.apache.wicket.behavior.Behavior
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 DroppableBehavior setAccept(DroppableAccept accept)
accept
-
public DroppableAccept getAccept()
public DroppableBehavior setActiveClass(String activeClass)
activeClass
-
public String getActiveClass()
public DroppableBehavior setAddClasses(boolean addClasses)
addClasses
-
public boolean isAddClasses()
public DroppableBehavior setDisabled(boolean disabled)
disabled
-
public boolean isDisabled()
public DroppableBehavior setGreedy(boolean greedy)
greedy
-
public boolean isGreedy()
public DroppableBehavior setHoverClass(String hoverClass)
hoverClass
-
public String getHoverClass()
public DroppableBehavior setScope(String scope)
scope
-
public String getScope()
public DroppableBehavior setTolerance(DroppableBehavior.ToleranceEnum tolerance)
tolerance
-
public DroppableBehavior.ToleranceEnum getTolerance()
public DroppableBehavior setActivateEvent(JsScopeUiEvent activate)
activate
-
public DroppableBehavior setDeactivateEvent(JsScopeUiEvent deactivate)
deactivate
-
public DroppableBehavior setDropEvent(JsScopeUiEvent drop)
drop
-
public DroppableBehavior setOutEvent(JsScopeUiEvent out)
out
-
public DroppableBehavior setOverEvent(JsScopeUiEvent over)
over
-
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 |