diff options
author | Sami Viitanen <sami.viitanen@vaadin.com> | 2012-06-28 15:43:11 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-06-28 16:49:54 +0300 |
commit | 18ac8b25501e28cfcfc3271d2c6722a00fa01b98 (patch) | |
tree | 3e2b4d90e98c3531e9bd4ac4847cf48a70a6b70d /src/com/vaadin/terminal/gwt/client/ApplicationConnection.java | |
parent | 92784107eddb53bd1a5f651775937a3caf2eeae0 (diff) | |
download | vaadin-framework-18ac8b25501e28cfcfc3271d2c6722a00fa01b98.tar.gz vaadin-framework-18ac8b25501e28cfcfc3271d2c6722a00fa01b98.zip |
Tooltips are now handled by the connector and not the widget (#8425)
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/ApplicationConnection.java')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ApplicationConnection.java | 99 |
1 files changed, 5 insertions, 94 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java index 8484d4abea..da4dfa08dc 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java @@ -35,7 +35,6 @@ import com.google.gwt.regexp.shared.RegExp; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; -import com.google.gwt.user.client.Event; import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.ui.HasWidgets; import com.google.gwt.user.client.ui.Widget; @@ -2323,57 +2322,8 @@ public class ApplicationConnection { /* Extended title handling */ - /** - * Data showed in tooltips are stored centrilized as it may be needed in - * varios place: caption, layouts, and in owner components themselves. - * - * Updating TooltipInfo is done in updateComponent method. - * - */ - public TooltipInfo getTooltipTitleInfo(ComponentConnector titleOwner, - Object key) { - if (null == titleOwner) { - return null; - } - return connectorMap.getTooltipInfo(titleOwner, key); - } - private final VTooltip tooltip = new VTooltip(this); - /** - * Component may want to delegate Tooltip handling to client. Layouts add - * Tooltip (description, errors) to caption, but some components may want - * them to appear one other elements too. - * - * Events wanted by this handler are same as in Tooltip.TOOLTIP_EVENTS - * - * @param event - * @param owner - */ - public void handleTooltipEvent(Event event, ComponentConnector owner) { - tooltip.handleTooltipEvent(event, owner, null); - - } - - /** - * Component may want to delegate Tooltip handling to client. Layouts add - * Tooltip (description, errors) to caption, but some components may want - * them to appear one other elements too. - * - * Events wanted by this handler are same as in Tooltip.TOOLTIP_EVENTS - * - * @param event - * @param owner - * @param key - * the key for tooltip if this is "additional" tooltip, null for - * components "main tooltip" - */ - public void handleTooltipEvent(Event event, ComponentConnector owner, - Object key) { - tooltip.handleTooltipEvent(event, owner, key); - - } - private ConnectorMap connectorMap = GWT.create(ConnectorMap.class); protected String getUidlSecurityKey() { @@ -2401,34 +2351,6 @@ public class ApplicationConnection { } /** - * If component has several tooltips in addition to the one provided by - * {@link com.vaadin.ui.AbstractComponent}, component can register them with - * this method. - * <p> - * Component must also pipe events to - * {@link #handleTooltipEvent(Event, ComponentConnector, Object)} method. - * <p> - * This method can also be used to deregister tooltips by using null as - * tooltip - * - * @param paintable - * Paintable "owning" this tooltip - * @param key - * key assosiated with given tooltip. Can be any object. For - * example a related dom element. Same key must be given for - * {@link #handleTooltipEvent(Event, ComponentConnector, Object)} - * method. - * - * @param tooltip - * the TooltipInfo object containing details shown in tooltip, - * null if deregistering tooltip - */ - public void registerTooltip(ComponentConnector paintable, Object key, - TooltipInfo tooltip) { - connectorMap.registerTooltip(paintable, key, tooltip); - } - - /** * Gets the {@link ApplicationConfiguration} for the current application. * * @see ApplicationConfiguration @@ -2510,15 +2432,15 @@ public class ApplicationConnection { // connectorMap.unregisterConnector(p); } + /** + * Get VTooltip instance related to application connection + * + * @return VTooltip instance + */ public VTooltip getVTooltip() { return tooltip; } - @Deprecated - public void handleTooltipEvent(Event event, Widget owner, Object key) { - handleTooltipEvent(event, getConnectorMap().getConnector(owner), key); - } - /** * Method provided for backwards compatibility. Duties previously done by * this method is now handled by the state change event handler in @@ -2547,17 +2469,6 @@ public class ApplicationConnection { } @Deprecated - public void handleTooltipEvent(Event event, Widget owner) { - handleTooltipEvent(event, getConnectorMap().getConnector(owner)); - - } - - @Deprecated - public void registerTooltip(Widget owner, Object key, TooltipInfo info) { - registerTooltip(getConnectorMap().getConnector(owner), key, info); - } - - @Deprecated public boolean hasEventListeners(Widget widget, String eventIdentifier) { return hasEventListeners(getConnectorMap().getConnector(widget), eventIdentifier); |