+++ /dev/null
-/*
- * Copyright 2000-2016 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.Map;
-
-import com.vaadin.ui.Component;
-import com.vaadin.v7.data.Container;
-
-/**
- * Parent class for {@link Transferable} implementations that have a Vaadin
- * container as a data source. The transfer is associated with an item
- * (identified by its Id) and optionally also a property identifier (e.g. a
- * table column identifier when transferring a single table cell).
- *
- * The component must implement the interface
- * {@link com.vaadin.v7.data.Container.Viewer}.
- *
- * In most cases, receivers of data transfers should depend on this class
- * instead of its concrete subclasses.
- *
- * @since 6.3
- */
-public abstract class DataBoundTransferable extends TransferableImpl {
-
- public DataBoundTransferable(Component sourceComponent,
- Map<String, Object> rawVariables) {
- super(sourceComponent, rawVariables);
- }
-
- /**
- * Returns the identifier of the item being transferred.
- *
- * @return item identifier
- */
- public abstract Object getItemId();
-
- /**
- * Returns the optional property identifier that the transfer concerns.
- *
- * This can be e.g. the table column from which a drag operation originated.
- *
- * @return property identifier
- */
- public abstract Object getPropertyId();
-
- /**
- * Returns the container data source from which the transfer occurs.
- *
- * {@link com.vaadin.v7.data.Container.Viewer#getContainerDataSource()} is used
- * to obtain the underlying container of the source component.
- *
- * @return Container
- */
- public Container getSourceContainer() {
- Component sourceComponent = getSourceComponent();
- if (sourceComponent instanceof Container.Viewer) {
- return ((Container.Viewer) sourceComponent)
- .getContainerDataSource();
- } else {
- // this should not happen
- return null;
- }
- }
-}
--- /dev/null
+/*
+ * Copyright 2000-2016 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.v7.data;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+/**
+ * <p>
+ * Provides a mechanism for handling a set of Properties, each associated to a
+ * locally unique non-null identifier. The interface is split into subinterfaces
+ * to enable a class to implement only the functionalities it needs.
+ * </p>
+ *
+ * @author Vaadin Ltd
+ * @since 3.0
+ */
+public interface Item extends Serializable {
+
+ /**
+ * Gets the Property corresponding to the given Property ID stored in the
+ * Item. If the Item does not contain the Property, <code>null</code> is
+ * returned.
+ *
+ * @param id
+ * identifier of the Property to get
+ * @return the Property with the given ID or <code>null</code>
+ */
+ public Property getItemProperty(Object id);
+
+ /**
+ * Gets the collection of IDs of all Properties stored in the Item.
+ *
+ * @return unmodifiable collection containing IDs of the Properties stored
+ * the Item
+ */
+ public Collection<?> getItemPropertyIds();
+
+ /**
+ * Tries to add a new Property into the Item.
+ *
+ * <p>
+ * This functionality is optional.
+ * </p>
+ *
+ * @param id
+ * ID of the new Property
+ * @param property
+ * the Property to be added and associated with the id
+ * @return <code>true</code> if the operation succeeded, <code>false</code>
+ * if not
+ * @throws UnsupportedOperationException
+ * if the operation is not supported.
+ */
+ public boolean addItemProperty(Object id, Property property)
+ throws UnsupportedOperationException;
+
+ /**
+ * Removes the Property identified by ID from the Item.
+ *
+ * <p>
+ * This functionality is optional.
+ * </p>
+ *
+ * @param id
+ * ID of the Property to be removed
+ * @return <code>true</code> if the operation succeeded
+ * @throws UnsupportedOperationException
+ * if the operation is not supported. <code>false</code> if not
+ */
+ public boolean removeItemProperty(Object id)
+ throws UnsupportedOperationException;
+
+ /**
+ * Interface implemented by viewer classes capable of using an Item as a
+ * data source.
+ */
+ public interface Viewer extends Serializable {
+
+ /**
+ * Sets the Item that serves as the data source of the viewer.
+ *
+ * @param newDataSource
+ * The new data source Item
+ */
+ public void setItemDataSource(Item newDataSource);
+
+ /**
+ * Gets the Item serving as the data source of the viewer.
+ *
+ * @return data source Item
+ */
+ public Item getItemDataSource();
+ }
+
+ /**
+ * Interface implemented by the <code>Editor</code> classes capable of
+ * editing the Item. Implementing this interface means that the Item serving
+ * as the data source of the editor can be modified through it.
+ * <p>
+ * Note : Not implementing the <code>Item.Editor</code> interface does not
+ * restrict the class from editing the contents of an internally.
+ * </p>
+ */
+ public interface Editor extends Item.Viewer, Serializable {
+
+ }
+
+ /* Property set change event */
+
+ /**
+ * An <code>Event</code> object specifying the Item whose contents has been
+ * changed through the <code>Property</code> interface.
+ * <p>
+ * Note: The values stored in the Properties may change without triggering
+ * this event.
+ * </p>
+ */
+ public interface PropertySetChangeEvent extends Serializable {
+
+ /**
+ * Retrieves the Item whose contents has been modified.
+ *
+ * @return source Item of the event
+ */
+ public Item getItem();
+ }
+
+ /**
+ * The listener interface for receiving <code>PropertySetChangeEvent</code>
+ * objects.
+ */
+ public interface PropertySetChangeListener extends Serializable {
+
+ /**
+ * Notifies this listener that the Item's property set has changed.
+ *
+ * @param event
+ * Property set change event object
+ */
+ public void itemPropertySetChange(Item.PropertySetChangeEvent event);
+ }
+
+ /**
+ * The interface for adding and removing <code>PropertySetChangeEvent</code>
+ * listeners. By implementing this interface a class explicitly announces
+ * that it will generate a <code>PropertySetChangeEvent</code> when its
+ * Property set is modified.
+ * <p>
+ * Note : The general Java convention is not to explicitly declare that a
+ * class generates events, but to directly define the
+ * <code>addListener</code> and <code>removeListener</code> methods. That
+ * way the caller of these methods has no real way of finding out if the
+ * class really will send the events, or if it just defines the methods to
+ * be able to implement an interface.
+ * </p>
+ */
+ public interface PropertySetChangeNotifier extends Serializable {
+
+ /**
+ * Registers a new property set change listener for this Item.
+ *
+ * @param listener
+ * The new Listener to be registered.
+ */
+ public void addPropertySetChangeListener(
+ Item.PropertySetChangeListener listener);
+
+ /**
+ * @deprecated As of 7.0, replaced by
+ * {@link #addPropertySetChangeListener(PropertySetChangeListener)}
+ **/
+ @Deprecated
+ public void addListener(Item.PropertySetChangeListener listener);
+
+ /**
+ * Removes a previously registered property set change listener.
+ *
+ * @param listener
+ * Listener to be removed.
+ */
+ public void removePropertySetChangeListener(
+ Item.PropertySetChangeListener listener);
+
+ /**
+ * @deprecated As of 7.0, replaced by
+ * {@link #removePropertySetChangeListener(PropertySetChangeListener)}
+ **/
+ @Deprecated
+ public void removeListener(Item.PropertySetChangeListener listener);
+ }
+}
--- /dev/null
+/*
+ * Copyright 2000-2016 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.v7.data.util;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import com.vaadin.v7.data.Item;
+import com.vaadin.v7.data.Property;
+
+/**
+ * Class for handling a set of identified Properties. The elements contained in
+ * a </code>MapItem</code> can be referenced using locally unique identifiers.
+ * The class supports listeners who are interested in changes to the Property
+ * set managed by the class.
+ *
+ * @author Vaadin Ltd.
+ * @since 3.0
+ */
+@SuppressWarnings("serial")
+public class PropertysetItem
+ implements Item, Item.PropertySetChangeNotifier, Cloneable {
+
+ /* Private representation of the item */
+
+ /**
+ * Mapping from property id to property.
+ */
+ private HashMap<Object, Property<?>> map = new HashMap<Object, Property<?>>();
+
+ /**
+ * List of all property ids to maintain the order.
+ */
+ private LinkedList<Object> list = new LinkedList<Object>();
+
+ /**
+ * List of property set modification listeners.
+ */
+ private LinkedList<Item.PropertySetChangeListener> propertySetChangeListeners = null;
+
+ /* Item methods */
+
+ /**
+ * Gets the Property corresponding to the given Property ID stored in the
+ * Item. If the Item does not contain the Property, <code>null</code> is
+ * returned.
+ *
+ * @param id
+ * the identifier of the Property to get.
+ * @return the Property with the given ID or <code>null</code>
+ */
+ @Override
+ public Property getItemProperty(Object id) {
+ return map.get(id);
+ }
+
+ /**
+ * Gets the collection of IDs of all Properties stored in the Item.
+ *
+ * @return unmodifiable collection containing IDs of the Properties stored
+ * the Item
+ */
+ @Override
+ public Collection<?> getItemPropertyIds() {
+ return Collections.unmodifiableCollection(list);
+ }
+
+ /* Item.Managed methods */
+
+ /**
+ * Removes the Property identified by ID from the Item. This functionality
+ * is optional. If the method is not implemented, the method always returns
+ * <code>false</code>.
+ *
+ * @param id
+ * the ID of the Property to be removed.
+ * @return <code>true</code> if the operation succeeded <code>false</code>
+ * if not
+ */
+ @Override
+ public boolean removeItemProperty(Object id) {
+
+ // Cant remove missing properties
+ if (map.remove(id) == null) {
+ return false;
+ }
+ list.remove(id);
+
+ // Send change events
+ fireItemPropertySetChange();
+
+ return true;
+ }
+
+ /**
+ * Tries to add a new Property into the Item.
+ *
+ * @param id
+ * the ID of the new Property.
+ * @param property
+ * the Property to be added and associated with the id.
+ * @return <code>true</code> if the operation succeeded, <code>false</code>
+ * if not
+ */
+ @Override
+ public boolean addItemProperty(Object id, Property property) {
+
+ // Null ids are not accepted
+ if (id == null) {
+ throw new NullPointerException("Item property id can not be null");
+ }
+
+ // Cant add a property twice
+ if (map.containsKey(id)) {
+ return false;
+ }
+
+ // Put the property to map
+ map.put(id, property);
+ list.add(id);
+
+ // Send event
+ fireItemPropertySetChange();
+
+ return true;
+ }
+
+ /**
+ * Gets the <code>String</code> representation of the contents of the Item.
+ * The format of the string is a space separated catenation of the
+ * <code>String</code> representations of the Properties contained by the
+ * Item.
+ *
+ * @return <code>String</code> representation of the Item contents
+ */
+ @Override
+ public String toString() {
+ String retValue = "";
+
+ for (final Iterator<?> i = getItemPropertyIds().iterator(); i
+ .hasNext();) {
+ final Object propertyId = i.next();
+ retValue += getItemProperty(propertyId).getValue();
+ if (i.hasNext()) {
+ retValue += " ";
+ }
+ }
+
+ return retValue;
+ }
+
+ /* Notifiers */
+
+ /**
+ * An <code>event</code> object specifying an Item whose Property set has
+ * changed.
+ *
+ * @author Vaadin Ltd.
+ * @since 3.0
+ */
+ private static class PropertySetChangeEvent extends EventObject
+ implements Item.PropertySetChangeEvent {
+
+ private PropertySetChangeEvent(Item source) {
+ super(source);
+ }
+
+ /**
+ * Gets the Item whose Property set has changed.
+ *
+ * @return source object of the event as an <code>Item</code>
+ */
+ @Override
+ public Item getItem() {
+ return (Item) getSource();
+ }
+ }
+
+ /**
+ * Registers a new property set change listener for this Item.
+ *
+ * @param listener
+ * the new Listener to be registered.
+ */
+ @Override
+ public void addPropertySetChangeListener(
+ Item.PropertySetChangeListener listener) {
+ if (propertySetChangeListeners == null) {
+ propertySetChangeListeners = new LinkedList<PropertySetChangeListener>();
+ }
+ propertySetChangeListeners.add(listener);
+ }
+
+ /**
+ * @deprecated As of 7.0, replaced by
+ * {@link #addPropertySetChangeListener(com.vaadin.v7.data.Item.PropertySetChangeListener)}
+ **/
+ @Override
+ @Deprecated
+ public void addListener(Item.PropertySetChangeListener listener) {
+ addPropertySetChangeListener(listener);
+ }
+
+ /**
+ * Removes a previously registered property set change listener.
+ *
+ * @param listener
+ * the Listener to be removed.
+ */
+ @Override
+ public void removePropertySetChangeListener(
+ Item.PropertySetChangeListener listener) {
+ if (propertySetChangeListeners != null) {
+ propertySetChangeListeners.remove(listener);
+ }
+ }
+
+ /**
+ * @deprecated As of 7.0, replaced by
+ * {@link #removePropertySetChangeListener(com.vaadin.v7.data.Item.PropertySetChangeListener)}
+ **/
+ @Override
+ @Deprecated
+ public void removeListener(Item.PropertySetChangeListener listener) {
+ removePropertySetChangeListener(listener);
+ }
+
+ /**
+ * Sends a Property set change event to all interested listeners.
+ */
+ private void fireItemPropertySetChange() {
+ if (propertySetChangeListeners != null) {
+ final Object[] l = propertySetChangeListeners.toArray();
+ final Item.PropertySetChangeEvent event = new PropertysetItem.PropertySetChangeEvent(
+ this);
+ for (int i = 0; i < l.length; i++) {
+ ((Item.PropertySetChangeListener) l[i])
+ .itemPropertySetChange(event);
+ }
+ }
+ }
+
+ public Collection<?> getListeners(Class<?> eventType) {
+ if (Item.PropertySetChangeEvent.class.isAssignableFrom(eventType)) {
+ if (propertySetChangeListeners == null) {
+ return Collections.EMPTY_LIST;
+ } else {
+ return Collections
+ .unmodifiableCollection(propertySetChangeListeners);
+ }
+ }
+
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * Creates and returns a copy of this object.
+ * <p>
+ * The method <code>clone</code> performs a shallow copy of the
+ * <code>PropertysetItem</code>.
+ * </p>
+ * <p>
+ * Note : All arrays are considered to implement the interface Cloneable.
+ * Otherwise, this method creates a new instance of the class of this object
+ * and initializes all its fields with exactly the contents of the
+ * corresponding fields of this object, as if by assignment, the contents of
+ * the fields are not themselves cloned. Thus, this method performs a
+ * "shallow copy" of this object, not a "deep copy" operation.
+ * </p>
+ *
+ * @throws CloneNotSupportedException
+ * if the object's class does not support the Cloneable
+ * interface.
+ *
+ * @see java.lang.Object#clone()
+ */
+ @Override
+ public Object clone() throws CloneNotSupportedException {
+
+ final PropertysetItem npsi = new PropertysetItem();
+
+ npsi.list = list != null ? (LinkedList<Object>) list.clone() : null;
+ npsi.propertySetChangeListeners = propertySetChangeListeners != null
+ ? (LinkedList<PropertySetChangeListener>) propertySetChangeListeners
+ .clone()
+ : null;
+ npsi.map = (HashMap<Object, Property<?>>) map.clone();
+
+ return npsi;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+
+ if (obj == null || !(obj instanceof PropertysetItem)) {
+ return false;
+ }
+
+ final PropertysetItem other = (PropertysetItem) obj;
+
+ if (other.list != list) {
+ if (other.list == null) {
+ return false;
+ }
+ if (!other.list.equals(list)) {
+ return false;
+ }
+ }
+ if (other.map != map) {
+ if (other.map == null) {
+ return false;
+ }
+ if (!other.map.equals(map)) {
+ return false;
+ }
+ }
+ if (other.propertySetChangeListeners != propertySetChangeListeners) {
+ boolean thisEmpty = (propertySetChangeListeners == null
+ || propertySetChangeListeners.isEmpty());
+ boolean otherEmpty = (other.propertySetChangeListeners == null
+ || other.propertySetChangeListeners.isEmpty());
+ if (thisEmpty && otherEmpty) {
+ return true;
+ }
+ if (otherEmpty) {
+ return false;
+ }
+ if (!other.propertySetChangeListeners
+ .equals(propertySetChangeListeners)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+
+ return (list == null ? 0 : list.hashCode())
+ ^ (map == null ? 0 : map.hashCode())
+ ^ ((propertySetChangeListeners == null
+ || propertySetChangeListeners.isEmpty()) ? 0
+ : propertySetChangeListeners.hashCode());
+ }
+}
--- /dev/null
+/*
+ * Copyright 2000-2016 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.v7.event;
+
+import java.util.Map;
+
+import com.vaadin.event.Transferable;
+import com.vaadin.event.TransferableImpl;
+import com.vaadin.ui.Component;
+import com.vaadin.v7.data.Container;
+
+/**
+ * Parent class for {@link Transferable} implementations that have a Vaadin
+ * container as a data source. The transfer is associated with an item
+ * (identified by its Id) and optionally also a property identifier (e.g. a
+ * table column identifier when transferring a single table cell).
+ *
+ * The component must implement the interface
+ * {@link com.vaadin.v7.data.Container.Viewer}.
+ *
+ * In most cases, receivers of data transfers should depend on this class
+ * instead of its concrete subclasses.
+ *
+ * @since 6.3
+ */
+public abstract class DataBoundTransferable extends TransferableImpl {
+
+ public DataBoundTransferable(Component sourceComponent,
+ Map<String, Object> rawVariables) {
+ super(sourceComponent, rawVariables);
+ }
+
+ /**
+ * Returns the identifier of the item being transferred.
+ *
+ * @return item identifier
+ */
+ public abstract Object getItemId();
+
+ /**
+ * Returns the optional property identifier that the transfer concerns.
+ *
+ * This can be e.g. the table column from which a drag operation originated.
+ *
+ * @return property identifier
+ */
+ public abstract Object getPropertyId();
+
+ /**
+ * Returns the container data source from which the transfer occurs.
+ *
+ * {@link com.vaadin.v7.data.Container.Viewer#getContainerDataSource()} is used
+ * to obtain the underlying container of the source component.
+ *
+ * @return Container
+ */
+ public Container getSourceContainer() {
+ Component sourceComponent = getSourceComponent();
+ if (sourceComponent instanceof Container.Viewer) {
+ return ((Container.Viewer) sourceComponent)
+ .getContainerDataSource();
+ } else {
+ // this should not happen
+ return null;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright 2000-2016 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.v7.event;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+
+import com.vaadin.event.MouseEvents.ClickEvent;
+import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.ui.Component;
+import com.vaadin.v7.data.Item;
+import com.vaadin.v7.data.Property;
+
+/**
+ *
+ * Click event fired by a {@link Component} implementing
+ * {@link com.vaadin.v7.data.Container} interface. ItemClickEvents happens on an
+ * {@link Item} rendered somehow on terminal. Event may also contain a specific
+ * {@link Property} on which the click event happened.
+ *
+ * @since 5.3
+ *
+ */
+@SuppressWarnings("serial")
+public class ItemClickEvent extends ClickEvent implements Serializable {
+ private Item item;
+ private Object itemId;
+ private Object propertyId;
+
+ public ItemClickEvent(Component source, Item item, Object itemId,
+ Object propertyId, MouseEventDetails details) {
+ super(source, details);
+ this.item = item;
+ this.itemId = itemId;
+ this.propertyId = propertyId;
+ }
+
+ /**
+ * Gets the item on which the click event occurred.
+ *
+ * @return item which was clicked
+ */
+ public Item getItem() {
+ return item;
+ }
+
+ /**
+ * Gets a possible identifier in source for clicked Item
+ *
+ * @return
+ */
+ public Object getItemId() {
+ return itemId;
+ }
+
+ /**
+ * Returns property on which click event occurred. Returns null if source
+ * cannot be resolved at property level. For example if clicked a cell in
+ * table, the "column id" is returned.
+ *
+ * @return a property id of clicked property or null if click didn't occur
+ * on any distinct property.
+ */
+ public Object getPropertyId() {
+ return propertyId;
+ }
+
+ public static final Method ITEM_CLICK_METHOD;
+
+ static {
+ try {
+ ITEM_CLICK_METHOD = ItemClickListener.class.getDeclaredMethod(
+ "itemClick", new Class[] { ItemClickEvent.class });
+ } catch (final java.lang.NoSuchMethodException e) {
+ // This should never happen
+ throw new java.lang.RuntimeException();
+ }
+ }
+
+ public interface ItemClickListener extends Serializable {
+ public void itemClick(ItemClickEvent event);
+ }
+
+ /**
+ * The interface for adding and removing <code>ItemClickEvent</code>
+ * listeners. By implementing this interface a class explicitly announces
+ * that it will generate an <code>ItemClickEvent</code> when one of its
+ * items is clicked.
+ * <p>
+ * Note: The general Java convention is not to explicitly declare that a
+ * class generates events, but to directly define the
+ * <code>addListener</code> and <code>removeListener</code> methods. That
+ * way the caller of these methods has no real way of finding out if the
+ * class really will send the events, or if it just defines the methods to
+ * be able to implement an interface.
+ * </p>
+ *
+ * @since 6.5
+ * @see ItemClickListener
+ * @see ItemClickEvent
+ */
+ public interface ItemClickNotifier extends Serializable {
+ /**
+ * Register a listener to handle {@link ItemClickEvent}s.
+ *
+ * @param listener
+ * ItemClickListener to be registered
+ */
+ public void addItemClickListener(ItemClickListener listener);
+
+ /**
+ * @deprecated As of 7.0, replaced by
+ * {@link #addItemClickListener(ItemClickListener)}
+ **/
+ @Deprecated
+ public void addListener(ItemClickListener listener);
+
+ /**
+ * Removes an ItemClickListener.
+ *
+ * @param listener
+ * ItemClickListener to be removed
+ */
+ public void removeItemClickListener(ItemClickListener listener);
+
+ /**
+ * @deprecated As of 7.0, replaced by
+ * {@link #removeItemClickListener(ItemClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(ItemClickListener listener);
+ }
+
+}
import org.jsoup.nodes.Element;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.Transferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropTarget;
import com.vaadin.v7.data.util.IndexedContainer;
import com.vaadin.v7.data.util.converter.Converter;
import com.vaadin.v7.data.util.converter.Converter.ConversionException;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.data.util.converter.ConverterUtil;
/**
import com.vaadin.data.sort.Sort;
import com.vaadin.data.sort.SortOrder;
import com.vaadin.event.ContextClickEvent;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
-import com.vaadin.event.ItemClickEvent.ItemClickNotifier;
import com.vaadin.event.SelectionEvent;
import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.event.SelectionEvent.SelectionNotifier;
import com.vaadin.v7.data.util.IndexedContainer;
import com.vaadin.v7.data.util.converter.Converter;
import com.vaadin.v7.data.util.converter.ConverterUtil;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickNotifier;
import com.vaadin.v7.server.communication.data.DataGenerator;
import com.vaadin.v7.server.communication.data.RpcDataProviderExtension;
import com.vaadin.v7.ui.renderers.HtmlRenderer;
import com.vaadin.event.Action;
import com.vaadin.event.Action.Handler;
import com.vaadin.event.ContextClickEvent;
-import com.vaadin.event.DataBoundTransferable;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
-import com.vaadin.event.ItemClickEvent.ItemClickNotifier;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DragSource;
import com.vaadin.v7.data.util.IndexedContainer;
import com.vaadin.v7.data.util.converter.Converter;
import com.vaadin.v7.data.util.converter.ConverterUtil;
+import com.vaadin.v7.event.DataBoundTransferable;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickNotifier;
/**
* <p>
import com.vaadin.event.Action;
import com.vaadin.event.Action.Handler;
import com.vaadin.event.ContextClickEvent;
-import com.vaadin.event.DataBoundTransferable;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
-import com.vaadin.event.ItemClickEvent.ItemClickNotifier;
import com.vaadin.event.Transferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DragSource;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.ContainerHierarchicalWrapper;
import com.vaadin.v7.data.util.HierarchicalContainer;
+import com.vaadin.v7.event.DataBoundTransferable;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickNotifier;
/**
* Tree component. A Tree can be used to select an item (or multiple items) from
--- /dev/null
+package com.vaadin.tests.server;
+
+import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
+import com.vaadin.v7.data.Item.PropertySetChangeEvent;
+import com.vaadin.v7.data.Item.PropertySetChangeListener;
+import com.vaadin.v7.data.util.PropertysetItem;
+
+public class PropertysetItemListenersTest
+ extends AbstractListenerMethodsTestBase {
+ public void testPropertySetChangeListenerAddGetRemove() throws Exception {
+ testListenerAddGetRemove(PropertysetItem.class,
+ PropertySetChangeEvent.class, PropertySetChangeListener.class);
+ }
+}
import org.junit.Test;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Table.ColumnReorderEvent;
import com.vaadin.v7.ui.Table.ColumnReorderListener;
import org.junit.Test;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Tree;
import com.vaadin.v7.ui.Tree.CollapseEvent;
import com.vaadin.v7.ui.Tree.CollapseListener;
+++ /dev/null
-/*
- * Copyright 2000-2016 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.lang.reflect.Method;
-
-import com.vaadin.event.MouseEvents.ClickEvent;
-import com.vaadin.shared.MouseEventDetails;
-import com.vaadin.ui.Component;
-import com.vaadin.v7.data.Item;
-import com.vaadin.v7.data.Property;
-
-/**
- *
- * Click event fired by a {@link Component} implementing
- * {@link com.vaadin.v7.data.Container} interface. ItemClickEvents happens on an
- * {@link Item} rendered somehow on terminal. Event may also contain a specific
- * {@link Property} on which the click event happened.
- *
- * @since 5.3
- *
- */
-@SuppressWarnings("serial")
-public class ItemClickEvent extends ClickEvent implements Serializable {
- private Item item;
- private Object itemId;
- private Object propertyId;
-
- public ItemClickEvent(Component source, Item item, Object itemId,
- Object propertyId, MouseEventDetails details) {
- super(source, details);
- this.item = item;
- this.itemId = itemId;
- this.propertyId = propertyId;
- }
-
- /**
- * Gets the item on which the click event occurred.
- *
- * @return item which was clicked
- */
- public Item getItem() {
- return item;
- }
-
- /**
- * Gets a possible identifier in source for clicked Item
- *
- * @return
- */
- public Object getItemId() {
- return itemId;
- }
-
- /**
- * Returns property on which click event occurred. Returns null if source
- * cannot be resolved at property level. For example if clicked a cell in
- * table, the "column id" is returned.
- *
- * @return a property id of clicked property or null if click didn't occur
- * on any distinct property.
- */
- public Object getPropertyId() {
- return propertyId;
- }
-
- public static final Method ITEM_CLICK_METHOD;
-
- static {
- try {
- ITEM_CLICK_METHOD = ItemClickListener.class.getDeclaredMethod(
- "itemClick", new Class[] { ItemClickEvent.class });
- } catch (final java.lang.NoSuchMethodException e) {
- // This should never happen
- throw new java.lang.RuntimeException();
- }
- }
-
- public interface ItemClickListener extends Serializable {
- public void itemClick(ItemClickEvent event);
- }
-
- /**
- * The interface for adding and removing <code>ItemClickEvent</code>
- * listeners. By implementing this interface a class explicitly announces
- * that it will generate an <code>ItemClickEvent</code> when one of its
- * items is clicked.
- * <p>
- * Note: The general Java convention is not to explicitly declare that a
- * class generates events, but to directly define the
- * <code>addListener</code> and <code>removeListener</code> methods. That
- * way the caller of these methods has no real way of finding out if the
- * class really will send the events, or if it just defines the methods to
- * be able to implement an interface.
- * </p>
- *
- * @since 6.5
- * @see ItemClickListener
- * @see ItemClickEvent
- */
- public interface ItemClickNotifier extends Serializable {
- /**
- * Register a listener to handle {@link ItemClickEvent}s.
- *
- * @param listener
- * ItemClickListener to be registered
- */
- public void addItemClickListener(ItemClickListener listener);
-
- /**
- * @deprecated As of 7.0, replaced by
- * {@link #addItemClickListener(ItemClickListener)}
- **/
- @Deprecated
- public void addListener(ItemClickListener listener);
-
- /**
- * Removes an ItemClickListener.
- *
- * @param listener
- * ItemClickListener to be removed
- */
- public void removeItemClickListener(ItemClickListener listener);
-
- /**
- * @deprecated As of 7.0, replaced by
- * {@link #removeItemClickListener(ItemClickListener)}
- **/
- @Deprecated
- public void removeListener(ItemClickListener listener);
- }
-
-}
+++ /dev/null
-/*
- * Copyright 2000-2016 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.v7.data;
-
-import java.io.Serializable;
-import java.util.Collection;
-
-/**
- * <p>
- * Provides a mechanism for handling a set of Properties, each associated to a
- * locally unique non-null identifier. The interface is split into subinterfaces
- * to enable a class to implement only the functionalities it needs.
- * </p>
- *
- * @author Vaadin Ltd
- * @since 3.0
- */
-public interface Item extends Serializable {
-
- /**
- * Gets the Property corresponding to the given Property ID stored in the
- * Item. If the Item does not contain the Property, <code>null</code> is
- * returned.
- *
- * @param id
- * identifier of the Property to get
- * @return the Property with the given ID or <code>null</code>
- */
- public Property getItemProperty(Object id);
-
- /**
- * Gets the collection of IDs of all Properties stored in the Item.
- *
- * @return unmodifiable collection containing IDs of the Properties stored
- * the Item
- */
- public Collection<?> getItemPropertyIds();
-
- /**
- * Tries to add a new Property into the Item.
- *
- * <p>
- * This functionality is optional.
- * </p>
- *
- * @param id
- * ID of the new Property
- * @param property
- * the Property to be added and associated with the id
- * @return <code>true</code> if the operation succeeded, <code>false</code>
- * if not
- * @throws UnsupportedOperationException
- * if the operation is not supported.
- */
- public boolean addItemProperty(Object id, Property property)
- throws UnsupportedOperationException;
-
- /**
- * Removes the Property identified by ID from the Item.
- *
- * <p>
- * This functionality is optional.
- * </p>
- *
- * @param id
- * ID of the Property to be removed
- * @return <code>true</code> if the operation succeeded
- * @throws UnsupportedOperationException
- * if the operation is not supported. <code>false</code> if not
- */
- public boolean removeItemProperty(Object id)
- throws UnsupportedOperationException;
-
- /**
- * Interface implemented by viewer classes capable of using an Item as a
- * data source.
- */
- public interface Viewer extends Serializable {
-
- /**
- * Sets the Item that serves as the data source of the viewer.
- *
- * @param newDataSource
- * The new data source Item
- */
- public void setItemDataSource(Item newDataSource);
-
- /**
- * Gets the Item serving as the data source of the viewer.
- *
- * @return data source Item
- */
- public Item getItemDataSource();
- }
-
- /**
- * Interface implemented by the <code>Editor</code> classes capable of
- * editing the Item. Implementing this interface means that the Item serving
- * as the data source of the editor can be modified through it.
- * <p>
- * Note : Not implementing the <code>Item.Editor</code> interface does not
- * restrict the class from editing the contents of an internally.
- * </p>
- */
- public interface Editor extends Item.Viewer, Serializable {
-
- }
-
- /* Property set change event */
-
- /**
- * An <code>Event</code> object specifying the Item whose contents has been
- * changed through the <code>Property</code> interface.
- * <p>
- * Note: The values stored in the Properties may change without triggering
- * this event.
- * </p>
- */
- public interface PropertySetChangeEvent extends Serializable {
-
- /**
- * Retrieves the Item whose contents has been modified.
- *
- * @return source Item of the event
- */
- public Item getItem();
- }
-
- /**
- * The listener interface for receiving <code>PropertySetChangeEvent</code>
- * objects.
- */
- public interface PropertySetChangeListener extends Serializable {
-
- /**
- * Notifies this listener that the Item's property set has changed.
- *
- * @param event
- * Property set change event object
- */
- public void itemPropertySetChange(Item.PropertySetChangeEvent event);
- }
-
- /**
- * The interface for adding and removing <code>PropertySetChangeEvent</code>
- * listeners. By implementing this interface a class explicitly announces
- * that it will generate a <code>PropertySetChangeEvent</code> when its
- * Property set is modified.
- * <p>
- * Note : The general Java convention is not to explicitly declare that a
- * class generates events, but to directly define the
- * <code>addListener</code> and <code>removeListener</code> methods. That
- * way the caller of these methods has no real way of finding out if the
- * class really will send the events, or if it just defines the methods to
- * be able to implement an interface.
- * </p>
- */
- public interface PropertySetChangeNotifier extends Serializable {
-
- /**
- * Registers a new property set change listener for this Item.
- *
- * @param listener
- * The new Listener to be registered.
- */
- public void addPropertySetChangeListener(
- Item.PropertySetChangeListener listener);
-
- /**
- * @deprecated As of 7.0, replaced by
- * {@link #addPropertySetChangeListener(PropertySetChangeListener)}
- **/
- @Deprecated
- public void addListener(Item.PropertySetChangeListener listener);
-
- /**
- * Removes a previously registered property set change listener.
- *
- * @param listener
- * Listener to be removed.
- */
- public void removePropertySetChangeListener(
- Item.PropertySetChangeListener listener);
-
- /**
- * @deprecated As of 7.0, replaced by
- * {@link #removePropertySetChangeListener(PropertySetChangeListener)}
- **/
- @Deprecated
- public void removeListener(Item.PropertySetChangeListener listener);
- }
-}
+++ /dev/null
-/*
- * Copyright 2000-2016 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.v7.data.util;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EventObject;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-import com.vaadin.v7.data.Item;
-import com.vaadin.v7.data.Property;
-
-/**
- * Class for handling a set of identified Properties. The elements contained in
- * a </code>MapItem</code> can be referenced using locally unique identifiers.
- * The class supports listeners who are interested in changes to the Property
- * set managed by the class.
- *
- * @author Vaadin Ltd.
- * @since 3.0
- */
-@SuppressWarnings("serial")
-public class PropertysetItem
- implements Item, Item.PropertySetChangeNotifier, Cloneable {
-
- /* Private representation of the item */
-
- /**
- * Mapping from property id to property.
- */
- private HashMap<Object, Property<?>> map = new HashMap<Object, Property<?>>();
-
- /**
- * List of all property ids to maintain the order.
- */
- private LinkedList<Object> list = new LinkedList<Object>();
-
- /**
- * List of property set modification listeners.
- */
- private LinkedList<Item.PropertySetChangeListener> propertySetChangeListeners = null;
-
- /* Item methods */
-
- /**
- * Gets the Property corresponding to the given Property ID stored in the
- * Item. If the Item does not contain the Property, <code>null</code> is
- * returned.
- *
- * @param id
- * the identifier of the Property to get.
- * @return the Property with the given ID or <code>null</code>
- */
- @Override
- public Property getItemProperty(Object id) {
- return map.get(id);
- }
-
- /**
- * Gets the collection of IDs of all Properties stored in the Item.
- *
- * @return unmodifiable collection containing IDs of the Properties stored
- * the Item
- */
- @Override
- public Collection<?> getItemPropertyIds() {
- return Collections.unmodifiableCollection(list);
- }
-
- /* Item.Managed methods */
-
- /**
- * Removes the Property identified by ID from the Item. This functionality
- * is optional. If the method is not implemented, the method always returns
- * <code>false</code>.
- *
- * @param id
- * the ID of the Property to be removed.
- * @return <code>true</code> if the operation succeeded <code>false</code>
- * if not
- */
- @Override
- public boolean removeItemProperty(Object id) {
-
- // Cant remove missing properties
- if (map.remove(id) == null) {
- return false;
- }
- list.remove(id);
-
- // Send change events
- fireItemPropertySetChange();
-
- return true;
- }
-
- /**
- * Tries to add a new Property into the Item.
- *
- * @param id
- * the ID of the new Property.
- * @param property
- * the Property to be added and associated with the id.
- * @return <code>true</code> if the operation succeeded, <code>false</code>
- * if not
- */
- @Override
- public boolean addItemProperty(Object id, Property property) {
-
- // Null ids are not accepted
- if (id == null) {
- throw new NullPointerException("Item property id can not be null");
- }
-
- // Cant add a property twice
- if (map.containsKey(id)) {
- return false;
- }
-
- // Put the property to map
- map.put(id, property);
- list.add(id);
-
- // Send event
- fireItemPropertySetChange();
-
- return true;
- }
-
- /**
- * Gets the <code>String</code> representation of the contents of the Item.
- * The format of the string is a space separated catenation of the
- * <code>String</code> representations of the Properties contained by the
- * Item.
- *
- * @return <code>String</code> representation of the Item contents
- */
- @Override
- public String toString() {
- String retValue = "";
-
- for (final Iterator<?> i = getItemPropertyIds().iterator(); i
- .hasNext();) {
- final Object propertyId = i.next();
- retValue += getItemProperty(propertyId).getValue();
- if (i.hasNext()) {
- retValue += " ";
- }
- }
-
- return retValue;
- }
-
- /* Notifiers */
-
- /**
- * An <code>event</code> object specifying an Item whose Property set has
- * changed.
- *
- * @author Vaadin Ltd.
- * @since 3.0
- */
- private static class PropertySetChangeEvent extends EventObject
- implements Item.PropertySetChangeEvent {
-
- private PropertySetChangeEvent(Item source) {
- super(source);
- }
-
- /**
- * Gets the Item whose Property set has changed.
- *
- * @return source object of the event as an <code>Item</code>
- */
- @Override
- public Item getItem() {
- return (Item) getSource();
- }
- }
-
- /**
- * Registers a new property set change listener for this Item.
- *
- * @param listener
- * the new Listener to be registered.
- */
- @Override
- public void addPropertySetChangeListener(
- Item.PropertySetChangeListener listener) {
- if (propertySetChangeListeners == null) {
- propertySetChangeListeners = new LinkedList<PropertySetChangeListener>();
- }
- propertySetChangeListeners.add(listener);
- }
-
- /**
- * @deprecated As of 7.0, replaced by
- * {@link #addPropertySetChangeListener(com.vaadin.v7.data.Item.PropertySetChangeListener)}
- **/
- @Override
- @Deprecated
- public void addListener(Item.PropertySetChangeListener listener) {
- addPropertySetChangeListener(listener);
- }
-
- /**
- * Removes a previously registered property set change listener.
- *
- * @param listener
- * the Listener to be removed.
- */
- @Override
- public void removePropertySetChangeListener(
- Item.PropertySetChangeListener listener) {
- if (propertySetChangeListeners != null) {
- propertySetChangeListeners.remove(listener);
- }
- }
-
- /**
- * @deprecated As of 7.0, replaced by
- * {@link #removePropertySetChangeListener(com.vaadin.v7.data.Item.PropertySetChangeListener)}
- **/
- @Override
- @Deprecated
- public void removeListener(Item.PropertySetChangeListener listener) {
- removePropertySetChangeListener(listener);
- }
-
- /**
- * Sends a Property set change event to all interested listeners.
- */
- private void fireItemPropertySetChange() {
- if (propertySetChangeListeners != null) {
- final Object[] l = propertySetChangeListeners.toArray();
- final Item.PropertySetChangeEvent event = new PropertysetItem.PropertySetChangeEvent(
- this);
- for (int i = 0; i < l.length; i++) {
- ((Item.PropertySetChangeListener) l[i])
- .itemPropertySetChange(event);
- }
- }
- }
-
- public Collection<?> getListeners(Class<?> eventType) {
- if (Item.PropertySetChangeEvent.class.isAssignableFrom(eventType)) {
- if (propertySetChangeListeners == null) {
- return Collections.EMPTY_LIST;
- } else {
- return Collections
- .unmodifiableCollection(propertySetChangeListeners);
- }
- }
-
- return Collections.EMPTY_LIST;
- }
-
- /**
- * Creates and returns a copy of this object.
- * <p>
- * The method <code>clone</code> performs a shallow copy of the
- * <code>PropertysetItem</code>.
- * </p>
- * <p>
- * Note : All arrays are considered to implement the interface Cloneable.
- * Otherwise, this method creates a new instance of the class of this object
- * and initializes all its fields with exactly the contents of the
- * corresponding fields of this object, as if by assignment, the contents of
- * the fields are not themselves cloned. Thus, this method performs a
- * "shallow copy" of this object, not a "deep copy" operation.
- * </p>
- *
- * @throws CloneNotSupportedException
- * if the object's class does not support the Cloneable
- * interface.
- *
- * @see java.lang.Object#clone()
- */
- @Override
- public Object clone() throws CloneNotSupportedException {
-
- final PropertysetItem npsi = new PropertysetItem();
-
- npsi.list = list != null ? (LinkedList<Object>) list.clone() : null;
- npsi.propertySetChangeListeners = propertySetChangeListeners != null
- ? (LinkedList<PropertySetChangeListener>) propertySetChangeListeners
- .clone()
- : null;
- npsi.map = (HashMap<Object, Property<?>>) map.clone();
-
- return npsi;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
-
- if (obj == null || !(obj instanceof PropertysetItem)) {
- return false;
- }
-
- final PropertysetItem other = (PropertysetItem) obj;
-
- if (other.list != list) {
- if (other.list == null) {
- return false;
- }
- if (!other.list.equals(list)) {
- return false;
- }
- }
- if (other.map != map) {
- if (other.map == null) {
- return false;
- }
- if (!other.map.equals(map)) {
- return false;
- }
- }
- if (other.propertySetChangeListeners != propertySetChangeListeners) {
- boolean thisEmpty = (propertySetChangeListeners == null
- || propertySetChangeListeners.isEmpty());
- boolean otherEmpty = (other.propertySetChangeListeners == null
- || other.propertySetChangeListeners.isEmpty());
- if (thisEmpty && otherEmpty) {
- return true;
- }
- if (otherEmpty) {
- return false;
- }
- if (!other.propertySetChangeListeners
- .equals(propertySetChangeListeners)) {
- return false;
- }
- }
-
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
-
- return (list == null ? 0 : list.hashCode())
- ^ (map == null ? 0 : map.hashCode())
- ^ ((propertySetChangeListeners == null
- || propertySetChangeListeners.isEmpty()) ? 0
- : propertySetChangeListeners.hashCode());
- }
-}
+++ /dev/null
-package com.vaadin.tests.server;
-
-import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase;
-import com.vaadin.v7.data.Item.PropertySetChangeEvent;
-import com.vaadin.v7.data.Item.PropertySetChangeListener;
-import com.vaadin.v7.data.util.PropertysetItem;
-
-public class PropertysetItemListenersTest
- extends AbstractListenerMethodsTestBase {
- public void testPropertySetChangeListenerAddGetRemove() throws Exception {
- testListenerAddGetRemove(PropertysetItem.class,
- PropertySetChangeEvent.class, PropertySetChangeListener.class);
- }
-}
import java.util.Map;
import java.util.Set;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.ExternalResource;
import com.vaadin.server.LegacyApplication;
import com.vaadin.server.Sizeable;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.DefaultItemSorter;
import com.vaadin.v7.data.util.HierarchicalContainer;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.LegacyWindow;
import com.vaadin.v7.ui.Tree;
import com.vaadin.v7.ui.Tree.ItemStyleGenerator;
package com.vaadin.tests.components;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Table.RowHeaderMode;
import com.vaadin.event.Action;
import com.vaadin.event.Action.Handler;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
import com.vaadin.ui.Window;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.AbstractSelect.AbstractSelectTargetDetails;
import com.vaadin.v7.ui.Table;
*/
package com.vaadin.tests.components.grid;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.data.util.BeanItemContainer;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.DetailsGenerator;
import com.vaadin.v7.ui.Grid.RowReference;
*/
package com.vaadin.tests.components.grid;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.DetailsGenerator;
import com.vaadin.v7.ui.Grid.RowReference;
*/
package com.vaadin.tests.components.grid;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.Column;
import com.vaadin.v7.ui.Grid.DetailsGenerator;
import java.util.HashMap;
import java.util.Map;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.shared.ui.grid.HeightMode;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.data.Property.ValueChangeEvent;
import com.vaadin.v7.data.Property.ValueChangeListener;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.DetailsGenerator;
import com.vaadin.v7.ui.Grid.RowReference;
*/
package com.vaadin.tests.components.grid;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Component;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.DetailsGenerator;
import com.vaadin.v7.ui.Grid.RowReference;
import com.vaadin.data.sort.Sort;
import com.vaadin.data.sort.SortOrder;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.event.SelectionEvent;
import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.event.SortEvent;
import com.vaadin.v7.data.Property.ValueChangeListener;
import com.vaadin.v7.data.fieldgroup.FieldGroup.CommitException;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Field;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.CellDescriptionGenerator;
import java.util.List;
import com.vaadin.event.Action;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
-import com.vaadin.event.ItemClickEvent.ItemClickNotifier;
import com.vaadin.server.Resource;
import com.vaadin.tests.components.abstractfield.LegacyAbstractFieldTest;
import com.vaadin.v7.data.Container;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickNotifier;
import com.vaadin.v7.ui.AbstractSelect;
public abstract class AbstractSelectTestCase<T extends AbstractSelect>
import java.util.Date;
import java.util.Locale;
-import com.vaadin.event.ItemClickEvent;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Component;
import com.vaadin.v7.data.Container;
+import com.vaadin.v7.event.ItemClickEvent;
import com.vaadin.v7.ui.DefaultFieldFactory;
import com.vaadin.v7.ui.Field;
import com.vaadin.v7.ui.Table;
package com.vaadin.tests.components.table;
import com.vaadin.event.Action;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.ExternalResource;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Link;
import com.vaadin.ui.Notification;
import com.vaadin.v7.data.Item;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
public class HeaderPositionWhenSorting extends AbstractTestUI
package com.vaadin.tests.components.table;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.ExternalResource;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.v7.data.Item;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.AbstractSelect;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Tree;
package com.vaadin.tests.components.table;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.ThemeResource;
import com.vaadin.server.VaadinRequest;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.Label;
import com.vaadin.v7.data.Item;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
public class LabelEmbeddedClickThroughForTable extends AbstractTestUI {
package com.vaadin.tests.components.table;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Label;
import com.vaadin.v7.data.Item;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
@SuppressWarnings("serial")
package com.vaadin.tests.components.table;
import com.vaadin.event.Action;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.ExternalResource;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.Component;
import com.vaadin.ui.Link;
import com.vaadin.v7.data.Item;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
public class TableAndBrowserContextMenu extends TestBase
package com.vaadin.tests.components.table;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
import com.vaadin.event.dd.acceptcriteria.AcceptAll;
import com.vaadin.ui.Label;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.AbstractSelect.AbstractSelectTargetDetails;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Table.ColumnGenerator;
package com.vaadin.tests.components.table;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Component;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.data.Property.ValueChangeEvent;
import com.vaadin.v7.data.Property.ValueChangeListener;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
public class TableClickValueChangeInteraction extends TestBase {
package com.vaadin.tests.components.table;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.tests.components.TestBase;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
public class TableFocusOnRefreshRowCache extends TestBase {
package com.vaadin.tests.components.table;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Notification;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Table.TableDragMode;
import com.vaadin.v7.ui.TextField;
import com.vaadin.event.Action;
import com.vaadin.event.Action.Handler;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.Resource;
import com.vaadin.shared.ui.MultiSelectMode;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.tests.components.select.AbstractSelectTestCase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Table.Align;
import com.vaadin.v7.ui.Table.CellStyleGenerator;
package com.vaadin.tests.components.table;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.tests.components.TestBase;
import com.vaadin.v7.data.Item;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Table.CellStyleGenerator;
package com.vaadin.tests.components.tree;
-import com.vaadin.event.ItemClickEvent;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.v7.event.ItemClickEvent;
import com.vaadin.v7.ui.Tree;
public class SelectItemAfterRemove extends AbstractTestUI {
package com.vaadin.tests.components.tree;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.v7.data.Container;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.AbstractSelect.AbstractSelectTargetDetails;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Table.TableDragMode;
package com.vaadin.tests.components.tree;
-import com.vaadin.event.ItemClickEvent;
import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.Log;
import com.vaadin.v7.data.Property;
import com.vaadin.v7.data.Property.ValueChangeEvent;
+import com.vaadin.v7.event.ItemClickEvent;
import com.vaadin.v7.ui.TextField;
import com.vaadin.v7.ui.Tree;
package com.vaadin.tests.components.tree;
-import com.vaadin.event.ItemClickEvent;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUIWithLog;
+import com.vaadin.v7.event.ItemClickEvent;
import com.vaadin.v7.ui.Tree;
public class TreeItemClickListening extends AbstractTestUIWithLog {
package com.vaadin.tests.components.tree;
-import com.vaadin.event.ItemClickEvent;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUIWithLog;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.v7.event.ItemClickEvent;
import com.vaadin.v7.ui.Tree;
public class TreeItemDoubleClick extends AbstractTestUIWithLog {
package com.vaadin.tests.components.tree;
-import com.vaadin.event.ItemClickEvent;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUIWithLog;
+import com.vaadin.v7.event.ItemClickEvent;
import com.vaadin.v7.ui.Tree;
@SuppressWarnings("serial")
package com.vaadin.tests.components.tree;
-import com.vaadin.event.ItemClickEvent;
import com.vaadin.event.MouseEvents;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.v7.event.ItemClickEvent;
import com.vaadin.v7.ui.Tree;
/**
package com.vaadin.tests.components.tree;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.data.util.HierarchicalContainer;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Tree;
public class TreeScrollingOnSelection extends TestBase {
package com.vaadin.tests.dd;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.Transferable;
import com.vaadin.event.TransferableImpl;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.ui.DragAndDropWrapper.DragStartMode;
import com.vaadin.ui.DragAndDropWrapper.WrapperTargetDetails;
import com.vaadin.ui.DragAndDropWrapper.WrapperTransferable;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;
package com.vaadin.tests.dd;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.Transferable;
import com.vaadin.event.TransferableImpl;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.ui.DragAndDropWrapper.WrapperTransferable;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.Tree;
public class AcceptFromComponent extends Window {
import java.util.Collection;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.Transferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
import com.vaadin.ui.Link;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.HierarchicalContainer;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.AbstractSelect.AcceptItem;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Table.TableDragMode;
import java.util.HashSet;
import java.util.Set;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.Transferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
import com.vaadin.v7.data.Container;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.HierarchicalContainer;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.AbstractSelect;
import com.vaadin.v7.ui.AbstractSelect.AbstractSelectTargetDetails;
import com.vaadin.v7.ui.AbstractSelect.AcceptItem;
import java.util.Collection;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
import com.vaadin.ui.UI;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.AbstractSelect.AbstractSelectTargetDetails;
import com.vaadin.v7.ui.Table;
import com.vaadin.event.Action;
import com.vaadin.event.Action.Handler;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.LayoutEvents.LayoutClickEvent;
import com.vaadin.event.LayoutEvents.LayoutClickListener;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.v7.data.Property.ValueChangeEvent;
import com.vaadin.v7.data.util.BeanItemContainer;
import com.vaadin.v7.data.util.ContainerHierarchicalWrapper;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.Table;
import com.vaadin.v7.ui.Tree;
import com.vaadin.v7.ui.Tree.TreeDragMode;
import java.util.HashSet;
import java.util.Set;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
import com.vaadin.ui.UI;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.AbstractSelect.AbstractSelectTargetDetails;
import com.vaadin.v7.ui.Table;
import java.util.Collection;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.Transferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.HierarchicalContainer;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.AbstractSelect;
import com.vaadin.v7.ui.Tree;
import com.vaadin.v7.ui.Tree.TreeDragMode;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.Transferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.AbsoluteLayout.ComponentPosition;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.ui.Component;
import com.vaadin.ui.DragAndDropWrapper;
import com.vaadin.ui.Html5File;
import java.util.HashMap;
import java.util.Iterator;
-import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DropHandler;
import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
import com.vaadin.v7.data.util.BeanItem;
import com.vaadin.v7.data.util.BeanItemContainer;
import com.vaadin.v7.data.util.HierarchicalContainer;
+import com.vaadin.v7.event.DataBoundTransferable;
import com.vaadin.v7.ui.AbstractSelect.AbstractSelectTargetDetails;
import com.vaadin.v7.ui.AbstractSelect.VerticalLocationIs;
import com.vaadin.v7.ui.Table;
*/
package com.vaadin.tests.minitutorials.v7_5;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.ExternalResource;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.minitutorials.v7_4.GridExampleBean;
import com.vaadin.ui.Notification;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.DetailsGenerator;
import com.vaadin.v7.ui.Grid.RowReference;
import java.util.Collection;
import java.util.List;
-import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.server.ErrorHandler;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinSession;
import com.vaadin.ui.Label;
import com.vaadin.v7.data.util.AbstractInMemoryContainer;
import com.vaadin.v7.data.util.BeanContainer;
+import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.ui.Table;
public class PushErrorHandling extends AbstractTestUI {