diff options
Diffstat (limited to 'server')
503 files changed, 1807 insertions, 1581 deletions
diff --git a/server/src/com/vaadin/annotations/AutoGenerated.java b/server/src/com/vaadin/annotations/AutoGenerated.java index 22435da1d4..1ad9f67ad1 100644 --- a/server/src/com/vaadin/annotations/AutoGenerated.java +++ b/server/src/com/vaadin/annotations/AutoGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/annotations/JavaScript.java b/server/src/com/vaadin/annotations/JavaScript.java index 3e9c46083d..445ef75ddf 100644 --- a/server/src/com/vaadin/annotations/JavaScript.java +++ b/server/src/com/vaadin/annotations/JavaScript.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/annotations/PreserveOnRefresh.java b/server/src/com/vaadin/annotations/PreserveOnRefresh.java index 801c1e78f2..7f4ef3ffe5 100644 --- a/server/src/com/vaadin/annotations/PreserveOnRefresh.java +++ b/server/src/com/vaadin/annotations/PreserveOnRefresh.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -32,7 +32,7 @@ import com.vaadin.ui.UI; * current UI instance when a reload is detected. * <p> * Whenever a request is received that reloads a preserved UI, the UI's - * {@link UI#reinit(com.vaadin.server.VaadinRequest) reinit} method is invoked + * {@link UI#refresh(com.vaadin.server.VaadinRequest) refresh} method is invoked * by the framework. * <p> * By using diff --git a/server/src/com/vaadin/annotations/Push.java b/server/src/com/vaadin/annotations/Push.java index 9965d535ba..b6a28c1560 100644 --- a/server/src/com/vaadin/annotations/Push.java +++ b/server/src/com/vaadin/annotations/Push.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/annotations/StyleSheet.java b/server/src/com/vaadin/annotations/StyleSheet.java index bc5b011873..191e39ee24 100644 --- a/server/src/com/vaadin/annotations/StyleSheet.java +++ b/server/src/com/vaadin/annotations/StyleSheet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/annotations/Theme.java b/server/src/com/vaadin/annotations/Theme.java index 12fa4bf409..61c47389ad 100644 --- a/server/src/com/vaadin/annotations/Theme.java +++ b/server/src/com/vaadin/annotations/Theme.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/annotations/Title.java b/server/src/com/vaadin/annotations/Title.java index 2a22f92747..38a3d75f17 100644 --- a/server/src/com/vaadin/annotations/Title.java +++ b/server/src/com/vaadin/annotations/Title.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/annotations/VaadinServletConfiguration.java b/server/src/com/vaadin/annotations/VaadinServletConfiguration.java index e65869c27a..00af38ecc1 100644 --- a/server/src/com/vaadin/annotations/VaadinServletConfiguration.java +++ b/server/src/com/vaadin/annotations/VaadinServletConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/annotations/Widgetset.java b/server/src/com/vaadin/annotations/Widgetset.java index 006bf59acf..c6ef6a7194 100644 --- a/server/src/com/vaadin/annotations/Widgetset.java +++ b/server/src/com/vaadin/annotations/Widgetset.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/Buffered.java b/server/src/com/vaadin/data/Buffered.java index c4c79ae13f..469f9987a4 100644 --- a/server/src/com/vaadin/data/Buffered.java +++ b/server/src/com/vaadin/data/Buffered.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/BufferedValidatable.java b/server/src/com/vaadin/data/BufferedValidatable.java index d57bbc6008..6f9d952d2f 100644 --- a/server/src/com/vaadin/data/BufferedValidatable.java +++ b/server/src/com/vaadin/data/BufferedValidatable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/Collapsible.java b/server/src/com/vaadin/data/Collapsible.java index 04f5e8259c..0ef290312d 100644 --- a/server/src/com/vaadin/data/Collapsible.java +++ b/server/src/com/vaadin/data/Collapsible.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/Container.java b/server/src/com/vaadin/data/Container.java index 1e053d1091..8e99bac541 100644 --- a/server/src/com/vaadin/data/Container.java +++ b/server/src/com/vaadin/data/Container.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -582,60 +582,6 @@ public interface Container extends Serializable { public Item addItemAt(int index, Object newItemId) throws UnsupportedOperationException; - /** - * An <code>Event</code> object specifying information about the added - * items. - */ - public interface ItemAddEvent extends ItemSetChangeEvent { - - /** - * Gets the item id of the first added item. - * - * @return item id of the first added item - */ - public Object getFirstItemId(); - - /** - * Gets the index of the first added item. - * - * @return index of the first added item - */ - public int getFirstIndex(); - - /** - * Gets the number of the added items. - * - * @return the number of added items. - */ - public int getAddedItemsCount(); - } - - /** - * An <code>Event</code> object specifying information about the removed - * items. - */ - public interface ItemRemoveEvent extends ItemSetChangeEvent { - /** - * Gets the item id of the first removed item. - * - * @return item id of the first removed item - */ - public Object getFirstItemId(); - - /** - * Gets the index of the first removed item. - * - * @return index of the first removed item - */ - public int getFirstIndex(); - - /** - * Gets the number of the removed items. - * - * @return the number of removed items - */ - public int getRemovedItemsCount(); - } } /** diff --git a/server/src/com/vaadin/data/ContainerHelpers.java b/server/src/com/vaadin/data/ContainerHelpers.java index f794656c83..817bec9474 100644 --- a/server/src/com/vaadin/data/ContainerHelpers.java +++ b/server/src/com/vaadin/data/ContainerHelpers.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/Item.java b/server/src/com/vaadin/data/Item.java index 8704810803..13f965f098 100644 --- a/server/src/com/vaadin/data/Item.java +++ b/server/src/com/vaadin/data/Item.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/Property.java b/server/src/com/vaadin/data/Property.java index 0aa6de1c2e..74ae1f86ec 100644 --- a/server/src/com/vaadin/data/Property.java +++ b/server/src/com/vaadin/data/Property.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/Validatable.java b/server/src/com/vaadin/data/Validatable.java index b933f5c6e9..1ae7cd8cee 100644 --- a/server/src/com/vaadin/data/Validatable.java +++ b/server/src/com/vaadin/data/Validatable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/Validator.java b/server/src/com/vaadin/data/Validator.java index 4f3fbe2cc3..d567267338 100644 --- a/server/src/com/vaadin/data/Validator.java +++ b/server/src/com/vaadin/data/Validator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java b/server/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java index 6616f9f24e..e5d53b759d 100644 --- a/server/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java +++ b/server/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/fieldgroup/Caption.java b/server/src/com/vaadin/data/fieldgroup/Caption.java index e05ae15e28..efe6f99d9a 100644 --- a/server/src/com/vaadin/data/fieldgroup/Caption.java +++ b/server/src/com/vaadin/data/fieldgroup/Caption.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java b/server/src/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java index c1e4b4933e..b1bf58199a 100644 --- a/server/src/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java +++ b/server/src/com/vaadin/data/fieldgroup/DefaultFieldGroupFieldFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java index 7edcc9719c..e647bdbf6d 100644 --- a/server/src/com/vaadin/data/fieldgroup/FieldGroup.java +++ b/server/src/com/vaadin/data/fieldgroup/FieldGroup.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -312,12 +312,18 @@ public class FieldGroup implements Serializable { "The given field is not part of this FieldBinder"); } + TransactionalPropertyWrapper<?> wrapper = null; Property fieldDataSource = field.getPropertyDataSource(); if (fieldDataSource instanceof TransactionalPropertyWrapper) { - fieldDataSource = ((TransactionalPropertyWrapper) fieldDataSource) + wrapper = (TransactionalPropertyWrapper<?>) fieldDataSource; + fieldDataSource = ((TransactionalPropertyWrapper<?>) fieldDataSource) .getWrappedProperty(); + } if (fieldDataSource == getItemProperty(propertyId)) { + if (null != wrapper) { + wrapper.detachFromProperty(); + } field.setPropertyDataSource(null); } fieldToPropertyId.remove(field); diff --git a/server/src/com/vaadin/data/fieldgroup/FieldGroupFieldFactory.java b/server/src/com/vaadin/data/fieldgroup/FieldGroupFieldFactory.java index 222e979bce..4aad08ba8d 100644 --- a/server/src/com/vaadin/data/fieldgroup/FieldGroupFieldFactory.java +++ b/server/src/com/vaadin/data/fieldgroup/FieldGroupFieldFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/fieldgroup/PropertyId.java b/server/src/com/vaadin/data/fieldgroup/PropertyId.java index 575a5b7720..c38af0e89b 100644 --- a/server/src/com/vaadin/data/fieldgroup/PropertyId.java +++ b/server/src/com/vaadin/data/fieldgroup/PropertyId.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/AbstractBeanContainer.java b/server/src/com/vaadin/data/util/AbstractBeanContainer.java index d94588bdc9..adf6313770 100644 --- a/server/src/com/vaadin/data/util/AbstractBeanContainer.java +++ b/server/src/com/vaadin/data/util/AbstractBeanContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -222,7 +222,6 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends @Override public boolean removeAllItems() { int origSize = size(); - IDTYPE firstItem = getFirstVisibleItem(); internalRemoveAllItems(); @@ -235,7 +234,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends // fire event only if the visible view changed, regardless of whether // filtered out items were removed or not if (origSize != 0) { - fireItemsRemoved(0, firstItem, origSize); + fireItemSetChange(); } return true; @@ -680,8 +679,6 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends protected void addAll(Collection<? extends BEANTYPE> collection) throws IllegalStateException, IllegalArgumentException { boolean modified = false; - int origSize = size(); - for (BEANTYPE bean : collection) { // TODO skipping invalid beans - should not allow them in javadoc? if (bean == null @@ -702,22 +699,13 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends if (modified) { // Filter the contents when all items have been added if (isFiltered()) { - doFilterContainer(!getFilters().isEmpty()); - } - if (visibleNewItemsWasAdded(origSize)) { - // fire event about added items - int firstPosition = origSize; - IDTYPE firstItemId = getVisibleItemIds().get(firstPosition); - int affectedItems = size() - origSize; - fireItemsAdded(firstPosition, firstItemId, affectedItems); + filterAll(); + } else { + fireItemSetChange(); } } } - private boolean visibleNewItemsWasAdded(int origSize) { - return size() > origSize; - } - /** * Use the bean resolver to get the identifier for a bean. * diff --git a/server/src/com/vaadin/data/util/AbstractContainer.java b/server/src/com/vaadin/data/util/AbstractContainer.java index 4724f8e8b8..dafdd15b06 100644 --- a/server/src/com/vaadin/data/util/AbstractContainer.java +++ b/server/src/com/vaadin/data/util/AbstractContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java b/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java index cae9f30fc9..b19cddb021 100644 --- a/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java +++ b/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -15,10 +15,8 @@ */ package com.vaadin.data.util; -import java.io.Serializable; import java.util.Collection; import java.util.Collections; -import java.util.EventObject; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; @@ -148,83 +146,6 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE } } - private static abstract class BaseItemAddOrRemoveEvent extends EventObject - implements Serializable { - protected Object itemId; - protected int index; - protected int count; - - public BaseItemAddOrRemoveEvent(Container source, Object itemId, - int index, int count) { - super(source); - this.itemId = itemId; - this.index = index; - this.count = count; - } - - public Container getContainer() { - return (Container) getSource(); - } - - public Object getFirstItemId() { - return itemId; - } - - public int getFirstIndex() { - return index; - } - - public int getAffectedItemsCount() { - return count; - } - } - - /** - * An <code>Event</code> object specifying information about the added - * items. - * - * <p> - * This class provides information about the first added item and the number - * of added items. - * </p> - */ - protected static class BaseItemAddEvent extends BaseItemAddOrRemoveEvent - implements Container.Indexed.ItemAddEvent { - - public BaseItemAddEvent(Container source, Object itemId, int index, - int count) { - super(source, itemId, index, count); - } - - @Override - public int getAddedItemsCount() { - return getAffectedItemsCount(); - } - } - - /** - * An <code>Event</code> object specifying information about the removed - * items. - * - * <p> - * This class provides information about the first removed item and the - * number of removed items. - * </p> - */ - protected static class BaseItemRemoveEvent extends BaseItemAddOrRemoveEvent - implements Container.Indexed.ItemRemoveEvent { - - public BaseItemRemoveEvent(Container source, Object itemId, int index, - int count) { - super(source, itemId, index, count); - } - - @Override - public int getRemovedItemsCount() { - return getAffectedItemsCount(); - } - } - /** * Get an item even if filtered out. * @@ -977,69 +898,36 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE * Notify item set change listeners that an item has been added to the * container. * + * Unless subclasses specify otherwise, the default notification indicates a + * full refresh. + * * @param postion - * position of the added item in the view + * position of the added item in the view (if visible) * @param itemId * id of the added item * @param item * the added item */ protected void fireItemAdded(int position, ITEMIDTYPE itemId, ITEMCLASS item) { - fireItemsAdded(position, itemId, 1); - } - - /** - * Notify item set change listeners that items has been added to the - * container. - * - * @param firstPosition - * position of the first visible added item in the view - * @param firstItemId - * id of the first visible added item - * @param numberOfItems - * the number of visible added items - */ - protected void fireItemsAdded(int firstPosition, ITEMIDTYPE firstItemId, - int numberOfItems) { - BaseItemAddEvent addEvent = new BaseItemAddEvent(this, firstItemId, - firstPosition, numberOfItems); - fireItemSetChange(addEvent); + fireItemSetChange(); } /** * Notify item set change listeners that an item has been removed from the * container. * - * @param position - * position of the removed item in the view prior to removal + * Unless subclasses specify otherwise, the default notification indicates a + * full refresh. * + * @param postion + * position of the removed item in the view prior to removal (if + * was visible) * @param itemId * id of the removed item, of type {@link Object} to satisfy * {@link Container#removeItem(Object)} API */ protected void fireItemRemoved(int position, Object itemId) { - fireItemsRemoved(position, itemId, 1); - } - - /** - * Notify item set change listeners that items has been removed from the - * container. - * - * @param firstPosition - * position of the first visible removed item in the view prior - * to removal - * @param firstItemId - * id of the first visible removed item, of type {@link Object} - * to satisfy {@link Container#removeItem(Object)} API - * @param numberOfItems - * the number of removed visible items - * - */ - protected void fireItemsRemoved(int firstPosition, Object firstItemId, - int numberOfItems) { - BaseItemRemoveEvent removeEvent = new BaseItemRemoveEvent(this, - firstItemId, firstPosition, numberOfItems); - fireItemSetChange(removeEvent); + fireItemSetChange(); } // visible and filtered item identifier lists @@ -1058,21 +946,6 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE } /** - * Returns the item id of the first visible item after filtering. 'Null' is - * returned if there is no visible items. - * - * For internal use only. - * - * @return item id of the first visible item - */ - protected ITEMIDTYPE getFirstVisibleItem() { - if (!getVisibleItemIds().isEmpty()) { - return getVisibleItemIds().get(0); - } - return null; - } - - /** * Returns true is the container has active filters. * * @return true if the container is currently filtered diff --git a/server/src/com/vaadin/data/util/AbstractProperty.java b/server/src/com/vaadin/data/util/AbstractProperty.java index 903f2f50f2..ee79fcd91e 100644 --- a/server/src/com/vaadin/data/util/AbstractProperty.java +++ b/server/src/com/vaadin/data/util/AbstractProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/BeanContainer.java b/server/src/com/vaadin/data/util/BeanContainer.java index 4e435aabcc..9b878d627e 100644 --- a/server/src/com/vaadin/data/util/BeanContainer.java +++ b/server/src/com/vaadin/data/util/BeanContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/BeanItem.java b/server/src/com/vaadin/data/util/BeanItem.java index 49f5f95898..ac3ef86434 100644 --- a/server/src/com/vaadin/data/util/BeanItem.java +++ b/server/src/com/vaadin/data/util/BeanItem.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/BeanItemContainer.java b/server/src/com/vaadin/data/util/BeanItemContainer.java index e7b38d8b88..d5d399f0f8 100644 --- a/server/src/com/vaadin/data/util/BeanItemContainer.java +++ b/server/src/com/vaadin/data/util/BeanItemContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java b/server/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java index bb592245f1..eafd3573bc 100644 --- a/server/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java +++ b/server/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/ContainerOrderedWrapper.java b/server/src/com/vaadin/data/util/ContainerOrderedWrapper.java index b227d3ea08..483753da88 100644 --- a/server/src/com/vaadin/data/util/ContainerOrderedWrapper.java +++ b/server/src/com/vaadin/data/util/ContainerOrderedWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/DefaultItemSorter.java b/server/src/com/vaadin/data/util/DefaultItemSorter.java index 5ef1571a97..9728ccbd51 100644 --- a/server/src/com/vaadin/data/util/DefaultItemSorter.java +++ b/server/src/com/vaadin/data/util/DefaultItemSorter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/FilesystemContainer.java b/server/src/com/vaadin/data/util/FilesystemContainer.java index 449ba07ef6..7ceda49918 100644 --- a/server/src/com/vaadin/data/util/FilesystemContainer.java +++ b/server/src/com/vaadin/data/util/FilesystemContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/HierarchicalContainer.java b/server/src/com/vaadin/data/util/HierarchicalContainer.java index 45bea5018f..2235e77b34 100644 --- a/server/src/com/vaadin/data/util/HierarchicalContainer.java +++ b/server/src/com/vaadin/data/util/HierarchicalContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java b/server/src/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java index bc98d39c16..1c7960f954 100644 --- a/server/src/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java +++ b/server/src/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/IndexedContainer.java b/server/src/com/vaadin/data/util/IndexedContainer.java index 5d20919208..68960335d7 100644 --- a/server/src/com/vaadin/data/util/IndexedContainer.java +++ b/server/src/com/vaadin/data/util/IndexedContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -226,7 +226,6 @@ public class IndexedContainer extends @Override public boolean removeAllItems() { int origSize = size(); - Object firstItem = getFirstVisibleItem(); internalRemoveAllItems(); @@ -236,7 +235,7 @@ public class IndexedContainer extends // filtered out items were removed or not if (origSize != 0) { // Sends a change event - fireItemsRemoved(0, firstItem, origSize); + fireItemSetChange(); } return true; @@ -621,7 +620,8 @@ public class IndexedContainer extends @Override protected void fireItemAdded(int position, Object itemId, Item item) { if (position >= 0) { - super.fireItemAdded(position, itemId, item); + fireItemSetChange(new IndexedContainer.ItemSetChangeEvent(this, + position)); } } @@ -1211,5 +1211,4 @@ public class IndexedContainer extends public Collection<Filter> getContainerFilters() { return super.getContainerFilters(); } - } diff --git a/server/src/com/vaadin/data/util/ItemSorter.java b/server/src/com/vaadin/data/util/ItemSorter.java index 89293157a6..141f84ad43 100644 --- a/server/src/com/vaadin/data/util/ItemSorter.java +++ b/server/src/com/vaadin/data/util/ItemSorter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/LegacyPropertyHelper.java b/server/src/com/vaadin/data/util/LegacyPropertyHelper.java index 76bd57117d..7432d036fb 100644 --- a/server/src/com/vaadin/data/util/LegacyPropertyHelper.java +++ b/server/src/com/vaadin/data/util/LegacyPropertyHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/ListSet.java b/server/src/com/vaadin/data/util/ListSet.java index 55ef398b20..ccc9e0dbfd 100644 --- a/server/src/com/vaadin/data/util/ListSet.java +++ b/server/src/com/vaadin/data/util/ListSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/MethodProperty.java b/server/src/com/vaadin/data/util/MethodProperty.java index d7323d872f..5ec8ebffe0 100644 --- a/server/src/com/vaadin/data/util/MethodProperty.java +++ b/server/src/com/vaadin/data/util/MethodProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/MethodPropertyDescriptor.java b/server/src/com/vaadin/data/util/MethodPropertyDescriptor.java index 007fdc4adc..04a6ab1cc9 100644 --- a/server/src/com/vaadin/data/util/MethodPropertyDescriptor.java +++ b/server/src/com/vaadin/data/util/MethodPropertyDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -143,4 +143,4 @@ public class MethodPropertyDescriptor<BT> implements private static final Logger getLogger() { return Logger.getLogger(MethodPropertyDescriptor.class.getName()); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/data/util/NestedMethodProperty.java b/server/src/com/vaadin/data/util/NestedMethodProperty.java index 8fe3b9d4c5..d252902d58 100644 --- a/server/src/com/vaadin/data/util/NestedMethodProperty.java +++ b/server/src/com/vaadin/data/util/NestedMethodProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/NestedPropertyDescriptor.java b/server/src/com/vaadin/data/util/NestedPropertyDescriptor.java index b2055fe776..ca423b34ed 100644 --- a/server/src/com/vaadin/data/util/NestedPropertyDescriptor.java +++ b/server/src/com/vaadin/data/util/NestedPropertyDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/ObjectProperty.java b/server/src/com/vaadin/data/util/ObjectProperty.java index 12d058aaca..8a2daa443c 100644 --- a/server/src/com/vaadin/data/util/ObjectProperty.java +++ b/server/src/com/vaadin/data/util/ObjectProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/PropertyFormatter.java b/server/src/com/vaadin/data/util/PropertyFormatter.java index b91a2426de..e188ce8bc3 100644 --- a/server/src/com/vaadin/data/util/PropertyFormatter.java +++ b/server/src/com/vaadin/data/util/PropertyFormatter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/PropertysetItem.java b/server/src/com/vaadin/data/util/PropertysetItem.java index be156434a5..f463a52f54 100644 --- a/server/src/com/vaadin/data/util/PropertysetItem.java +++ b/server/src/com/vaadin/data/util/PropertysetItem.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/TextFileProperty.java b/server/src/com/vaadin/data/util/TextFileProperty.java index 0df6765d77..22fd8168a1 100644 --- a/server/src/com/vaadin/data/util/TextFileProperty.java +++ b/server/src/com/vaadin/data/util/TextFileProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/TransactionalPropertyWrapper.java b/server/src/com/vaadin/data/util/TransactionalPropertyWrapper.java index 6b0119c503..c3cef6a0ec 100644 --- a/server/src/com/vaadin/data/util/TransactionalPropertyWrapper.java +++ b/server/src/com/vaadin/data/util/TransactionalPropertyWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -48,18 +48,32 @@ public class TransactionalPropertyWrapper<T> extends AbstractProperty<T> private boolean inTransaction = false; private boolean valueChangePending; private T valueBeforeTransaction; + private final ValueChangeListener listener = new ValueChangeListener() { + + @Override + public void valueChange(ValueChangeEvent event) { + fireValueChange(); + } + }; public TransactionalPropertyWrapper(Property<T> wrappedProperty) { this.wrappedProperty = wrappedProperty; if (wrappedProperty instanceof ValueChangeNotifier) { ((ValueChangeNotifier) wrappedProperty) - .addListener(new ValueChangeListener() { + .addValueChangeListener(listener); + } + } - @Override - public void valueChange(ValueChangeEvent event) { - fireValueChange(); - } - }); + /** + * Removes the ValueChangeListener from wrapped Property that was added by + * TransactionalPropertyWrapper. + * + * @since 7.1.15 + */ + public void detachFromProperty() { + if (wrappedProperty instanceof ValueChangeNotifier) { + ((ValueChangeNotifier) wrappedProperty) + .removeValueChangeListener(listener); } } diff --git a/server/src/com/vaadin/data/util/VaadinPropertyDescriptor.java b/server/src/com/vaadin/data/util/VaadinPropertyDescriptor.java index 62b5888047..51084d9115 100644 --- a/server/src/com/vaadin/data/util/VaadinPropertyDescriptor.java +++ b/server/src/com/vaadin/data/util/VaadinPropertyDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/AbstractStringToNumberConverter.java b/server/src/com/vaadin/data/util/converter/AbstractStringToNumberConverter.java index 237f01bb22..9054f258c7 100644 --- a/server/src/com/vaadin/data/util/converter/AbstractStringToNumberConverter.java +++ b/server/src/com/vaadin/data/util/converter/AbstractStringToNumberConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/Converter.java b/server/src/com/vaadin/data/util/converter/Converter.java index 3c391af434..a7188ebb33 100644 --- a/server/src/com/vaadin/data/util/converter/Converter.java +++ b/server/src/com/vaadin/data/util/converter/Converter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/ConverterFactory.java b/server/src/com/vaadin/data/util/converter/ConverterFactory.java index 91a0aa0577..0280be4a73 100644 --- a/server/src/com/vaadin/data/util/converter/ConverterFactory.java +++ b/server/src/com/vaadin/data/util/converter/ConverterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/ConverterUtil.java b/server/src/com/vaadin/data/util/converter/ConverterUtil.java index 3457c16755..91e11a6222 100644 --- a/server/src/com/vaadin/data/util/converter/ConverterUtil.java +++ b/server/src/com/vaadin/data/util/converter/ConverterUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/DateToLongConverter.java b/server/src/com/vaadin/data/util/converter/DateToLongConverter.java index 6aedc74f6d..fffe80352e 100644 --- a/server/src/com/vaadin/data/util/converter/DateToLongConverter.java +++ b/server/src/com/vaadin/data/util/converter/DateToLongConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/DateToSqlDateConverter.java b/server/src/com/vaadin/data/util/converter/DateToSqlDateConverter.java index 7c252d78f2..6a7e8327a1 100644 --- a/server/src/com/vaadin/data/util/converter/DateToSqlDateConverter.java +++ b/server/src/com/vaadin/data/util/converter/DateToSqlDateConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/DefaultConverterFactory.java b/server/src/com/vaadin/data/util/converter/DefaultConverterFactory.java index 4d3717e9ba..fdf858a528 100644 --- a/server/src/com/vaadin/data/util/converter/DefaultConverterFactory.java +++ b/server/src/com/vaadin/data/util/converter/DefaultConverterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/ReverseConverter.java b/server/src/com/vaadin/data/util/converter/ReverseConverter.java index 6fa07696db..2495dc631a 100644 --- a/server/src/com/vaadin/data/util/converter/ReverseConverter.java +++ b/server/src/com/vaadin/data/util/converter/ReverseConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/StringToBigDecimalConverter.java b/server/src/com/vaadin/data/util/converter/StringToBigDecimalConverter.java index 75d4cedd23..549f156f61 100644 --- a/server/src/com/vaadin/data/util/converter/StringToBigDecimalConverter.java +++ b/server/src/com/vaadin/data/util/converter/StringToBigDecimalConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/StringToBooleanConverter.java b/server/src/com/vaadin/data/util/converter/StringToBooleanConverter.java index 6af0933731..0e802da879 100644 --- a/server/src/com/vaadin/data/util/converter/StringToBooleanConverter.java +++ b/server/src/com/vaadin/data/util/converter/StringToBooleanConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/StringToDateConverter.java b/server/src/com/vaadin/data/util/converter/StringToDateConverter.java index e3917c6a52..8f0db24caf 100644 --- a/server/src/com/vaadin/data/util/converter/StringToDateConverter.java +++ b/server/src/com/vaadin/data/util/converter/StringToDateConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/StringToDoubleConverter.java b/server/src/com/vaadin/data/util/converter/StringToDoubleConverter.java index c593d256da..f514eac648 100644 --- a/server/src/com/vaadin/data/util/converter/StringToDoubleConverter.java +++ b/server/src/com/vaadin/data/util/converter/StringToDoubleConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/StringToFloatConverter.java b/server/src/com/vaadin/data/util/converter/StringToFloatConverter.java index 6fcb83a770..f4d7f97853 100644 --- a/server/src/com/vaadin/data/util/converter/StringToFloatConverter.java +++ b/server/src/com/vaadin/data/util/converter/StringToFloatConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/StringToIntegerConverter.java b/server/src/com/vaadin/data/util/converter/StringToIntegerConverter.java index f6f668ad4d..59a46babe1 100644 --- a/server/src/com/vaadin/data/util/converter/StringToIntegerConverter.java +++ b/server/src/com/vaadin/data/util/converter/StringToIntegerConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/converter/StringToLongConverter.java b/server/src/com/vaadin/data/util/converter/StringToLongConverter.java index 3532336787..cd7cf49042 100644 --- a/server/src/com/vaadin/data/util/converter/StringToLongConverter.java +++ b/server/src/com/vaadin/data/util/converter/StringToLongConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/filter/AbstractJunctionFilter.java b/server/src/com/vaadin/data/util/filter/AbstractJunctionFilter.java index 25924f8e61..28e6cda34e 100644 --- a/server/src/com/vaadin/data/util/filter/AbstractJunctionFilter.java +++ b/server/src/com/vaadin/data/util/filter/AbstractJunctionFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -85,4 +85,4 @@ public abstract class AbstractJunctionFilter implements Filter { } return hash; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/data/util/filter/And.java b/server/src/com/vaadin/data/util/filter/And.java index 101040889b..938aedae95 100644 --- a/server/src/com/vaadin/data/util/filter/And.java +++ b/server/src/com/vaadin/data/util/filter/And.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/filter/Between.java b/server/src/com/vaadin/data/util/filter/Between.java index a76821981a..48a610ed57 100644 --- a/server/src/com/vaadin/data/util/filter/Between.java +++ b/server/src/com/vaadin/data/util/filter/Between.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/filter/Compare.java b/server/src/com/vaadin/data/util/filter/Compare.java index 1396c46d36..1fcbe85580 100644 --- a/server/src/com/vaadin/data/util/filter/Compare.java +++ b/server/src/com/vaadin/data/util/filter/Compare.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/filter/IsNull.java b/server/src/com/vaadin/data/util/filter/IsNull.java index 6907a016a1..9bcfe40c03 100644 --- a/server/src/com/vaadin/data/util/filter/IsNull.java +++ b/server/src/com/vaadin/data/util/filter/IsNull.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/filter/Like.java b/server/src/com/vaadin/data/util/filter/Like.java index e0e2c9275c..9b7b2af292 100644 --- a/server/src/com/vaadin/data/util/filter/Like.java +++ b/server/src/com/vaadin/data/util/filter/Like.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/filter/Not.java b/server/src/com/vaadin/data/util/filter/Not.java index 6892d199d0..a677e7f752 100644 --- a/server/src/com/vaadin/data/util/filter/Not.java +++ b/server/src/com/vaadin/data/util/filter/Not.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/filter/Or.java b/server/src/com/vaadin/data/util/filter/Or.java index 0e952b63ce..69d20513a2 100644 --- a/server/src/com/vaadin/data/util/filter/Or.java +++ b/server/src/com/vaadin/data/util/filter/Or.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/filter/SimpleStringFilter.java b/server/src/com/vaadin/data/util/filter/SimpleStringFilter.java index a214e69846..ea5e93277e 100644 --- a/server/src/com/vaadin/data/util/filter/SimpleStringFilter.java +++ b/server/src/com/vaadin/data/util/filter/SimpleStringFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/filter/UnsupportedFilterException.java b/server/src/com/vaadin/data/util/filter/UnsupportedFilterException.java index 0a28139406..42a7784da8 100644 --- a/server/src/com/vaadin/data/util/filter/UnsupportedFilterException.java +++ b/server/src/com/vaadin/data/util/filter/UnsupportedFilterException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -44,4 +44,4 @@ public class UnsupportedFilterException extends RuntimeException implements public UnsupportedFilterException(String message, Exception cause) { super(message, cause); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/data/util/sqlcontainer/CacheFlushNotifier.java b/server/src/com/vaadin/data/util/sqlcontainer/CacheFlushNotifier.java index 5095f0c6af..12d806a8d5 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/CacheFlushNotifier.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/CacheFlushNotifier.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/CacheMap.java b/server/src/com/vaadin/data/util/sqlcontainer/CacheMap.java index 338874c3ae..cdeff873d0 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/CacheMap.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/CacheMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -40,4 +40,4 @@ class CacheMap<K, V> extends LinkedHashMap<K, V> { int getCacheLimit() { return cacheLimit; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java b/server/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java index d8448a2b50..e89b8c02a8 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/OptimisticLockException.java b/server/src/com/vaadin/data/util/sqlcontainer/OptimisticLockException.java index 2a9d49bf55..ed8eb3c0ff 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/OptimisticLockException.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/OptimisticLockException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/ReadOnlyRowId.java b/server/src/com/vaadin/data/util/sqlcontainer/ReadOnlyRowId.java index 8dc31922dd..dcad8f7c5d 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/ReadOnlyRowId.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/ReadOnlyRowId.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/Reference.java b/server/src/com/vaadin/data/util/sqlcontainer/Reference.java index cdc1c46102..e82f63ad2f 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/Reference.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/Reference.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/RowId.java b/server/src/com/vaadin/data/util/sqlcontainer/RowId.java index c375bd5a4a..8674b9dca0 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/RowId.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/RowId.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/RowItem.java b/server/src/com/vaadin/data/util/sqlcontainer/RowItem.java index 39bbf5990f..ddb5de1d31 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/RowItem.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/RowItem.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java b/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java index 32b46df166..683140d279 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/SQLContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/SQLUtil.java b/server/src/com/vaadin/data/util/sqlcontainer/SQLUtil.java index 91220fc763..e5282c867a 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/SQLUtil.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/SQLUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/TemporaryRowId.java b/server/src/com/vaadin/data/util/sqlcontainer/TemporaryRowId.java index 03f7f23fdd..6c1e07756f 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/TemporaryRowId.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/TemporaryRowId.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPool.java b/server/src/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPool.java index 06c552d10e..acad5beed9 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPool.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/connection/J2EEConnectionPool.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -81,4 +81,4 @@ public class J2EEConnectionPool implements JDBCConnectionPool { dataSource = null; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/data/util/sqlcontainer/connection/JDBCConnectionPool.java b/server/src/com/vaadin/data/util/sqlcontainer/connection/JDBCConnectionPool.java index b980f9022e..11669075a3 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/connection/JDBCConnectionPool.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/connection/JDBCConnectionPool.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java b/server/src/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java index fbd1e9d770..57ea188cb4 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/AbstractTransactionalQuery.java b/server/src/com/vaadin/data/util/sqlcontainer/query/AbstractTransactionalQuery.java index f36b583e07..e7fd9f4aa4 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/AbstractTransactionalQuery.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/AbstractTransactionalQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformQuery.java b/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformQuery.java index 6895e02147..79a5b6c067 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformQuery.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformQueryDelegate.java b/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformQueryDelegate.java index 3a5cd8f660..b6fa56055d 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformQueryDelegate.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformQueryDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformStatementDelegate.java b/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformStatementDelegate.java index 65205b3866..9df72f5b98 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformStatementDelegate.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/FreeformStatementDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/OrderBy.java b/server/src/com/vaadin/data/util/sqlcontainer/query/OrderBy.java index e50ac6d1b2..2bafa5dc0c 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/OrderBy.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/OrderBy.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java b/server/src/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java index 416440c61a..413dd55ab9 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/QueryDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java b/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java index b54a630e04..bb000bd8f5 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java index 43c0933e0a..84dfe9b865 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/MSSQLGenerator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/MSSQLGenerator.java index 9443d5ea5a..5a1f2003cd 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/MSSQLGenerator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/MSSQLGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -110,4 +110,4 @@ public class MSSQLGenerator extends DefaultSQLGenerator { sh.setQueryString(query.toString()); return sh; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/OracleGenerator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/OracleGenerator.java index 4a26d54ace..86508d37c4 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/OracleGenerator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/OracleGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -121,4 +121,4 @@ public class OracleGenerator extends DefaultSQLGenerator { return sh; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/SQLGenerator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/SQLGenerator.java index a3bad3495f..53ff924a36 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/SQLGenerator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/SQLGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java index 3f96e51110..ed849b51ec 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/AndTranslator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/AndTranslator.java index 315ec8058a..a3d9b90705 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/AndTranslator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/AndTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java index bc42ba1318..13d3553742 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java index f769541442..d8d5cc61fb 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java index 8f74a726a9..0ece263ef4 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java index b406812386..764a04eece 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java index 1aeae86284..07e544d40b 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/NotTranslator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/NotTranslator.java index cf53f6d82e..1bbc2a8e7e 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/NotTranslator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/NotTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/OrTranslator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/OrTranslator.java index 1c45c4fd25..00b4d5421b 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/OrTranslator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/OrTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java index c95dd369e6..b277551209 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java index c81c74b304..9bfda5fb34 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/StringDecorator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/StringDecorator.java index 5b2c8116f4..0132260a0c 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/StringDecorator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/filter/StringDecorator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/AbstractStringValidator.java b/server/src/com/vaadin/data/validator/AbstractStringValidator.java index 4941783bd3..70227afa67 100644 --- a/server/src/com/vaadin/data/validator/AbstractStringValidator.java +++ b/server/src/com/vaadin/data/validator/AbstractStringValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/AbstractValidator.java b/server/src/com/vaadin/data/validator/AbstractValidator.java index 7c4d84655c..b0894bbdbf 100644 --- a/server/src/com/vaadin/data/validator/AbstractValidator.java +++ b/server/src/com/vaadin/data/validator/AbstractValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/BeanValidator.java b/server/src/com/vaadin/data/validator/BeanValidator.java index 54efa51ac1..b25f7e687c 100644 --- a/server/src/com/vaadin/data/validator/BeanValidator.java +++ b/server/src/com/vaadin/data/validator/BeanValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -180,4 +180,4 @@ public class BeanValidator implements Validator { return javaxBeanValidator; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/data/validator/CompositeValidator.java b/server/src/com/vaadin/data/validator/CompositeValidator.java index 065bd2bbe3..f3b7133b9d 100644 --- a/server/src/com/vaadin/data/validator/CompositeValidator.java +++ b/server/src/com/vaadin/data/validator/CompositeValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/DateRangeValidator.java b/server/src/com/vaadin/data/validator/DateRangeValidator.java index 2263ecc89f..3add69c207 100644 --- a/server/src/com/vaadin/data/validator/DateRangeValidator.java +++ b/server/src/com/vaadin/data/validator/DateRangeValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/DoubleRangeValidator.java b/server/src/com/vaadin/data/validator/DoubleRangeValidator.java index e5e8a6cb6e..8992e2644a 100644 --- a/server/src/com/vaadin/data/validator/DoubleRangeValidator.java +++ b/server/src/com/vaadin/data/validator/DoubleRangeValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/DoubleValidator.java b/server/src/com/vaadin/data/validator/DoubleValidator.java index 55093b6a40..e40cf3eecf 100644 --- a/server/src/com/vaadin/data/validator/DoubleValidator.java +++ b/server/src/com/vaadin/data/validator/DoubleValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/EmailValidator.java b/server/src/com/vaadin/data/validator/EmailValidator.java index aa7a921d51..853c855a37 100644 --- a/server/src/com/vaadin/data/validator/EmailValidator.java +++ b/server/src/com/vaadin/data/validator/EmailValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/IntegerRangeValidator.java b/server/src/com/vaadin/data/validator/IntegerRangeValidator.java index 759a9f3ae7..6ef848bed3 100644 --- a/server/src/com/vaadin/data/validator/IntegerRangeValidator.java +++ b/server/src/com/vaadin/data/validator/IntegerRangeValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/IntegerValidator.java b/server/src/com/vaadin/data/validator/IntegerValidator.java index db2d510946..f52ba0ab3a 100644 --- a/server/src/com/vaadin/data/validator/IntegerValidator.java +++ b/server/src/com/vaadin/data/validator/IntegerValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/NullValidator.java b/server/src/com/vaadin/data/validator/NullValidator.java index 451ee9c10f..42cf419973 100644 --- a/server/src/com/vaadin/data/validator/NullValidator.java +++ b/server/src/com/vaadin/data/validator/NullValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/RangeValidator.java b/server/src/com/vaadin/data/validator/RangeValidator.java index 5e82a37b51..5ba3aef363 100644 --- a/server/src/com/vaadin/data/validator/RangeValidator.java +++ b/server/src/com/vaadin/data/validator/RangeValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/RegexpValidator.java b/server/src/com/vaadin/data/validator/RegexpValidator.java index f85bce9281..74e1f89253 100644 --- a/server/src/com/vaadin/data/validator/RegexpValidator.java +++ b/server/src/com/vaadin/data/validator/RegexpValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/data/validator/StringLengthValidator.java b/server/src/com/vaadin/data/validator/StringLengthValidator.java index d314f38783..efb551c614 100644 --- a/server/src/com/vaadin/data/validator/StringLengthValidator.java +++ b/server/src/com/vaadin/data/validator/StringLengthValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/Action.java b/server/src/com/vaadin/event/Action.java index d872ef2541..1af1de6e6d 100644 --- a/server/src/com/vaadin/event/Action.java +++ b/server/src/com/vaadin/event/Action.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/ActionManager.java b/server/src/com/vaadin/event/ActionManager.java index 8d7a64b364..b42a5d8dde 100644 --- a/server/src/com/vaadin/event/ActionManager.java +++ b/server/src/com/vaadin/event/ActionManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/ConnectorActionManager.java b/server/src/com/vaadin/event/ConnectorActionManager.java index 297f78f179..0816ba48df 100644 --- a/server/src/com/vaadin/event/ConnectorActionManager.java +++ b/server/src/com/vaadin/event/ConnectorActionManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/ConnectorEvent.java b/server/src/com/vaadin/event/ConnectorEvent.java index 6e1526435f..3dc73b864a 100644 --- a/server/src/com/vaadin/event/ConnectorEvent.java +++ b/server/src/com/vaadin/event/ConnectorEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -28,4 +28,4 @@ public abstract class ConnectorEvent extends EventObject { public ClientConnector getConnector() { return (ClientConnector) getSource(); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/ConnectorEventListener.java b/server/src/com/vaadin/event/ConnectorEventListener.java index 7461e31888..e3cb9c283b 100644 --- a/server/src/com/vaadin/event/ConnectorEventListener.java +++ b/server/src/com/vaadin/event/ConnectorEventListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -20,4 +20,4 @@ import java.util.EventListener; public interface ConnectorEventListener extends EventListener, Serializable { -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/DataBoundTransferable.java b/server/src/com/vaadin/event/DataBoundTransferable.java index e5e23223fb..d461692b2e 100644 --- a/server/src/com/vaadin/event/DataBoundTransferable.java +++ b/server/src/com/vaadin/event/DataBoundTransferable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/EventRouter.java b/server/src/com/vaadin/event/EventRouter.java index fdc543143b..b662dfcb36 100644 --- a/server/src/com/vaadin/event/EventRouter.java +++ b/server/src/com/vaadin/event/EventRouter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/FieldEvents.java b/server/src/com/vaadin/event/FieldEvents.java index 61c342891b..364ac76ffd 100644 --- a/server/src/com/vaadin/event/FieldEvents.java +++ b/server/src/com/vaadin/event/FieldEvents.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/ItemClickEvent.java b/server/src/com/vaadin/event/ItemClickEvent.java index b055fda3a1..a151257442 100644 --- a/server/src/com/vaadin/event/ItemClickEvent.java +++ b/server/src/com/vaadin/event/ItemClickEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/LayoutEvents.java b/server/src/com/vaadin/event/LayoutEvents.java index 47cb011898..e4432b7c7a 100644 --- a/server/src/com/vaadin/event/LayoutEvents.java +++ b/server/src/com/vaadin/event/LayoutEvents.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -161,4 +161,4 @@ public interface LayoutEvents { childComponent); } } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/ListenerMethod.java b/server/src/com/vaadin/event/ListenerMethod.java index 20523920fd..3311ed705e 100644 --- a/server/src/com/vaadin/event/ListenerMethod.java +++ b/server/src/com/vaadin/event/ListenerMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/MethodEventSource.java b/server/src/com/vaadin/event/MethodEventSource.java index 999470a98a..ddfc87ca8c 100644 --- a/server/src/com/vaadin/event/MethodEventSource.java +++ b/server/src/com/vaadin/event/MethodEventSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/MouseEvents.java b/server/src/com/vaadin/event/MouseEvents.java index fe3300e434..b32ce06587 100644 --- a/server/src/com/vaadin/event/MouseEvents.java +++ b/server/src/com/vaadin/event/MouseEvents.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/ShortcutAction.java b/server/src/com/vaadin/event/ShortcutAction.java index 5ec4d3bfa0..09accae1c7 100644 --- a/server/src/com/vaadin/event/ShortcutAction.java +++ b/server/src/com/vaadin/event/ShortcutAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/ShortcutListener.java b/server/src/com/vaadin/event/ShortcutListener.java index 8b946f1234..ccfe68d6fb 100644 --- a/server/src/com/vaadin/event/ShortcutListener.java +++ b/server/src/com/vaadin/event/ShortcutListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/Transferable.java b/server/src/com/vaadin/event/Transferable.java index 69b158d790..9cfbba5161 100644 --- a/server/src/com/vaadin/event/Transferable.java +++ b/server/src/com/vaadin/event/Transferable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/TransferableImpl.java b/server/src/com/vaadin/event/TransferableImpl.java index dae18bfb15..9c8e79f1bf 100644 --- a/server/src/com/vaadin/event/TransferableImpl.java +++ b/server/src/com/vaadin/event/TransferableImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/UIEvents.java b/server/src/com/vaadin/event/UIEvents.java index 321bfc9251..e986386da8 100644 --- a/server/src/com/vaadin/event/UIEvents.java +++ b/server/src/com/vaadin/event/UIEvents.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/dd/DragAndDropEvent.java b/server/src/com/vaadin/event/dd/DragAndDropEvent.java index 4e31e55063..661c7ed1cc 100644 --- a/server/src/com/vaadin/event/dd/DragAndDropEvent.java +++ b/server/src/com/vaadin/event/dd/DragAndDropEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/dd/DragSource.java b/server/src/com/vaadin/event/dd/DragSource.java index 447ee32589..8e4d43bfc4 100644 --- a/server/src/com/vaadin/event/dd/DragSource.java +++ b/server/src/com/vaadin/event/dd/DragSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -61,4 +61,4 @@ public interface DragSource extends Component { */ public Transferable getTransferable(Map<String, Object> rawVariables); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/DropHandler.java b/server/src/com/vaadin/event/dd/DropHandler.java index 3bb5e955a2..c45ae7e7d3 100644 --- a/server/src/com/vaadin/event/dd/DropHandler.java +++ b/server/src/com/vaadin/event/dd/DropHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/dd/DropTarget.java b/server/src/com/vaadin/event/dd/DropTarget.java index e7a49a0f6f..f96170cf98 100644 --- a/server/src/com/vaadin/event/dd/DropTarget.java +++ b/server/src/com/vaadin/event/dd/DropTarget.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -51,4 +51,4 @@ public interface DropTarget extends Component { public TargetDetails translateDropTargetDetails( Map<String, Object> clientVariables); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/TargetDetails.java b/server/src/com/vaadin/event/dd/TargetDetails.java index 7719349a92..b5635bc2a8 100644 --- a/server/src/com/vaadin/event/dd/TargetDetails.java +++ b/server/src/com/vaadin/event/dd/TargetDetails.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/dd/TargetDetailsImpl.java b/server/src/com/vaadin/event/dd/TargetDetailsImpl.java index 374c4a67f7..1138215f3f 100644 --- a/server/src/com/vaadin/event/dd/TargetDetailsImpl.java +++ b/server/src/com/vaadin/event/dd/TargetDetailsImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -55,4 +55,4 @@ public class TargetDetailsImpl implements TargetDetails { return dropTarget; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java b/server/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java index b324e7a9bb..fa6a4c2b9a 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -45,4 +45,4 @@ public final class AcceptAll extends ClientSideCriterion { public boolean accept(DragAndDropEvent dragEvent) { return true; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/AcceptCriterion.java b/server/src/com/vaadin/event/dd/acceptcriteria/AcceptCriterion.java index 2f76bfc609..a968cd8741 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/AcceptCriterion.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/AcceptCriterion.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -84,4 +84,4 @@ public interface AcceptCriterion extends Serializable { * @return */ public boolean accept(DragAndDropEvent dragEvent); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/And.java b/server/src/com/vaadin/event/dd/acceptcriteria/And.java index 6dc9593e17..b2fc1b1b94 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/And.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/And.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -63,4 +63,4 @@ public class And extends ClientSideCriterion { return true; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/ClientSideCriterion.java b/server/src/com/vaadin/event/dd/acceptcriteria/ClientSideCriterion.java index b3c0636800..6bb227a95e 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/ClientSideCriterion.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/ClientSideCriterion.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java b/server/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java index e9c2834ccd..57f4d8253b 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -62,4 +62,4 @@ public class ContainsDataFlavor extends ClientSideCriterion { // extending classes use client side implementation from this class return ContainsDataFlavor.class.getCanonicalName(); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/Not.java b/server/src/com/vaadin/event/dd/acceptcriteria/Not.java index 7f48a0913c..95f96bbf08 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/Not.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/Not.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -48,4 +48,4 @@ public class Not extends ClientSideCriterion { return !acceptCriterion.accept(dragEvent); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/Or.java b/server/src/com/vaadin/event/dd/acceptcriteria/Or.java index 9676576cc1..e300606464 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/Or.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/Or.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -61,4 +61,4 @@ public class Or extends ClientSideCriterion { return false; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java b/server/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java index 0cb2ae2055..8b769ee031 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java b/server/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java index 0cc2f0a1a5..8e9fdecdae 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -76,4 +76,4 @@ public class SourceIs extends ClientSideCriterion { return false; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java b/server/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java index e10672cc1a..c49f126941 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -60,4 +60,4 @@ public class SourceIsTarget extends ClientSideCriterion { return instance; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java b/server/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java index d6b844e610..42fb5dfa11 100644 --- a/server/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java +++ b/server/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -81,4 +81,4 @@ public class TargetDetailIs extends ClientSideCriterion { // sub classes by default use VDropDetailEquals a client implementation return TargetDetailIs.class.getCanonicalName(); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/navigator/NavigationStateManager.java b/server/src/com/vaadin/navigator/NavigationStateManager.java index 5b3d3410ea..d454d044cb 100644 --- a/server/src/com/vaadin/navigator/NavigationStateManager.java +++ b/server/src/com/vaadin/navigator/NavigationStateManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -60,4 +60,4 @@ public interface NavigationStateManager extends Serializable { * This method should only be called by a Navigator. */ public void setNavigator(Navigator navigator); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/navigator/Navigator.java b/server/src/com/vaadin/navigator/Navigator.java index dbcec00ba9..80dad2244e 100644 --- a/server/src/com/vaadin/navigator/Navigator.java +++ b/server/src/com/vaadin/navigator/Navigator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -16,7 +16,7 @@ package com.vaadin.navigator; /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/navigator/View.java b/server/src/com/vaadin/navigator/View.java index 1c3e17876b..76b76f5520 100644 --- a/server/src/com/vaadin/navigator/View.java +++ b/server/src/com/vaadin/navigator/View.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -46,4 +46,4 @@ public interface View extends Serializable { * */ public void enter(ViewChangeEvent event); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/navigator/ViewChangeListener.java b/server/src/com/vaadin/navigator/ViewChangeListener.java index d4989f7018..7d3f2b6044 100644 --- a/server/src/com/vaadin/navigator/ViewChangeListener.java +++ b/server/src/com/vaadin/navigator/ViewChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -130,4 +130,4 @@ public interface ViewChangeListener extends Serializable { */ public void afterViewChange(ViewChangeEvent event); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/navigator/ViewDisplay.java b/server/src/com/vaadin/navigator/ViewDisplay.java index 6db95ea84d..36aa5dadc2 100644 --- a/server/src/com/vaadin/navigator/ViewDisplay.java +++ b/server/src/com/vaadin/navigator/ViewDisplay.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -38,4 +38,4 @@ public interface ViewDisplay extends Serializable { * new view to show */ public void showView(View view); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/navigator/ViewProvider.java b/server/src/com/vaadin/navigator/ViewProvider.java index 64b2043d92..ecf4e51073 100644 --- a/server/src/com/vaadin/navigator/ViewProvider.java +++ b/server/src/com/vaadin/navigator/ViewProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -53,4 +53,4 @@ public interface ViewProvider extends Serializable { * @return newly created view (null if none available for the view name) */ public View getView(String viewName); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/AbstractClientConnector.java b/server/src/com/vaadin/server/AbstractClientConnector.java index a73ca3d985..1e58fb30c0 100644 --- a/server/src/com/vaadin/server/AbstractClientConnector.java +++ b/server/src/com/vaadin/server/AbstractClientConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -132,13 +132,22 @@ public abstract class AbstractClientConnector implements ClientConnector, /* Documentation copied from interface */ @Override public void markAsDirty() { - assert getSession() == null || getSession().hasLock() : "Session must be locked when markAsDirty() is called"; + assert getSession() == null || getSession().hasLock() : buildLockAssertMessage("markAsDirty()"); UI uI = getUI(); if (uI != null) { uI.getConnectorTracker().markDirty(this); } } + private String buildLockAssertMessage(String method) { + if (VaadinService.isOtherSessionLocked(getSession())) { + return "The session of this connecor is not locked, but there is another session that is locked. " + + "This might be caused by accidentally using a connector that belongs to another session."; + } else { + return "Session must be locked when " + method + " is called"; + } + } + /** * Registers an RPC interface implementation for this component. * @@ -217,7 +226,7 @@ public abstract class AbstractClientConnector implements ClientConnector, * @see #getState() */ protected SharedState getState(boolean markAsDirty) { - assert getSession() == null || getSession().hasLock() : "Session must be locked when getState() is called"; + assert getSession() == null || getSession().hasLock() : buildLockAssertMessage("getState()"); if (null == sharedState) { sharedState = createState(); diff --git a/server/src/com/vaadin/server/AbstractErrorMessage.java b/server/src/com/vaadin/server/AbstractErrorMessage.java index bd40a75b33..c733cc493e 100644 --- a/server/src/com/vaadin/server/AbstractErrorMessage.java +++ b/server/src/com/vaadin/server/AbstractErrorMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/AbstractExtension.java b/server/src/com/vaadin/server/AbstractExtension.java index 0387ad1b08..7148e6e84c 100644 --- a/server/src/com/vaadin/server/AbstractExtension.java +++ b/server/src/com/vaadin/server/AbstractExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/AbstractJavaScriptExtension.java b/server/src/com/vaadin/server/AbstractJavaScriptExtension.java index c184abac7d..acf6a870c6 100644 --- a/server/src/com/vaadin/server/AbstractJavaScriptExtension.java +++ b/server/src/com/vaadin/server/AbstractJavaScriptExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/BootstrapFragmentResponse.java b/server/src/com/vaadin/server/BootstrapFragmentResponse.java index ead0ce6281..14a12a20ec 100644 --- a/server/src/com/vaadin/server/BootstrapFragmentResponse.java +++ b/server/src/com/vaadin/server/BootstrapFragmentResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java index bfdbea3086..3c75764075 100644 --- a/server/src/com/vaadin/server/BootstrapHandler.java +++ b/server/src/com/vaadin/server/BootstrapHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -156,10 +156,6 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { public boolean synchronizedHandleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) throws IOException { try { - // Update WebBrowser here only to make WebBrowser information - // available in init for LegacyApplications - session.getBrowser().updateRequestDetails(request); - List<UIProvider> uiProviders = session.getUIProviders(); UIClassSelectionEvent classSelectionEvent = new UIClassSelectionEvent( diff --git a/server/src/com/vaadin/server/BootstrapListener.java b/server/src/com/vaadin/server/BootstrapListener.java index 52acc352a3..374268dbdc 100644 --- a/server/src/com/vaadin/server/BootstrapListener.java +++ b/server/src/com/vaadin/server/BootstrapListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/BootstrapPageResponse.java b/server/src/com/vaadin/server/BootstrapPageResponse.java index e3337fe90c..e57ed413f0 100644 --- a/server/src/com/vaadin/server/BootstrapPageResponse.java +++ b/server/src/com/vaadin/server/BootstrapPageResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/BootstrapResponse.java b/server/src/com/vaadin/server/BootstrapResponse.java index 78fcc27c6f..59e18d4c8a 100644 --- a/server/src/com/vaadin/server/BootstrapResponse.java +++ b/server/src/com/vaadin/server/BootstrapResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/BrowserWindowOpener.java b/server/src/com/vaadin/server/BrowserWindowOpener.java index a6e420f89c..df03e76bcd 100644 --- a/server/src/com/vaadin/server/BrowserWindowOpener.java +++ b/server/src/com/vaadin/server/BrowserWindowOpener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ClassResource.java b/server/src/com/vaadin/server/ClassResource.java index 5b3db968f7..5fb30095ed 100644 --- a/server/src/com/vaadin/server/ClassResource.java +++ b/server/src/com/vaadin/server/ClassResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ClientConnector.java b/server/src/com/vaadin/server/ClientConnector.java index 3c06d5743c..e61ba50a3a 100644 --- a/server/src/com/vaadin/server/ClientConnector.java +++ b/server/src/com/vaadin/server/ClientConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ClientMethodInvocation.java b/server/src/com/vaadin/server/ClientMethodInvocation.java index 3a6a87a53c..e51138d7bf 100644 --- a/server/src/com/vaadin/server/ClientMethodInvocation.java +++ b/server/src/com/vaadin/server/ClientMethodInvocation.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -134,4 +134,4 @@ public class ClientMethodInvocation implements Serializable, } } } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/ComponentSizeValidator.java b/server/src/com/vaadin/server/ComponentSizeValidator.java index 07c195a1c1..2d88ae3b53 100644 --- a/server/src/com/vaadin/server/ComponentSizeValidator.java +++ b/server/src/com/vaadin/server/ComponentSizeValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/CompositeErrorMessage.java b/server/src/com/vaadin/server/CompositeErrorMessage.java index 1645285f9b..ee2af74994 100644 --- a/server/src/com/vaadin/server/CompositeErrorMessage.java +++ b/server/src/com/vaadin/server/CompositeErrorMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ConnectorResource.java b/server/src/com/vaadin/server/ConnectorResource.java index 8682f8ce6f..3c4fb1955f 100644 --- a/server/src/com/vaadin/server/ConnectorResource.java +++ b/server/src/com/vaadin/server/ConnectorResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ConnectorResourceHandler.java b/server/src/com/vaadin/server/ConnectorResourceHandler.java index e4315e9694..6c486a2d65 100644 --- a/server/src/com/vaadin/server/ConnectorResourceHandler.java +++ b/server/src/com/vaadin/server/ConnectorResourceHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/Constants.java b/server/src/com/vaadin/server/Constants.java index 90f09d1642..39329c32ce 100644 --- a/server/src/com/vaadin/server/Constants.java +++ b/server/src/com/vaadin/server/Constants.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/CustomizedSystemMessages.java b/server/src/com/vaadin/server/CustomizedSystemMessages.java index a4b8f9e64b..f7049e3688 100644 --- a/server/src/com/vaadin/server/CustomizedSystemMessages.java +++ b/server/src/com/vaadin/server/CustomizedSystemMessages.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -330,4 +330,4 @@ public class CustomizedSystemMessages extends SystemMessages implements this.cookiesDisabledMessage = cookiesDisabledMessage; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java index b2a66ee2a9..e72b411720 100644 --- a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java +++ b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/DefaultErrorHandler.java b/server/src/com/vaadin/server/DefaultErrorHandler.java index f8b684f1d1..bbb15b4d62 100644 --- a/server/src/com/vaadin/server/DefaultErrorHandler.java +++ b/server/src/com/vaadin/server/DefaultErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -138,4 +138,4 @@ public class DefaultErrorHandler implements ErrorHandler { return null; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/DefaultSystemMessagesProvider.java b/server/src/com/vaadin/server/DefaultSystemMessagesProvider.java index 9029a262e4..17177c36ca 100644 --- a/server/src/com/vaadin/server/DefaultSystemMessagesProvider.java +++ b/server/src/com/vaadin/server/DefaultSystemMessagesProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/DefaultUIProvider.java b/server/src/com/vaadin/server/DefaultUIProvider.java index d624f77cc6..2a1a59dbe6 100644 --- a/server/src/com/vaadin/server/DefaultUIProvider.java +++ b/server/src/com/vaadin/server/DefaultUIProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/DeploymentConfiguration.java b/server/src/com/vaadin/server/DeploymentConfiguration.java index 8c24379db3..b600d01cbd 100644 --- a/server/src/com/vaadin/server/DeploymentConfiguration.java +++ b/server/src/com/vaadin/server/DeploymentConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/DownloadStream.java b/server/src/com/vaadin/server/DownloadStream.java index 4e66831f1d..681c438967 100644 --- a/server/src/com/vaadin/server/DownloadStream.java +++ b/server/src/com/vaadin/server/DownloadStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/DragAndDropService.java b/server/src/com/vaadin/server/DragAndDropService.java index 0402a4997e..087a670b5b 100644 --- a/server/src/com/vaadin/server/DragAndDropService.java +++ b/server/src/com/vaadin/server/DragAndDropService.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/EncodeResult.java b/server/src/com/vaadin/server/EncodeResult.java index 87fefef548..55a97aa829 100644 --- a/server/src/com/vaadin/server/EncodeResult.java +++ b/server/src/com/vaadin/server/EncodeResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ErrorEvent.java b/server/src/com/vaadin/server/ErrorEvent.java index 0fae9cbfa8..5f8cb4eaca 100644 --- a/server/src/com/vaadin/server/ErrorEvent.java +++ b/server/src/com/vaadin/server/ErrorEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -121,4 +121,4 @@ public class ErrorEvent implements Serializable { return session.getErrorHandler(); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/ErrorHandler.java b/server/src/com/vaadin/server/ErrorHandler.java index 64f2455ed5..9c3af4c999 100644 --- a/server/src/com/vaadin/server/ErrorHandler.java +++ b/server/src/com/vaadin/server/ErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -29,4 +29,4 @@ public interface ErrorHandler extends Serializable { * the fired event. */ public void error(ErrorEvent event); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/ErrorHandlingRunnable.java b/server/src/com/vaadin/server/ErrorHandlingRunnable.java index 3970a14ee8..8ec24c0bcb 100644 --- a/server/src/com/vaadin/server/ErrorHandlingRunnable.java +++ b/server/src/com/vaadin/server/ErrorHandlingRunnable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ErrorMessage.java b/server/src/com/vaadin/server/ErrorMessage.java index 72b32ab074..0171b95e54 100644 --- a/server/src/com/vaadin/server/ErrorMessage.java +++ b/server/src/com/vaadin/server/ErrorMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/Extension.java b/server/src/com/vaadin/server/Extension.java index 0f3d81598e..b27c58b4bc 100644 --- a/server/src/com/vaadin/server/Extension.java +++ b/server/src/com/vaadin/server/Extension.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ExternalResource.java b/server/src/com/vaadin/server/ExternalResource.java index e2f43b4b27..0c724ae19f 100644 --- a/server/src/com/vaadin/server/ExternalResource.java +++ b/server/src/com/vaadin/server/ExternalResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/FileDownloader.java b/server/src/com/vaadin/server/FileDownloader.java index bd7d9caafd..42c2f76e1a 100644 --- a/server/src/com/vaadin/server/FileDownloader.java +++ b/server/src/com/vaadin/server/FileDownloader.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/FileResource.java b/server/src/com/vaadin/server/FileResource.java index 688c25385f..de14e2f0f2 100644 --- a/server/src/com/vaadin/server/FileResource.java +++ b/server/src/com/vaadin/server/FileResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/FontAwesome.java b/server/src/com/vaadin/server/FontAwesome.java index a7f4c7b342..71a2249dca 100644 --- a/server/src/com/vaadin/server/FontAwesome.java +++ b/server/src/com/vaadin/server/FontAwesome.java @@ -13,6 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ + package com.vaadin.server; /** diff --git a/server/src/com/vaadin/server/FontIcon.java b/server/src/com/vaadin/server/FontIcon.java index 45279f2c44..2ada45084f 100644 --- a/server/src/com/vaadin/server/FontIcon.java +++ b/server/src/com/vaadin/server/FontIcon.java @@ -13,6 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ + package com.vaadin.server; import com.vaadin.shared.ui.label.ContentMode; diff --git a/server/src/com/vaadin/server/GAEVaadinServlet.java b/server/src/com/vaadin/server/GAEVaadinServlet.java index 6690da7562..df7cd0a66e 100644 --- a/server/src/com/vaadin/server/GAEVaadinServlet.java +++ b/server/src/com/vaadin/server/GAEVaadinServlet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/GlobalResourceHandler.java b/server/src/com/vaadin/server/GlobalResourceHandler.java index 4235d85024..d1ef125534 100644 --- a/server/src/com/vaadin/server/GlobalResourceHandler.java +++ b/server/src/com/vaadin/server/GlobalResourceHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/JavaScriptCallbackHelper.java b/server/src/com/vaadin/server/JavaScriptCallbackHelper.java index 895c1e615b..53fb1f838b 100644 --- a/server/src/com/vaadin/server/JavaScriptCallbackHelper.java +++ b/server/src/com/vaadin/server/JavaScriptCallbackHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/JsonCodec.java b/server/src/com/vaadin/server/JsonCodec.java index d5e1082487..eb11cde343 100644 --- a/server/src/com/vaadin/server/JsonCodec.java +++ b/server/src/com/vaadin/server/JsonCodec.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/JsonPaintTarget.java b/server/src/com/vaadin/server/JsonPaintTarget.java index cd09b2a44b..47c69f1a30 100644 --- a/server/src/com/vaadin/server/JsonPaintTarget.java +++ b/server/src/com/vaadin/server/JsonPaintTarget.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/KeyMapper.java b/server/src/com/vaadin/server/KeyMapper.java index 64773b5b3b..0e4b7edc77 100644 --- a/server/src/com/vaadin/server/KeyMapper.java +++ b/server/src/com/vaadin/server/KeyMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/LegacyApplication.java b/server/src/com/vaadin/server/LegacyApplication.java index 44649067c5..d03b3d7f96 100644 --- a/server/src/com/vaadin/server/LegacyApplication.java +++ b/server/src/com/vaadin/server/LegacyApplication.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -270,4 +270,4 @@ public abstract class LegacyApplication implements ErrorHandler { public void setLogoutURL(String logoutURL) { this.logoutURL = logoutURL; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/LegacyApplicationUIProvider.java b/server/src/com/vaadin/server/LegacyApplicationUIProvider.java index c75cd097e5..0977071806 100644 --- a/server/src/com/vaadin/server/LegacyApplicationUIProvider.java +++ b/server/src/com/vaadin/server/LegacyApplicationUIProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/LegacyCommunicationManager.java b/server/src/com/vaadin/server/LegacyCommunicationManager.java index 2b278e4858..0dda5661bd 100644 --- a/server/src/com/vaadin/server/LegacyCommunicationManager.java +++ b/server/src/com/vaadin/server/LegacyCommunicationManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/LegacyPaint.java b/server/src/com/vaadin/server/LegacyPaint.java index 8d59dfd5ea..91ff103db6 100644 --- a/server/src/com/vaadin/server/LegacyPaint.java +++ b/server/src/com/vaadin/server/LegacyPaint.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/LegacyVaadinPortlet.java b/server/src/com/vaadin/server/LegacyVaadinPortlet.java index 8bebb36427..606809d893 100644 --- a/server/src/com/vaadin/server/LegacyVaadinPortlet.java +++ b/server/src/com/vaadin/server/LegacyVaadinPortlet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/LegacyVaadinServlet.java b/server/src/com/vaadin/server/LegacyVaadinServlet.java index a70befba1d..8ef16b50bc 100644 --- a/server/src/com/vaadin/server/LegacyVaadinServlet.java +++ b/server/src/com/vaadin/server/LegacyVaadinServlet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/LocaleService.java b/server/src/com/vaadin/server/LocaleService.java index 031ceb433c..0274d227ab 100644 --- a/server/src/com/vaadin/server/LocaleService.java +++ b/server/src/com/vaadin/server/LocaleService.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/NoInputStreamException.java b/server/src/com/vaadin/server/NoInputStreamException.java index 7569a46bf8..9f12c52fdf 100644 --- a/server/src/com/vaadin/server/NoInputStreamException.java +++ b/server/src/com/vaadin/server/NoInputStreamException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/NoOutputStreamException.java b/server/src/com/vaadin/server/NoOutputStreamException.java index f5e8d8c1f0..8dce2194e8 100644 --- a/server/src/com/vaadin/server/NoOutputStreamException.java +++ b/server/src/com/vaadin/server/NoOutputStreamException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/Page.java b/server/src/com/vaadin/server/Page.java index 70b8306bc3..d58ba548e3 100644 --- a/server/src/com/vaadin/server/Page.java +++ b/server/src/com/vaadin/server/Page.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -636,7 +636,7 @@ public class Page implements Serializable { } public void init(VaadinRequest request) { - // NOTE: UI.reinit makes assumptions about the semantics of this method. + // NOTE: UI.refresh makes assumptions about the semantics of this method. // It should be kept in sync if this method is changed. // Extract special parameter sent by vaadinBootstrap.js diff --git a/server/src/com/vaadin/server/PaintException.java b/server/src/com/vaadin/server/PaintException.java index 0345cf911b..a7025598b2 100644 --- a/server/src/com/vaadin/server/PaintException.java +++ b/server/src/com/vaadin/server/PaintException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/PaintTarget.java b/server/src/com/vaadin/server/PaintTarget.java index 76b41ce7dd..902cb13816 100644 --- a/server/src/com/vaadin/server/PaintTarget.java +++ b/server/src/com/vaadin/server/PaintTarget.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/RequestHandler.java b/server/src/com/vaadin/server/RequestHandler.java index 097a3e034b..b667ed038c 100644 --- a/server/src/com/vaadin/server/RequestHandler.java +++ b/server/src/com/vaadin/server/RequestHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/Resource.java b/server/src/com/vaadin/server/Resource.java index 79de02b0d6..20e0bb7f9a 100644 --- a/server/src/com/vaadin/server/Resource.java +++ b/server/src/com/vaadin/server/Resource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ResourceReference.java b/server/src/com/vaadin/server/ResourceReference.java index 4bc8febd72..31dfa41ef9 100644 --- a/server/src/com/vaadin/server/ResourceReference.java +++ b/server/src/com/vaadin/server/ResourceReference.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/Responsive.java b/server/src/com/vaadin/server/Responsive.java index d69c204c94..9209f14ff9 100644 --- a/server/src/com/vaadin/server/Responsive.java +++ b/server/src/com/vaadin/server/Responsive.java @@ -1,12 +1,12 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -49,7 +49,7 @@ import com.vaadin.ui.Component; * * <pre> * CssLayout layout = new CssLayout(); - * layout.setStyleName("responsive"); + * layout.setStyleName("responsive"); * layout.setSizeFull(); * Responsive.makeResponsive(layout); * </pre> diff --git a/server/src/com/vaadin/server/RestrictedRenderResponse.java b/server/src/com/vaadin/server/RestrictedRenderResponse.java index 9434666281..5bee476cff 100644 --- a/server/src/com/vaadin/server/RestrictedRenderResponse.java +++ b/server/src/com/vaadin/server/RestrictedRenderResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -181,4 +181,4 @@ class RestrictedRenderResponse implements RenderResponse, Serializable { // NOP return null; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/Scrollable.java b/server/src/com/vaadin/server/Scrollable.java index c5a1bc07b1..ae6828e339 100644 --- a/server/src/com/vaadin/server/Scrollable.java +++ b/server/src/com/vaadin/server/Scrollable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ServerRpcManager.java b/server/src/com/vaadin/server/ServerRpcManager.java index a1682cb453..3a2cb3a32c 100644 --- a/server/src/com/vaadin/server/ServerRpcManager.java +++ b/server/src/com/vaadin/server/ServerRpcManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ServerRpcMethodInvocation.java b/server/src/com/vaadin/server/ServerRpcMethodInvocation.java index 43942a77eb..d3f8531406 100644 --- a/server/src/com/vaadin/server/ServerRpcMethodInvocation.java +++ b/server/src/com/vaadin/server/ServerRpcMethodInvocation.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ServiceDestroyEvent.java b/server/src/com/vaadin/server/ServiceDestroyEvent.java index 2ae4cc10af..2ed0bbf8f1 100644 --- a/server/src/com/vaadin/server/ServiceDestroyEvent.java +++ b/server/src/com/vaadin/server/ServiceDestroyEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ServiceDestroyListener.java b/server/src/com/vaadin/server/ServiceDestroyListener.java index ad4966dd58..1549d82d51 100644 --- a/server/src/com/vaadin/server/ServiceDestroyListener.java +++ b/server/src/com/vaadin/server/ServiceDestroyListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ServiceException.java b/server/src/com/vaadin/server/ServiceException.java index c73553e3aa..2bc36bc1d7 100644 --- a/server/src/com/vaadin/server/ServiceException.java +++ b/server/src/com/vaadin/server/ServiceException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ServletPortletHelper.java b/server/src/com/vaadin/server/ServletPortletHelper.java index c14467a10e..2ec747ba3a 100644 --- a/server/src/com/vaadin/server/ServletPortletHelper.java +++ b/server/src/com/vaadin/server/ServletPortletHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/SessionDestroyEvent.java b/server/src/com/vaadin/server/SessionDestroyEvent.java index dfb2b3358c..a64fce0b64 100644 --- a/server/src/com/vaadin/server/SessionDestroyEvent.java +++ b/server/src/com/vaadin/server/SessionDestroyEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/SessionDestroyListener.java b/server/src/com/vaadin/server/SessionDestroyListener.java index ec1c136140..29daa60a40 100644 --- a/server/src/com/vaadin/server/SessionDestroyListener.java +++ b/server/src/com/vaadin/server/SessionDestroyListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/SessionExpiredException.java b/server/src/com/vaadin/server/SessionExpiredException.java index 1da5d4ab1d..d70498e7cb 100644 --- a/server/src/com/vaadin/server/SessionExpiredException.java +++ b/server/src/com/vaadin/server/SessionExpiredException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/SessionExpiredHandler.java b/server/src/com/vaadin/server/SessionExpiredHandler.java index 6a7896f3d1..3d6de95dea 100644 --- a/server/src/com/vaadin/server/SessionExpiredHandler.java +++ b/server/src/com/vaadin/server/SessionExpiredHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/SessionInitEvent.java b/server/src/com/vaadin/server/SessionInitEvent.java index a69264a945..76262c6140 100644 --- a/server/src/com/vaadin/server/SessionInitEvent.java +++ b/server/src/com/vaadin/server/SessionInitEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/SessionInitListener.java b/server/src/com/vaadin/server/SessionInitListener.java index 8476d719ce..2bbb8e3d1f 100644 --- a/server/src/com/vaadin/server/SessionInitListener.java +++ b/server/src/com/vaadin/server/SessionInitListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/Sizeable.java b/server/src/com/vaadin/server/Sizeable.java index decace3d10..5a4704ba2a 100644 --- a/server/src/com/vaadin/server/Sizeable.java +++ b/server/src/com/vaadin/server/Sizeable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/StreamResource.java b/server/src/com/vaadin/server/StreamResource.java index 7210bcaffb..248d62338b 100644 --- a/server/src/com/vaadin/server/StreamResource.java +++ b/server/src/com/vaadin/server/StreamResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/StreamVariable.java b/server/src/com/vaadin/server/StreamVariable.java index 046b1119dd..c7b84c92d6 100644 --- a/server/src/com/vaadin/server/StreamVariable.java +++ b/server/src/com/vaadin/server/StreamVariable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/SynchronizedRequestHandler.java b/server/src/com/vaadin/server/SynchronizedRequestHandler.java index c695855d7d..56abfbb8f3 100644 --- a/server/src/com/vaadin/server/SynchronizedRequestHandler.java +++ b/server/src/com/vaadin/server/SynchronizedRequestHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/SystemError.java b/server/src/com/vaadin/server/SystemError.java index cd4e499112..834055e1e1 100644 --- a/server/src/com/vaadin/server/SystemError.java +++ b/server/src/com/vaadin/server/SystemError.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/SystemMessageException.java b/server/src/com/vaadin/server/SystemMessageException.java index c6e68cd562..854d8001f6 100644 --- a/server/src/com/vaadin/server/SystemMessageException.java +++ b/server/src/com/vaadin/server/SystemMessageException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -66,4 +66,4 @@ public class SystemMessageException extends RuntimeException { return cause; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/SystemMessages.java b/server/src/com/vaadin/server/SystemMessages.java index 299c725207..51e9da5800 100644 --- a/server/src/com/vaadin/server/SystemMessages.java +++ b/server/src/com/vaadin/server/SystemMessages.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -297,4 +297,4 @@ public class SystemMessages implements Serializable { : null); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/SystemMessagesInfo.java b/server/src/com/vaadin/server/SystemMessagesInfo.java index 57e4e0c122..195cf3c711 100644 --- a/server/src/com/vaadin/server/SystemMessagesInfo.java +++ b/server/src/com/vaadin/server/SystemMessagesInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/SystemMessagesProvider.java b/server/src/com/vaadin/server/SystemMessagesProvider.java index 91273ba7d4..a69cc0b159 100644 --- a/server/src/com/vaadin/server/SystemMessagesProvider.java +++ b/server/src/com/vaadin/server/SystemMessagesProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/ThemeResource.java b/server/src/com/vaadin/server/ThemeResource.java index 636542cb8a..45a2736bf3 100644 --- a/server/src/com/vaadin/server/ThemeResource.java +++ b/server/src/com/vaadin/server/ThemeResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/UIClassSelectionEvent.java b/server/src/com/vaadin/server/UIClassSelectionEvent.java index 1d4469cd12..9c9bbe5bc9 100644 --- a/server/src/com/vaadin/server/UIClassSelectionEvent.java +++ b/server/src/com/vaadin/server/UIClassSelectionEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/UICreateEvent.java b/server/src/com/vaadin/server/UICreateEvent.java index 45a4106e76..1688416ba5 100644 --- a/server/src/com/vaadin/server/UICreateEvent.java +++ b/server/src/com/vaadin/server/UICreateEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/UIProvider.java b/server/src/com/vaadin/server/UIProvider.java index a76f396767..d3d834cad7 100644 --- a/server/src/com/vaadin/server/UIProvider.java +++ b/server/src/com/vaadin/server/UIProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -131,7 +131,7 @@ public abstract class UIProvider implements Serializable { * the value of window.name in the browser. * <p> * Whenever a preserved UI is reused, its - * {@link UI#reinit(com.vaadin.server.VaadinRequest) reinit} method is + * {@link UI#refresh(com.vaadin.server.VaadinRequest) refresh} method is * invoked by the framework first. * * diff --git a/server/src/com/vaadin/server/UIProviderEvent.java b/server/src/com/vaadin/server/UIProviderEvent.java index f5ed0ebaa5..1fcc0a3ddc 100644 --- a/server/src/com/vaadin/server/UIProviderEvent.java +++ b/server/src/com/vaadin/server/UIProviderEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/UnsupportedBrowserHandler.java b/server/src/com/vaadin/server/UnsupportedBrowserHandler.java index 5fc00408a9..e5ea55b116 100644 --- a/server/src/com/vaadin/server/UnsupportedBrowserHandler.java +++ b/server/src/com/vaadin/server/UnsupportedBrowserHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -90,4 +90,4 @@ public class UnsupportedBrowserHandler extends SynchronizedRequestHandler { page.close(); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/UploadException.java b/server/src/com/vaadin/server/UploadException.java index 7b8b889d45..1f1073b435 100644 --- a/server/src/com/vaadin/server/UploadException.java +++ b/server/src/com/vaadin/server/UploadException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/UserError.java b/server/src/com/vaadin/server/UserError.java index 2ff8fce966..ec1ac042f8 100644 --- a/server/src/com/vaadin/server/UserError.java +++ b/server/src/com/vaadin/server/UserError.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/VaadinPortlet.java b/server/src/com/vaadin/server/VaadinPortlet.java index b3ce238e72..77a1b18d10 100644 --- a/server/src/com/vaadin/server/VaadinPortlet.java +++ b/server/src/com/vaadin/server/VaadinPortlet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/VaadinPortletRequest.java b/server/src/com/vaadin/server/VaadinPortletRequest.java index eae367a992..47cbebffe4 100644 --- a/server/src/com/vaadin/server/VaadinPortletRequest.java +++ b/server/src/com/vaadin/server/VaadinPortletRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/VaadinPortletResponse.java b/server/src/com/vaadin/server/VaadinPortletResponse.java index ccb35a2c91..7a0a68d116 100644 --- a/server/src/com/vaadin/server/VaadinPortletResponse.java +++ b/server/src/com/vaadin/server/VaadinPortletResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -140,4 +140,4 @@ public class VaadinPortletResponse implements VaadinResponse { public void addCookie(Cookie cookie) { response.addProperty(cookie); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/VaadinPortletService.java b/server/src/com/vaadin/server/VaadinPortletService.java index dceeec8e91..3666853253 100644 --- a/server/src/com/vaadin/server/VaadinPortletService.java +++ b/server/src/com/vaadin/server/VaadinPortletService.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/VaadinPortletSession.java b/server/src/com/vaadin/server/VaadinPortletSession.java index 39416213c3..23b578cea2 100644 --- a/server/src/com/vaadin/server/VaadinPortletSession.java +++ b/server/src/com/vaadin/server/VaadinPortletSession.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/VaadinRequest.java b/server/src/com/vaadin/server/VaadinRequest.java index 08338f3620..538e0af598 100644 --- a/server/src/com/vaadin/server/VaadinRequest.java +++ b/server/src/com/vaadin/server/VaadinRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/VaadinResponse.java b/server/src/com/vaadin/server/VaadinResponse.java index 0cd3abb3f9..1d5fcf141f 100644 --- a/server/src/com/vaadin/server/VaadinResponse.java +++ b/server/src/com/vaadin/server/VaadinResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/VaadinService.java b/server/src/com/vaadin/server/VaadinService.java index b96e284e6e..6aeac684c2 100644 --- a/server/src/com/vaadin/server/VaadinService.java +++ b/server/src/com/vaadin/server/VaadinService.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -750,6 +750,9 @@ public abstract class VaadinService implements Serializable { session.storeInSession(this, request.getWrappedSession()); + // Initial WebBrowser data comes from the request + session.getBrowser().updateRequestDetails(request); + // Initial locale comes from the request Locale locale = request.getLocale(); session.setLocale(locale); @@ -982,7 +985,7 @@ public abstract class VaadinService implements Serializable { // Get UI id from the request String uiIdString = request.getParameter(UIConstants.UI_ID_PARAMETER); UI ui = null; - if (uiIdString != null) { + if (uiIdString != null && session != null) { int uiId = Integer.parseInt(uiIdString); ui = session.getUIById(uiId); } diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java index 2d4d11785a..81c3f374ea 100644 --- a/server/src/com/vaadin/server/VaadinServlet.java +++ b/server/src/com/vaadin/server/VaadinServlet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/VaadinServletRequest.java b/server/src/com/vaadin/server/VaadinServletRequest.java index e2b1fadc75..c68eefedb1 100644 --- a/server/src/com/vaadin/server/VaadinServletRequest.java +++ b/server/src/com/vaadin/server/VaadinServletRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -76,4 +76,4 @@ public class VaadinServletRequest extends HttpServletRequestWrapper implements public VaadinServletService getService() { return vaadinService; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/VaadinServletResponse.java b/server/src/com/vaadin/server/VaadinServletResponse.java index 845e56522e..fd688a594c 100644 --- a/server/src/com/vaadin/server/VaadinServletResponse.java +++ b/server/src/com/vaadin/server/VaadinServletResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -81,4 +81,4 @@ public class VaadinServletResponse extends HttpServletResponseWrapper implements public VaadinServletService getService() { return vaadinService; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/VaadinServletService.java b/server/src/com/vaadin/server/VaadinServletService.java index daefad0644..a4ff3943c9 100644 --- a/server/src/com/vaadin/server/VaadinServletService.java +++ b/server/src/com/vaadin/server/VaadinServletService.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java index ac518c1902..bbabd881f8 100644 --- a/server/src/com/vaadin/server/VaadinSession.java +++ b/server/src/com/vaadin/server/VaadinSession.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/VariableOwner.java b/server/src/com/vaadin/server/VariableOwner.java index 2bfd3c0652..87a820e8b7 100644 --- a/server/src/com/vaadin/server/VariableOwner.java +++ b/server/src/com/vaadin/server/VariableOwner.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/WebBrowser.java b/server/src/com/vaadin/server/WebBrowser.java index 4d1027f0e4..af20bcbb8f 100644 --- a/server/src/com/vaadin/server/WebBrowser.java +++ b/server/src/com/vaadin/server/WebBrowser.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/WrappedHttpSession.java b/server/src/com/vaadin/server/WrappedHttpSession.java index aed3be1ca0..137ccf2cdd 100644 --- a/server/src/com/vaadin/server/WrappedHttpSession.java +++ b/server/src/com/vaadin/server/WrappedHttpSession.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/WrappedPortletSession.java b/server/src/com/vaadin/server/WrappedPortletSession.java index e1e98e0501..37991aab39 100644 --- a/server/src/com/vaadin/server/WrappedPortletSession.java +++ b/server/src/com/vaadin/server/WrappedPortletSession.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/WrappedSession.java b/server/src/com/vaadin/server/WrappedSession.java index 57d3ef6a8c..b839e5d87a 100644 --- a/server/src/com/vaadin/server/WrappedSession.java +++ b/server/src/com/vaadin/server/WrappedSession.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/AbstractStreamingEvent.java b/server/src/com/vaadin/server/communication/AbstractStreamingEvent.java index b97a60fd56..1f546b2489 100644 --- a/server/src/com/vaadin/server/communication/AbstractStreamingEvent.java +++ b/server/src/com/vaadin/server/communication/AbstractStreamingEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/AtmospherePushConnection.java b/server/src/com/vaadin/server/communication/AtmospherePushConnection.java index a4290a31cf..3eae848adc 100644 --- a/server/src/com/vaadin/server/communication/AtmospherePushConnection.java +++ b/server/src/com/vaadin/server/communication/AtmospherePushConnection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -287,6 +287,12 @@ public class AtmospherePushConnection implements PushConnection { outgoingMessage = null; } + try { + resource.close(); + } catch (IOException e) { + getLogger() + .log(Level.INFO, "Error when closing push connection", e); + } resource = null; state = State.DISCONNECTED; } diff --git a/server/src/com/vaadin/server/communication/ClientRpcWriter.java b/server/src/com/vaadin/server/communication/ClientRpcWriter.java index 285adac7a5..1090fdbab9 100644 --- a/server/src/com/vaadin/server/communication/ClientRpcWriter.java +++ b/server/src/com/vaadin/server/communication/ClientRpcWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java b/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java index 467bddbdce..653048b930 100644 --- a/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java +++ b/server/src/com/vaadin/server/communication/ConnectorHierarchyWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/ConnectorTypeWriter.java b/server/src/com/vaadin/server/communication/ConnectorTypeWriter.java index eaa1c83ff2..0bafd20a81 100644 --- a/server/src/com/vaadin/server/communication/ConnectorTypeWriter.java +++ b/server/src/com/vaadin/server/communication/ConnectorTypeWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/DateSerializer.java b/server/src/com/vaadin/server/communication/DateSerializer.java index 9179eb922b..429941abfd 100644 --- a/server/src/com/vaadin/server/communication/DateSerializer.java +++ b/server/src/com/vaadin/server/communication/DateSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/FileUploadHandler.java b/server/src/com/vaadin/server/communication/FileUploadHandler.java index 7decfc2c0f..22c6a76106 100644 --- a/server/src/com/vaadin/server/communication/FileUploadHandler.java +++ b/server/src/com/vaadin/server/communication/FileUploadHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/HeartbeatHandler.java b/server/src/com/vaadin/server/communication/HeartbeatHandler.java index 04cb1b5a25..c6711d1d18 100644 --- a/server/src/com/vaadin/server/communication/HeartbeatHandler.java +++ b/server/src/com/vaadin/server/communication/HeartbeatHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/JSONSerializer.java b/server/src/com/vaadin/server/communication/JSONSerializer.java index fe609c70b6..91105d6ffd 100644 --- a/server/src/com/vaadin/server/communication/JSONSerializer.java +++ b/server/src/com/vaadin/server/communication/JSONSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/LegacyUidlWriter.java b/server/src/com/vaadin/server/communication/LegacyUidlWriter.java index ad99a2d8b5..43ea1aca67 100644 --- a/server/src/com/vaadin/server/communication/LegacyUidlWriter.java +++ b/server/src/com/vaadin/server/communication/LegacyUidlWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/MetadataWriter.java b/server/src/com/vaadin/server/communication/MetadataWriter.java index 5ad7186c24..17c893fe40 100644 --- a/server/src/com/vaadin/server/communication/MetadataWriter.java +++ b/server/src/com/vaadin/server/communication/MetadataWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -77,7 +77,8 @@ public class MetadataWriter implements Serializable { // sessionExpiredURL after timer expires. if (messages != null && messages.getSessionExpiredMessage() == null && messages.getSessionExpiredCaption() == null - && messages.isSessionExpiredNotificationEnabled()) { + && messages.isSessionExpiredNotificationEnabled() + && ui.getSession().getSession() != null) { int newTimeoutInterval = ui.getSession().getSession() .getMaxInactiveInterval(); if (repaintAll || (timeoutInterval != newTimeoutInterval)) { diff --git a/server/src/com/vaadin/server/communication/PortletBootstrapHandler.java b/server/src/com/vaadin/server/communication/PortletBootstrapHandler.java index dd6d3c9283..66b08fdadd 100644 --- a/server/src/com/vaadin/server/communication/PortletBootstrapHandler.java +++ b/server/src/com/vaadin/server/communication/PortletBootstrapHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -121,4 +121,4 @@ public class PortletBootstrapHandler extends BootstrapHandler { return parameters; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/communication/PortletDummyRequestHandler.java b/server/src/com/vaadin/server/communication/PortletDummyRequestHandler.java index 8383cf607b..a79f5e96f2 100644 --- a/server/src/com/vaadin/server/communication/PortletDummyRequestHandler.java +++ b/server/src/com/vaadin/server/communication/PortletDummyRequestHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/PortletListenerNotifier.java b/server/src/com/vaadin/server/communication/PortletListenerNotifier.java index 34e007c770..3aa3426d2f 100644 --- a/server/src/com/vaadin/server/communication/PortletListenerNotifier.java +++ b/server/src/com/vaadin/server/communication/PortletListenerNotifier.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/PortletStateAwareRequestHandler.java b/server/src/com/vaadin/server/communication/PortletStateAwareRequestHandler.java index 4072aae359..a1276025d8 100644 --- a/server/src/com/vaadin/server/communication/PortletStateAwareRequestHandler.java +++ b/server/src/com/vaadin/server/communication/PortletStateAwareRequestHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/PortletUIInitHandler.java b/server/src/com/vaadin/server/communication/PortletUIInitHandler.java index d5d1e6b98d..b3cda44592 100644 --- a/server/src/com/vaadin/server/communication/PortletUIInitHandler.java +++ b/server/src/com/vaadin/server/communication/PortletUIInitHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/PublishedFileHandler.java b/server/src/com/vaadin/server/communication/PublishedFileHandler.java index 8fe0f7085f..56edffd16d 100644 --- a/server/src/com/vaadin/server/communication/PublishedFileHandler.java +++ b/server/src/com/vaadin/server/communication/PublishedFileHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -110,7 +110,14 @@ public class PublishedFileHandler implements RequestHandler { return true; } - // TODO Check and set cache headers + // Set caching for the published file + String cacheControl = "public, max-age=0, must-revalidate"; + int resourceCacheTime = request.getService() + .getDeploymentConfiguration().getResourceCacheTime(); + if (resourceCacheTime > 0) { + cacheControl = "max-age=" + String.valueOf(resourceCacheTime); + } + response.setHeader("Cache-Control", cacheControl); OutputStream out = null; try { diff --git a/server/src/com/vaadin/server/communication/PushConnection.java b/server/src/com/vaadin/server/communication/PushConnection.java index cab3c94824..52efcfcd89 100644 --- a/server/src/com/vaadin/server/communication/PushConnection.java +++ b/server/src/com/vaadin/server/communication/PushConnection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -53,4 +53,4 @@ public interface PushConnection { */ public boolean isConnected(); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/communication/PushHandler.java b/server/src/com/vaadin/server/communication/PushHandler.java index e028968494..983ada3279 100644 --- a/server/src/com/vaadin/server/communication/PushHandler.java +++ b/server/src/com/vaadin/server/communication/PushHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -186,46 +186,6 @@ public class PushHandler extends AtmosphereResourceEventListenerAdapter { } }; - /** - * Callback used when a connection is closed, either deliberately or because - * an error occurred. - */ - private final PushEventCallback disconnectCallback = new PushEventCallback() { - @Override - public void run(AtmosphereResource resource, UI ui) throws IOException { - PushMode pushMode = ui.getPushConfiguration().getPushMode(); - AtmospherePushConnection connection = getConnectionForUI(ui); - - String id = resource.uuid(); - - if (connection == null) { - getLogger() - .log(Level.WARNING, - "Could not find push connection to close: {0} with transport {1}", - new Object[] { id, resource.transport() }); - } else { - if (!pushMode.isEnabled()) { - /* - * The client is expected to close the connection after push - * mode has been set to disabled. - */ - getLogger().log(Level.FINER, - "Connection closed for resource {0}", id); - } else { - /* - * Unexpected cancel, e.g. if the user closes the browser - * tab. - */ - getLogger() - .log(Level.FINER, - "Connection unexpectedly closed for resource {0} with transport {1}", - new Object[] { id, resource.transport() }); - } - connection.disconnect(); - } - } - }; - private VaadinServletService service; public PushHandler(VaadinServletService service) { @@ -428,7 +388,12 @@ public class PushHandler extends AtmosphereResourceEventListenerAdapter { "Connection unexpectedly closed for resource {0} with transport {1}", new Object[] { id, resource.transport() }); } - ui.setPushConnection(null); + if (pushConnection.isConnected()) { + // disconnect() assumes the push connection is connected but + // this method can currently be called more than once during + // disconnect, depending on the situation + pushConnection.disconnect(); + } } } catch (final Exception e) { diff --git a/server/src/com/vaadin/server/communication/PushRequestHandler.java b/server/src/com/vaadin/server/communication/PushRequestHandler.java index 883a873ef6..db14e73c1a 100644 --- a/server/src/com/vaadin/server/communication/PushRequestHandler.java +++ b/server/src/com/vaadin/server/communication/PushRequestHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/ResourceWriter.java b/server/src/com/vaadin/server/communication/ResourceWriter.java index 080027943f..2c5d1b409b 100644 --- a/server/src/com/vaadin/server/communication/ResourceWriter.java +++ b/server/src/com/vaadin/server/communication/ResourceWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/ServerRpcHandler.java b/server/src/com/vaadin/server/communication/ServerRpcHandler.java index 3e7aec7cac..89d87567d7 100644 --- a/server/src/com/vaadin/server/communication/ServerRpcHandler.java +++ b/server/src/com/vaadin/server/communication/ServerRpcHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/ServletBootstrapHandler.java b/server/src/com/vaadin/server/communication/ServletBootstrapHandler.java index 4b6517c30f..46909cecee 100644 --- a/server/src/com/vaadin/server/communication/ServletBootstrapHandler.java +++ b/server/src/com/vaadin/server/communication/ServletBootstrapHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -45,4 +45,4 @@ public class ServletBootstrapHandler extends BootstrapHandler { } return themeName; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/server/communication/ServletUIInitHandler.java b/server/src/com/vaadin/server/communication/ServletUIInitHandler.java index 6286c161f2..b3b1684809 100644 --- a/server/src/com/vaadin/server/communication/ServletUIInitHandler.java +++ b/server/src/com/vaadin/server/communication/ServletUIInitHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/SessionRequestHandler.java b/server/src/com/vaadin/server/communication/SessionRequestHandler.java index 244cb0121d..383ad2d541 100644 --- a/server/src/com/vaadin/server/communication/SessionRequestHandler.java +++ b/server/src/com/vaadin/server/communication/SessionRequestHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/SharedStateWriter.java b/server/src/com/vaadin/server/communication/SharedStateWriter.java index fdf834387f..6a318f0758 100644 --- a/server/src/com/vaadin/server/communication/SharedStateWriter.java +++ b/server/src/com/vaadin/server/communication/SharedStateWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/StreamingEndEventImpl.java b/server/src/com/vaadin/server/communication/StreamingEndEventImpl.java index f8cfb160be..6d87d0cc8b 100644 --- a/server/src/com/vaadin/server/communication/StreamingEndEventImpl.java +++ b/server/src/com/vaadin/server/communication/StreamingEndEventImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/StreamingErrorEventImpl.java b/server/src/com/vaadin/server/communication/StreamingErrorEventImpl.java index 9d9a19e4fe..a96f759216 100644 --- a/server/src/com/vaadin/server/communication/StreamingErrorEventImpl.java +++ b/server/src/com/vaadin/server/communication/StreamingErrorEventImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/StreamingProgressEventImpl.java b/server/src/com/vaadin/server/communication/StreamingProgressEventImpl.java index 69f3bfb29c..7f2428a55d 100644 --- a/server/src/com/vaadin/server/communication/StreamingProgressEventImpl.java +++ b/server/src/com/vaadin/server/communication/StreamingProgressEventImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/StreamingStartEventImpl.java b/server/src/com/vaadin/server/communication/StreamingStartEventImpl.java index bd16f08801..a2ce075458 100644 --- a/server/src/com/vaadin/server/communication/StreamingStartEventImpl.java +++ b/server/src/com/vaadin/server/communication/StreamingStartEventImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/UIInitHandler.java b/server/src/com/vaadin/server/communication/UIInitHandler.java index 5dc44208d1..cf0de8e9ee 100644 --- a/server/src/com/vaadin/server/communication/UIInitHandler.java +++ b/server/src/com/vaadin/server/communication/UIInitHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -68,7 +68,7 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler { try { assert UI.getCurrent() == null; - // Set browser information from the request + // Update browser information from the request session.getBrowser().updateRequestDetails(request); UI uI = getBrowserDetailsUI(request, session); @@ -266,7 +266,7 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler { */ private void reinitUI(UI ui, VaadinRequest request) { UI.setCurrent(ui); - ui.doReinit(request); + ui.doRefresh(request); } /** diff --git a/server/src/com/vaadin/server/communication/UidlRequestHandler.java b/server/src/com/vaadin/server/communication/UidlRequestHandler.java index cf25910fa4..0d8ddb7bc7 100644 --- a/server/src/com/vaadin/server/communication/UidlRequestHandler.java +++ b/server/src/com/vaadin/server/communication/UidlRequestHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/communication/UidlWriter.java b/server/src/com/vaadin/server/communication/UidlWriter.java index 893a87972d..00522e2aa5 100644 --- a/server/src/com/vaadin/server/communication/UidlWriter.java +++ b/server/src/com/vaadin/server/communication/UidlWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java b/server/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java index 94ca9e7d5b..cfee2a320e 100644 --- a/server/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java +++ b/server/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/widgetsetutils/ClassPathExplorer.java b/server/src/com/vaadin/server/widgetsetutils/ClassPathExplorer.java index 3ad76794de..063f4f5346 100644 --- a/server/src/com/vaadin/server/widgetsetutils/ClassPathExplorer.java +++ b/server/src/com/vaadin/server/widgetsetutils/ClassPathExplorer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/server/widgetsetutils/WidgetSetBuilder.java b/server/src/com/vaadin/server/widgetsetutils/WidgetSetBuilder.java index 6d0818b2cd..f810a63a38 100644 --- a/server/src/com/vaadin/server/widgetsetutils/WidgetSetBuilder.java +++ b/server/src/com/vaadin/server/widgetsetutils/WidgetSetBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java index 86a8948fdc..afc73f5ecc 100644 --- a/server/src/com/vaadin/ui/AbsoluteLayout.java +++ b/server/src/com/vaadin/ui/AbsoluteLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbstractColorPicker.java b/server/src/com/vaadin/ui/AbstractColorPicker.java index c3bdd49155..db4239f8a6 100644 --- a/server/src/com/vaadin/ui/AbstractColorPicker.java +++ b/server/src/com/vaadin/ui/AbstractColorPicker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -464,4 +464,4 @@ public abstract class AbstractColorPicker extends AbstractComponent implements public boolean isHtmlContentAllowed() { return getState().htmlContentAllowed; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index 33aa689a88..d0406c3eb7 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbstractComponentContainer.java b/server/src/com/vaadin/ui/AbstractComponentContainer.java index 4aacad680f..0aa185d557 100644 --- a/server/src/com/vaadin/ui/AbstractComponentContainer.java +++ b/server/src/com/vaadin/ui/AbstractComponentContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -349,4 +349,4 @@ public abstract class AbstractComponentContainer extends AbstractComponent public Iterator<Component> getComponentIterator() { return iterator(); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/AbstractEmbedded.java b/server/src/com/vaadin/ui/AbstractEmbedded.java index dc8310fb5e..8c574fd59e 100644 --- a/server/src/com/vaadin/ui/AbstractEmbedded.java +++ b/server/src/com/vaadin/ui/AbstractEmbedded.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java index 300e130c4e..47ac953319 100644 --- a/server/src/com/vaadin/ui/AbstractField.java +++ b/server/src/com/vaadin/ui/AbstractField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java b/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java index 6769b6e513..d6e232035b 100644 --- a/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java +++ b/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbstractLayout.java b/server/src/com/vaadin/ui/AbstractLayout.java index c59fd4c96d..9cdb0a326a 100644 --- a/server/src/com/vaadin/ui/AbstractLayout.java +++ b/server/src/com/vaadin/ui/AbstractLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbstractMedia.java b/server/src/com/vaadin/ui/AbstractMedia.java index d7d593c29e..a841aa672e 100644 --- a/server/src/com/vaadin/ui/AbstractMedia.java +++ b/server/src/com/vaadin/ui/AbstractMedia.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java index c9eb756daa..039c87333e 100644 --- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -213,8 +213,12 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements if (oldLocation == -1) { addComponent(newComponent); } else if (newLocation == -1) { + Alignment alignment = getComponentAlignment(oldComponent); + float expandRatio = getExpandRatio(oldComponent); + removeComponent(oldComponent); addComponent(newComponent, oldLocation); + applyLayoutSettings(newComponent, alignment, expandRatio); } else { // Both old and new are in the layout if (oldLocation > newLocation) { @@ -444,4 +448,10 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements defaultComponentAlignment = defaultAlignment; } + private void applyLayoutSettings(Component target, Alignment alignment, + float expandRatio) { + setComponentAlignment(target, alignment); + setExpandRatio(target, expandRatio); + } + } diff --git a/server/src/com/vaadin/ui/AbstractSelect.java b/server/src/com/vaadin/ui/AbstractSelect.java index a32d40b11d..c6abb8e685 100644 --- a/server/src/com/vaadin/ui/AbstractSelect.java +++ b/server/src/com/vaadin/ui/AbstractSelect.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java b/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java index 534f01d4eb..de1bb29846 100644 --- a/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java +++ b/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbstractSplitPanel.java b/server/src/com/vaadin/ui/AbstractSplitPanel.java index e4f4543f1e..3a1b7ca35a 100644 --- a/server/src/com/vaadin/ui/AbstractSplitPanel.java +++ b/server/src/com/vaadin/ui/AbstractSplitPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java index 8c61680d5c..25b34ae19f 100644 --- a/server/src/com/vaadin/ui/AbstractTextField.java +++ b/server/src/com/vaadin/ui/AbstractTextField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Accordion.java b/server/src/com/vaadin/ui/Accordion.java index cca0a7efb8..1d53937d24 100644 --- a/server/src/com/vaadin/ui/Accordion.java +++ b/server/src/com/vaadin/ui/Accordion.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Alignment.java b/server/src/com/vaadin/ui/Alignment.java index abc710a179..57131494ac 100644 --- a/server/src/com/vaadin/ui/Alignment.java +++ b/server/src/com/vaadin/ui/Alignment.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Audio.java b/server/src/com/vaadin/ui/Audio.java index d4e4f8aed2..845bbd13b5 100644 --- a/server/src/com/vaadin/ui/Audio.java +++ b/server/src/com/vaadin/ui/Audio.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/BrowserFrame.java b/server/src/com/vaadin/ui/BrowserFrame.java index e6167706ec..5717941ac5 100644 --- a/server/src/com/vaadin/ui/BrowserFrame.java +++ b/server/src/com/vaadin/ui/BrowserFrame.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Button.java b/server/src/com/vaadin/ui/Button.java index 765c805d37..5a5d03a3ee 100644 --- a/server/src/com/vaadin/ui/Button.java +++ b/server/src/com/vaadin/ui/Button.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Calendar.java b/server/src/com/vaadin/ui/Calendar.java index b0999451c3..59dfceec9b 100644 --- a/server/src/com/vaadin/ui/Calendar.java +++ b/server/src/com/vaadin/ui/Calendar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/CheckBox.java b/server/src/com/vaadin/ui/CheckBox.java index ac33f5e410..3c4ce1c528 100644 --- a/server/src/com/vaadin/ui/CheckBox.java +++ b/server/src/com/vaadin/ui/CheckBox.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/ColorPicker.java b/server/src/com/vaadin/ui/ColorPicker.java index 342504c9f6..f65b67db72 100644 --- a/server/src/com/vaadin/ui/ColorPicker.java +++ b/server/src/com/vaadin/ui/ColorPicker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/ColorPickerArea.java b/server/src/com/vaadin/ui/ColorPickerArea.java index 0d589356a3..94f64cf256 100644 --- a/server/src/com/vaadin/ui/ColorPickerArea.java +++ b/server/src/com/vaadin/ui/ColorPickerArea.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/ComboBox.java b/server/src/com/vaadin/ui/ComboBox.java index da29618efe..048726dc84 100644 --- a/server/src/com/vaadin/ui/ComboBox.java +++ b/server/src/com/vaadin/ui/ComboBox.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Component.java b/server/src/com/vaadin/ui/Component.java index c385805675..e10b5e1cd9 100644 --- a/server/src/com/vaadin/ui/Component.java +++ b/server/src/com/vaadin/ui/Component.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/ComponentContainer.java b/server/src/com/vaadin/ui/ComponentContainer.java index fd7d5f7646..2d5b4ffa9a 100644 --- a/server/src/com/vaadin/ui/ComponentContainer.java +++ b/server/src/com/vaadin/ui/ComponentContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java index af03dade3a..ce8c452c2c 100644 --- a/server/src/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/com/vaadin/ui/ConnectorTracker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/CssLayout.java b/server/src/com/vaadin/ui/CssLayout.java index f72ffcbb96..7fdae32bd1 100644 --- a/server/src/com/vaadin/ui/CssLayout.java +++ b/server/src/com/vaadin/ui/CssLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/CustomComponent.java b/server/src/com/vaadin/ui/CustomComponent.java index 9e004f7a17..cfd109d175 100644 --- a/server/src/com/vaadin/ui/CustomComponent.java +++ b/server/src/com/vaadin/ui/CustomComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/CustomField.java b/server/src/com/vaadin/ui/CustomField.java index d3c66e4c38..0fdb6eba34 100644 --- a/server/src/com/vaadin/ui/CustomField.java +++ b/server/src/com/vaadin/ui/CustomField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/CustomLayout.java b/server/src/com/vaadin/ui/CustomLayout.java index 37c9a4fa21..fd56ed9219 100644 --- a/server/src/com/vaadin/ui/CustomLayout.java +++ b/server/src/com/vaadin/ui/CustomLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/DateField.java b/server/src/com/vaadin/ui/DateField.java index 17dda73b95..7ab7732079 100644 --- a/server/src/com/vaadin/ui/DateField.java +++ b/server/src/com/vaadin/ui/DateField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/DefaultFieldFactory.java b/server/src/com/vaadin/ui/DefaultFieldFactory.java index 6ff3687e0e..ad6461686c 100644 --- a/server/src/com/vaadin/ui/DefaultFieldFactory.java +++ b/server/src/com/vaadin/ui/DefaultFieldFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/DragAndDropWrapper.java b/server/src/com/vaadin/ui/DragAndDropWrapper.java index 2ab3e872c6..cb94a774a5 100644 --- a/server/src/com/vaadin/ui/DragAndDropWrapper.java +++ b/server/src/com/vaadin/ui/DragAndDropWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Embedded.java b/server/src/com/vaadin/ui/Embedded.java index 53354db0f4..1086da8d09 100644 --- a/server/src/com/vaadin/ui/Embedded.java +++ b/server/src/com/vaadin/ui/Embedded.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Field.java b/server/src/com/vaadin/ui/Field.java index 447ae2c0e6..f191e1bdd7 100644 --- a/server/src/com/vaadin/ui/Field.java +++ b/server/src/com/vaadin/ui/Field.java @@ -1,12 +1,12 @@ /* - * Copyright 2000-2013 Vaadin Ltd. - * + * Copyright 2000-2014 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 @@ -21,14 +21,23 @@ import com.vaadin.data.Property; import com.vaadin.ui.Component.Focusable; /** - * TODO document - * + * Field interface is implemented by all classes (field components) that have a + * value that the user can change through the user interface. + * + * Field components are built upon the framework defined in the Field interface + * and the {@link com.vaadin.AbstractField} base class. + * + * The Field interface inherits the {@link com.vaadin.ui.Component} + * superinterface and also the {@link com.vaadin.ui.Property} interface to have + * a value for the field. + * + * * @author Vaadin Ltd. - * + * * @param T * the type of values in the field, which might not be the same type * as that of the data source if converters are used - * + * * @author IT Mill Ltd. */ public interface Field<T> extends Component, BufferedValidatable, Property<T>, @@ -37,9 +46,9 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>, /** * Is this field required. - * + * * Required fields must filled by the user. - * + * * @return <code>true</code> if the field is required,otherwise * <code>false</code>. * @since 3.1 @@ -48,7 +57,7 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>, /** * Sets the field required. Required fields must filled by the user. - * + * * @param required * Is the field required. * @since 3.1 @@ -57,7 +66,7 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>, /** * Sets the error message to be displayed if a required field is empty. - * + * * @param requiredMessage * Error message. * @since 5.2.6 @@ -67,7 +76,7 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>, /** * Gets the error message that is to be displayed if a required field is * empty. - * + * * @return Error message. * @since 5.2.6 */ @@ -76,7 +85,7 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>, /** * An <code>Event</code> object specifying the Field whose value has been * changed. - * + * * @author Vaadin Ltd. * @since 3.0 */ @@ -86,7 +95,7 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>, /** * Constructs a new event object with the specified source field object. - * + * * @param source * the field that caused the event. */ @@ -96,7 +105,7 @@ public interface Field<T> extends Component, BufferedValidatable, Property<T>, /** * Gets the Property which triggered the event. - * + * * @return the Source Property of the event. */ @Override diff --git a/server/src/com/vaadin/ui/Flash.java b/server/src/com/vaadin/ui/Flash.java index cc00a07aa8..791202f4a9 100644 --- a/server/src/com/vaadin/ui/Flash.java +++ b/server/src/com/vaadin/ui/Flash.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Form.java b/server/src/com/vaadin/ui/Form.java index 706c103cd7..5653a83cee 100644 --- a/server/src/com/vaadin/ui/Form.java +++ b/server/src/com/vaadin/ui/Form.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/FormFieldFactory.java b/server/src/com/vaadin/ui/FormFieldFactory.java index 0cf7666704..124e0fcb9a 100644 --- a/server/src/com/vaadin/ui/FormFieldFactory.java +++ b/server/src/com/vaadin/ui/FormFieldFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/FormLayout.java b/server/src/com/vaadin/ui/FormLayout.java index 9dc0b24cad..1c8b196b31 100644 --- a/server/src/com/vaadin/ui/FormLayout.java +++ b/server/src/com/vaadin/ui/FormLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java index 53a25c1c83..00e50aafc4 100644 --- a/server/src/com/vaadin/ui/GridLayout.java +++ b/server/src/com/vaadin/ui/GridLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/HasComponents.java b/server/src/com/vaadin/ui/HasComponents.java index 7de944c0f2..6273e8053b 100644 --- a/server/src/com/vaadin/ui/HasComponents.java +++ b/server/src/com/vaadin/ui/HasComponents.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/HorizontalLayout.java b/server/src/com/vaadin/ui/HorizontalLayout.java index dbf691dc95..54569570b9 100644 --- a/server/src/com/vaadin/ui/HorizontalLayout.java +++ b/server/src/com/vaadin/ui/HorizontalLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/HorizontalSplitPanel.java b/server/src/com/vaadin/ui/HorizontalSplitPanel.java index 2346bc7acd..14bfdba023 100644 --- a/server/src/com/vaadin/ui/HorizontalSplitPanel.java +++ b/server/src/com/vaadin/ui/HorizontalSplitPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Html5File.java b/server/src/com/vaadin/ui/Html5File.java index d548fe6d71..87ea83c8c9 100644 --- a/server/src/com/vaadin/ui/Html5File.java +++ b/server/src/com/vaadin/ui/Html5File.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -74,4 +74,4 @@ public class Html5File implements Serializable { return streamVariable; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/Image.java b/server/src/com/vaadin/ui/Image.java index 93bcb0ec51..7b0294a450 100644 --- a/server/src/com/vaadin/ui/Image.java +++ b/server/src/com/vaadin/ui/Image.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/InlineDateField.java b/server/src/com/vaadin/ui/InlineDateField.java index 0aadad2f1f..e6f0f5d7a0 100644 --- a/server/src/com/vaadin/ui/InlineDateField.java +++ b/server/src/com/vaadin/ui/InlineDateField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/JavaScript.java b/server/src/com/vaadin/ui/JavaScript.java index 9078d1b7ac..68c8c9a6e4 100644 --- a/server/src/com/vaadin/ui/JavaScript.java +++ b/server/src/com/vaadin/ui/JavaScript.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/JavaScriptFunction.java b/server/src/com/vaadin/ui/JavaScriptFunction.java index 410bae12d9..2c026abd1a 100644 --- a/server/src/com/vaadin/ui/JavaScriptFunction.java +++ b/server/src/com/vaadin/ui/JavaScriptFunction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Label.java b/server/src/com/vaadin/ui/Label.java index 71d54fc29a..b4685adcea 100644 --- a/server/src/com/vaadin/ui/Label.java +++ b/server/src/com/vaadin/ui/Label.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Layout.java b/server/src/com/vaadin/ui/Layout.java index dc16b186f2..6cf2cec249 100644 --- a/server/src/com/vaadin/ui/Layout.java +++ b/server/src/com/vaadin/ui/Layout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/LegacyComponent.java b/server/src/com/vaadin/ui/LegacyComponent.java index 33e3acb3d2..7f71162c94 100644 --- a/server/src/com/vaadin/ui/LegacyComponent.java +++ b/server/src/com/vaadin/ui/LegacyComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/LegacyWindow.java b/server/src/com/vaadin/ui/LegacyWindow.java index 458b09390d..fe71d14430 100644 --- a/server/src/com/vaadin/ui/LegacyWindow.java +++ b/server/src/com/vaadin/ui/LegacyWindow.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -477,4 +477,4 @@ public class LegacyWindow extends UI { getContent().removeAllComponents(); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/Link.java b/server/src/com/vaadin/ui/Link.java index e1a47777bd..2731e93ef2 100644 --- a/server/src/com/vaadin/ui/Link.java +++ b/server/src/com/vaadin/ui/Link.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/ListSelect.java b/server/src/com/vaadin/ui/ListSelect.java index 60b95f7fde..9f44407db9 100644 --- a/server/src/com/vaadin/ui/ListSelect.java +++ b/server/src/com/vaadin/ui/ListSelect.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/LoadingIndicatorConfiguration.java b/server/src/com/vaadin/ui/LoadingIndicatorConfiguration.java index 57ccdc1b64..46fe7ead35 100644 --- a/server/src/com/vaadin/ui/LoadingIndicatorConfiguration.java +++ b/server/src/com/vaadin/ui/LoadingIndicatorConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/LoginForm.java b/server/src/com/vaadin/ui/LoginForm.java index 67d7182ecb..1f0e3fc3b3 100644 --- a/server/src/com/vaadin/ui/LoginForm.java +++ b/server/src/com/vaadin/ui/LoginForm.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/MenuBar.java b/server/src/com/vaadin/ui/MenuBar.java index 545a1e9e3e..17a2f8e391 100644 --- a/server/src/com/vaadin/ui/MenuBar.java +++ b/server/src/com/vaadin/ui/MenuBar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/NativeButton.java b/server/src/com/vaadin/ui/NativeButton.java index 1eb81b17ba..3c220719b5 100644 --- a/server/src/com/vaadin/ui/NativeButton.java +++ b/server/src/com/vaadin/ui/NativeButton.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/NativeSelect.java b/server/src/com/vaadin/ui/NativeSelect.java index d21203e47c..51f5536588 100644 --- a/server/src/com/vaadin/ui/NativeSelect.java +++ b/server/src/com/vaadin/ui/NativeSelect.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Notification.java b/server/src/com/vaadin/ui/Notification.java index 31fa265b02..aaf25a9e9d 100644 --- a/server/src/com/vaadin/ui/Notification.java +++ b/server/src/com/vaadin/ui/Notification.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -21,7 +21,6 @@ import java.io.Serializable; import com.vaadin.server.Page; import com.vaadin.server.Resource; import com.vaadin.shared.Position; -import com.vaadin.shared.ui.ui.NotificationConfigurationBean.Role; /** * A notification message, used to display temporary messages to the user - for @@ -64,7 +63,27 @@ import com.vaadin.shared.ui.ui.NotificationConfigurationBean.Role; */ public class Notification implements Serializable { public enum Type { - HUMANIZED_MESSAGE, WARNING_MESSAGE, ERROR_MESSAGE, TRAY_NOTIFICATION, ASSISTIVE_NOTIFICATION; + HUMANIZED_MESSAGE("humanized"), WARNING_MESSAGE("warning"), ERROR_MESSAGE( + "error"), TRAY_NOTIFICATION("tray"), + /** + * @since 7.2 + */ + ASSISTIVE_NOTIFICATION("assistive"); + + private String style; + + Type(String style) { + this.style = style; + } + + /** + * @since 7.2 + * + * @return the style name for this notification type. + */ + public String getStyle() { + return style; + } } @Deprecated @@ -187,44 +206,28 @@ public class Notification implements Serializable { } private void setType(Type type) { + styleName = type.getStyle(); switch (type) { case WARNING_MESSAGE: delayMsec = 1500; - styleName = "warning"; - setNavigationConfiguration("Warning: ", "", Role.ALERT); break; case ERROR_MESSAGE: delayMsec = -1; - styleName = "error"; - setNavigationConfiguration("Error: ", " - close with ESC", - Role.ALERT); break; case TRAY_NOTIFICATION: delayMsec = 3000; position = Position.BOTTOM_RIGHT; - styleName = "tray"; - setNavigationConfiguration("Info: ", "", Role.STATUS); break; case ASSISTIVE_NOTIFICATION: delayMsec = 3000; position = Position.ASSISTIVE; - styleName = "assistive"; - setNavigationConfiguration("Note: ", "", Role.ALERT); break; case HUMANIZED_MESSAGE: default: - styleName = "humanized"; - setNavigationConfiguration("Info: ", "", Role.ALERT); break; } } - private void setNavigationConfiguration(String prefix, String postfix, - Role ariaRole) { - UI.getCurrent().getNotificationConfiguration() - .setStyleConfiguration(styleName, prefix, postfix, ariaRole); - } - /** * Gets the caption part of the notification message. * @@ -340,132 +343,6 @@ public class Notification implements Serializable { } /** - * Sets the accessibility prefix for a notification type. - * - * This prefix is read to assistive device users before the content of the - * notification, but not visible on the page. - * - * @param type - * Type of the notification - * @param prefix - * String that is placed before the notification content - */ - public void setAssistivePrefixForType(Type type, String prefix) { - UI.getCurrent().getNotificationConfiguration() - .setAssistivePrefixForStyle(getStyle(type), prefix); - } - - /** - * Gets the accessibility prefix for a notification type. - * - * This prefix is read to assistive device users before the content of the - * notification, but not visible on the page. - * - * @param type - * Type of the notification - * @return The accessibility prefix for the provided notification type - */ - public String getAssistivePrefixForType(Type type) { - return UI.getCurrent().getNotificationConfiguration() - .getAssistivePrefixForStyle(getStyle(type)); - } - - /** - * Sets the accessibility postfix for a notification type. - * - * This postfix is read to assistive device users after the content of the - * notification, but not visible on the page. - * - * @param type - * Type of the notification - * @param postfix - * String that is placed after the notification content - */ - public void setAssistivePostfixForType(Type type, String postfix) { - UI.getCurrent().getNotificationConfiguration() - .setAssistivePostfixForStyle(getStyle(type), postfix); - } - - /** - * Gets the accessibility postfix for a notification type. - * - * This postfix is read to assistive device users after the content of the - * notification, but not visible on the page. - * - * @param type - * Type of the notification - * @return The accessibility postfix for the provided notification type - */ - public String getAssistivePostfixForType(Type type) { - return UI.getCurrent().getNotificationConfiguration() - .getAssistivePostfixForStyle(getStyle(type)); - } - - /** - * Sets the WAI-ARIA role for a notification type. - * - * This role defines how an assistive device handles a notification. - * Available roles are alert and status (@see <a - * href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles - * Model</a>). - * - * The default role is alert. - * - * @param type - * Type of the notification - * @param role - * Role to set for the notification type - */ - public void setAssistiveRoleForType(Type type, Role role) { - UI.getCurrent().getNotificationConfiguration() - .setAssistiveRoleForStyle(getStyle(type), role); - } - - /** - * Gets the WAI-ARIA role for a notification type. - * - * This role defines how an assistive device handles a notification. - * Available roles are alert and status (@see <a - * href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles - * Model</a>) - * - * The default role is alert. - * - * @param type - * Type of the notification - * @return Role to set for the notification type - */ - public Role getAssistiveRoleForType(Type type) { - return UI.getCurrent().getNotificationConfiguration() - .getAssistiveRoleForStyle(getStyle(type)); - } - - private String getStyle(Type type) { - String style = ""; - - switch (type) { - case WARNING_MESSAGE: - style = "warning"; - break; - case ERROR_MESSAGE: - style = "error"; - break; - case TRAY_NOTIFICATION: - style = "tray"; - break; - case ASSISTIVE_NOTIFICATION: - style = "assistive"; - break; - case HUMANIZED_MESSAGE: - default: - style = "humanized"; - break; - } - - return style; - } - - /** * Sets whether html is allowed in the caption and description. If set to * true, the texts are passed to the browser as html and the developer is * responsible for ensuring no harmful html is used. If set to false, the diff --git a/server/src/com/vaadin/ui/NotificationConfiguration.java b/server/src/com/vaadin/ui/NotificationConfiguration.java index 52d3e76d63..faab329f88 100644 --- a/server/src/com/vaadin/ui/NotificationConfiguration.java +++ b/server/src/com/vaadin/ui/NotificationConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -21,112 +21,99 @@ package com.vaadin.ui; import java.io.Serializable; -import com.vaadin.shared.ui.ui.NotificationConfigurationBean; -import com.vaadin.shared.ui.ui.NotificationConfigurationBean.Role; -import com.vaadin.shared.ui.ui.UIState.NotificationConfigurationState; +import com.vaadin.shared.ui.ui.NotificationRole; +import com.vaadin.shared.ui.ui.UIState.NotificationTypeConfiguration; +import com.vaadin.ui.Notification.Type; /** * Provides methods for configuring the notification. - * + * * @author Vaadin Ltd - * @since 7.1 + * @since 7.2 */ public interface NotificationConfiguration extends Serializable { - public void setStyleConfiguration(String style, String prefix, - String postfix, Role ariaRole); - /** - * Returns the complete configuration object for the given notification - * style. - * - * @param style - * String of the notification style to return - * @return The notification configuration object - */ - public NotificationConfigurationBean getStyleConfiguration(String style); - - /** - * Sets the accessibility prefix for the given notification style. - * - * This prefix is read to assistive device users in front of the content of - * the notification, but not visible on the page. - * - * @param style - * String of the notification style + * Sets the accessibility prefix for a notification type. + * <p> + * This prefix is read to assistive device users before the content of the + * notification, but not visible on the page. + * + * @param type + * type of the notification * @param prefix - * String that is placed before the notification content + * string that is placed before the notification content */ - public void setAssistivePrefixForStyle(String style, String prefix); + public void setAssistivePrefix(Type type, String prefix); /** - * Returns the accessibility prefix for the given notification style. - * - * This prefix is read to assistive device users in front of the content of - * the notification, but not visible on the page. - * - * @param style - * String of the notification style - * @return The prefix of the provided notification style + * Gets the accessibility prefix for a notification type. + * <p> + * This prefix is read to assistive device users before the content of the + * notification, but not visible on the page. + * + * @param type + * type of the notification + * @return The accessibility prefix for the provided notification type */ - public String getAssistivePrefixForStyle(String style); + public String getAssistivePrefix(Type type); /** - * Sets the accessibility postfix for the given notification style. - * + * Sets the accessibility postfix for a notification type. + * <p> * This postfix is read to assistive device users after the content of the * notification, but not visible on the page. - * - * @param style - * String of the notification style + * + * @param type + * type of the notification * @param postfix - * String that is placed after the notification content + * string that is placed after the notification content */ - public void setAssistivePostfixForStyle(String style, String postfix); + public void setAssistivePostfix(Type type, String postfix); /** - * Returns the accessibility postfix for the given notification style. - * + * Gets the accessibility postfix for a notification type. + * <p> * This postfix is read to assistive device users after the content of the * notification, but not visible on the page. - * - * @param style - * String of the notification style - * @return The postfix of the provided notification style + * + * @param type + * type of the notification + * @return The accessibility postfix for the provided notification type */ - public String getAssistivePostfixForStyle(String style); + public String getAssistivePostfix(Type type); /** - * Sets the WAI-ARIA role for a notification style. - * + * Sets the WAI-ARIA role for a notification type. + * <p> * This role defines how an assistive device handles a notification. - * Available roles are alert, alertdialog and status (@see <a + * Available roles are alert and status (@see <a * href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles - * Model</a>) - * + * Model</a>). + * * The default role is alert. - * - * @param style - * String of the notification style + * + * @param type + * type of the notification * @param role - * Role to set for the notification type + * role to set for the notification type */ - public void setAssistiveRoleForStyle(String style, Role role); + public void setAssistiveRole(Type type, NotificationRole role); /** - * Returns the WAI-ARIA role for a notification style. - * + * Gets the WAI-ARIA role for a notification type. + * <p> * This role defines how an assistive device handles a notification. - * Available roles are alert, alertdialog and status (@see <a + * Available roles are alert and status (@see <a * href="http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles">Roles - * Model</a> ) - * + * Model</a>) + * <p> * The default role is alert. - * - * @param style - * String of the notification style - * @return The current Role for the notification type + * + * @param type + * type of the notification + * @return role to set for the notification type */ - public Role getAssistiveRoleForStyle(String style); + public NotificationRole getAssistiveRole(Type type); } class NotificationConfigurationImpl implements NotificationConfiguration { @@ -137,133 +124,62 @@ class NotificationConfigurationImpl implements NotificationConfiguration { this.ui = ui; } - /* - * (non-Javadoc) - * - * @see - * com.vaadin.ui.NotificationConfiguration#setStyleConfiguration(java.lang - * .String, java.lang.String, java.lang.String, - * com.vaadin.ui.NotificationConfiguration.Role) - */ - @Override - public void setStyleConfiguration(String style, String prefix, - String postfix, Role ariaRole) { - getState().setup.put(style, new NotificationConfigurationBean(prefix, - postfix, ariaRole)); - } - - /* - * (non-Javadoc) - * - * @see - * com.vaadin.ui.NotificationConfiguration#getStyleConfiguration(java.lang - * .String) - */ @Override - public NotificationConfigurationBean getStyleConfiguration(String style) { - return getState(false).setup.get(style); + public void setAssistivePrefix(Type type, String prefix) { + getConfigurationBean(type).prefix = prefix; } - /* - * (non-Javadoc) - * - * @see - * com.vaadin.ui.NotificationConfiguration#setStylePrefix(java.lang.String, - * java.lang.String) - */ @Override - public void setAssistivePrefixForStyle(String style, String prefix) { - getConfigurationBean(style).setAssistivePrefix(prefix); - } - - /* - * (non-Javadoc) - * - * @see - * com.vaadin.ui.NotificationConfiguration#getStylePrefix(java.lang.String) - */ - @Override - public String getAssistivePrefixForStyle(String style) { - NotificationConfigurationBean styleSetup = getState().setup.get(style); + public String getAssistivePrefix(Type type) { + NotificationTypeConfiguration styleSetup = getTypeConf(type); if (styleSetup != null) { - return styleSetup.getAssistivePrefix(); + return styleSetup.prefix; } return null; } - /* - * (non-Javadoc) - * - * @see - * com.vaadin.ui.NotificationConfiguration#setStylePostfix(com.vaadin.ui - * .Notification.Type, java.lang.String) - */ @Override - public void setAssistivePostfixForStyle(String style, String postfix) { - getConfigurationBean(style).setAssistivePostfix(postfix); + public void setAssistivePostfix(Type type, String postfix) { + getConfigurationBean(type).postfix = postfix; } - /* - * (non-Javadoc) - * - * @see - * com.vaadin.ui.NotificationConfiguration#getStylePostfix(com.vaadin.ui - * .Notification.Type) - */ @Override - public String getAssistivePostfixForStyle(String style) { - NotificationConfigurationBean styleSetup = getState().setup.get(style); + public String getAssistivePostfix(Type type) { + NotificationTypeConfiguration styleSetup = getTypeConf(type); if (styleSetup != null) { - return styleSetup.getAssistivePostfix(); + return styleSetup.postfix; } return null; } - /* - * (non-Javadoc) - * - * @see com.vaadin.ui.NotificationConfiguration#setStyleRole(com.vaadin.ui. - * Notification.Type, com.vaadin.ui.NotificationConfiguration.Role) - */ @Override - public void setAssistiveRoleForStyle(String style, Role role) { - getConfigurationBean(style).setAssistiveRole(role); + public void setAssistiveRole(Type type, NotificationRole role) { + getConfigurationBean(type).notificationRole = role; } - /* - * (non-Javadoc) - * - * @see com.vaadin.ui.NotificationConfiguration#getStyleRole(com.vaadin.ui. - * Notification.Type) - */ @Override - public Role getAssistiveRoleForStyle(String style) { - NotificationConfigurationBean styleSetup = getState().setup.get(style); + public NotificationRole getAssistiveRole(Type type) { + NotificationTypeConfiguration styleSetup = getTypeConf(type); if (styleSetup != null) { - return styleSetup.getAssistiveRole(); + return styleSetup.notificationRole; } return null; } - private NotificationConfigurationBean getConfigurationBean(String style) { - NotificationConfigurationBean styleSetup = getState().setup.get(style); + private NotificationTypeConfiguration getConfigurationBean(Type type) { + NotificationTypeConfiguration styleSetup = getTypeConf(type); if (styleSetup == null) { - styleSetup = new NotificationConfigurationBean(); - getState().setup.put(style, styleSetup); + styleSetup = new NotificationTypeConfiguration(); + ui.getState().notificationConfigurations.put(type.getStyle(), styleSetup); } return styleSetup; } - private NotificationConfigurationState getState() { - return ui.getState().notificationConfiguration; + private NotificationTypeConfiguration getTypeConf(Type type) { + return ui.getState().notificationConfigurations.get(type.getStyle()); } - - private NotificationConfigurationState getState(boolean markAsDirty) { - return ui.getState(markAsDirty).notificationConfiguration; - } - } diff --git a/server/src/com/vaadin/ui/OptionGroup.java b/server/src/com/vaadin/ui/OptionGroup.java index 0b81321023..393f5399f6 100644 --- a/server/src/com/vaadin/ui/OptionGroup.java +++ b/server/src/com/vaadin/ui/OptionGroup.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Panel.java b/server/src/com/vaadin/ui/Panel.java index 7d962c246b..34ff6ec112 100644 --- a/server/src/com/vaadin/ui/Panel.java +++ b/server/src/com/vaadin/ui/Panel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/PasswordField.java b/server/src/com/vaadin/ui/PasswordField.java index 52f47c5c89..107e40c149 100644 --- a/server/src/com/vaadin/ui/PasswordField.java +++ b/server/src/com/vaadin/ui/PasswordField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/PopupDateField.java b/server/src/com/vaadin/ui/PopupDateField.java index f0bb0d74fe..61aac16a97 100644 --- a/server/src/com/vaadin/ui/PopupDateField.java +++ b/server/src/com/vaadin/ui/PopupDateField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/PopupView.java b/server/src/com/vaadin/ui/PopupView.java index 28a78ab31a..b347576b22 100644 --- a/server/src/com/vaadin/ui/PopupView.java +++ b/server/src/com/vaadin/ui/PopupView.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/ProgressBar.java b/server/src/com/vaadin/ui/ProgressBar.java index 3f8aab6d7c..bf52cefefe 100644 --- a/server/src/com/vaadin/ui/ProgressBar.java +++ b/server/src/com/vaadin/ui/ProgressBar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -149,4 +149,4 @@ public class ProgressBar extends AbstractField<Float> implements getState().state = newValue; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/ProgressIndicator.java b/server/src/com/vaadin/ui/ProgressIndicator.java index 6da18fc29d..6e436169e3 100644 --- a/server/src/com/vaadin/ui/ProgressIndicator.java +++ b/server/src/com/vaadin/ui/ProgressIndicator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/PushConfiguration.java b/server/src/com/vaadin/ui/PushConfiguration.java index 49738c5aff..84f59d0313 100644 --- a/server/src/com/vaadin/ui/PushConfiguration.java +++ b/server/src/com/vaadin/ui/PushConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/RichTextArea.java b/server/src/com/vaadin/ui/RichTextArea.java index cd95988bd4..9d05181541 100644 --- a/server/src/com/vaadin/ui/RichTextArea.java +++ b/server/src/com/vaadin/ui/RichTextArea.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Select.java b/server/src/com/vaadin/ui/Select.java index 2fc1b692cc..e63cba3eaa 100644 --- a/server/src/com/vaadin/ui/Select.java +++ b/server/src/com/vaadin/ui/Select.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/SelectiveRenderer.java b/server/src/com/vaadin/ui/SelectiveRenderer.java index 7c871e3c25..5c4d052a53 100644 --- a/server/src/com/vaadin/ui/SelectiveRenderer.java +++ b/server/src/com/vaadin/ui/SelectiveRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/SingleComponentContainer.java b/server/src/com/vaadin/ui/SingleComponentContainer.java index 7a525d0182..9feee84f15 100644 --- a/server/src/com/vaadin/ui/SingleComponentContainer.java +++ b/server/src/com/vaadin/ui/SingleComponentContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Slider.java b/server/src/com/vaadin/ui/Slider.java index 44fc49ba9b..e108c74ba2 100644 --- a/server/src/com/vaadin/ui/Slider.java +++ b/server/src/com/vaadin/ui/Slider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java index 8e2c40fc0f..2fdb3b40a7 100644 --- a/server/src/com/vaadin/ui/TabSheet.java +++ b/server/src/com/vaadin/ui/TabSheet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -292,34 +292,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, * @return the created {@link Tab} */ public Tab addTab(Component c, String caption, Resource icon) { - return addTab(c, caption, icon, "", components.size()); - } - - /** - * Adds a new tab into TabSheet. - * - * The first tab added to a tab sheet is automatically selected and a tab - * selection event is fired. - * - * If the component is already present in the tab sheet, changes its caption - * and icon and icon alternate text and returns the corresponding (old) tab, - * preserving other tab metadata. - * - * @param c - * the component to be added onto tab - should not be null. - * @param caption - * the caption to be set for the component and used rendered in - * tab bar - * @param icon - * the icon to be set for the component and used rendered in tab - * bar - * @param iconAltText - * the alternate text for the icon - * @return the created {@link Tab} - */ - public Tab addTab(Component c, String caption, Resource icon, - String iconAltText) { - return addTab(c, caption, icon, iconAltText, components.size()); + return addTab(c, caption, icon, components.size()); } /** @@ -344,43 +317,13 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, * the position at where the the tab should be added. * @return the created {@link Tab} */ - public Tab addTab(Component c, String caption, Resource icon, int position) { - return addTab(c, caption, icon, "", position); - } - - /** - * Adds a new tab into TabSheet. - * - * The first tab added to a tab sheet is automatically selected and a tab - * selection event is fired. - * - * If the component is already present in the tab sheet, changes its caption - * and icon and icon alternate text and returns the corresponding (old) tab, - * preserving other tab metadata like the position. - * - * @param tabComponent - * the component to be added onto tab - should not be null. - * @param caption - * the caption to be set for the component and used rendered in - * tab bar - * @param icon - * the icon to be set for the component and used rendered in tab - * bar - * @param iconAltText - * the alternate text for the icon - * @param position - * the position at where the the tab should be added. - * @return the created {@link Tab} - */ - public Tab addTab(Component tabComponent, String caption, Resource icon, - String iconAltText, int position) { - + public Tab addTab(Component tabComponent, String caption, Resource icon, int position) { if (tabComponent == null) { return null; } else if (tabs.containsKey(tabComponent)) { Tab tab = tabs.get(tabComponent); tab.setCaption(caption); - tab.setIcon(icon, iconAltText); + tab.setIcon(icon); return tab; } else { components.add(position, tabComponent); @@ -461,11 +404,11 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, Tab tab = ((TabSheet) source).getTab(c); caption = tab.getCaption(); icon = tab.getIcon(); - iconAltText = tab.getIconAltText(); + iconAltText = tab.getIconAlternateText(); } source.removeComponent(c); - addTab(c, caption, icon, iconAltText); - + Tab tab = addTab(c, caption, icon); + tab.setIconAlternateText(iconAltText); } } @@ -968,16 +911,20 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, /** * Gets the icon alt text for the tab. + * + * @since 7.2 */ - public String getIconAltText(); + public String getIconAlternateText(); /** * Sets the icon alt text for the tab. - * + * + * @since 7.2 + * * @param iconAltText * the icon to set */ - public void setIconAltText(String iconAltText); + public void setIconAlternateText(String iconAltText); /** * Gets the description for the tab. The description can be used to @@ -1135,12 +1082,12 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, } @Override - public String getIconAltText() { + public String getIconAlternateText() { return tabState.iconAltText; } @Override - public void setIconAltText(String iconAltText) { + public void setIconAlternateText(String iconAltText) { tabState.iconAltText = iconAltText; markAsDirty(); } @@ -1428,7 +1375,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, */ private static void copyTabMetadata(Tab from, Tab to) { to.setCaption(from.getCaption()); - to.setIcon(from.getIcon(), from.getIconAltText()); + to.setIcon(from.getIcon(), from.getIconAlternateText()); to.setDescription(from.getDescription()); to.setVisible(from.isVisible()); to.setEnabled(from.isEnabled()); diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java index 06e82dedcb..29dc52a9a6 100644 --- a/server/src/com/vaadin/ui/Table.java +++ b/server/src/com/vaadin/ui/Table.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -2647,6 +2647,10 @@ public class Table extends AbstractSelect implements Action.Container, * new container contains properties that are not meant to be shown you * should use {@link Table#setContainerDataSource(Container, Collection)} * instead, especially if the table is editable. + * <p> + * Keeps propertyValueConverters if the corresponding id exists in the new + * data source and is of a compatible type. + * </p> * * @param newDataSource * the new data source. @@ -2681,9 +2685,14 @@ public class Table extends AbstractSelect implements Action.Container, /** * Sets the container data source and the columns that will be visible. * Columns are shown in the collection's iteration order. + * <p> + * Keeps propertyValueConverters if the corresponding id exists in the new + * data source and is of a compatible type. + * </p> * * @see Table#setContainerDataSource(Container) * @see Table#setVisibleColumns(Object[]) + * @see Table#setConverter(Object, Converter<String, ?>) * * @param newDataSource * the new data source. @@ -2702,6 +2711,26 @@ public class Table extends AbstractSelect implements Action.Container, visibleIds = new ArrayList<Object>(); } + // Retain propertyValueConverters if their corresponding ids are + // properties of the new + // data source and are of a compatible type + if (propertyValueConverters != null) { + Collection<?> newPropertyIds = newDataSource + .getContainerPropertyIds(); + LinkedList<Object> retainableValueConverters = new LinkedList<Object>(); + for (Object propertyId : newPropertyIds) { + Converter<String, ?> converter = getConverter(propertyId); + if (converter != null) { + if (typeIsCompatible(converter.getModelType(), + newDataSource.getType(propertyId))) { + retainableValueConverters.add(propertyId); + } + } + } + propertyValueConverters.keySet().retainAll( + retainableValueConverters); + } + // Assures that the data source is ordered by making unordered // containers ordered by wrapping them if (newDataSource instanceof Container.Ordered) { @@ -2738,6 +2767,20 @@ public class Table extends AbstractSelect implements Action.Container, } /** + * Checks if class b can be safely assigned to class a. + * + * @param a + * @param b + * @return + */ + private boolean typeIsCompatible(Class<?> a, Class<?> b) { + // TODO Implement this check properly + // Basically we need to do a a.isAssignableFrom(b) + // with special considerations for primitive types. + return true; + } + + /** * Gets items ids from a range of key values * * @param startRowKey @@ -2911,15 +2954,23 @@ public class Table extends AbstractSelect implements Action.Container, // (row caches emptied by other event) if (!containerChangeToBeRendered) { Integer value = (Integer) variables.get("reqfirstrow"); + int tableSize = size(); if (value != null) { reqFirstRowToPaint = value.intValue(); + // Sanity check + if (reqFirstRowToPaint < 0) { + reqFirstRowToPaint = -1; + } + if (reqFirstRowToPaint >= tableSize) { + reqFirstRowToPaint = tableSize - 1; + } } value = (Integer) variables.get("reqrows"); if (value != null) { reqRowsToPaint = value.intValue(); // sanity check - if (reqFirstRowToPaint + reqRowsToPaint > size()) { - reqRowsToPaint = size() - reqFirstRowToPaint; + if (reqFirstRowToPaint + reqRowsToPaint > tableSize) { + reqRowsToPaint = tableSize - reqFirstRowToPaint; } } } @@ -4229,6 +4280,8 @@ public class Table extends AbstractSelect implements Action.Container, columnIcons.remove(propertyId); columnHeaders.remove(propertyId); columnFooters.remove(propertyId); + // If a propertyValueConverter was defined for the property, remove it. + propertyValueConverters.remove(propertyId); return super.removeContainerProperty(propertyId); } @@ -4706,7 +4759,15 @@ public class Table extends AbstractSelect implements Action.Container, if (refreshingPreviouslyEnabled) { enableContentRefreshing(true); } - + if (propertyId.length > 0 && ascending.length > 0) { + // The first propertyId is the primary sorting criterion, + // therefore the sort indicator should be there + sortAscending = ascending[0]; + sortContainerPropertyId = propertyId[0]; + } else { + sortAscending = true; + sortContainerPropertyId = null; + } } else if (c != null) { throw new UnsupportedOperationException( "Underlying Data does not allow sorting"); @@ -5844,16 +5905,13 @@ public class Table extends AbstractSelect implements Action.Container, throw new IllegalArgumentException("PropertyId " + propertyId + " must be in the container"); } - // FIXME: This check should be here but primitive types like Boolean - // formatter for boolean property must be handled - // if (!converter.getSourceType().isAssignableFrom(getType(propertyId))) - // { - // throw new IllegalArgumentException("Property type (" - // + getType(propertyId) - // + ") must match converter source type (" - // + converter.getSourceType() + ")"); - // } + if (!typeIsCompatible(converter.getModelType(), getType(propertyId))) { + throw new IllegalArgumentException("Property type (" + + getType(propertyId) + + ") must match converter source type (" + + converter.getModelType() + ")"); + } propertyValueConverters.put(propertyId, (Converter<String, Object>) converter); refreshRowCache(); diff --git a/server/src/com/vaadin/ui/TableFieldFactory.java b/server/src/com/vaadin/ui/TableFieldFactory.java index 3b840d2816..3c946dcec2 100644 --- a/server/src/com/vaadin/ui/TableFieldFactory.java +++ b/server/src/com/vaadin/ui/TableFieldFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/TextArea.java b/server/src/com/vaadin/ui/TextArea.java index 6e5b9da2f4..56c97f58eb 100644 --- a/server/src/com/vaadin/ui/TextArea.java +++ b/server/src/com/vaadin/ui/TextArea.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/TextField.java b/server/src/com/vaadin/ui/TextField.java index ba6252bf78..fb1e4284a2 100644 --- a/server/src/com/vaadin/ui/TextField.java +++ b/server/src/com/vaadin/ui/TextField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/TooltipConfiguration.java b/server/src/com/vaadin/ui/TooltipConfiguration.java index f9120aa18d..ecb8ac7534 100644 --- a/server/src/com/vaadin/ui/TooltipConfiguration.java +++ b/server/src/com/vaadin/ui/TooltipConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Tree.java b/server/src/com/vaadin/ui/Tree.java index 15175b5a8b..a86a9bd64b 100644 --- a/server/src/com/vaadin/ui/Tree.java +++ b/server/src/com/vaadin/ui/Tree.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/TreeTable.java b/server/src/com/vaadin/ui/TreeTable.java index 1c13eae8d9..9bca20587b 100644 --- a/server/src/com/vaadin/ui/TreeTable.java +++ b/server/src/com/vaadin/ui/TreeTable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/TwinColSelect.java b/server/src/com/vaadin/ui/TwinColSelect.java index 61487be1d4..37e3b7ccb9 100644 --- a/server/src/com/vaadin/ui/TwinColSelect.java +++ b/server/src/com/vaadin/ui/TwinColSelect.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index 275aeb4c79..7a71083e85 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -669,10 +669,10 @@ public abstract class UI extends AbstractSingleComponentContainer implements * @param request * the request that caused this UI to be reloaded */ - public void doReinit(VaadinRequest request) { + public void doRefresh(VaadinRequest request) { // This is a horrible hack. We want to have the most recent location and - // browser window size available in reinit(), but we want to call - // listeners, if any, only after reinit(). So we momentarily assign the + // browser window size available in refresh(), but we want to call + // listeners, if any, only after refresh(). So we momentarily assign the // old values back before setting the new values again to ensure the // events are properly fired. @@ -684,7 +684,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements page.init(request); - reinit(request); + refresh(request); URI newLocation = page.getLocation(); int newWidth = page.getBrowserWindowWidth(); @@ -710,7 +710,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements * @param request * the request that caused this UI to be reloaded */ - protected void reinit(VaadinRequest request) { + protected void refresh(VaadinRequest request) { } /** diff --git a/server/src/com/vaadin/ui/UIDetachedException.java b/server/src/com/vaadin/ui/UIDetachedException.java index 07207b0bf3..7cd7f0889e 100644 --- a/server/src/com/vaadin/ui/UIDetachedException.java +++ b/server/src/com/vaadin/ui/UIDetachedException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/UniqueSerializable.java b/server/src/com/vaadin/ui/UniqueSerializable.java index 2bcc7c2028..f5d68e8a71 100644 --- a/server/src/com/vaadin/ui/UniqueSerializable.java +++ b/server/src/com/vaadin/ui/UniqueSerializable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Upload.java b/server/src/com/vaadin/ui/Upload.java index 5677b1a16e..869c32751a 100644 --- a/server/src/com/vaadin/ui/Upload.java +++ b/server/src/com/vaadin/ui/Upload.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/VerticalLayout.java b/server/src/com/vaadin/ui/VerticalLayout.java index 9c4067bd38..12819e50bc 100644 --- a/server/src/com/vaadin/ui/VerticalLayout.java +++ b/server/src/com/vaadin/ui/VerticalLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/VerticalSplitPanel.java b/server/src/com/vaadin/ui/VerticalSplitPanel.java index 7ad9a51e36..4476d5a19b 100644 --- a/server/src/com/vaadin/ui/VerticalSplitPanel.java +++ b/server/src/com/vaadin/ui/VerticalSplitPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Video.java b/server/src/com/vaadin/ui/Video.java index d6dc918da0..e690218e6f 100644 --- a/server/src/com/vaadin/ui/Video.java +++ b/server/src/com/vaadin/ui/Video.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java index d3afdaacf1..149fcd536f 100644 --- a/server/src/com/vaadin/ui/Window.java +++ b/server/src/com/vaadin/ui/Window.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -18,9 +18,6 @@ package com.vaadin.ui; import java.io.Serializable; import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; import java.util.Map; import com.vaadin.event.FieldEvents.BlurEvent; @@ -41,7 +38,7 @@ import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.window.WindowMode; import com.vaadin.shared.ui.window.WindowServerRpc; import com.vaadin.shared.ui.window.WindowState; -import com.vaadin.shared.ui.window.WindowState.WindowRole; +import com.vaadin.shared.ui.window.WindowRole; import com.vaadin.util.ReflectTools; /** @@ -1017,15 +1014,15 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, * window. Text contained in these components will be read by assistive * devices when it is opened. * - * @param connectors - * with the components to use as description + * @param components + * the components to use as description */ - public void setAssistiveDescription(Connector... connectors) { - if (connectors == null) { + public void setAssistiveDescription(Component... components) { + if (components == null) { throw new IllegalArgumentException( "Parameter connectors must be non-null"); } else { - getState().contentDescription = connectors; + getState().contentDescription = components; } } @@ -1034,11 +1031,19 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, * contained in these components will be read by assistive devices when the * window is opened. * - * @return list of previously set components + * @return array of previously set components */ - public List<Connector> getAssistiveDescription() { - return Collections.unmodifiableList(Arrays - .asList(getState().contentDescription)); + public Component[] getAssistiveDescription() { + Connector[] contentDescription = getState().contentDescription; + if (contentDescription == null) { + return null; + } + + Component[] target = new Component[contentDescription.length]; + System.arraycopy(contentDescription, 0, target, 0, + contentDescription.length); + + return target; } /** diff --git a/server/src/com/vaadin/ui/components/calendar/CalendarComponentEvent.java b/server/src/com/vaadin/ui/components/calendar/CalendarComponentEvent.java index 1f012157b5..dfb59e148b 100644 --- a/server/src/com/vaadin/ui/components/calendar/CalendarComponentEvent.java +++ b/server/src/com/vaadin/ui/components/calendar/CalendarComponentEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/CalendarComponentEvents.java b/server/src/com/vaadin/ui/components/calendar/CalendarComponentEvents.java index 1904d69898..f01b465dd2 100644 --- a/server/src/com/vaadin/ui/components/calendar/CalendarComponentEvents.java +++ b/server/src/com/vaadin/ui/components/calendar/CalendarComponentEvents.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/CalendarDateRange.java b/server/src/com/vaadin/ui/components/calendar/CalendarDateRange.java index b78fda3136..18b98e1f6c 100644 --- a/server/src/com/vaadin/ui/components/calendar/CalendarDateRange.java +++ b/server/src/com/vaadin/ui/components/calendar/CalendarDateRange.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/CalendarTargetDetails.java b/server/src/com/vaadin/ui/components/calendar/CalendarTargetDetails.java index 1a3ef67377..3ea6c4d8f4 100644 --- a/server/src/com/vaadin/ui/components/calendar/CalendarTargetDetails.java +++ b/server/src/com/vaadin/ui/components/calendar/CalendarTargetDetails.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java b/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java index 37ea255d27..7c19395df2 100644 --- a/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java +++ b/server/src/com/vaadin/ui/components/calendar/ContainerEventProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -224,8 +224,8 @@ public class ContainerEventProvider implements CalendarEditableEventProvider, } if (styleNameProperty != null && item.getItemPropertyIds().contains(styleNameProperty)) { - basicEvent.setDescription(String.valueOf(item.getItemProperty( - descriptionProperty).getValue())); + basicEvent.setStyleName(String.valueOf(item.getItemProperty( + styleNameProperty).getValue())); } event = basicEvent; } diff --git a/server/src/com/vaadin/ui/components/calendar/event/BasicEvent.java b/server/src/com/vaadin/ui/components/calendar/event/BasicEvent.java index 3f14145f0c..a1ccad2712 100644 --- a/server/src/com/vaadin/ui/components/calendar/event/BasicEvent.java +++ b/server/src/com/vaadin/ui/components/calendar/event/BasicEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/event/BasicEventProvider.java b/server/src/com/vaadin/ui/components/calendar/event/BasicEventProvider.java index b2b74a5e52..9fa6baadad 100644 --- a/server/src/com/vaadin/ui/components/calendar/event/BasicEventProvider.java +++ b/server/src/com/vaadin/ui/components/calendar/event/BasicEventProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/event/CalendarEditableEventProvider.java b/server/src/com/vaadin/ui/components/calendar/event/CalendarEditableEventProvider.java index 13e84df666..920600368e 100644 --- a/server/src/com/vaadin/ui/components/calendar/event/CalendarEditableEventProvider.java +++ b/server/src/com/vaadin/ui/components/calendar/event/CalendarEditableEventProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/event/CalendarEvent.java b/server/src/com/vaadin/ui/components/calendar/event/CalendarEvent.java index 531ee72c7f..2ad8c777ff 100644 --- a/server/src/com/vaadin/ui/components/calendar/event/CalendarEvent.java +++ b/server/src/com/vaadin/ui/components/calendar/event/CalendarEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/event/CalendarEventProvider.java b/server/src/com/vaadin/ui/components/calendar/event/CalendarEventProvider.java index fefb2ca9b6..35719a13f3 100644 --- a/server/src/com/vaadin/ui/components/calendar/event/CalendarEventProvider.java +++ b/server/src/com/vaadin/ui/components/calendar/event/CalendarEventProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/event/EditableCalendarEvent.java b/server/src/com/vaadin/ui/components/calendar/event/EditableCalendarEvent.java index e8a27ad50f..df708697b8 100644 --- a/server/src/com/vaadin/ui/components/calendar/event/EditableCalendarEvent.java +++ b/server/src/com/vaadin/ui/components/calendar/event/EditableCalendarEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java index 65e9c94dec..f4d47f89d4 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicBackwardHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java index ac2470e008..8d366ed52f 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicDateClickHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java index ae4c5fcc12..418e03d24a 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicEventMoveHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java index ee7fc27360..6141c84c5b 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicEventResizeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java index e36c9e5756..96c3c097dc 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicForwardHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java b/server/src/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java index 846fd7dd53..c52d0a5a82 100644 --- a/server/src/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java +++ b/server/src/com/vaadin/ui/components/calendar/handler/BasicWeekClickHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorChangeEvent.java b/server/src/com/vaadin/ui/components/colorpicker/ColorChangeEvent.java index 7ce5a7fd7e..b55b55357f 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorChangeEvent.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -40,4 +40,4 @@ public class ColorChangeEvent extends Event { public Color getColor() { return color; } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorChangeListener.java b/server/src/com/vaadin/ui/components/colorpicker/ColorChangeListener.java index 7afbde5028..6db148989c 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorChangeListener.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -39,4 +39,4 @@ public interface ColorChangeListener extends Serializable { */ void colorChanged(ColorChangeEvent event); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGradient.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGradient.java index 5ff166b201..6147fcdd96 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGradient.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGradient.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -137,4 +137,4 @@ public class ColorPickerGradient extends AbstractComponent implements protected ColorPickerGradientState getState() { return (ColorPickerGradientState) super.getState(); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java index 9123245033..002f36d99d 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerGrid.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -254,4 +254,4 @@ public class ColorPickerGrid extends AbstractComponent implements ColorSelector protected ColorPickerGridState getState() { return (ColorPickerGridState) super.getState(); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java index de8c5db195..a3297a282c 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerHistory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -214,4 +214,4 @@ public class ColorPickerHistory extends CustomComponent implements public void colorChanged(ColorChangeEvent event) { fireEvent(new ColorChangeEvent(this, event.getColor())); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java index 9774211bea..e7b412f7eb 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -776,4 +776,4 @@ public class ColorPickerPopup extends Window implements ClickListener, public static Logger getLogger() { return Logger.getLogger(ColorPickerPopup.class.getName()); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java index 45c6dc76c3..ae00b267ce 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -19,7 +19,6 @@ import java.lang.reflect.Method; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.Property.ValueChangeListener; -import com.vaadin.data.validator.RegexpValidator; import com.vaadin.shared.ui.colorpicker.Color; import com.vaadin.ui.Component; import com.vaadin.ui.CssLayout; @@ -67,13 +66,12 @@ public class ColorPickerPreview extends CssLayout implements ColorSelector, this.color = color; field = new TextField(); - field.setReadOnly(true); field.setImmediate(true); field.setSizeFull(); field.setStyleName("v-colorpicker-preview-textfield"); field.setData(this); field.addValueChangeListener(this); - field.addValidator(new RegexpValidator("#[0-9a-fA-F]{6}", true, "")); + addComponent(field); setColor(color); @@ -85,7 +83,6 @@ public class ColorPickerPreview extends CssLayout implements ColorSelector, // Unregister listener field.removeValueChangeListener(this); - field.setReadOnly(false); String colorCSS = color.getCSS(); field.setValue(colorCSS); @@ -97,7 +94,6 @@ public class ColorPickerPreview extends CssLayout implements ColorSelector, } // Re-register listener - field.setReadOnly(true); field.addValueChangeListener(this); // Set the text color @@ -130,21 +126,63 @@ public class ColorPickerPreview extends CssLayout implements ColorSelector, @Override public void valueChange(ValueChangeEvent event) { String value = (String) event.getProperty().getValue(); - - if (!field.isValid()) { + try { + if (value != null) { + /* + * Description of supported formats see + * http://www.w3schools.com/cssref/css_colors_legal.asp + */ + if (value.length() == 7 && value.startsWith("#")) { + // CSS color format (e.g. #000000) + int red = Integer.parseInt(value.substring(1, 3), 16); + int green = Integer.parseInt(value.substring(3, 5), 16); + int blue = Integer.parseInt(value.substring(5, 7), 16); + color = new Color(red, green, blue); + + } else if (value.startsWith("rgb")) { + // RGB color format rgb/rgba(255,255,255,0.1) + String[] colors = value.substring(value.indexOf("(") + 1, + value.length() - 1).split(","); + + int red = Integer.parseInt(colors[0]); + int green = Integer.parseInt(colors[1]); + int blue = Integer.parseInt(colors[2]); + if (colors.length > 3) { + int alpha = (int) (Double.parseDouble(colors[3]) * 255d); + color = new Color(red, green, blue, alpha); + } else { + color = new Color(red, green, blue); + } + + } else if (value.startsWith("hsl")) { + // HSL color format hsl/hsla(100,50%,50%,1.0) + String[] colors = value.substring(value.indexOf("(") + 1, + value.length() - 1).split(","); + + int hue = Integer.parseInt(colors[0]); + int saturation = Integer.parseInt(colors[1] + .replace("%", "")); + int lightness = Integer + .parseInt(colors[2].replace("%", "")); + int rgb = Color.HSLtoRGB(hue, saturation, lightness); + + if (colors.length > 3) { + int alpha = (int) (Double.parseDouble(colors[3]) * 255d); + color = new Color(rgb); + color.setAlpha(alpha); + } else { + color = new Color(rgb); + } + } + + oldValue = value; + fireEvent(new ColorChangeEvent((Component) field.getData(), + color)); + } + + } catch (NumberFormatException nfe) { + // Revert value field.setValue(oldValue); - return; - } else { - oldValue = value; - } - - if (value != null && value.length() == 7) { - int red = Integer.parseInt(value.substring(1, 3), 16); - int green = Integer.parseInt(value.substring(3, 5), 16); - int blue = Integer.parseInt(value.substring(5, 7), 16); - color = new Color(red, green, blue); - - fireEvent(new ColorChangeEvent((Component) field.getData(), color)); } } @@ -155,4 +193,4 @@ public class ColorPickerPreview extends CssLayout implements ColorSelector, protected String getCss(Component c) { return "background: " + color.getCSS(); } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java index 263349c17c..8e441b25ee 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerSelect.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -230,4 +230,4 @@ public class ColorPickerSelect extends CustomComponent implements grid.setColorGrid(createColors(new Color(0, 0, 0xFF), 14, 10)); } } -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorSelector.java b/server/src/com/vaadin/ui/components/colorpicker/ColorSelector.java index 31ce2b2e5b..c282c22f62 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorSelector.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -40,4 +40,4 @@ public interface ColorSelector extends Serializable, HasColorChangeListener { * @return the color */ public Color getColor(); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/components/colorpicker/HasColorChangeListener.java b/server/src/com/vaadin/ui/components/colorpicker/HasColorChangeListener.java index c84a90bf6f..eb16d8cbbe 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/HasColorChangeListener.java +++ b/server/src/com/vaadin/ui/components/colorpicker/HasColorChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -33,4 +33,4 @@ public interface HasColorChangeListener extends Serializable { */ void removeColorChangeListener(ColorChangeListener listener); -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/themes/BaseTheme.java b/server/src/com/vaadin/ui/themes/BaseTheme.java index b2f4fd632e..9421cf2341 100644 --- a/server/src/com/vaadin/ui/themes/BaseTheme.java +++ b/server/src/com/vaadin/ui/themes/BaseTheme.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -55,4 +55,4 @@ public class BaseTheme { * overflow. */ public static final String CLIP = "v-clip"; -}
\ No newline at end of file +} diff --git a/server/src/com/vaadin/ui/themes/ChameleonTheme.java b/server/src/com/vaadin/ui/themes/ChameleonTheme.java index 3822540452..6e230c426e 100644 --- a/server/src/com/vaadin/ui/themes/ChameleonTheme.java +++ b/server/src/com/vaadin/ui/themes/ChameleonTheme.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/themes/LiferayTheme.java b/server/src/com/vaadin/ui/themes/LiferayTheme.java index 78e7d61244..de56be39ac 100644 --- a/server/src/com/vaadin/ui/themes/LiferayTheme.java +++ b/server/src/com/vaadin/ui/themes/LiferayTheme.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/themes/Reindeer.java b/server/src/com/vaadin/ui/themes/Reindeer.java index f823c54c2a..6eeebd8a03 100644 --- a/server/src/com/vaadin/ui/themes/Reindeer.java +++ b/server/src/com/vaadin/ui/themes/Reindeer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/ui/themes/Runo.java b/server/src/com/vaadin/ui/themes/Runo.java index 390aa9d893..11f1bae682 100644 --- a/server/src/com/vaadin/ui/themes/Runo.java +++ b/server/src/com/vaadin/ui/themes/Runo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/util/ConnectorHelper.java b/server/src/com/vaadin/util/ConnectorHelper.java index e698e9222a..b3457068c3 100644 --- a/server/src/com/vaadin/util/ConnectorHelper.java +++ b/server/src/com/vaadin/util/ConnectorHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/util/CurrentInstance.java b/server/src/com/vaadin/util/CurrentInstance.java index 4c62ef49be..00d2e7346d 100644 --- a/server/src/com/vaadin/util/CurrentInstance.java +++ b/server/src/com/vaadin/util/CurrentInstance.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/util/FileTypeResolver.java b/server/src/com/vaadin/util/FileTypeResolver.java index 8e8093b085..a49a0e2d01 100644 --- a/server/src/com/vaadin/util/FileTypeResolver.java +++ b/server/src/com/vaadin/util/FileTypeResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/util/ReflectTools.java b/server/src/com/vaadin/util/ReflectTools.java index 6fccd365fb..f56a68f223 100644 --- a/server/src/com/vaadin/util/ReflectTools.java +++ b/server/src/com/vaadin/util/ReflectTools.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/src/com/vaadin/util/SerializerHelper.java b/server/src/com/vaadin/util/SerializerHelper.java index 9d3ba56b82..793488d892 100644 --- a/server/src/com/vaadin/util/SerializerHelper.java +++ b/server/src/com/vaadin/util/SerializerHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/ClassInDefaultPackage.java b/server/tests/src/ClassInDefaultPackage.java index 1eb8bc4df5..52dc87e0e2 100644 --- a/server/tests/src/ClassInDefaultPackage.java +++ b/server/tests/src/ClassInDefaultPackage.java @@ -1,7 +1,7 @@ import org.junit.Ignore; /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java b/server/tests/src/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java index b319c13e4e..cc1de6560f 100644 --- a/server/tests/src/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java +++ b/server/tests/src/com/vaadin/data/DefaultFieldGroupFieldFactoryTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java b/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java index e11b6e50f8..951fc20c42 100644 --- a/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java +++ b/server/tests/src/com/vaadin/data/fieldgroup/FieldGroupDate.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java b/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java index b9633753b4..c7d992dbeb 100644 --- a/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java +++ b/server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java @@ -10,15 +10,8 @@ import java.util.Map; import junit.framework.Assert; -import org.easymock.Capture; -import org.easymock.EasyMock; - import com.vaadin.data.Container; -import com.vaadin.data.Container.Indexed.ItemAddEvent; -import com.vaadin.data.Container.Indexed.ItemRemoveEvent; -import com.vaadin.data.Container.ItemSetChangeListener; import com.vaadin.data.Item; -import com.vaadin.data.util.filter.Compare; /** * Test basic functionality of BeanItemContainer. @@ -734,182 +727,4 @@ public class BeanItemContainerTest extends AbstractBeanContainerTest { assertNull(container.getContainerProperty(john, "address.street") .getValue()); } - - public void testItemAddedEvent() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - Person bean = new Person("John"); - ItemSetChangeListener addListener = createListenerMockFor(container); - addListener.containerItemSetChange(EasyMock.isA(ItemAddEvent.class)); - EasyMock.replay(addListener); - - container.addItem(bean); - - EasyMock.verify(addListener); - } - - public void testItemAddedEvent_AddedItem() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - Person bean = new Person("John"); - ItemSetChangeListener addListener = createListenerMockFor(container); - Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener); - EasyMock.replay(addListener); - - container.addItem(bean); - - assertEquals(bean, capturedEvent.getValue().getFirstItemId()); - } - - public void testItemAddedEvent_addItemAt_IndexOfAddedItem() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - Person bean = new Person("John"); - container.addItem(bean); - ItemSetChangeListener addListener = createListenerMockFor(container); - Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener); - EasyMock.replay(addListener); - - container.addItemAt(1, new Person("")); - - assertEquals(1, capturedEvent.getValue().getFirstIndex()); - } - - public void testItemAddedEvent_addItemAfter_IndexOfAddedItem() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - Person bean = new Person("John"); - container.addItem(bean); - ItemSetChangeListener addListener = createListenerMockFor(container); - Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener); - EasyMock.replay(addListener); - - container.addItemAfter(bean, new Person("")); - - assertEquals(1, capturedEvent.getValue().getFirstIndex()); - } - - public void testItemAddedEvent_amountOfAddedItems() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - ItemSetChangeListener addListener = createListenerMockFor(container); - Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener); - EasyMock.replay(addListener); - List<Person> beans = Arrays.asList(new Person("Jack"), new Person( - "John")); - - container.addAll(beans); - - assertEquals(2, capturedEvent.getValue().getAddedItemsCount()); - } - - public void testItemAddedEvent_someItemsAreFiltered_amountOfAddedItemsIsReducedByAmountOfFilteredItems() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - ItemSetChangeListener addListener = createListenerMockFor(container); - Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener); - EasyMock.replay(addListener); - List<Person> beans = Arrays.asList(new Person("Jack"), new Person( - "John")); - container.addFilter(new Compare.Equal("name", "John")); - - container.addAll(beans); - - assertEquals(1, capturedEvent.getValue().getAddedItemsCount()); - } - - public void testItemAddedEvent_someItemsAreFiltered_addedItemIsTheFirstVisibleItem() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - Person bean = new Person("John"); - ItemSetChangeListener addListener = createListenerMockFor(container); - Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener); - EasyMock.replay(addListener); - List<Person> beans = Arrays.asList(new Person("Jack"), bean); - container.addFilter(new Compare.Equal("name", "John")); - - container.addAll(beans); - - assertEquals(bean, capturedEvent.getValue().getFirstItemId()); - } - - public void testItemRemovedEvent() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - Person bean = new Person("John"); - container.addItem(bean); - ItemSetChangeListener removeListener = createListenerMockFor(container); - removeListener.containerItemSetChange(EasyMock - .isA(ItemRemoveEvent.class)); - EasyMock.replay(removeListener); - - container.removeItem(bean); - - EasyMock.verify(removeListener); - } - - public void testItemRemovedEvent_RemovedItem() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - Person bean = new Person("John"); - container.addItem(bean); - ItemSetChangeListener removeListener = createListenerMockFor(container); - Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener); - EasyMock.replay(removeListener); - - container.removeItem(bean); - - assertEquals(bean, capturedEvent.getValue().getFirstItemId()); - } - - public void testItemRemovedEvent_indexOfRemovedItem() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - container.addItem(new Person("Jack")); - Person secondBean = new Person("John"); - container.addItem(secondBean); - ItemSetChangeListener removeListener = createListenerMockFor(container); - Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener); - EasyMock.replay(removeListener); - - container.removeItem(secondBean); - - assertEquals(1, capturedEvent.getValue().getFirstIndex()); - } - - public void testItemRemovedEvent_amountOfRemovedItems() { - BeanItemContainer<Person> container = new BeanItemContainer<Person>( - Person.class); - container.addItem(new Person("Jack")); - container.addItem(new Person("John")); - ItemSetChangeListener removeListener = createListenerMockFor(container); - Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener); - EasyMock.replay(removeListener); - - container.removeAllItems(); - - assertEquals(2, capturedEvent.getValue().getRemovedItemsCount()); - } - - private Capture<ItemAddEvent> captureAddEvent( - ItemSetChangeListener addListener) { - Capture<ItemAddEvent> capturedEvent = new Capture<ItemAddEvent>(); - addListener.containerItemSetChange(EasyMock.capture(capturedEvent)); - return capturedEvent; - } - - private Capture<ItemRemoveEvent> captureRemoveEvent( - ItemSetChangeListener removeListener) { - Capture<ItemRemoveEvent> capturedEvent = new Capture<ItemRemoveEvent>(); - removeListener.containerItemSetChange(EasyMock.capture(capturedEvent)); - return capturedEvent; - } - - private ItemSetChangeListener createListenerMockFor( - BeanItemContainer<Person> container) { - ItemSetChangeListener listener = EasyMock - .createNiceMock(ItemSetChangeListener.class); - container.addItemSetChangeListener(listener); - return listener; - } } diff --git a/server/tests/src/com/vaadin/data/util/MethodPropertyMemoryConsumption.java b/server/tests/src/com/vaadin/data/util/MethodPropertyMemoryConsumption.java index caff33cf50..ce0711a29e 100644 --- a/server/tests/src/com/vaadin/data/util/MethodPropertyMemoryConsumption.java +++ b/server/tests/src/com/vaadin/data/util/MethodPropertyMemoryConsumption.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java b/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java index 5da0bdc8a2..09e5a26c15 100644 --- a/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java +++ b/server/tests/src/com/vaadin/data/util/TestIndexedContainer.java @@ -4,12 +4,6 @@ import java.util.List; import junit.framework.Assert; -import org.easymock.Capture; -import org.easymock.EasyMock; - -import com.vaadin.data.Container.Indexed.ItemAddEvent; -import com.vaadin.data.Container.Indexed.ItemRemoveEvent; -import com.vaadin.data.Container.ItemSetChangeListener; import com.vaadin.data.Item; public class TestIndexedContainer extends AbstractInMemoryContainerTest { @@ -277,113 +271,6 @@ public class TestIndexedContainer extends AbstractInMemoryContainerTest { counter.assertNone(); } - public void testItemAddedEvent() { - IndexedContainer container = new IndexedContainer(); - ItemSetChangeListener addListener = createListenerMockFor(container); - addListener.containerItemSetChange(EasyMock.isA(ItemAddEvent.class)); - EasyMock.replay(addListener); - - container.addItem(); - - EasyMock.verify(addListener); - } - - public void testItemAddedEvent_AddedItem() { - IndexedContainer container = new IndexedContainer(); - ItemSetChangeListener addListener = createListenerMockFor(container); - Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener); - EasyMock.replay(addListener); - - Object itemId = container.addItem(); - - assertEquals(itemId, capturedEvent.getValue().getFirstItemId()); - } - - public void testItemAddedEvent_IndexOfAddedItem() { - IndexedContainer container = new IndexedContainer(); - ItemSetChangeListener addListener = createListenerMockFor(container); - container.addItem(); - Capture<ItemAddEvent> capturedEvent = captureAddEvent(addListener); - EasyMock.replay(addListener); - - container.addItemAt(1); - - assertEquals(1, capturedEvent.getValue().getFirstIndex()); - } - - public void testItemRemovedEvent() { - IndexedContainer container = new IndexedContainer(); - Object itemId = container.addItem(); - ItemSetChangeListener removeListener = createListenerMockFor(container); - removeListener.containerItemSetChange(EasyMock - .isA(ItemRemoveEvent.class)); - EasyMock.replay(removeListener); - - container.removeItem(itemId); - - EasyMock.verify(removeListener); - } - - public void testItemRemovedEvent_RemovedItem() { - IndexedContainer container = new IndexedContainer(); - Object itemId = container.addItem(); - ItemSetChangeListener removeListener = createListenerMockFor(container); - Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener); - EasyMock.replay(removeListener); - - container.removeItem(itemId); - - assertEquals(itemId, capturedEvent.getValue().getFirstItemId()); - } - - public void testItemRemovedEvent_indexOfRemovedItem() { - IndexedContainer container = new IndexedContainer(); - container.addItem(); - Object secondItemId = container.addItem(); - ItemSetChangeListener removeListener = createListenerMockFor(container); - Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener); - EasyMock.replay(removeListener); - - container.removeItem(secondItemId); - - assertEquals(1, capturedEvent.getValue().getFirstIndex()); - } - - public void testItemRemovedEvent_amountOfRemovedItems() { - IndexedContainer container = new IndexedContainer(); - container.addItem(); - container.addItem(); - ItemSetChangeListener removeListener = createListenerMockFor(container); - Capture<ItemRemoveEvent> capturedEvent = captureRemoveEvent(removeListener); - EasyMock.replay(removeListener); - - container.removeAllItems(); - - assertEquals(2, capturedEvent.getValue().getRemovedItemsCount()); - } - - private Capture<ItemAddEvent> captureAddEvent( - ItemSetChangeListener addListener) { - Capture<ItemAddEvent> capturedEvent = new Capture<ItemAddEvent>(); - addListener.containerItemSetChange(EasyMock.capture(capturedEvent)); - return capturedEvent; - } - - private Capture<ItemRemoveEvent> captureRemoveEvent( - ItemSetChangeListener removeListener) { - Capture<ItemRemoveEvent> capturedEvent = new Capture<ItemRemoveEvent>(); - removeListener.containerItemSetChange(EasyMock.capture(capturedEvent)); - return capturedEvent; - } - - private ItemSetChangeListener createListenerMockFor( - IndexedContainer container) { - ItemSetChangeListener listener = EasyMock - .createNiceMock(ItemSetChangeListener.class); - container.addItemSetChangeListener(listener); - return listener; - } - // Ticket 8028 public void testGetItemIdsRangeIndexOutOfBounds() { IndexedContainer ic = new IndexedContainer(); diff --git a/server/tests/src/com/vaadin/data/util/TransactionalPropertyWrapperTest.java b/server/tests/src/com/vaadin/data/util/TransactionalPropertyWrapperTest.java new file mode 100644 index 0000000000..5297cd807c --- /dev/null +++ b/server/tests/src/com/vaadin/data/util/TransactionalPropertyWrapperTest.java @@ -0,0 +1,116 @@ +/* + * Copyright 2000-2014 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.data.util; + +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; + +import com.vaadin.data.fieldgroup.FieldGroup; +import com.vaadin.ui.TextField; + +/** + * Test verifying that TransactionalPropertyWrapper removes it's listener from + * wrapped Property + * + * @since 7.1.15 + * @author Vaadin Ltd + */ +public class TransactionalPropertyWrapperTest { + + @SuppressWarnings("serial") + public class TestingProperty<T extends Object> extends + ObjectProperty<Object> { + + private List<ValueChangeListener> listeners = new ArrayList<ValueChangeListener>(); + + public TestingProperty(Object value) { + super(value); + } + + @Override + public void addValueChangeListener(ValueChangeListener listener) { + super.addValueChangeListener(listener); + listeners.add(listener); + } + + @Override + public void removeValueChangeListener(ValueChangeListener listener) { + super.removeValueChangeListener(listener); + if (listeners.contains(listener)) { + listeners.remove(listener); + } + } + + public boolean hasListeners() { + return !listeners.isEmpty(); + } + } + + private final TextField nameField = new TextField("Name"); + private final TextField ageField = new TextField("Age"); + private final TextField unboundField = new TextField("No FieldGroup"); + private final TestingProperty<String> unboundProp = new TestingProperty<String>( + "Hello World"); + private final PropertysetItem item = new PropertysetItem(); + + @Test + public void fieldGroupBindAndUnbind() { + item.addItemProperty("name", new TestingProperty<String>( + "Just some text")); + item.addItemProperty("age", new TestingProperty<String>("42")); + + final FieldGroup binder = new FieldGroup(item); + binder.setBuffered(false); + + for (int i = 0; i < 2; ++i) { + binder.bind(nameField, "name"); + binder.bind(ageField, "age"); + unboundField.setPropertyDataSource(unboundProp); + + assertTrue("No listeners in Properties", fieldsHaveListeners(true)); + + binder.unbind(nameField); + binder.unbind(ageField); + unboundField.setPropertyDataSource(null); + + assertTrue("Listeners in Properties after unbinding", + fieldsHaveListeners(false)); + } + } + + /** + * Check that all listeners have same hasListeners() response + * + * @param expected + * expected response + * @return true if all are the same as expected. false if not + */ + private boolean fieldsHaveListeners(boolean expected) { + for (Object id : item.getItemPropertyIds()) { + TestingProperty<?> itemProperty = (TestingProperty<?>) item + .getItemProperty(id); + + if (itemProperty.hasListeners() != expected) { + return false; + } + } + return unboundProp.hasListeners() == expected; + } +} diff --git a/server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java b/server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java index 15ad85e10d..b0c96b6f9c 100644 --- a/server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java +++ b/server/tests/src/com/vaadin/data/util/filter/LikeFilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java index 1e96d59ed5..e03e970048 100755 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -151,4 +151,4 @@ public class SQLTestsConstants { } } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/filters/CompareTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/filters/CompareTest.java index c8faa71e66..252acd81fc 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/filters/CompareTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/filters/CompareTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java index c275cd4363..f009fc505e 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java @@ -734,4 +734,4 @@ public class TableQueryTest { statement.execute(SQLTestsConstants.dropSchema); } } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/server/ConnectorResourceHandlerTest.java b/server/tests/src/com/vaadin/server/ConnectorResourceHandlerTest.java index 828c35ced3..a5746065d6 100644 --- a/server/tests/src/com/vaadin/server/ConnectorResourceHandlerTest.java +++ b/server/tests/src/com/vaadin/server/ConnectorResourceHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/DefaultDeploymentConfigurationTest.java b/server/tests/src/com/vaadin/server/DefaultDeploymentConfigurationTest.java index 45d9853537..7cbb73af17 100644 --- a/server/tests/src/com/vaadin/server/DefaultDeploymentConfigurationTest.java +++ b/server/tests/src/com/vaadin/server/DefaultDeploymentConfigurationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/JSONSerializerTest.java b/server/tests/src/com/vaadin/server/JSONSerializerTest.java index 81fd997c4a..8c1967acb3 100644 --- a/server/tests/src/com/vaadin/server/JSONSerializerTest.java +++ b/server/tests/src/com/vaadin/server/JSONSerializerTest.java @@ -1,7 +1,7 @@ package com.vaadin.server; /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/MockServletConfig.java b/server/tests/src/com/vaadin/server/MockServletConfig.java index cd1201c249..d9d0e4d773 100644 --- a/server/tests/src/com/vaadin/server/MockServletConfig.java +++ b/server/tests/src/com/vaadin/server/MockServletConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/MockServletContext.java b/server/tests/src/com/vaadin/server/MockServletContext.java index 40d79190f6..031c83ae90 100644 --- a/server/tests/src/com/vaadin/server/MockServletContext.java +++ b/server/tests/src/com/vaadin/server/MockServletContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/MockVaadinSession.java b/server/tests/src/com/vaadin/server/MockVaadinSession.java index 1fb53cd368..660767e0d4 100644 --- a/server/tests/src/com/vaadin/server/MockVaadinSession.java +++ b/server/tests/src/com/vaadin/server/MockVaadinSession.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/VaadinGateInRequestTests.java b/server/tests/src/com/vaadin/server/VaadinGateInRequestTests.java index 017613661e..4478b4cf39 100644 --- a/server/tests/src/com/vaadin/server/VaadinGateInRequestTests.java +++ b/server/tests/src/com/vaadin/server/VaadinGateInRequestTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTests.java b/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTests.java index 01d501c4fb..a87eb1870e 100644 --- a/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTests.java +++ b/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/VaadinLiferayRequestTests.java b/server/tests/src/com/vaadin/server/VaadinLiferayRequestTests.java index 074941a556..8ccd649ea4 100644 --- a/server/tests/src/com/vaadin/server/VaadinLiferayRequestTests.java +++ b/server/tests/src/com/vaadin/server/VaadinLiferayRequestTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -36,4 +36,4 @@ public class VaadinLiferayRequestTests extends return spy; } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/server/VaadinPortletServiceTests.java b/server/tests/src/com/vaadin/server/VaadinPortletServiceTests.java index 62befdc516..f7a69c2edb 100644 --- a/server/tests/src/com/vaadin/server/VaadinPortletServiceTests.java +++ b/server/tests/src/com/vaadin/server/VaadinPortletServiceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -20,8 +20,15 @@ import static org.hamcrest.core.Is.is; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import java.util.concurrent.locks.ReentrantLock; + +import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import org.mockito.Mockito; + +import com.vaadin.shared.ui.ui.UIConstants; +import com.vaadin.ui.UI; public class VaadinPortletServiceTests { @@ -188,4 +195,28 @@ public class VaadinPortletServiceTests { assertThat(widgetset, is("com.vaadin.portal.gwt.PortalDefaultWidgetSet")); } + + @Test + public void findUIDoesntThrowNPE() { + try { + ReentrantLock mockLock = Mockito.mock(ReentrantLock.class); + when(mockLock.isHeldByCurrentThread()).thenReturn(true); + + WrappedSession emptyWrappedSession = Mockito + .mock(WrappedSession.class); + when(emptyWrappedSession.getAttribute("null.lock")).thenReturn( + mockLock); + VaadinRequest requestWithUIIDSet = Mockito + .mock(VaadinRequest.class); + when(requestWithUIIDSet.getParameter(UIConstants.UI_ID_PARAMETER)) + .thenReturn("1"); + when(requestWithUIIDSet.getWrappedSession()).thenReturn( + emptyWrappedSession); + + UI ui = sut.findUI(requestWithUIIDSet); + Assert.assertNull("Unset session did not return null", ui); + } catch (NullPointerException e) { + Assert.fail("findUI threw a NullPointerException"); + } + } } diff --git a/server/tests/src/com/vaadin/server/VaadinPortletTests.java b/server/tests/src/com/vaadin/server/VaadinPortletTests.java index 93f8fd0778..f92aa0dcaa 100644 --- a/server/tests/src/com/vaadin/server/VaadinPortletTests.java +++ b/server/tests/src/com/vaadin/server/VaadinPortletTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/VaadinServiceTest.java b/server/tests/src/com/vaadin/server/VaadinServiceTest.java index 77eb155378..51325067d2 100644 --- a/server/tests/src/com/vaadin/server/VaadinServiceTest.java +++ b/server/tests/src/com/vaadin/server/VaadinServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java b/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java index 58b44dc3db..a5c683a119 100644 --- a/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java +++ b/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/VaadinServletTest.java b/server/tests/src/com/vaadin/server/VaadinServletTest.java index be21586be4..566c4ce70a 100644 --- a/server/tests/src/com/vaadin/server/VaadinServletTest.java +++ b/server/tests/src/com/vaadin/server/VaadinServletTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/VaadinSessionTest.java b/server/tests/src/com/vaadin/server/VaadinSessionTest.java index edc78ba8d7..d39da211f4 100644 --- a/server/tests/src/com/vaadin/server/VaadinSessionTest.java +++ b/server/tests/src/com/vaadin/server/VaadinSessionTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTests.java b/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTests.java index 0da85c7111..a1abfbd280 100644 --- a/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTests.java +++ b/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -36,4 +36,4 @@ public class VaadinWebSpherePortalRequestTests extends return spy; } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/server/communication/MetadataWriterTest.java b/server/tests/src/com/vaadin/server/communication/MetadataWriterTest.java new file mode 100644 index 0000000000..dee37ddc7f --- /dev/null +++ b/server/tests/src/com/vaadin/server/communication/MetadataWriterTest.java @@ -0,0 +1,95 @@ +/* + * Copyright 2000-2014 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.server.communication; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.io.StringWriter; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; + +import com.vaadin.server.SystemMessages; +import com.vaadin.server.VaadinSession; +import com.vaadin.server.WrappedSession; +import com.vaadin.ui.UI; + +public class MetadataWriterTest { + + private UI ui; + private VaadinSession session; + private StringWriter writer; + private SystemMessages messages; + + @Before + public void setup() { + ui = Mockito.mock(UI.class); + session = Mockito.mock(VaadinSession.class); + Mockito.when(ui.getSession()).thenReturn(session); + writer = new StringWriter(); + messages = Mockito.mock(SystemMessages.class); + } + + private void disableSessionExpirationMessages(SystemMessages messages) { + when(messages.isSessionExpiredNotificationEnabled()).thenReturn(true); + when(messages.getSessionExpiredMessage()).thenReturn(null); + when(messages.getSessionExpiredCaption()).thenReturn(null); + } + + @Test + public void writeAsyncTag() throws Exception { + new MetadataWriter().write(ui, writer, false, true, messages); + Assert.assertEquals("{\"async\":true}", writer.getBuffer().toString()); + } + + @Test + public void writeRepaintTag() throws Exception { + new MetadataWriter().write(ui, writer, true, false, messages); + Assert.assertEquals("{\"repaintAll\":true}", writer.getBuffer() + .toString()); + } + + @Test + public void writeRepaintAndAsyncTag() throws Exception { + new MetadataWriter().write(ui, writer, true, true, messages); + Assert.assertEquals("{\"repaintAll\":true, \"async\":true}", writer + .getBuffer().toString()); + } + + @Test + public void writeRedirectWithExpiredSession() throws Exception { + disableSessionExpirationMessages(messages); + + new MetadataWriter().write(ui, writer, false, false, messages); + Assert.assertEquals("{}", writer.getBuffer().toString()); + } + + @Test + public void writeRedirectWithActiveSession() throws Exception { + WrappedSession wrappedSession = mock(WrappedSession.class); + when(session.getSession()).thenReturn(wrappedSession); + + disableSessionExpirationMessages(messages); + + new MetadataWriter().write(ui, writer, false, false, messages); + Assert.assertEquals( + "{\"timedRedirect\":{\"interval\":15,\"url\":\"\"}}", writer + .getBuffer().toString()); + } +} diff --git a/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java b/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java index 306e2f0405..32c9dc6604 100644 --- a/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java +++ b/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestAnyEnumToStringConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestAnyEnumToStringConverter.java index e21382069f..64b06f651e 100644 --- a/server/tests/src/com/vaadin/tests/data/converter/TestAnyEnumToStringConverter.java +++ b/server/tests/src/com/vaadin/tests/data/converter/TestAnyEnumToStringConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestSpecificEnumToStringConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestSpecificEnumToStringConverter.java index 8ce7b8eab8..75c742775f 100644 --- a/server/tests/src/com/vaadin/tests/data/converter/TestSpecificEnumToStringConverter.java +++ b/server/tests/src/com/vaadin/tests/data/converter/TestSpecificEnumToStringConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToBigDecimalConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestStringToBigDecimalConverter.java index 5db33691b6..b8e74c7572 100644 --- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToBigDecimalConverter.java +++ b/server/tests/src/com/vaadin/tests/data/converter/TestStringToBigDecimalConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java b/server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java index 18e2ed06c0..3210703445 100644 --- a/server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java +++ b/server/tests/src/com/vaadin/tests/data/converter/TestStringToLongConverter.java @@ -51,7 +51,7 @@ public class TestStringToLongConverter extends TestCase { String.class, Locale.ENGLISH); Assert.assertEquals("9,223,372,036,854,775,807", str); str = reverseConverter.convertToModel(Long.MIN_VALUE, String.class, - null); + Locale.ENGLISH); Assert.assertEquals("-9,223,372,036,854,775,808", str); } diff --git a/server/tests/src/com/vaadin/tests/event/EventRouterTest.java b/server/tests/src/com/vaadin/tests/event/EventRouterTest.java index dbbeaf778e..aeb460c49e 100644 --- a/server/tests/src/com/vaadin/tests/event/EventRouterTest.java +++ b/server/tests/src/com/vaadin/tests/event/EventRouterTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/TestAssertionsEnabled.java b/server/tests/src/com/vaadin/tests/server/TestAssertionsEnabled.java index f94cff391f..7e120cb9dd 100644 --- a/server/tests/src/com/vaadin/tests/server/TestAssertionsEnabled.java +++ b/server/tests/src/com/vaadin/tests/server/TestAssertionsEnabled.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/TestClientMethodSerialization.java b/server/tests/src/com/vaadin/tests/server/TestClientMethodSerialization.java index 1e0210dc63..41b71a37fa 100644 --- a/server/tests/src/com/vaadin/tests/server/TestClientMethodSerialization.java +++ b/server/tests/src/com/vaadin/tests/server/TestClientMethodSerialization.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/TestSerialization.java b/server/tests/src/com/vaadin/tests/server/TestSerialization.java index a52821a919..3c18035dab 100644 --- a/server/tests/src/com/vaadin/tests/server/TestSerialization.java +++ b/server/tests/src/com/vaadin/tests/server/TestSerialization.java @@ -136,4 +136,4 @@ public class TestSerialization extends TestCase { return dummyGetter; } } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/tests/server/component/ComponentSizeParseTest.java b/server/tests/src/com/vaadin/tests/server/component/ComponentSizeParseTest.java index 11c0d10998..2083d1f473 100644 --- a/server/tests/src/com/vaadin/tests/server/component/ComponentSizeParseTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/ComponentSizeParseTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplace.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplace.java new file mode 100644 index 0000000000..fd951f1692 --- /dev/null +++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/LayoutSettingsOnReplace.java @@ -0,0 +1,85 @@ +/* + * Copyright 2000-2014 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.tests.server.component.abstractorderedlayout; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.ui.AbstractComponent; +import com.vaadin.ui.AbstractOrderedLayout; +import com.vaadin.ui.Alignment; + +/** + * Tests for abstract layout settings which should be preserved on replace + * component + * + * @since 7.2 + * @author Vaadin Ltd + */ +public class LayoutSettingsOnReplace { + + @Test + public void testExpandRatio() { + AbstractOrderedLayout layout = new AbstractOrderedLayout() { + }; + + AbstractComponent first = new AbstractComponent() { + }; + AbstractComponent second = new AbstractComponent() { + }; + + layout.addComponent(first); + layout.addComponent(second); + + int ratio = 2; + layout.setExpandRatio(first, ratio); + layout.setExpandRatio(second, 1); + + AbstractComponent replace = new AbstractComponent() { + }; + layout.replaceComponent(first, replace); + + Assert.assertEquals("Expand ratio for replaced component is not " + + "the same as for previous one", ratio, + layout.getExpandRatio(replace), 0.0001); + } + + @Test + public void testAlignment() { + AbstractOrderedLayout layout = new AbstractOrderedLayout() { + }; + + AbstractComponent first = new AbstractComponent() { + }; + AbstractComponent second = new AbstractComponent() { + }; + + layout.addComponent(first); + layout.addComponent(second); + + Alignment alignment = Alignment.BOTTOM_RIGHT; + layout.setComponentAlignment(first, alignment); + layout.setComponentAlignment(second, Alignment.MIDDLE_CENTER); + + AbstractComponent replace = new AbstractComponent() { + }; + layout.replaceComponent(first, replace); + + Assert.assertEquals("Alignment for replaced component is not " + + "the same as for previous one", alignment, + layout.getComponentAlignment(replace)); + } +} diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/TestRemoveFromParentLocking.java b/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/TestRemoveFromParentLocking.java index 26443ead2b..fd4a1df766 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/TestRemoveFromParentLocking.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/TestRemoveFromParentLocking.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarBasics.java b/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarBasics.java index 5926cfa1ca..ab2bc7c8c0 100644 --- a/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarBasics.java +++ b/server/tests/src/com/vaadin/tests/server/component/calendar/CalendarBasics.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/component/calendar/ContainerDataSource.java b/server/tests/src/com/vaadin/tests/server/component/calendar/ContainerDataSource.java index 2bc95e371c..030abc0eb2 100644 --- a/server/tests/src/com/vaadin/tests/server/component/calendar/ContainerDataSource.java +++ b/server/tests/src/com/vaadin/tests/server/component/calendar/ContainerDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -25,6 +25,7 @@ import org.junit.Test; import com.vaadin.data.Container.Indexed; import com.vaadin.data.Container.Sortable; import com.vaadin.data.Item; +import com.vaadin.data.Property; import com.vaadin.data.util.BeanItemContainer; import com.vaadin.data.util.IndexedContainer; import com.vaadin.ui.Calendar; @@ -327,6 +328,37 @@ public class ContainerDataSource extends TestCase { assertEquals(0, calendar.getEvents(start, end).size()); } + @Test + public void testStyleNamePropertyRetrieved() { + IndexedContainer ic = (IndexedContainer) createTestIndexedContainer(); + ic.addContainerProperty("testStyleName", String.class, ""); + for (int i = 0; i < 10; i++) { + Item item = ic.getItem(ic.getIdByIndex(i)); + @SuppressWarnings("unchecked") + Property<String> itemProperty = item + .getItemProperty("testStyleName"); + itemProperty.setValue("testStyle"); + } + + ContainerEventProvider provider = new ContainerEventProvider(ic); + provider.setCaptionProperty("testCaption"); + provider.setDescriptionProperty("testDescription"); + provider.setStartDateProperty("testStartDate"); + provider.setEndDateProperty("testEndDate"); + provider.setStyleNameProperty("testStyleName"); + + calendar.setEventProvider(provider); + java.util.Calendar cal = java.util.Calendar.getInstance(); + Date now = cal.getTime(); + cal.add(java.util.Calendar.DAY_OF_MONTH, 20); + Date then = cal.getTime(); + List<CalendarEvent> events = calendar.getEventProvider().getEvents(now, + then); + for (CalendarEvent ce : events) { + assertEquals("testStyle", ce.getStyleName()); + } + } + private static Indexed createTestBeanItemContainer() { BeanItemContainer<CalendarEvent> eventContainer = new BeanItemContainer<CalendarEvent>( CalendarEvent.class); diff --git a/server/tests/src/com/vaadin/tests/server/component/colorpicker/ColorConversions.java b/server/tests/src/com/vaadin/tests/server/component/colorpicker/ColorConversions.java new file mode 100644 index 0000000000..46d72a6ae6 --- /dev/null +++ b/server/tests/src/com/vaadin/tests/server/component/colorpicker/ColorConversions.java @@ -0,0 +1,57 @@ +/* + * Copyright 2000-2014 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.tests.server.component.colorpicker; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +import com.vaadin.shared.ui.colorpicker.Color; + +public class ColorConversions { + + @Test + public void convertHSL2RGB() { + + int rgb = Color.HSLtoRGB(100, 50, 50); + Color c = new Color(rgb); + assertEquals(106, c.getRed()); + assertEquals(191, c.getGreen()); + assertEquals(64, c.getBlue()); + assertEquals("#6abf40", c.getCSS()); + + rgb = Color.HSLtoRGB(0, 50, 50); + c = new Color(rgb); + assertEquals(191, c.getRed()); + assertEquals(64, c.getGreen()); + assertEquals(64, c.getBlue()); + assertEquals("#bf4040", c.getCSS()); + + rgb = Color.HSLtoRGB(50, 0, 50); + c = new Color(rgb); + assertEquals(128, c.getRed()); + assertEquals(128, c.getGreen()); + assertEquals(128, c.getBlue()); + assertEquals("#808080", c.getCSS()); + + rgb = Color.HSLtoRGB(50, 100, 0); + c = new Color(rgb); + assertEquals(0, c.getRed(), 0); + assertEquals(0, c.getGreen(), 0); + assertEquals(0, c.getBlue(), 0); + assertEquals("#000000", c.getCSS()); + } +} diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutListeners.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutListeners.java index 21a48888d6..ee75d6ed59 100644 --- a/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutListeners.java +++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/CssLayoutListeners.java @@ -10,4 +10,4 @@ public class CssLayoutListeners extends AbstractListenerMethodsTest { testListenerAddGetRemove(CssLayout.class, LayoutClickEvent.class, LayoutClickListener.class); } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldConverterTest.java b/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldConverterTest.java index 25ee0a38a9..f5467b2d18 100644 --- a/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldConverterTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/datefield/DateFieldConverterTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java index e571576990..ea34d8b04e 100644 --- a/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java +++ b/server/tests/src/com/vaadin/tests/server/component/fieldgroup/CaseInsensitiveBinding.java @@ -82,4 +82,4 @@ public class CaseInsensitiveBinding { assertTrue("This".equals(form.firstName.getValue())); } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java b/server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java index 9d71db89a6..e6cecee1bf 100644 --- a/server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java +++ b/server/tests/src/com/vaadin/tests/server/component/label/LabelConverters.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/component/select/SelectListeners.java b/server/tests/src/com/vaadin/tests/server/component/select/SelectListeners.java index c7703303d3..2a1cc0deb0 100644 --- a/server/tests/src/com/vaadin/tests/server/component/select/SelectListeners.java +++ b/server/tests/src/com/vaadin/tests/server/component/select/SelectListeners.java @@ -17,4 +17,4 @@ public class SelectListeners extends AbstractListenerMethodsTest { testListenerAddGetRemove(Select.class, BlurEvent.class, BlurListener.class); } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableListeners.java b/server/tests/src/com/vaadin/tests/server/component/table/TableListeners.java index 6cc522f8c7..fbe5bb3146 100644 --- a/server/tests/src/com/vaadin/tests/server/component/table/TableListeners.java +++ b/server/tests/src/com/vaadin/tests/server/component/table/TableListeners.java @@ -38,4 +38,4 @@ public class TableListeners extends AbstractListenerMethodsTest { testListenerAddGetRemove(Table.class, ColumnReorderEvent.class, ColumnReorderListener.class); } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TablePropertyValueConverter.java b/server/tests/src/com/vaadin/tests/server/component/table/TablePropertyValueConverter.java new file mode 100644 index 0000000000..418ca333bc --- /dev/null +++ b/server/tests/src/com/vaadin/tests/server/component/table/TablePropertyValueConverter.java @@ -0,0 +1,380 @@ +/* + * Copyright 2000-2013 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.tests.server.component.table; + +import java.lang.reflect.Field; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Locale; +import java.util.Map.Entry; +import java.util.Set; + +import junit.framework.TestCase; + +import org.junit.Test; + +import com.vaadin.data.Container; +import com.vaadin.data.Item; +import com.vaadin.data.Property; +import com.vaadin.data.util.IndexedContainer; +import com.vaadin.data.util.converter.Converter; +import com.vaadin.ui.Table; + +/** + * + * @since + * @author Vaadin Ltd + */ +public class TablePropertyValueConverter extends TestCase { + protected TestableTable table; + protected Collection<?> initialProperties; + + @Test + public void testRemovePropertyId() { + Collection<Object> converters = table.getCurrentConverters(); + assertTrue("Set of converters was empty at the start.", + converters.size() > 0); + + Object firstId = converters.iterator().next(); + + table.removeContainerProperty(firstId); + + Collection<Object> converters2 = table.getCurrentConverters(); + assertTrue("FirstId was not removed", !converters2.contains(firstId)); + + assertTrue("The number of removed converters was not one.", + converters.size() - converters2.size() == 1); + + for (Object originalId : converters) { + if (!originalId.equals(firstId)) { + assertTrue("The wrong converter was removed.", + converters2.contains(originalId)); + } + } + + } + + @Test + public void testSetContainer() { + table.setContainerDataSource(createContainer(new String[] { "col1", + "col3", "col4", "col5" })); + Collection<Object> converters = table.getCurrentConverters(); + assertTrue("There should only have been one converter left.", + converters.size() == 1); + Object onlyKey = converters.iterator().next(); + assertTrue("The incorrect key was left.", onlyKey.equals("col1")); + + } + + @Test + public void testSetContainerWithInexactButCompatibleTypes() { + TestableTable customTable = new TestableTable("Test table", + createContainer(new String[] { "col1", "col2", "col3" }, + new Class[] { String.class, BaseClass.class, + DerivedClass.class })); + customTable.setConverter("col1", new Converter<String, String>() { + private static final long serialVersionUID = 1L; + + @Override + public String convertToModel(String value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return "model"; + } + + @Override + public String convertToPresentation(String value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return "presentation"; + } + + @Override + public Class<String> getModelType() { + return String.class; + } + + @Override + public Class<String> getPresentationType() { + return String.class; + } + + }); + customTable.setConverter("col2", new Converter<String, BaseClass>() { + private static final long serialVersionUID = 1L; + + @Override + public BaseClass convertToModel(String value, + Class<? extends BaseClass> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return new BaseClass("model"); + } + + @Override + public Class<BaseClass> getModelType() { + return BaseClass.class; + } + + @Override + public Class<String> getPresentationType() { + return String.class; + } + + @Override + public String convertToPresentation(BaseClass value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return null; + } + }); + customTable.setConverter("col3", new Converter<String, DerivedClass>() { + private static final long serialVersionUID = 1L; + + @Override + public DerivedClass convertToModel(String value, + Class<? extends DerivedClass> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return new DerivedClass("derived" + 1001); + } + + @Override + public Class<DerivedClass> getModelType() { + return DerivedClass.class; + } + + @Override + public Class<String> getPresentationType() { + return String.class; + } + + @Override + public String convertToPresentation(DerivedClass value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return null; + } + }); + customTable.setContainerDataSource(createContainer(new String[] { + "col1", "col2", "col3" }, new Class[] { DerivedClass.class, + DerivedClass.class, BaseClass.class })); + Set<Object> converters = customTable.getCurrentConverters(); + // TODO Test temporarily disabled as this feature + // is not yet implemented in Table + /* + * assertTrue("Incompatible types were not removed.", converters.size() + * <= 1); assertTrue("Even compatible types were removed", + * converters.size() == 1); assertTrue("Compatible type was missing.", + * converters.contains("col2")); + */ + } + + @Test + public void testPrimitiveTypeConverters() { + TestableTable customTable = new TestableTable("Test table", + createContainer(new String[] { "col1", "col2", "col3" }, + new Class[] { int.class, BaseClass.class, + DerivedClass.class })); + customTable.setConverter("col1", new Converter<String, Integer>() { + private static final long serialVersionUID = 1L; + + @Override + public Integer convertToModel(String value, + Class<? extends Integer> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return 11; + } + + @Override + public String convertToPresentation(Integer value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return "presentation"; + } + + @Override + public Class<Integer> getModelType() { + return Integer.class; + } + + @Override + public Class<String> getPresentationType() { + return String.class; + } + }); + Set<Object> converters = customTable.getCurrentConverters(); + assertTrue("Converter was not set.", converters.size() > 0); + } + + @Test + public void testInheritance() { + assertTrue("BaseClass isn't assignable from DerivedClass", + BaseClass.class.isAssignableFrom(DerivedClass.class)); + assertFalse("DerivedClass is assignable from BaseClass", + DerivedClass.class.isAssignableFrom(BaseClass.class)); + } + + @Override + public void setUp() { + table = new TestableTable("Test table", createContainer(new String[] { + "col1", "col2", "col3" })); + table.setConverter("col1", new Converter<String, String>() { + private static final long serialVersionUID = 1L; + + @Override + public String convertToModel(String value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return "model"; + } + + @Override + public String convertToPresentation(String value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return "presentation"; + } + + @Override + public Class<String> getModelType() { + return String.class; + } + + @Override + public Class<String> getPresentationType() { + return String.class; + } + + }); + + table.setConverter("col2", new Converter<String, String>() { + private static final long serialVersionUID = 1L; + + @Override + public String convertToModel(String value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return "model2"; + } + + @Override + public String convertToPresentation(String value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.data.util.converter.Converter.ConversionException { + return "presentation2"; + } + + @Override + public Class<String> getModelType() { + return String.class; + } + + @Override + public Class<String> getPresentationType() { + return String.class; + } + + }); + + initialProperties = table.getContainerPropertyIds(); + } + + private static Container createContainer(Object[] ids) { + Class[] types = new Class[ids.length]; + for (int i = 0; i < types.length; ++i) { + types[i] = String.class; + } + return createContainer(ids, types); + } + + private static Container createContainer(Object[] ids, Class[] types) { + IndexedContainer container = new IndexedContainer(); + if (ids.length > types.length) { + throw new IllegalArgumentException("Too few defined types"); + } + for (int i = 0; i < ids.length; ++i) { + container.addContainerProperty(ids[i], types[i], ""); + } + + for (int i = 0; i < 100; i++) { + Item item = container.addItem("item " + i); + for (int j = 0; j < ids.length; ++j) { + Property itemProperty = item.getItemProperty(ids[j]); + if (types[j] == String.class) { + itemProperty.setValue(ids[j].toString() + i); + } else if (types[j] == BaseClass.class) { + itemProperty.setValue(new BaseClass("base" + i)); + } else if (types[j] == DerivedClass.class) { + itemProperty.setValue(new DerivedClass("derived" + i)); + } else if (types[j] == int.class) { + // FIXME can't set values because the int is autoboxed into + // an Integer and not unboxed prior to set + + // itemProperty.setValue(i); + } else { + throw new IllegalArgumentException( + "Unhandled type in createContainer: " + types[j]); + } + } + } + + return container; + } + + private class TestableTable extends Table { + /** + * @param string + * @param createContainer + */ + public TestableTable(String string, Container container) { + super(string, container); + } + + Set<Object> getCurrentConverters() { + try { + Field f = Table.class + .getDeclaredField("propertyValueConverters"); + f.setAccessible(true); + HashMap<Object, Converter<String, Object>> pvc = (HashMap<Object, Converter<String, Object>>) f + .get(this); + Set<Object> currentConverters = new HashSet<Object>(); + for (Entry<Object, Converter<String, Object>> entry : pvc + .entrySet()) { + currentConverters.add(entry.getKey()); + } + return currentConverters; + + } catch (Exception e) { + fail("Unable to retrieve propertyValueConverters"); + return null; + } + } + } + + private static class BaseClass { + private String title; + + public BaseClass(String title) { + this.title = title; + } + } + + private static class DerivedClass extends BaseClass { + public DerivedClass(String title) { + super(title); + } + } +} diff --git a/server/tests/src/com/vaadin/tests/server/component/tree/TreeListeners.java b/server/tests/src/com/vaadin/tests/server/component/tree/TreeListeners.java index e14ebe739d..8d5b499264 100644 --- a/server/tests/src/com/vaadin/tests/server/component/tree/TreeListeners.java +++ b/server/tests/src/com/vaadin/tests/server/component/tree/TreeListeners.java @@ -24,4 +24,4 @@ public class TreeListeners extends AbstractListenerMethodsTest { testListenerAddGetRemove(Tree.class, CollapseEvent.class, CollapseListener.class); } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/tests/server/component/window/WindowAttach.java b/server/tests/src/com/vaadin/tests/server/component/window/WindowAttach.java index f9c93d307b..586300f650 100644 --- a/server/tests/src/com/vaadin/tests/server/component/window/WindowAttach.java +++ b/server/tests/src/com/vaadin/tests/server/component/window/WindowAttach.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/component/window/WindowTest.java b/server/tests/src/com/vaadin/tests/server/component/window/WindowTest.java new file mode 100644 index 0000000000..b74896b7a1 --- /dev/null +++ b/server/tests/src/com/vaadin/tests/server/component/window/WindowTest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2000-2014 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.tests.server.component.window; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import com.vaadin.ui.Button; +import com.vaadin.ui.Label; +import com.vaadin.ui.Window; + +public class WindowTest { + + public Window window; + + @Before + public void setup() { + window = new Window(); + } + + @Test + public void testAssistiveDescription() { + Label l1 = new Label("label 1"); + Button b2 = new Button("button 2"); + window.setAssistiveDescription(l1, b2); + + Assert.assertEquals(2, window.getAssistiveDescription().length); + Assert.assertEquals(l1, window.getAssistiveDescription()[0]); + Assert.assertEquals(b2, window.getAssistiveDescription()[1]); + + // Modifying return value must not change actual value + window.getAssistiveDescription()[0] = null; + + Assert.assertEquals(2, window.getAssistiveDescription().length); + Assert.assertEquals(l1, window.getAssistiveDescription()[0]); + Assert.assertEquals(b2, window.getAssistiveDescription()[1]); + + } +} diff --git a/server/tests/src/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java b/server/tests/src/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java index 89cb352b6f..bc067ddb88 100644 --- a/server/tests/src/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java +++ b/server/tests/src/com/vaadin/tests/server/navigator/ClassBasedViewProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java b/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java index 5dc28757a7..ff6028648e 100644 --- a/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java +++ b/server/tests/src/com/vaadin/tests/server/navigator/NavigatorTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java b/server/tests/src/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java index 4be34707e4..85de106e23 100644 --- a/server/tests/src/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java +++ b/server/tests/src/com/vaadin/tests/server/navigator/UriFragmentManagerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/tests/util/UniqueSerializableTest.java b/server/tests/src/com/vaadin/tests/util/UniqueSerializableTest.java index db9b5c02fa..abdc6c1a5c 100644 --- a/server/tests/src/com/vaadin/tests/util/UniqueSerializableTest.java +++ b/server/tests/src/com/vaadin/tests/util/UniqueSerializableTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/ui/LabelDataSource.java b/server/tests/src/com/vaadin/ui/LabelDataSource.java index 21d3e56d57..b57e83df8e 100644 --- a/server/tests/src/com/vaadin/ui/LabelDataSource.java +++ b/server/tests/src/com/vaadin/ui/LabelDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 diff --git a/server/tests/src/com/vaadin/ui/UIInitReinitTest.java b/server/tests/src/com/vaadin/ui/UIInitRefreshTest.java index f8ec0e68c2..e4b31ca487 100644 --- a/server/tests/src/com/vaadin/ui/UIInitReinitTest.java +++ b/server/tests/src/com/vaadin/ui/UIInitRefreshTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 @@ -27,10 +27,10 @@ import com.vaadin.server.Page.UriFragmentChangedEvent; import com.vaadin.server.Page.UriFragmentChangedListener; import com.vaadin.server.VaadinRequest; -public class UIInitReinitTest { +public class UIInitRefreshTest { private boolean initCalled; - private boolean reinitCalled; + private boolean refreshCalled; private boolean fragmentChangeCalled; private boolean browserWindowResizeCalled; @@ -52,8 +52,8 @@ public class UIInitReinitTest { } @Override - protected void reinit(VaadinRequest request) { - reinitCalled = true; + protected void refresh(VaadinRequest request) { + refreshCalled = true; Assert.assertEquals("bar", getPage().getUriFragment()); Assert.assertEquals(200, getPage().getBrowserWindowWidth()); @@ -79,7 +79,7 @@ public class UIInitReinitTest { @Before public void setUp() { - initCalled = reinitCalled = fragmentChangeCalled = browserWindowResizeCalled = false; + initCalled = refreshCalled = fragmentChangeCalled = browserWindowResizeCalled = false; } @Test @@ -107,9 +107,9 @@ public class UIInitReinitTest { Assert.assertFalse(fragmentChangeCalled); Assert.assertFalse(browserWindowResizeCalled); - ui.doReinit(reinitRequest); + ui.doRefresh(reinitRequest); - Assert.assertTrue(reinitCalled); + Assert.assertTrue(refreshCalled); Assert.assertTrue(fragmentChangeCalled); Assert.assertTrue(browserWindowResizeCalled); } diff --git a/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java b/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java index 540ffb852d..25f8ba7796 100644 --- a/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java +++ b/server/tests/src/com/vaadin/util/ReflectToolsGetFieldValueByType.java @@ -60,4 +60,4 @@ public class ReflectToolsGetFieldValueByType { } catch (Exception e) { } } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java b/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java index 1e1fafe31c..690f77d9a5 100644 --- a/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java +++ b/server/tests/src/com/vaadin/util/ReflectToolsGetPrimitiveFieldValue.java @@ -23,4 +23,4 @@ public class ReflectToolsGetPrimitiveFieldValue { } assertFalse(fieldValue instanceof Boolean); } -}
\ No newline at end of file +} diff --git a/server/tests/src/com/vaadin/util/TestCurrentInstance.java b/server/tests/src/com/vaadin/util/TestCurrentInstance.java index 09ef9514e5..666a0ef019 100644 --- a/server/tests/src/com/vaadin/util/TestCurrentInstance.java +++ b/server/tests/src/com/vaadin/util/TestCurrentInstance.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 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 |