From: Leif Åstrand Date: Wed, 6 Jun 2012 06:59:22 +0000 (+0300) Subject: Change widget -> connector in some places X-Git-Tag: 7.0.0.alpha3~210 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9ae1a99ca3f4bcff88a576fddee6644ceeaa9d7e;p=vaadin-framework.git Change widget -> connector in some places --- diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java index 4e7213e777..c3bdc405aa 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java @@ -2133,7 +2133,7 @@ public class ApplicationConnection { int connectorType) { // Create and register a new connector with the given type ServerConnector p = widgetSet - .createWidget(connectorType, configuration); + .createConnector(connectorType, configuration); connectorMap.registerConnector(connectorId, p); p.doInit(connectorId, this); diff --git a/src/com/vaadin/terminal/gwt/client/WidgetSet.java b/src/com/vaadin/terminal/gwt/client/WidgetSet.java index a973c4fd05..d7cc2df00d 100644 --- a/src/com/vaadin/terminal/gwt/client/WidgetSet.java +++ b/src/com/vaadin/terminal/gwt/client/WidgetSet.java @@ -5,7 +5,6 @@ package com.vaadin.terminal.gwt.client; import com.google.gwt.core.client.GWT; -import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ui.UnknownComponentConnector; public class WidgetSet { @@ -19,27 +18,28 @@ public class WidgetSet { /** * Create an uninitialized connector that best matches given UIDL. The - * connector must be a {@link Widget} that implements - * {@link ServerConnector}. + * connector must implement {@link ServerConnector}. * * @param tag * connector type tag for the connector to create - * @param client - * the application connection that whishes to instantiate widget + * @param conf + * the application configuration to use when creating the + * connector * * @return New uninitialized and unregistered connector that can paint given * UIDL. */ - public ServerConnector createWidget(int tag, ApplicationConfiguration conf) { + public ServerConnector createConnector(int tag, + ApplicationConfiguration conf) { /* * Yes, this (including the generated code in WidgetMap) may look very * odd code, but due the nature of GWT, we cannot do this any cleaner. * Luckily this is mostly written by WidgetSetGenerator, here are just - * some hacks. Extra instantiation code is needed if client side widget - * has no "native" counterpart on client side. + * some hacks. Extra instantiation code is needed if client side + * connector has no "native" counterpart on client side. */ - Class classType = resolveInheritedWidgetType( + Class classType = resolveInheritedConnectorType( conf, tag); if (classType == null || classType == UnknownComponentConnector.class) { @@ -56,23 +56,23 @@ public class WidgetSet { } } - private Class resolveInheritedWidgetType( + private Class resolveInheritedConnectorType( ApplicationConfiguration conf, int tag) { Class classType = null; Integer t = tag; do { - classType = resolveWidgetType(t, conf); + classType = resolveConnectorType(t, conf); t = conf.getParentTag(t); } while (classType == null && t != null); return classType; } - protected Class resolveWidgetType(int tag, + protected Class resolveConnectorType(int tag, ApplicationConfiguration conf) { - Class widgetClass = conf + Class connectorClass = conf .getConnectorClassByEncodedTag(tag); - return widgetClass; + return connectorClass; } /**