Class EventsHelper
- java.lang.Object
-
- org.wicketstuff.wiquery.core.javascript.helper.EventsHelper
-
public abstract class EventsHelper extends java.lang.Object$Id: EventsHelper.java 1714 2011-09-22 20:38:30Z hielke.hoeve $Helper to bind javascript scope and events
- Since:
- 1.0.2
- Author:
- Julien Roche
-
-
Constructor Summary
Constructors Constructor Description EventsHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ChainableStatementbind(EventLabel eventLabel, JsScope jsScope)Binds a handler to one or more events (like click) for each matched element.static ChainableStatementblur()Triggers the blur event of each matched element.static ChainableStatementblur(JsScope jsScope)Bind a function to the blur event of each matched element.static ChainableStatementchange()Triggers the change event of each matched element.static ChainableStatementchange(JsScope jsScope)Bind a function to the change event of each matched element.static ChainableStatementclick()Triggers the click event of each matched element.static ChainableStatementclick(JsScope jsScope)Bind a function to the click event of each matched element.static ChainableStatementdblclick()Triggers the dblclick event of each matched element.static ChainableStatementdblclick(JsScope jsScope)Bind a function to the dblclick event of each matched element.static ChainableStatementdie(EventLabel eventLabel, JsScope jsScope)This does the opposite of live, it removes a bound live event.static ChainableStatementerror()Triggers the error event of each matched element.static ChainableStatementerror(JsScope jsScope)Bind a function to the error event of each matched element.static ChainableStatementfocus()Triggers the focus event of each matched element.static ChainableStatementfocus(JsScope jsScope)Bind a function to the focus event of each matched element.static ChainableStatementhover(JsScope over, JsScope out)Simulates hovering (moving the mouse on, and off, an object).static ChainableStatementkeydown()Triggers the keydown event of each matched element.static ChainableStatementkeydown(JsScope jsScope)Bind a function to the keydown event of each matched element.static ChainableStatementkeypress()Triggers the keypress event of each matched element.static ChainableStatementkeypress(JsScope jsScope)Bind a function to the keypress event of each matched element.static ChainableStatementkeyup()Triggers the keyup event of each matched element.static ChainableStatementkeyup(JsScope jsScope)Bind a function to the keyup event of each matched element.static ChainableStatementlive(EventLabel eventLabel, JsScope jsScope)Binds a handler to an event (like click) for all current - and future - matched element.static ChainableStatementload(JsScope jsScope)Bind a function to the load event of each matched element.static ChainableStatementmousedown(JsScope jsScope)Bind a function to the mousedown event of each matched element.static ChainableStatementmouseenter(JsScope jsScope)Bind a function to the mouseenter event of each matched element.static ChainableStatementmouseleave(JsScope jsScope)Bind a function to the mouseleave event of each matched element.static ChainableStatementmousemove(JsScope jsScope)Bind a function to the mousemove event of each matched element.static ChainableStatementmouseout(JsScope jsScope)Bind a function to the mouseout event of each matched element.static ChainableStatementmouseover(JsScope jsScope)Bind a function to the mouseover event of each matched element.static ChainableStatementmouseup(JsScope jsScope)Bind a function to the mouseup event of each matched element.static ChainableStatementone(EventLabel eventLabel, JsScope jsScope)Binds a handler to one or more events to be executed once for each matched element.static ChainableStatementready(JsScope jsScope)Binds a function to be executed whenever the DOM is ready to be traversed and manipulated.static ChainableStatementscroll(JsScope jsScope)Bind a function to the scroll event of each matched element.static ChainableStatementselect()Triggers the select event of each matched element.static ChainableStatementselect(JsScope jsScope)Bind a function to the select event of each matched element.static ChainableStatementsubmit()Triggers the submit event of each matched element.static ChainableStatementsubmit(JsScope jsScope)Bind a function to the submit event of each matched element.static ChainableStatementtoggle(JsScope jsScope, JsScope jsScope2)Toggle among two function calls every other click.static ChainableStatementtoggle(JsScope jsScope, JsScope jsScope2, JsScope... jsScopes)Toggle among two or more function calls every other click.static ChainableStatementtrigger(EventLabel eventLabel)Trigger an event on every matched element.static ChainableStatementtrigger(EventLabel eventLabel, java.lang.CharSequence... data)Trigger an event on every matched element.static ChainableStatementtriggerHandler(EventLabel eventLabel)Triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browser's default actions, bubbling, or live events.static ChainableStatementtriggerHandler(EventLabel eventLabel, java.lang.CharSequence... data)Triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browser's default actions, bubbling, or live events.static ChainableStatementunbind(EventLabel eventLabel, JsScope jsScope)This does the opposite of bind, it removes bound events from each of the matched elements.static ChainableStatementunload(JsScope jsScope)Bind a function to the unload event of each matched element.
-
-
-
Method Detail
-
bind
public static ChainableStatement bind(EventLabel eventLabel, JsScope jsScope)
Binds a handler to one or more events (like click) for each matched element.- Parameters:
eventLabel- EventjsScope- Scope to use- Returns:
- the jQuery code
-
blur
public static ChainableStatement blur()
Triggers the blur event of each matched element.- Returns:
- the jQuery code
-
blur
public static ChainableStatement blur(JsScope jsScope)
Bind a function to the blur event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
change
public static ChainableStatement change()
Triggers the change event of each matched element.- Returns:
- the jQuery code
-
change
public static ChainableStatement change(JsScope jsScope)
Bind a function to the change event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
click
public static ChainableStatement click()
Triggers the click event of each matched element.- Returns:
- the jQuery code
-
click
public static ChainableStatement click(JsScope jsScope)
Bind a function to the click event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
dblclick
public static ChainableStatement dblclick()
Triggers the dblclick event of each matched element.- Returns:
- the jQuery code
-
dblclick
public static ChainableStatement dblclick(JsScope jsScope)
Bind a function to the dblclick event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
die
public static ChainableStatement die(EventLabel eventLabel, JsScope jsScope)
This does the opposite of live, it removes a bound live event.- Parameters:
eventLabel- EventjsScope- Scope to use- Returns:
- the jQuery code
-
error
public static ChainableStatement error()
Triggers the error event of each matched element.- Returns:
- the jQuery code
-
error
public static ChainableStatement error(JsScope jsScope)
Bind a function to the error event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
focus
public static ChainableStatement focus()
Triggers the focus event of each matched element.- Returns:
- the jQuery code
-
focus
public static ChainableStatement focus(JsScope jsScope)
Bind a function to the focus event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
hover
public static ChainableStatement hover(JsScope over, JsScope out)
Simulates hovering (moving the mouse on, and off, an object). This is a custom method which provides an 'in' to a frequent task.- Parameters:
over- Scope to use on "over"out- Scope to use on "out"- Returns:
- the jQuery code
-
keydown
public static ChainableStatement keydown()
Triggers the keydown event of each matched element.- Returns:
- the jQuery code
-
keydown
public static ChainableStatement keydown(JsScope jsScope)
Bind a function to the keydown event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
keypress
public static ChainableStatement keypress()
Triggers the keypress event of each matched element.- Returns:
- the jQuery code
-
keypress
public static ChainableStatement keypress(JsScope jsScope)
Bind a function to the keypress event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
keyup
public static ChainableStatement keyup()
Triggers the keyup event of each matched element.- Returns:
- the jQuery code
-
keyup
public static ChainableStatement keyup(JsScope jsScope)
Bind a function to the keyup event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
live
public static ChainableStatement live(EventLabel eventLabel, JsScope jsScope)
Binds a handler to an event (like click) for all current - and future - matched element.- Parameters:
eventLabel- EventjsScope- Scope to use- Returns:
- the jQuery code
-
load
public static ChainableStatement load(JsScope jsScope)
Bind a function to the load event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mousedown
public static ChainableStatement mousedown(JsScope jsScope)
Bind a function to the mousedown event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mouseenter
public static ChainableStatement mouseenter(JsScope jsScope)
Bind a function to the mouseenter event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mouseleave
public static ChainableStatement mouseleave(JsScope jsScope)
Bind a function to the mouseleave event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mousemove
public static ChainableStatement mousemove(JsScope jsScope)
Bind a function to the mousemove event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mouseout
public static ChainableStatement mouseout(JsScope jsScope)
Bind a function to the mouseout event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mouseover
public static ChainableStatement mouseover(JsScope jsScope)
Bind a function to the mouseover event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
mouseup
public static ChainableStatement mouseup(JsScope jsScope)
Bind a function to the mouseup event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
one
public static ChainableStatement one(EventLabel eventLabel, JsScope jsScope)
Binds a handler to one or more events to be executed once for each matched element.- Parameters:
eventLabel- EventjsScope- Scope to use- Returns:
- the jQuery code
-
ready
public static ChainableStatement ready(JsScope jsScope)
Binds a function to be executed whenever the DOM is ready to be traversed and manipulated.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
scroll
public static ChainableStatement scroll(JsScope jsScope)
Bind a function to the scroll event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
select
public static ChainableStatement select()
Triggers the select event of each matched element.- Returns:
- the jQuery code
-
select
public static ChainableStatement select(JsScope jsScope)
Bind a function to the select event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
submit
public static ChainableStatement submit()
Triggers the submit event of each matched element.- Returns:
- the jQuery code
-
submit
public static ChainableStatement submit(JsScope jsScope)
Bind a function to the submit event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
toggle
public static ChainableStatement toggle(JsScope jsScope, JsScope jsScope2)
Toggle among two function calls every other click.- Parameters:
jsScope- Scope to usejsScope2- Scope to use- Returns:
- the jQuery code
-
toggle
public static ChainableStatement toggle(JsScope jsScope, JsScope jsScope2, JsScope... jsScopes)
Toggle among two or more function calls every other click.- Parameters:
jsScope- Scope to usejsScope2- Scope to usejsScopes- Additional functions- Returns:
- the jQuery code
-
trigger
public static ChainableStatement trigger(EventLabel eventLabel)
Trigger an event on every matched element.- Parameters:
eventLabel- Event- Returns:
- the jQuery code
-
trigger
public static ChainableStatement trigger(EventLabel eventLabel, java.lang.CharSequence... data)
Trigger an event on every matched element.- Parameters:
eventLabel- Eventdata- Data for the scope- Returns:
- the jQuery code
-
triggerHandler
public static ChainableStatement triggerHandler(EventLabel eventLabel)
Triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browser's default actions, bubbling, or live events.- Parameters:
eventLabel- Event- Returns:
- the jQuery code
-
triggerHandler
public static ChainableStatement triggerHandler(EventLabel eventLabel, java.lang.CharSequence... data)
Triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browser's default actions, bubbling, or live events.- Parameters:
eventLabel- Eventdata- Data for the scope- Returns:
- the jQuery code
-
unbind
public static ChainableStatement unbind(EventLabel eventLabel, JsScope jsScope)
This does the opposite of bind, it removes bound events from each of the matched elements.- Parameters:
eventLabel- EventjsScope- Scope to use- Returns:
- the jQuery code
-
unload
public static ChainableStatement unload(JsScope jsScope)
Bind a function to the unload event of each matched element.- Parameters:
jsScope- Scope to use- Returns:
- the jQuery code
-
-