tooltip2.add(
new TooltipBehavior().setDelay(500)
.setPosition(Position.bottom_right)
.setPredelay(500)
.setRelative(true)
.setOffset(new Offset(-10,-10))
.setOnBeforeShow(new JQueryToolsOnBeforeShowUiEvent() {
private static final long serialVersionUID = 1L;
@Override
protected void execute(JsScopeContext scopeContext) {
scopeContext.append("$('#position').html('['+position.top + ',' + position.left+']');");
}
})
.setOnHideEvent(new JQueryToolsUiEvent() {
private static final long serialVersionUID = 1L;
@Override
protected void execute(JsScopeContext scopeContext) {
scopeContext.append("$('#position').html('');");
}
}));
add(tooltip2);
WebMarkupContainer withAjax = new WebMarkupContainer("withAjax");
withAjax.add(new TooltipAjaxBehaviour()
.setOffset(new Offset(30, 120))
.setOnBeforeShow(new IToolTipOnBeforeShowUIEventHandler() {
private static final long serialVersionUID = 1L;
public void onEvent(AjaxRequestTarget target, Component component, int top, int left) {