+++ /dev/null
-/*
- * Copyright 2011 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.event;
-
-import java.io.Serializable;
-import java.util.EventListener;
-
-public interface ComponentEventListener extends EventListener, Serializable {
-
-}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2012 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.vaadin.event;
+
+import java.util.EventObject;
+
+import com.vaadin.server.ClientConnector;
+
+public abstract class ConnectorEvent extends EventObject {
+ public ConnectorEvent(ClientConnector source) {
+ super(source);
+ }
+
+ public ClientConnector getConnector() {
+ return (ClientConnector) getSource();
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.event;
+
+import java.io.Serializable;
+import java.util.EventListener;
+
+public interface ConnectorEventListener extends EventListener, Serializable {
+
+}
\ No newline at end of file
* @see FocusEvent
* @since 6.2
*/
- public interface FocusListener extends ComponentEventListener {
+ public interface FocusListener extends ConnectorEventListener {
public static final Method focusMethod = ReflectTools.findMethod(
FocusListener.class, "focus", FocusEvent.class);
* @see BlurEvent
* @since 6.2
*/
- public interface BlurListener extends ComponentEventListener {
+ public interface BlurListener extends ConnectorEventListener {
public static final Method blurMethod = ReflectTools.findMethod(
BlurListener.class, "blur", BlurEvent.class);
*
* @since 6.5
*/
- public interface TextChangeListener extends ComponentEventListener {
+ public interface TextChangeListener extends ConnectorEventListener {
public static String EVENT_ID = "ie";
public static Method EVENT_METHOD = ReflectTools.findMethod(
public interface LayoutEvents {
- public interface LayoutClickListener extends ComponentEventListener {
+ public interface LayoutClickListener extends ConnectorEventListener {
public static final Method clickMethod = ReflectTools.findMethod(
LayoutClickListener.class, "layoutClick",
* @author Vaadin Ltd.
* @since 6.2
*/
- public interface ClickListener extends ComponentEventListener {
+ public interface ClickListener extends ConnectorEventListener {
public static final Method clickMethod = ReflectTools.findMethod(
ClickListener.class, "click", ClickEvent.class);
* @author Vaadin Ltd.
* @since 6.2
*/
- public interface DoubleClickListener extends ComponentEventListener {
+ public interface DoubleClickListener extends ConnectorEventListener {
public static final Method doubleClickMethod = ReflectTools.findMethod(
DoubleClickListener.class, "doubleClick",
package com.vaadin.server;
import java.io.IOException;
-import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Collection;
-import java.util.EventListener;
-import java.util.EventObject;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;
+import com.vaadin.event.ConnectorEvent;
+import com.vaadin.event.ConnectorEventListener;
import com.vaadin.shared.Connector;
import com.vaadin.shared.communication.SharedState;
import com.vaadin.ui.Component;
*/
public interface ClientConnector extends Connector {
- public static abstract class ConnectorEvent extends EventObject {
- public ConnectorEvent(ClientConnector source) {
- super(source);
- }
-
- public ClientConnector getConnector() {
- return (ClientConnector) getSource();
- }
- }
-
/**
* Event fired after a connector is attached to the application.
*/
* Interface for listening {@link DetachEvent connector detach events}.
*
*/
- public static interface AttachListener extends EventListener, Serializable {
+ public static interface AttachListener extends ConnectorEventListener {
public static final Method attachMethod = ReflectTools.findMethod(
AttachListener.class, "attach", AttachEvent.class);
* Interface for listening {@link DetachEvent connector detach events}.
*
*/
- public static interface DetachListener extends EventListener, Serializable {
+ public static interface DetachListener extends ConnectorEventListener {
public static final Method detachMethod = ReflectTools.findMethod(
DetachListener.class, "detach", DetachEvent.class);
import java.lang.reflect.Method;
import java.util.Iterator;
-import com.vaadin.event.ComponentEventListener;
+import com.vaadin.event.ConnectorEventListener;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.server.Sizeable;
import com.vaadin.shared.EventId;
* @see SplitterClickEvent
* @since 6.2
*/
- public interface SplitterClickListener extends ComponentEventListener {
+ public interface SplitterClickListener extends ConnectorEventListener {
public static final Method clickMethod = ReflectTools.findMethod(
SplitterClickListener.class, "splitterClick",
package com.vaadin.ui;
import java.io.Serializable;
-import java.util.EventListener;
import java.util.Locale;
+import com.vaadin.event.ConnectorEvent;
+import com.vaadin.event.ConnectorEventListener;
import com.vaadin.event.FieldEvents;
import com.vaadin.server.ClientConnector;
import com.vaadin.server.ErrorMessage;
*
* @see Component#addListener(Listener)
*/
- public interface Listener extends EventListener, Serializable {
+ public interface Listener extends ConnectorEventListener {
/**
* Notifies the listener of a component event.
*/
package com.vaadin.ui;
-import java.util.EventListener;
-
+import com.vaadin.event.ConnectorEventListener;
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.server.VariableOwner;
*/
@Deprecated
public interface LegacyComponent extends VariableOwner, Component,
- EventListener {
+ ConnectorEventListener {
/**
* <p>
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.EventListener;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import com.vaadin.event.Action;
import com.vaadin.event.Action.Handler;
import com.vaadin.event.ActionManager;
+import com.vaadin.event.ConnectorEventListener;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.event.MouseEvents.ClickListener;
import com.vaadin.navigator.Navigator;
* Interface for listening {@link UI.CleanupEvent UI cleanup events}.
*
*/
- public interface CleanupListener extends EventListener {
+ public interface CleanupListener extends ConnectorEventListener {
public static final Method cleanupMethod = ReflectTools.findMethod(
CleanupListener.class, "cleanup", CleanupEvent.class);
import org.junit.Before;
import org.junit.Test;
+import com.vaadin.event.ConnectorEvent;
import com.vaadin.server.ClientConnector.AttachEvent;
import com.vaadin.server.ClientConnector.AttachListener;
-import com.vaadin.server.ClientConnector.ConnectorEvent;
import com.vaadin.server.ClientConnector.DetachEvent;
import com.vaadin.server.ClientConnector.DetachListener;
import com.vaadin.server.VaadinRequest;