public class JQueryUiTooltip extends JQueryDurableAjaxBehavior
Component to give it a jQuery UI tooltip. This Behavior will generate the tooltip
JavaScript.
adf
Default selector: the component's markup id
Default tooltip content: value(s) of the title attribute(s) or the
data-tolltip attribute(s) dynamically obtained by a JS function
You can use custom CSS through ResourceReferences. If no user ResourceReference
for CSS is provided a default style will be used.
An instance of this class can be added to one and only one Component. Another
Component that should have exactly the same behavior needs it's own instance.JQueryAjaxBehavior.JsAjaxCallbackFunction, JQueryAjaxBehavior.JsBuilder, JQueryAjaxBehavior.JsFunction| Modifier and Type | Field and Description |
|---|---|
static org.apache.wicket.request.resource.CssResourceReference |
uiTooltipCss_1_10_3 |
static JQueryResourceReference |
uiTooltipJs_1_10_3 |
renderedrawOptions| Modifier | Constructor and Description |
|---|---|
|
JQueryUiTooltip(JQueryResourceReference customJQueryUiTooltipJs) |
protected |
JQueryUiTooltip(JQueryUiWidget widget)
Constructor for testing.
|
|
JQueryUiTooltip(String componentSelector,
JQueryResourceReference customJQueryUiTooltipJs) |
| Modifier and Type | Method and Description |
|---|---|
JQueryUiTooltip |
addCssResource(org.apache.wicket.request.resource.ResourceReference cssResourceReference)
Adds the given CSS
ResourceReference to the response for custom tooltip styling. |
protected JQueryAjaxBehavior.JsBuilder |
getJsBuilder() |
void |
renderHead(org.apache.wicket.Component component,
org.apache.wicket.markup.head.IHeaderResponse response)
Do not override this method unless you know exactly what you do.
|
JQueryUiTooltip |
setContent(org.apache.wicket.Component content)
Sets the
content option of the tooltip widget like this:
content:$('#markupIdOfGivenComponent').html(). |
JQueryUiTooltip |
setContent(JQueryAjaxBehavior.JsFunction content)
Sets the
content option of the tooltip widget like this:
content:function(){return 'tooltip content';}. |
JQueryUiTooltip |
setContent(String content)
Sets the
content option of the tooltip widget like this: {@code content:
' |
JQueryUiTooltip |
setDisabled(boolean disabled)
Sets the
disabled option of the tooltip widget like this:
disabled:true. |
JQueryUiTooltip |
setHide(Boolean hide)
Sets the
hide option of the tooltip widget. |
JQueryUiTooltip |
setHide(int hide)
Sets the
hide option of the tooltip widget. |
JQueryUiTooltip |
setHide(JsOption... options)
Sets the
hide option of the tooltip widget. |
JQueryUiTooltip |
setHide(String hide)
Sets the
hide option of the tooltip widget. |
JQueryUiTooltip |
setItems(String itemsSelector)
Sets the
items option of the tooltip widget like this:
items:'.element'. |
JQueryUiTooltip |
setOnClose(String close)
Sets the
close event handler of the tooltip widget like this:
close:function(event,ui){some code;}. |
JQueryUiTooltip |
setOnCreate(String create)
Sets the
create event handler of the tooltip widget like this:
create:function(event,ui){some code;}. |
JQueryUiTooltip |
setOnOpen(String open)
Sets the
open event handler of the tooltip widget like this:
open:function(event,ui){some code;}. |
JQueryUiTooltip |
setPosition(JsOption... options)
Sets the
position option of the tooltip widget like this:
position:{my:'center'}. |
JQueryUiTooltip |
setShow(Boolean show)
Sets the
show option of the tooltip widget. |
JQueryUiTooltip |
setShow(int show)
Sets the
show option of the tooltip widget. |
JQueryUiTooltip |
setShow(JsOption... options)
Sets the
show option of the tooltip widget. |
JQueryUiTooltip |
setShow(String show)
Sets the
show option of the tooltip widget. |
JQueryUiTooltip |
setTooltipClass(String tooltipClass)
Sets the
tooltipClass option of the tooltip widget which will be rendered like
this: tooltipClass:'className'. |
JQueryUiTooltip |
setTrack(boolean track)
Sets the
track option of the tooltip widget like this: track:true . |
static JQueryUiTooltip |
tooltip_1_10_3()
Factory method.
|
static JQueryUiTooltip |
tooltip_1_10_3(String componentSelector)
Factory method.
|
JQueryUiTooltip |
withoutCss()
Turns of adding any jQuery UI CSS to the response (even the default one).
|
isAlreadyRendered, setRestoreAfterRedraw, updateBehavioraddCssResources, addUserProvidedResourceReferences, addUserProvidedResourceReferences, getUserProvidedResourceReferences, printParameters, printParameters, respond, setRawOptionsfindIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes, updateAjaxAttributesafterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbindpublic static final JQueryResourceReference uiTooltipJs_1_10_3
public static final org.apache.wicket.request.resource.CssResourceReference uiTooltipCss_1_10_3
public JQueryUiTooltip(JQueryResourceReference customJQueryUiTooltipJs)
customJQueryUiTooltipJs - a JQueryResourceReference which should provide all jQuery UI libraries
needed to use the jQuery UI tooltip widgetpublic JQueryUiTooltip(String componentSelector, JQueryResourceReference customJQueryUiTooltipJs)
componentSelector - the selector which will be used by jQuery to add the tooltip(s)customJQueryUiTooltipJs - a JQueryResourceReference which should provide all jQuery UI libraries
needed to use the jQuery UI tooltip widgetprotected JQueryUiTooltip(JQueryUiWidget widget)
widget - public static JQueryUiTooltip tooltip_1_10_3()
JQueryUiTooltip using jQuery UI 1.10.3public static JQueryUiTooltip tooltip_1_10_3(String componentSelector)
componentSelector - the selector which will be used by jQuery to add the tooltip(s)JQueryUiTooltip using jQuery UI 1.10.3public void renderHead(org.apache.wicket.Component component,
org.apache.wicket.markup.head.IHeaderResponse response)
JQueryDurableAjaxBehaviorsuper.renderHead(response).renderHead in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributorrenderHead in class JQueryDurableAjaxBehaviorprotected JQueryAjaxBehavior.JsBuilder getJsBuilder()
getJsBuilder in class JQueryDurableAjaxBehaviorpublic JQueryUiTooltip addCssResource(org.apache.wicket.request.resource.ResourceReference cssResourceReference)
ResourceReference to the response for custom tooltip styling. If
no user ResourceReference is provided a default style will be used.cssResourceReference - public JQueryUiTooltip withoutCss()
public JQueryUiTooltip setContent(String content)
content option of the tooltip widget like this: content:
'<h1>tooltip content</h1>'.
Note: The content option has to stay in sync with the items option
(see http://api.jqueryui.com/tooltip/#option-content).content - a String containing the content of this tooltip (e.g.
<h1>tooltip content</h1>)public JQueryUiTooltip setContent(JQueryAjaxBehavior.JsFunction content)
content option of the tooltip widget like this:
content:function(){return 'tooltip content';}.
Note: The content option has to stay in sync with the items option
(see http://api.jqueryui.com/tooltip/#option-content).content - a JsFunction containing a JavaScript function which returns the content of
this tooltip (e.g.
new JsFunction("function(){return 'tooltip content';}"))public JQueryUiTooltip setContent(org.apache.wicket.Component content)
content option of the tooltip widget like this:
content:$('#markupIdOfGivenComponent').html().
Note: The content option has to stay in sync with the items option
(see http://api.jqueryui.com/tooltip/#option-content).content - the Component whose markup will be used as the content of this tooltippublic JQueryUiTooltip setDisabled(boolean disabled)
disabled option of the tooltip widget like this:
disabled:true.disabled - a boolean containing the disabled option of this tooltippublic JQueryUiTooltip setHide(Boolean hide)
hide option of the tooltip widget.hide - see http://api.jqueryui.com/tooltip/#option-hidepublic JQueryUiTooltip setHide(int hide)
hide option of the tooltip widget.hide - see http://api.jqueryui.com/tooltip/#option-hidepublic JQueryUiTooltip setHide(String hide)
hide option of the tooltip widget.hide - see http://api.jqueryui.com/tooltip/#option-hidepublic JQueryUiTooltip setHide(JsOption... options)
hide option of the tooltip widget.options - see http://api.jqueryui.com/tooltip/#option-hidepublic JQueryUiTooltip setItems(String itemsSelector)
items option of the tooltip widget like this:
items:'.element'.
Note: The items option has to stay in sync with the content option
(see http://api.jqueryui.com/tooltip/#option-items).itemsSelector - a String containing the selector(s) of the element(s) this tooltip should be
applied to (e.g. .element)public JQueryUiTooltip setPosition(JsOption... options)
position option of the tooltip widget like this:
position:{my:'center'}.position - a String containing the position object of this tooltip (e.g. {my:'center'})public JQueryUiTooltip setShow(Boolean show)
show option of the tooltip widget.show - see
http://api.jqueryui.com/tooltip/#option-showpublic JQueryUiTooltip setShow(int show)
show option of the tooltip widget.show - see
http://api.jqueryui.com/tooltip/#option-showpublic JQueryUiTooltip setShow(String show)
show option of the tooltip widget.show - see
http://api.jqueryui.com/tooltip/#option-showpublic JQueryUiTooltip setShow(JsOption... options)
show option of the tooltip widget.options - see
http://api.jqueryui.com/tooltip/#option-showpublic JQueryUiTooltip setTooltipClass(String tooltipClass)
tooltipClass option of the tooltip widget which will be rendered like
this: tooltipClass:'className'.tooltipClass - a String containing the tooltipClass option of this tooltip (e.g. className)public JQueryUiTooltip setTrack(boolean track)
track option of the tooltip widget like this: track:true .track - a boolean containing the track option of this tooltippublic JQueryUiTooltip setOnClose(String close)
close event handler of the tooltip widget like this:
close:function(event,ui){some code;}.close - a String containing the close event handler of this tooltip (e.g.
function(event,ui){some code;}.)public JQueryUiTooltip setOnCreate(String create)
create event handler of the tooltip widget like this:
create:function(event,ui){some code;}.create - a String containing the create event handler of this tooltip (e.g.
function(event,ui){some code;}.)public JQueryUiTooltip setOnOpen(String open)
open event handler of the tooltip widget like this:
open:function(event,ui){some code;}.open - a String containing the open event handler of this tooltip (e.g.
function(event,ui){some code;}.)Copyright © 2015. All rights reserved.