public class SelectableBehavior extends WiQueryAbstractBehavior
Wicket behabior to use the JQuery UI Selectable behavior
* Example : Java code:
List values = Arrays.asList(
"Value 1",
"Value 2",
"Value 3",
"Value 4",
"Value 5");
ListView listView = new ListView("listView", values) { | Modifier and Type | Class and Description |
|---|---|
static class |
SelectableBehavior.ToleranceEnum
Enumeration for the tolerance option
|
| Constructor and Description |
|---|
SelectableBehavior()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(org.apache.wicket.Component component) |
void |
contribute(WiQueryResourceManager wiQueryResourceManager)
Declares resources (JavaScript and CSS files) to import.
|
JsStatement |
destroy()
Method to destroy
This will return the element back to its pre-init state.
|
void |
destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to destroy within the ajax request
|
void |
detach(org.apache.wicket.Component component) |
JsStatement |
disable()
Method to disable
|
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to disable within the ajax request
|
JsStatement |
enable()
Method to enable
|
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to enable within the ajax request
|
String |
getCancel() |
int |
getDelay() |
int |
getDistance() |
String |
getFilter() |
protected Options |
getOptions()
Method retrieving the options of the component
|
SelectableBehavior.ToleranceEnum |
getTolerance() |
boolean |
isAutoRefresh() |
boolean |
isDisabled() |
JsStatement |
refresh()
Method to refresh
|
void |
refresh(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to refresh within the ajax request
|
SelectableBehavior |
setAutoRefresh(boolean autoRefresh)
This determines whether to refresh (recalculate) the position and size
of each selected at the beginning of each select operation.
|
SelectableBehavior |
setCancel(String cancel)
Set's the prevent selecting if you start on elements matching the selector
|
SelectableBehavior |
setDelay(int delay)
Set's the delay (in milliseconds) to define when the selecting should start
|
SelectableBehavior |
setDisabled(boolean disabled)
Disables (true) or enables (false) the selectable.
|
SelectableBehavior |
setDistance(int distance)
Set's the tolerance in pixels
|
SelectableBehavior |
setFilter(String filter)
Set's the matching child to be selectable
|
SelectableBehavior |
setSelectedEvent(JsScopeUiEvent selected)
Set's the selected event
This event is triggered at the end of the select operation, on each
element added to the selection.
|
SelectableBehavior |
setSelectingEvent(JsScopeUiEvent selecting)
Set's the selecting event
This event is triggered during the select operation, on each element
added to the selection.
|
SelectableBehavior |
setStartEvent(JsScopeUiEvent start)
Set's the start event
This event is triggered at the beginning of the select operation.
|
SelectableBehavior |
setStopEvent(JsScopeUiEvent stop)
Set's the stop event
This event is triggered at the end of the select operation.
|
SelectableBehavior |
setTolerance(SelectableBehavior.ToleranceEnum tolerance)
Set's the tolerance
fit: draggable overlaps the droppable entirely
touch: draggable overlaps the droppable any amount
|
SelectableBehavior |
setUnselectedEvent(JsScopeUiEvent unselected)
Set's the unselected event
This event is triggered at the end of the select operation, on each element
removed from the selection.
|
SelectableBehavior |
setUnselectingEvent(JsScopeUiEvent unselecting)
Set's the unselecting event
This event is triggered during the select operation, on each element
removed from the selection.
|
JsStatement |
statement()
Returns the main
JsStatement used to create the plugin. |
JsStatement |
widget()
Method to returns the .ui-selectable element
|
void |
widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to returns the .ui-selectable element within the ajax request
|
getComponentpublic void bind(org.apache.wicket.Component component)
bind in interface org.apache.wicket.behavior.IBehaviorbind in class WiQueryAbstractBehaviorpublic void detach(org.apache.wicket.Component component)
detach in interface org.apache.wicket.behavior.IBehaviordetach in class org.apache.wicket.behavior.AbstractBehaviorpublic void contribute(WiQueryResourceManager wiQueryResourceManager)
contribute in interface IWiQueryPlugincontribute in class WiQueryAbstractBehaviorwiQueryResourceManager - The WiQueryResourceManager instance managing this
component resources.WiQueryAbstractBehavior.contribute(org.odlabs.wiquery.core.commons.WiQueryResourceManager)public String getCancel()
public int getDelay()
public int getDistance()
public String getFilter()
protected Options getOptions()
public SelectableBehavior.ToleranceEnum getTolerance()
public boolean isAutoRefresh()
public SelectableBehavior setAutoRefresh(boolean autoRefresh)
autoRefresh - public SelectableBehavior setDisabled(boolean disabled)
disabled - public boolean isDisabled()
public SelectableBehavior setCancel(String cancel)
cancel - Selector (default : ':input,option')public SelectableBehavior setDelay(int delay)
delay - public SelectableBehavior setDistance(int distance)
distance - public SelectableBehavior setFilter(String filter)
filter - Selector (default : '*')public SelectableBehavior setTolerance(SelectableBehavior.ToleranceEnum tolerance)
tolerance - public JsStatement statement()
JsStatement used to create the plugin.statement in interface IWiQueryPluginstatement in class WiQueryAbstractBehaviorJsStatement corresponding to this component.WiQueryAbstractBehavior.statement()public SelectableBehavior setSelectedEvent(JsScopeUiEvent selected)
selected - Associated JsScopeUiEventpublic SelectableBehavior setSelectingEvent(JsScopeUiEvent selecting)
selecting - Associated JsScopeUiEventpublic SelectableBehavior setStartEvent(JsScopeUiEvent start)
start - Associated JsScopeUiEventpublic SelectableBehavior setStopEvent(JsScopeUiEvent stop)
stop - Associated JsScopeUiEventpublic SelectableBehavior setUnselectedEvent(JsScopeUiEvent unselected)
unselected - Associated JsScopeUiEventpublic SelectableBehavior setUnselectingEvent(JsScopeUiEvent unselecting)
unselecting - Associated JsScopeUiEventpublic 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 refresh()
public void refresh(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement widget()
public void widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - Copyright © 2009-2012. All Rights Reserved.