|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.behavior.AbstractBehavior
org.wicketstuff.minis.prototipbehaviour.PrototipBehaviour
public class PrototipBehaviour
Prototip behavior The component you add this behavior to will be the component which the tooltip appears for note this does not work if you add the behavior to a panel
| Field Summary | |
|---|---|
protected boolean |
onLoad
|
protected boolean |
overrideHeaderContributor
|
protected static JS_TYPE |
selectedJsType
Made this static as it is very unlikely that you would want different versions of prototip.js across your site |
protected PrototipSettings |
settings
|
protected org.apache.wicket.Component |
source
|
protected java.lang.String |
title
|
protected java.lang.String |
tooltip
|
protected org.apache.wicket.Component |
tooltipComponent
|
| Constructor Summary | |
|---|---|
PrototipBehaviour()
Default constructor If you use this then you must set either a string, or a component manually |
|
PrototipBehaviour(org.apache.wicket.Component panel)
Provide a component to show as the tool tip (eg a panel) |
|
PrototipBehaviour(java.lang.String tooltip)
Provide a simple string as a tooltip |
|
| Method Summary | |
|---|---|
void |
bind(org.apache.wicket.Component component)
override bind so that the component you add this behavior to becomes the component the tooltip applies to |
static JS_TYPE |
getSelectedJsType()
|
PrototipSettings |
getSettings()
|
org.apache.wicket.Component |
getSource()
|
java.lang.String |
getTitle()
|
java.lang.String |
getTooltip()
|
org.apache.wicket.Component |
getTooltipComponent()
|
void |
hide(org.apache.wicket.ajax.AjaxRequestTarget target)
Given an ajax request target, hide this tip on the page |
boolean |
isOnLoad()
Is the javascript set to load 'onload' if false then it will be 'ondomready' |
boolean |
isOverrideHeaderContributor()
|
void |
remove(org.apache.wicket.ajax.AjaxRequestTarget target)
Given an ajax request target, remove this tip from the page |
void |
renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
Add the required css and js files to the page Permission to distribute prototip files given by prototip creator Nick Stakenburg (http://www.nickstakenburg.com) Also add the javascript to create the tooltip |
void |
setOnLoad(boolean onLoad)
Is the javascript set to load 'onload' if false then it will be 'ondomready' |
PrototipBehaviour |
setOverrideHeaderContributor(boolean overrideHeaderContributor)
If you do not want this behavour to add the required javascript and css files to the header set this to true (default false) |
static void |
setSelectedJsType(JS_TYPE selectedJsType)
There are 3 different js files which can be included: a normal uncompressed one a minified one a minified and gziped one To override the default (the minified one) set this parameter This is a static method and as such affects all PrototipBehaviour in the system, this is so that you do not have to set the type for every PrototipBehaviour that you use (which is tedious) |
PrototipBehaviour |
setSettings(PrototipSettings settings)
|
PrototipBehaviour |
setSource(org.apache.wicket.Component source)
|
PrototipBehaviour |
setTitle(java.lang.String title)
|
PrototipBehaviour |
setTooltip(java.lang.String tooltip)
|
PrototipBehaviour |
setTooltipComponent(org.apache.wicket.Component tooltipComponent)
|
protected java.lang.String |
toJavascript()
Get string to add the prototip to the page |
| Methods inherited from class org.apache.wicket.behavior.AbstractBehavior |
|---|
afterRender, beforeRender, cleanup, detach, detachModel, exception, getStatelessHint, isEnabled, isTemporary, onComponentTag, onException, onRendered, rendered |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.wicket.Component source
protected java.lang.String tooltip
protected org.apache.wicket.Component tooltipComponent
protected PrototipSettings settings
protected boolean overrideHeaderContributor
protected java.lang.String title
protected boolean onLoad
protected static JS_TYPE selectedJsType
| Constructor Detail |
|---|
public PrototipBehaviour()
public PrototipBehaviour(java.lang.String tooltip)
tooltip - public PrototipBehaviour(org.apache.wicket.Component panel)
panel - | Method Detail |
|---|
public void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
renderHead in interface org.apache.wicket.markup.html.IHeaderContributorrenderHead in class org.apache.wicket.behavior.AbstractBehaviorIHeaderContributor.renderHead(org.apache.wicket.markup.html.IHeaderResponse)public void bind(org.apache.wicket.Component component)
bind in interface org.apache.wicket.behavior.IBehaviorbind in class org.apache.wicket.behavior.AbstractBehaviorpublic void remove(org.apache.wicket.ajax.AjaxRequestTarget target)
target - public void hide(org.apache.wicket.ajax.AjaxRequestTarget target)
target - protected java.lang.String toJavascript()
public org.apache.wicket.Component getSource()
public PrototipBehaviour setSource(org.apache.wicket.Component source)
source - the source to set
public java.lang.String getTooltip()
public PrototipBehaviour setTooltip(java.lang.String tooltip)
tooltip - the tooltip to set
public org.apache.wicket.Component getTooltipComponent()
public PrototipBehaviour setTooltipComponent(org.apache.wicket.Component tooltipComponent)
panel - the panel to set
public PrototipSettings getSettings()
public PrototipBehaviour setSettings(PrototipSettings settings)
settings - the settings to set
public boolean isOverrideHeaderContributor()
public PrototipBehaviour setOverrideHeaderContributor(boolean overrideHeaderContributor)
overrideHeaderContributor - the overrideHeaderContributor to set
public java.lang.String getTitle()
public PrototipBehaviour setTitle(java.lang.String title)
title - the title to set
public static JS_TYPE getSelectedJsType()
public static void setSelectedJsType(JS_TYPE selectedJsType)
selectedJsType - the selectedJsType to setpublic boolean isOnLoad()
public void setOnLoad(boolean onLoad)
onLoad -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||