+++ /dev/null
-/*
-@VaadinApache2LicenseForJavaFiles@
- */
-package com.vaadin.terminal.gwt.client.ui;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import com.vaadin.terminal.gwt.client.ComponentConnector;
-import com.vaadin.terminal.gwt.client.Connector;
-import com.vaadin.terminal.gwt.widgetsetutils.CustomWidgetMapGenerator;
-import com.vaadin.terminal.gwt.widgetsetutils.EagerWidgetMapGenerator;
-import com.vaadin.terminal.gwt.widgetsetutils.LazyWidgetMapGenerator;
-import com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator;
-
-/**
- * Annotation defining the default server side counterpart in GWT terminal for
- * {@link ComponentConnector}.
- * <p>
- * With this annotation client side Vaadin connector is marked to have a server
- * side counterpart. The value of the annotation is the class of server side
- * implementation.
- *
- * @since 7.0
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-public @interface Component {
-
- /**
- * @return the server side counterpart for the annotated component connector
- */
- Class<? extends Connector> value();
-
- /**
- * Depending on the used WidgetMap generator, these optional hints may be
- * used to define how the client side components are loaded by the browser.
- * The default is to eagerly load all widgets
- * {@link EagerWidgetMapGenerator}, but if the {@link WidgetMapGenerator} is
- * used by the widgetset, these load style hints are respected.
- * <p>
- * Lazy loading of a widget implementation means the client side component
- * is not included in the initial JavaScript application loaded when the
- * application starts. Instead the implementation is loaded to the client
- * when it is first needed. Lazy loaded widget can be achieved by giving
- * {@link LoadStyle#LAZY} value in {@link Component} annotation.
- * <p>
- * Lazy loaded widgets don't stress the size and startup time of the client
- * side as much as eagerly loaded widgets. On the other hand there is a
- * slight latency when lazy loaded widgets are first used as the client side
- * needs to visit the server to fetch the client side implementation.
- * <p>
- * The {@link LoadStyle#DEFERRED} will also not stress the initially loaded
- * JavaScript file. If this load style is defined, the widget implementation
- * is preemptively loaded to the browser after the application is started
- * and the communication to server idles. This load style kind of combines
- * the best of both worlds.
- * <p>
- * Fine tunings to widget loading can also be made by overriding
- * {@link WidgetMapGenerator} in the GWT module. Tunings might be helpful if
- * the end users have slow connections and especially if they have high
- * latency in their network. The {@link CustomWidgetMapGenerator} is an
- * abstract generator implementation for easy customization. Vaadin package
- * also includes {@link LazyWidgetMapGenerator} that makes as many widgets
- * lazily loaded as possible.
- *
- * @since 6.4
- *
- * @return the hint for the widget set generator how the client side
- * implementation should be loaded to the browser
- */
- LoadStyle loadStyle() default LoadStyle.DEFERRED;
-
- public enum LoadStyle {
- /**
- * The widget is included in the initial JS sent to the client.
- */
- EAGER,
- /**
- * Not included in the initial set of widgets, but added to queue from
- * which it will be loaded when network is not busy or the
- * implementation is required.
- */
- DEFERRED,
- /**
- * Loaded to the client only if needed.
- */
- LAZY
- }
-}
--- /dev/null
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.terminal.gwt.client.ui;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import com.vaadin.terminal.gwt.client.Connector;
+import com.vaadin.terminal.gwt.server.ClientConnector;
+import com.vaadin.terminal.gwt.widgetsetutils.CustomWidgetMapGenerator;
+import com.vaadin.terminal.gwt.widgetsetutils.EagerWidgetMapGenerator;
+import com.vaadin.terminal.gwt.widgetsetutils.LazyWidgetMapGenerator;
+import com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator;
+
+/**
+ * Annotation defining the server side connector that this ClientSideConnector
+ * should connect to. The value must always by a class extending
+ * {@link ClientConnector}.
+ * <p>
+ * With this annotation client side Vaadin connector is marked to have a server
+ * side counterpart. The value of the annotation is the class of server side
+ * implementation.
+ *
+ * @since 7.0
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface Connect {
+
+ /**
+ * @return the server side counterpart for the annotated component connector
+ */
+ Class<? extends Connector> value();
+
+ /**
+ * Depending on the used WidgetMap generator, these optional hints may be
+ * used to define how the client side components are loaded by the browser.
+ * The default is to eagerly load all widgets
+ * {@link EagerWidgetMapGenerator}, but if the {@link WidgetMapGenerator} is
+ * used by the widgetset, these load style hints are respected.
+ * <p>
+ * Lazy loading of a widget implementation means the client side component
+ * is not included in the initial JavaScript application loaded when the
+ * application starts. Instead the implementation is loaded to the client
+ * when it is first needed. Lazy loaded widget can be achieved by giving
+ * {@link LoadStyle#LAZY} value in {@link Connect} annotation.
+ * <p>
+ * Lazy loaded widgets don't stress the size and startup time of the client
+ * side as much as eagerly loaded widgets. On the other hand there is a
+ * slight latency when lazy loaded widgets are first used as the client side
+ * needs to visit the server to fetch the client side implementation.
+ * <p>
+ * The {@link LoadStyle#DEFERRED} will also not stress the initially loaded
+ * JavaScript file. If this load style is defined, the widget implementation
+ * is preemptively loaded to the browser after the application is started
+ * and the communication to server idles. This load style kind of combines
+ * the best of both worlds.
+ * <p>
+ * Fine tunings to widget loading can also be made by overriding
+ * {@link WidgetMapGenerator} in the GWT module. Tunings might be helpful if
+ * the end users have slow connections and especially if they have high
+ * latency in their network. The {@link CustomWidgetMapGenerator} is an
+ * abstract generator implementation for easy customization. Vaadin package
+ * also includes {@link LazyWidgetMapGenerator} that makes as many widgets
+ * lazily loaded as possible.
+ *
+ * @since 6.4
+ *
+ * @return the hint for the widget set generator how the client side
+ * implementation should be loaded to the browser
+ */
+ LoadStyle loadStyle() default LoadStyle.DEFERRED;
+
+ public enum LoadStyle {
+ /**
+ * The widget is included in the initial JS sent to the client.
+ */
+ EAGER,
+ /**
+ * Not included in the initial set of widgets, but added to queue from
+ * which it will be loaded when network is not busy or the
+ * implementation is required.
+ */
+ DEFERRED,
+ /**
+ * Loaded to the client only if needed.
+ */
+ LAZY
+ }
+}
import com.vaadin.terminal.gwt.client.communication.RpcProxy;
import com.vaadin.terminal.gwt.client.communication.StateChangeEvent;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC;
import com.vaadin.terminal.gwt.client.ui.absolutelayout.VAbsoluteLayout.AbsoluteWrapper;
import com.vaadin.ui.AbsoluteLayout;
-@Component(AbsoluteLayout.class)
+@Connect(AbsoluteLayout.class)
public class AbsoluteLayoutConnector extends
AbstractComponentContainerConnector implements DirectionalManagedLayout {
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.ComponentConnector;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout;
import com.vaadin.terminal.gwt.client.ui.accordion.VAccordion.StackItem;
import com.vaadin.terminal.gwt.client.ui.layout.MayScrollChildren;
import com.vaadin.terminal.gwt.client.ui.tabsheet.TabsheetBaseConnector;
import com.vaadin.ui.Accordion;
-@Component(Accordion.class)
+@Connect(Accordion.class)
public class AccordionConnector extends TabsheetBaseConnector implements
SimpleManagedLayout, MayScrollChildren {
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.MediaBaseConnector;
import com.vaadin.ui.Audio;
-@Component(Audio.class)
+@Connect(Audio.class)
public class AudioConnector extends MediaBaseConnector {
@Override
import com.vaadin.terminal.gwt.client.communication.RpcProxy;
import com.vaadin.terminal.gwt.client.communication.StateChangeEvent;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.terminal.gwt.client.ui.Icon;
import com.vaadin.ui.Button;
-@Component(value = Button.class, loadStyle = LoadStyle.EAGER)
+@Connect(value = Button.class, loadStyle = LoadStyle.EAGER)
public class ButtonConnector extends AbstractComponentConnector implements
BlurHandler, FocusHandler, ClickHandler {
import com.vaadin.terminal.gwt.client.communication.RpcProxy;
import com.vaadin.terminal.gwt.client.communication.StateChangeEvent;
import com.vaadin.terminal.gwt.client.ui.AbstractFieldConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.Icon;
import com.vaadin.ui.CheckBox;
-@Component(CheckBox.class)
+@Connect(CheckBox.class)
public class CheckBoxConnector extends AbstractFieldConnector implements
FocusHandler, BlurHandler, ClickHandler {
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.ui.AbstractFieldConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout;
import com.vaadin.terminal.gwt.client.ui.combobox.VFilterSelect.FilterSelectSuggestion;
import com.vaadin.terminal.gwt.client.ui.menubar.MenuItem;
import com.vaadin.ui.Select;
-@Component(Select.class)
+@Connect(Select.class)
public class ComboBoxConnector extends AbstractFieldConnector implements
Paintable, SimpleManagedLayout {
import com.vaadin.terminal.gwt.client.communication.RpcProxy;
import com.vaadin.terminal.gwt.client.communication.StateChangeEvent;
import com.vaadin.terminal.gwt.client.ui.AbstractLayoutConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC;
import com.vaadin.terminal.gwt.client.ui.VMarginInfo;
import com.vaadin.terminal.gwt.client.ui.csslayout.VCssLayout.FlowPane;
import com.vaadin.ui.CssLayout;
-@Component(CssLayout.class)
+@Connect(CssLayout.class)
public class CssLayoutConnector extends AbstractLayoutConnector {
private LayoutClickEventHandler clickEventHandler = new LayoutClickEventHandler(
import com.vaadin.terminal.gwt.client.ComponentConnector;
import com.vaadin.terminal.gwt.client.ConnectorHierarchyChangeEvent;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.ui.CustomComponent;
-@Component(value = CustomComponent.class, loadStyle = LoadStyle.EAGER)
+@Connect(value = CustomComponent.class, loadStyle = LoadStyle.EAGER)
public class CustomComponentConnector extends
AbstractComponentContainerConnector {
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Widget;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.customcomponent.CustomComponentConnector;
import com.vaadin.terminal.gwt.client.ui.customcomponent.VCustomComponent;
import com.vaadin.ui.CustomField;
-@Component(value = CustomField.class)
+@Connect(value = CustomField.class)
public class CustomFieldConnector extends CustomComponentConnector {
@Override
import com.vaadin.terminal.gwt.client.ConnectorHierarchyChangeEvent;
import com.vaadin.terminal.gwt.client.communication.StateChangeEvent;
import com.vaadin.terminal.gwt.client.ui.AbstractLayoutConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout;
import com.vaadin.ui.CustomLayout;
-@Component(CustomLayout.class)
+@Connect(CustomLayout.class)
public class CustomLayoutConnector extends AbstractLayoutConnector implements
SimpleManagedLayout {
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.DateTimeService;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.datefield.VCalendarPanel.FocusChangeListener;
import com.vaadin.terminal.gwt.client.ui.datefield.VCalendarPanel.TimeChangeListener;
import com.vaadin.ui.InlineDateField;
-@Component(InlineDateField.class)
+@Connect(InlineDateField.class)
public class InlineDateFieldConnector extends AbstractDateFieldConnector {
@Override
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.DateTimeService;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.datefield.VCalendarPanel.FocusChangeListener;
import com.vaadin.terminal.gwt.client.ui.datefield.VCalendarPanel.TimeChangeListener;
import com.vaadin.ui.DateField;
-@Component(DateField.class)
+@Connect(DateField.class)
public class PopupDateFieldConnector extends TextualDateConnector {
/*
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.customcomponent.CustomComponentConnector;
import com.vaadin.ui.DragAndDropWrapper;
-@Component(DragAndDropWrapper.class)
+@Connect(DragAndDropWrapper.class)
public class DragAndDropWrapperConnector extends CustomComponentConnector
implements Paintable {
import com.vaadin.terminal.gwt.client.communication.RpcProxy;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
import com.vaadin.terminal.gwt.client.ui.ClickEventHandler;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.ui.Embedded;
-@Component(Embedded.class)
+@Connect(Embedded.class)
public class EmbeddedConnector extends AbstractComponentConnector implements
Paintable {
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.Icon;
import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler;
import com.vaadin.terminal.gwt.client.ui.layout.ElementResizeEvent;
import com.vaadin.terminal.gwt.client.ui.layout.MayScrollChildren;
import com.vaadin.ui.Form;
-@Component(Form.class)
+@Connect(Form.class)
public class FormConnector extends AbstractComponentContainerConnector
implements Paintable, MayScrollChildren {
import com.vaadin.terminal.gwt.client.communication.StateChangeEvent;
import com.vaadin.terminal.gwt.client.ui.AbstractFieldConnector;
import com.vaadin.terminal.gwt.client.ui.AbstractLayoutConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.VMarginInfo;
import com.vaadin.terminal.gwt.client.ui.formlayout.VFormLayout.Caption;
import com.vaadin.terminal.gwt.client.ui.formlayout.VFormLayout.ErrorFlag;
import com.vaadin.terminal.gwt.client.ui.orderedlayout.AbstractOrderedLayoutState;
import com.vaadin.ui.FormLayout;
-@Component(FormLayout.class)
+@Connect(FormLayout.class)
public class FormLayoutConnector extends AbstractLayoutConnector {
@Override
import com.vaadin.terminal.gwt.client.communication.StateChangeEvent;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector;
import com.vaadin.terminal.gwt.client.ui.AlignmentInfo;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler;
import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC;
import com.vaadin.terminal.gwt.client.ui.VMarginInfo;
import com.vaadin.terminal.gwt.client.ui.layout.VLayoutSlot;
import com.vaadin.ui.GridLayout;
-@Component(GridLayout.class)
+@Connect(GridLayout.class)
public class GridLayoutConnector extends AbstractComponentContainerConnector
implements Paintable, DirectionalManagedLayout {
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.ui.Label;
-@Component(value = Label.class, loadStyle = LoadStyle.EAGER)
+@Connect(value = Label.class, loadStyle = LoadStyle.EAGER)
public class LabelConnector extends AbstractComponentConnector implements
Paintable {
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.Icon;
import com.vaadin.ui.Link;
-@Component(Link.class)
+@Connect(Link.class)
public class LinkConnector extends AbstractComponentConnector implements
Paintable {
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Widget;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.optiongroup.OptionGroupBaseConnector;
import com.vaadin.ui.ListSelect;
-@Component(ListSelect.class)
+@Connect(ListSelect.class)
public class ListSelectConnector extends OptionGroupBaseConnector {
@Override
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.terminal.gwt.client.ui.Icon;
import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout;
import com.vaadin.terminal.gwt.client.ui.menubar.VMenuBar.CustomMenuItem;
-@Component(value = com.vaadin.ui.MenuBar.class, loadStyle = LoadStyle.LAZY)
+@Connect(value = com.vaadin.ui.MenuBar.class, loadStyle = LoadStyle.LAZY)
public class MenuBarConnector extends AbstractComponentConnector implements
Paintable, SimpleManagedLayout {
/**
import com.vaadin.terminal.gwt.client.communication.RpcProxy;
import com.vaadin.terminal.gwt.client.communication.StateChangeEvent;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.Icon;
import com.vaadin.terminal.gwt.client.ui.button.ButtonServerRpc;
import com.vaadin.terminal.gwt.client.ui.button.ButtonState;
import com.vaadin.ui.NativeButton;
-@Component(NativeButton.class)
+@Connect(NativeButton.class)
public class NativeButtonConnector extends AbstractComponentConnector implements
BlurHandler, FocusHandler {
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Widget;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.optiongroup.OptionGroupBaseConnector;
import com.vaadin.ui.NativeSelect;
-@Component(NativeSelect.class)
+@Connect(NativeSelect.class)
public class NativeSelectConnector extends OptionGroupBaseConnector {
@Override
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.EventId;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.ui.OptionGroup;
-@Component(OptionGroup.class)
+@Connect(OptionGroup.class)
public class OptionGroupConnector extends OptionGroupBaseConnector {
@Override
package com.vaadin.terminal.gwt.client.ui.orderedlayout;
import com.google.gwt.core.client.GWT;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.ui.HorizontalLayout;
-@Component(value = HorizontalLayout.class, loadStyle = LoadStyle.EAGER)
+@Connect(value = HorizontalLayout.class, loadStyle = LoadStyle.EAGER)
public class HorizontalLayoutConnector extends AbstractOrderedLayoutConnector {
@Override
package com.vaadin.terminal.gwt.client.ui.orderedlayout;
import com.google.gwt.core.client.GWT;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.ui.VerticalLayout;
-@Component(value = VerticalLayout.class, loadStyle = LoadStyle.EAGER)
+@Connect(value = VerticalLayout.class, loadStyle = LoadStyle.EAGER)
public class VerticalLayoutConnector extends AbstractOrderedLayoutConnector {
@Override
import com.vaadin.terminal.gwt.client.communication.RpcProxy;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector;
import com.vaadin.terminal.gwt.client.ui.ClickEventHandler;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.PostLayoutListener;
import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler;
import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout;
import com.vaadin.terminal.gwt.client.ui.layout.MayScrollChildren;
import com.vaadin.ui.Panel;
-@Component(Panel.class)
+@Connect(Panel.class)
public class PanelConnector extends AbstractComponentContainerConnector
implements Paintable, SimpleManagedLayout, PostLayoutListener,
MayScrollChildren {
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.textfield.TextFieldConnector;
import com.vaadin.ui.PasswordField;
-@Component(PasswordField.class)
+@Connect(PasswordField.class)
public class PasswordFieldConnector extends TextFieldConnector {
@Override
import com.vaadin.terminal.gwt.client.VCaption;
import com.vaadin.terminal.gwt.client.VCaptionWrapper;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.PostLayoutListener;
import com.vaadin.ui.PopupView;
-@Component(PopupView.class)
+@Connect(PopupView.class)
public class PopupViewConnector extends AbstractComponentContainerConnector
implements Paintable, PostLayoutListener {
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.AbstractFieldConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.ui.ProgressIndicator;
-@Component(ProgressIndicator.class)
+@Connect(ProgressIndicator.class)
public class ProgressIndicatorConnector extends AbstractFieldConnector
implements Paintable {
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.AbstractFieldConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.BeforeShortcutActionListener;
import com.vaadin.ui.RichTextArea;
-@Component(value = RichTextArea.class, loadStyle = LoadStyle.LAZY)
+@Connect(value = RichTextArea.class, loadStyle = LoadStyle.LAZY)
public class RichTextAreaConnector extends AbstractFieldConnector implements
Paintable, BeforeShortcutActionListener {
import com.vaadin.terminal.gwt.client.communication.StateChangeEvent.StateChangeHandler;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector;
import com.vaadin.terminal.gwt.client.ui.ClickEventHandler;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler;
import com.vaadin.terminal.gwt.client.ui.layout.MayScrollChildren;
import com.vaadin.terminal.gwt.client.ui.notification.VNotification;
import com.vaadin.terminal.gwt.client.ui.window.WindowConnector;
import com.vaadin.ui.Root;
-@Component(value = Root.class, loadStyle = LoadStyle.EAGER)
+@Connect(value = Root.class, loadStyle = LoadStyle.EAGER)
public class RootConnector extends AbstractComponentContainerConnector
implements Paintable, MayScrollChildren {
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.AbstractFieldConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.ui.Slider;
-@Component(Slider.class)
+@Connect(Slider.class)
public class SliderConnector extends AbstractFieldConnector implements
Paintable {
package com.vaadin.terminal.gwt.client.ui.splitpanel;
import com.google.gwt.core.client.GWT;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.ui.HorizontalSplitPanel;
-@Component(value = HorizontalSplitPanel.class, loadStyle = LoadStyle.EAGER)
+@Connect(value = HorizontalSplitPanel.class, loadStyle = LoadStyle.EAGER)
public class HorizontalSplitPanelConnector extends AbstractSplitPanelConnector {
@Override
package com.vaadin.terminal.gwt.client.ui.splitpanel;
import com.google.gwt.core.client.GWT;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.ui.VerticalSplitPanel;
-@Component(value = VerticalSplitPanel.class, loadStyle = LoadStyle.EAGER)
+@Connect(value = VerticalSplitPanel.class, loadStyle = LoadStyle.EAGER)
public class VerticalSplitPanelConnector extends AbstractSplitPanelConnector {
@Override
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.PostLayoutListener;
import com.vaadin.terminal.gwt.client.ui.table.VScrollTable.ContextMenuDetails;
import com.vaadin.terminal.gwt.client.ui.table.VScrollTable.VScrollTableBody.VScrollTableRow;
-@Component(com.vaadin.ui.Table.class)
+@Connect(com.vaadin.ui.Table.class)
public class TableConnector extends AbstractComponentContainerConnector
implements Paintable, DirectionalManagedLayout, PostLayoutListener {
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.ComponentConnector;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout;
import com.vaadin.terminal.gwt.client.ui.layout.MayScrollChildren;
import com.vaadin.ui.TabSheet;
-@Component(TabSheet.class)
+@Connect(TabSheet.class)
public class TabsheetConnector extends TabsheetBaseConnector implements
SimpleManagedLayout, MayScrollChildren {
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.textfield.TextFieldConnector;
import com.vaadin.ui.TextArea;
-@Component(TextArea.class)
+@Connect(TextArea.class)
public class TextAreaConnector extends TextFieldConnector {
@Override
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.AbstractFieldConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.BeforeShortcutActionListener;
import com.vaadin.ui.TextField;
-@Component(value = TextField.class, loadStyle = LoadStyle.EAGER)
+@Connect(value = TextField.class, loadStyle = LoadStyle.EAGER)
public class TextFieldConnector extends AbstractFieldConnector implements
Paintable, BeforeShortcutActionListener {
import com.vaadin.terminal.gwt.client.TooltipInfo;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.tree.VTree.TreeNode;
import com.vaadin.ui.Tree;
-@Component(Tree.class)
+@Connect(Tree.class)
public class TreeConnector extends AbstractComponentConnector implements
Paintable {
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.FocusableScrollPanel;
import com.vaadin.terminal.gwt.client.ui.table.TableConnector;
import com.vaadin.terminal.gwt.client.ui.table.VScrollTable.VScrollTableBody.VScrollTableRow;
import com.vaadin.terminal.gwt.client.ui.treetable.VTreeTable.PendingNavigationEvent;
import com.vaadin.ui.TreeTable;
-@Component(TreeTable.class)
+@Connect(TreeTable.class)
public class TreeTableConnector extends TableConnector {
public static final String ATTRIBUTE_HIERARCHY_COLUMN_INDEX = "hci";
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.DirectionalManagedLayout;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.optiongroup.OptionGroupBaseConnector;
import com.vaadin.ui.TwinColSelect;
-@Component(TwinColSelect.class)
+@Connect(TwinColSelect.class)
public class TwinColSelectConnector extends OptionGroupBaseConnector implements
DirectionalManagedLayout {
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.ui.Upload;
-@Component(value = Upload.class, loadStyle = LoadStyle.LAZY)
+@Connect(value = Upload.class, loadStyle = LoadStyle.LAZY)
public class UploadConnector extends AbstractComponentConnector implements
Paintable {
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.UIDL;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.MediaBaseConnector;
import com.vaadin.ui.Video;
-@Component(Video.class)
+@Connect(Video.class)
public class VideoConnector extends MediaBaseConnector {
public static final String ATTR_POSTER = "poster";
import com.vaadin.terminal.gwt.client.communication.RpcProxy;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector;
import com.vaadin.terminal.gwt.client.ui.ClickEventHandler;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.PostLayoutListener;
import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler;
import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.BeforeShortcutActionListener;
import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout;
import com.vaadin.terminal.gwt.client.ui.layout.MayScrollChildren;
-@Component(value = com.vaadin.ui.Window.class)
+@Connect(value = com.vaadin.ui.Window.class)
public class WindowConnector extends AbstractComponentContainerConnector
implements Paintable, BeforeShortcutActionListener,
SimpleManagedLayout, PostLayoutListener, MayScrollChildren {
import java.util.HashSet;
import com.vaadin.terminal.gwt.client.ComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
/**
* An abstract helper class that can be used to easily build a widgetset with
* customized load styles for each components. In three abstract methods one can
- * override the default values given in {@link Component} annotations.
+ * override the default values given in {@link Connect} annotations.
*
* @see WidgetMapGenerator
*
package com.vaadin.terminal.gwt.widgetsetutils;
import com.vaadin.terminal.gwt.client.ComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
/**
* WidgetMap generator that builds a widgetset that packs all included widgets
package com.vaadin.terminal.gwt.widgetsetutils;
import com.vaadin.terminal.gwt.client.ComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
/**
import com.google.gwt.user.rebind.SourceWriter;
import com.vaadin.terminal.gwt.client.ComponentConnector;
import com.vaadin.terminal.gwt.client.Connector;
-import com.vaadin.terminal.gwt.client.ui.Component;
-import com.vaadin.terminal.gwt.client.ui.Component.LoadStyle;
+import com.vaadin.terminal.gwt.client.ui.Connect;
+import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.terminal.gwt.client.ui.root.RootConnector;
import com.vaadin.terminal.gwt.client.ui.UnknownComponentConnector;
import com.vaadin.terminal.gwt.server.ClientConnector;
/**
* WidgetMapGenerator's are GWT generator to build WidgetMapImpl dynamically
- * based on {@link Component} annotations available in workspace. By modifying
+ * based on {@link Connect} annotations available in workspace. By modifying
* the generator it is possible to do some fine tuning for the generated
* widgetset (aka client side engine). The components to be included in the
* client side engine can modified be overriding {@link #getUsedConnectors()}.
* that loads all widget implementation on application initialization. This has
* been the only option until Vaadin 6.4.
* <p>
- * This generator uses the loadStyle hints from the {@link Component}
+ * This generator uses the loadStyle hints from the {@link Connect}
* annotations. Depending on the {@link LoadStyle} used, the widget may be
* included in the initially loaded JavaScript, loaded when the application has
* started and there is no communication to server or lazy loaded when the
.iterator();
while (iter.hasNext()) {
Class<? extends ComponentConnector> connectorClass = iter.next();
- Component annotation = connectorClass
- .getAnnotation(Component.class);
+ Connect annotation = connectorClass
+ .getAnnotation(Connect.class);
if (!ClientConnector.class.isAssignableFrom(annotation.value())) {
logger.log(
Type.WARN,
.getName());
Collection<Class<? extends ComponentConnector>> connectors = new HashSet<Class<? extends ComponentConnector>>();
for (JClassType jClassType : connectorType.getSubtypes()) {
- Component annotation = jClassType.getAnnotation(Component.class);
+ Connect annotation = jClassType.getAnnotation(Connect.class);
if (annotation != null) {
try {
Class<? extends ComponentConnector> clazz = (Class<? extends ComponentConnector>) Class
/**
* Returns true if the widget for given component will be lazy loaded by the
* client. The default implementation reads the information from the
- * {@link Component} annotation.
+ * {@link Connect} annotation.
* <p>
* The method can be overridden to optimize the widget loading mechanism. If
* the Widgetset is wanted to be optimized for a network with a high latency
*/
protected LoadStyle getLoadStyle(
Class<? extends ComponentConnector> connector) {
- Component annotation = connector.getAnnotation(Component.class);
+ Connect annotation = connector.getAnnotation(Connect.class);
return annotation.loadStyle();
}
private static Class<? extends ClientConnector> getClientConnectorClass(
Class<? extends ComponentConnector> connectorClass) {
- Component annotation = connectorClass.getAnnotation(Component.class);
+ Connect annotation = connectorClass.getAnnotation(Connect.class);
return (Class<? extends ClientConnector>) annotation.value();
}
}
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.tests.dd.CustomDDImplementation.MyDragSource;
-@Component(MyDragSource.class)
+@Connect(MyDragSource.class)
public class MyDragSourceConnector extends AbstractComponentConnector implements
Paintable {
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
-import com.vaadin.terminal.gwt.client.ui.Component;
+import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.tests.dd.CustomDDImplementation.MyDropTarget;
-@Component(MyDropTarget.class)
+@Connect(MyDropTarget.class)
public class MyDropTargetConnector extends AbstractComponentConnector implements
Paintable {