diff options
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/VCaption.java')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/VCaption.java | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/VCaption.java b/src/com/vaadin/terminal/gwt/client/VCaption.java index 6f3fcf2c3a..2f7ba87870 100644 --- a/src/com/vaadin/terminal/gwt/client/VCaption.java +++ b/src/com/vaadin/terminal/gwt/client/VCaption.java @@ -35,6 +35,8 @@ public class VCaption extends HTML { ICON, CAPTION, REQUIRED, ERROR } + private TooltipInfo tooltipInfo = null; + /** * Creates a caption that is not linked to a {@link ComponentConnector}. * @@ -74,8 +76,6 @@ public class VCaption extends HTML { } setStyleName(CLASSNAME); - sinkEvents(VTooltip.TOOLTIP_EVENTS); - } /** @@ -345,9 +345,6 @@ public class VCaption extends HTML { public void onBrowserEvent(Event event) { super.onBrowserEvent(event); final Element target = DOM.eventGetTarget(event); - if (client != null && owner != null && target != getElement()) { - client.handleTooltipEvent(event, owner); - } if (DOM.eventGetType(event) == Event.ONLOAD && icon.getElement() == target) { @@ -555,6 +552,26 @@ public class VCaption extends HTML { } } + /** + * Sets the tooltip that should be shown for the caption + * + * @param tooltipInfo + * The tooltip that should be shown or null if no tooltip should + * be shown + */ + public void setTooltipInfo(TooltipInfo tooltipInfo) { + this.tooltipInfo = tooltipInfo; + } + + /** + * Returns the tooltip that should be shown for the caption + * + * @return The tooltip to show or null if no tooltip should be shown + */ + public TooltipInfo getTooltipInfo() { + return tooltipInfo; + } + protected Element getTextElement() { return captionText; } |