Commits

Anonymous committed 08e4f39

Vaadin module moved to TheseFoolishThings.

  • Participants
  • Parent commits 4170859

Comments (0)

Files changed (11)

modules/Vaadin/pom.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>it.tidalwave.bluebill</groupId>
-        <artifactId>bluebill-stats-modules</artifactId>
-        <version>1.0-ALPHA-6-SNAPSHOT</version>
-        <relativePath>..</relativePath>
-    </parent>
-
-    <groupId>it.tidalwave.vaadin</groupId>
-    <artifactId>it-tidalwave-ui-vaadin</artifactId>
-    <version>1.0.2-SNAPSHOT</version>
-    <packaging>jar</packaging>
-    <name>Vaadin Enhancements</name>
-    <description>Vaadin Enhancements</description>
-    
-    <dependencies>
-        <dependency>
-            <groupId>com.vaadin</groupId>
-            <artifactId>vaadin</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>it.tidalwave.thesefoolishthings</groupId>
-            <artifactId>it-tidalwave-util</artifactId>
-        </dependency>
-    </dependencies>
-    
-</project>

modules/Vaadin/src/main/java/it/tidalwave/ui/vaadin/FormattedItemDecorator.java

-/***********************************************************************************************************************
- *
- * blueBill Stats
- * Copyright (C) 2011-2011 by Tidalwave s.a.s. (http://www.tidalwave.it)
- *
- ***********************************************************************************************************************
- *
- * Licensed under the Apache 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.
- *
- ***********************************************************************************************************************
- *
- * WWW: http://bluebill.tidalwave.it/mobile/
- * SCM: http://java.net/hg/bluebill-server~stats-src
- *
- **********************************************************************************************************************/
-package it.tidalwave.ui.vaadin;
-
-import java.util.Collection;
-import javax.annotation.Nonnull;
-import java.util.HashMap;
-import java.util.Map;
-import java.text.Format;
-import com.vaadin.data.Item;
-import com.vaadin.data.Property;
-import lombok.Delegate;
-
-/***********************************************************************************************************************
- * 
- * @author  Fabrizio Giudici
- * @version $Id$
- *
- **********************************************************************************************************************/
-public class FormattedItemDecorator implements Item 
-  {
-//    @Delegate(types=Item.class) @Nonnull
-    private final Item delegate;
-    
-    private final Map<Object, Format> formatMapByPropertyId = new HashMap<Object, Format>();
-
-    public FormattedItemDecorator (final @Nonnull Item delegate, final @Nonnull Map<Object, Format> formatMapByPropertyId)
-      {
-        this.delegate = delegate;
-        this.formatMapByPropertyId.putAll(formatMapByPropertyId);
-      }   
-    
-    @Override @Nonnull
-    public Property getItemProperty (final @Nonnull Object propertyId) 
-      {
-        return new FormattedPropertyDecorator(delegate.getItemProperty(propertyId), formatMapByPropertyId.get(propertyId));
-      }
-
-    public boolean removeItemProperty(Object id) throws UnsupportedOperationException {
-        return delegate.removeItemProperty(id);
-    }
-
-    public Collection<?> getItemPropertyIds() {
-        return delegate.getItemPropertyIds();
-    }
-
-    public boolean addItemProperty(Object id, Property property) throws UnsupportedOperationException {
-        return delegate.addItemProperty(id, property);
-    }
-  }

modules/Vaadin/src/main/java/it/tidalwave/ui/vaadin/FormattedPropertyDecorator.java

-/***********************************************************************************************************************
- *
- * blueBill Stats
- * Copyright (C) 2011-2011 by Tidalwave s.a.s. (http://www.tidalwave.it)
- *
- ***********************************************************************************************************************
- *
- * Licensed under the Apache 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.
- *
- ***********************************************************************************************************************
- *
- * WWW: http://bluebill.tidalwave.it/mobile/
- * SCM: http://java.net/hg/bluebill-server~stats-src
- *
- **********************************************************************************************************************/
-package it.tidalwave.ui.vaadin;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-import java.text.Format;
-import com.vaadin.data.Property;
-import lombok.Delegate;
-import lombok.RequiredArgsConstructor;
-
-/***********************************************************************************************************************
- * 
- * @author  Fabrizio Giudici
- * @version $Id$
- *
- **********************************************************************************************************************/
-@RequiredArgsConstructor
-public class FormattedPropertyDecorator implements Property
-  {
-    @Delegate(types=Property.class) @Nonnull
-    private final Property delegate;
-    
-    @Nullable 
-    private final Format format;
-    
-    @Override @Nonnull
-    public String toString() 
-      {
-        return (format == null) ? delegate.getValue().toString() : (format.format(delegate.getValue()));
-      }
-  }

modules/Vaadin/src/main/java/it/tidalwave/ui/vaadin/HeaderLabelProvider.java

-/***********************************************************************************************************************
- *
- * blueBill Stats
- * Copyright (C) 2011-2011 by Tidalwave s.a.s. (http://www.tidalwave.it)
- *
- ***********************************************************************************************************************
- *
- * Licensed under the Apache 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.
- *
- ***********************************************************************************************************************
- *
- * WWW: http://bluebill.tidalwave.it/mobile/
- * SCM: http://java.net/hg/bluebill-server~stats-src
- *
- **********************************************************************************************************************/
-package it.tidalwave.ui.vaadin;
-
-import javax.annotation.Nonnull;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.MissingResourceException;
-import com.vaadin.data.Container;
-import org.openide.util.NbBundle;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-
-/***********************************************************************************************************************
- *
- * A provider of table header labels based on resource bundles. It asks a delegate {@link Container} the property ids
- * and looks them up in the bundleLabel, prefixed by {@code header.}. For instance, if the {@code Container} return the ids
- * {@code firstName}, {@code lastName}, the bundle must contain:
- * 
- * <pre>
- * headerLabel.firstName: First name
- * headerLabel.lastName:  Last name
- * </pre>
- * 
- * @author  Fabrizio Giudici
- * @version $Id$
- *
- **********************************************************************************************************************/
-@RequiredArgsConstructor @Slf4j 
-public class HeaderLabelProvider
-  {
-    private static final String PREFIX = "headerLabel.";
-    
-    @Nonnull
-    private final Container container;  
-    
-    @Nonnull
-    private final Class<?> bundleClass;
-    
-    /*******************************************************************************************************************
-     *
-     * Returns the labels for the table headers.
-     * 
-     * @return  the labels
-     *
-     ******************************************************************************************************************/
-    @Nonnull
-    public List<String> getHeaderLabels() 
-      {
-        final List<String> headerLabels = new ArrayList<String>();
-        
-        for (final Object propertyId : container.getContainerPropertyIds())
-          {
-            final String bundleId = PREFIX + propertyId;
-            String label = propertyId.toString();
-                    
-            try
-              {
-                label = NbBundle.getMessage(bundleClass, bundleId);
-              }
-            catch (MissingResourceException e)
-              {
-                log.warn("Can't find bundle for {} in class {}", bundleId, bundleClass);
-              }
-            
-            headerLabels.add(label);
-          }
-        
-        return headerLabels;
-      }
-  }  

modules/Vaadin/src/main/java/it/tidalwave/ui/vaadin/IndexedContainerSupport.java

-/***********************************************************************************************************************
- *
- * blueBill Stats
- * Copyright (C) 2011-2011 by Tidalwave s.a.s. (http://www.tidalwave.it)
- *
- ***********************************************************************************************************************
- *
- * Licensed under the Apache 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.
- *
- ***********************************************************************************************************************
- *
- * WWW: http://bluebill.tidalwave.it/mobile/
- * SCM: http://java.net/hg/bluebill-server~stats-src
- *
- **********************************************************************************************************************/
-package it.tidalwave.ui.vaadin;
-
-import javax.annotation.Nonnull;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CopyOnWriteArrayList;
-import com.vaadin.data.Container;
-import com.vaadin.data.Container.Indexed;
-import com.vaadin.data.Item;
-import com.vaadin.data.Property;
-
-/***********************************************************************************************************************
- *
- * A support, partial implementation of an {@link Indexed} {@link Container}.
- * 
- * @stereotype Adapter
- * 
- * @author  Fabrizio Giudici
- * @author  based on LazyQyeryFinder by Tommi S.E. Laukkanen
- * @version $Id$
- *
- **********************************************************************************************************************/
-public abstract class IndexedContainerSupport implements Container, Indexed
-  {
-    private static final long serialVersionUID = 65363534234233L;
-    
-    @Nonnull
-    protected final Class<?> datumType;
-    
-    private final List<Object> propertyIds = new ArrayList<Object>();
-            
-    private final Map<Object, Class> propertyTypeMap = new HashMap<Object, Class>();
-
-    /*******************************************************************************************************************
-     *
-     *
-     ******************************************************************************************************************/
-    public IndexedContainerSupport (final @Nonnull Class<?> datumType)
-      {
-        this.datumType = datumType;
-      }
-    
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue)
-      {
-        propertyIds.add(propertyId);
-        propertyTypeMap.put(propertyId, type);
-        return false; // TODO
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public boolean removeContainerProperty (final @Nonnull Object propertyId) 
-      {
-        propertyIds.remove(propertyId);
-        propertyTypeMap.remove(propertyId);
-        return false; // TODO
-      }
-    
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Collection<?> getContainerPropertyIds() 
-      {
-        return new CopyOnWriteArrayList<Object>(propertyIds);
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Class<?> getType (final @Nonnull Object propertyId) 
-      {
-        return propertyTypeMap.get(propertyId);
-      } 
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Collection<?> getItemIds() 
-      {
-        final List<Object> result = new ArrayList<Object>();
-        
-        for (int i = 0; i < size() - 1; i++)
-          {
-            result.add(i);
-          }
-        
-        return result;
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Property getContainerProperty (final Object itemId, final Object propertyId)
-      {
-        return getItem(itemId).getItemProperty(propertyId);
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Object getIdByIndex (final int index) 
-      {
-        return index;
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final int indexOfId (final Object itemId) 
-      {
-        return (Integer) itemId;
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final boolean containsId (final Object itemId)
-      {
-        if (itemId.getClass() == Integer.class) 
-          {
-            final int index = (Integer)itemId;
-            return (index >= 0) && (index < size());
-          }
-        else 
-          {
-            return false;
-          }
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final boolean isFirstId (final Object itemId) 
-      {
-        if (itemId.getClass() == Integer.class) 
-          {
-            return (Integer) itemId == 0;
-          }
-        else
-          {
-            return false;
-          }          
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final boolean isLastId (final Object itemId)
-      {
-        if (itemId.getClass() == Integer.class) 
-          {
-            return (Integer) itemId == size() - 1;
-          }
-        else 
-          {
-            return false;
-          }        
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Object firstItemId() 
-      {
-        return 0;
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Object lastItemId() 
-      {
-        return size() - 1;
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Object nextItemId (final Object itemId)
-      {
-        return (Integer)itemId + 1;
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Object prevItemId (final Object itemId)
-      {
-        return (Integer)itemId - 1;
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Object addItemAt (final int index) 
-      {
-        throw new UnsupportedOperationException();
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Object addItemAfter (final Object previousItemId)
-      {
-        throw new UnsupportedOperationException();
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Item addItemAt (final int index, final Object newItemId) 
-      {
-        throw new UnsupportedOperationException();
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Item addItemAfter (final Object previousItemId, final Object newItemId) 
-      {
-        throw new UnsupportedOperationException();
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Item addItem (final Object itemId) 
-      {
-        throw new UnsupportedOperationException();
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final Object addItem() 
-      {
-        throw new UnsupportedOperationException();
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final boolean removeItem (final Object itemId)
-      {
-        throw new UnsupportedOperationException();
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override
-    public final boolean removeAllItems()
-      {
-        throw new UnsupportedOperationException();
-      }
-  }

modules/Vaadin/src/main/java/it/tidalwave/ui/vaadin/ReadOnlyPresentationModelContainer.java

-/***********************************************************************************************************************
- *
- * blueBill Stats
- * Copyright (C) 2011-2011 by Tidalwave s.a.s. (http://www.tidalwave.it)
- *
- ***********************************************************************************************************************
- *
- * Licensed under the Apache 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.
- *
- ***********************************************************************************************************************
- *
- * WWW: http://bluebill.tidalwave.it/mobile/
- * SCM: http://java.net/hg/bluebill-server~stats-src
- *
- **********************************************************************************************************************/
-package it.tidalwave.ui.vaadin;
-
-import javax.annotation.Nonnegative;
-import javax.annotation.Nonnull;
-import java.util.Collections;
-import java.util.List;
-import java.util.HashMap;
-import java.util.Map;
-import java.text.Format;
-import it.tidalwave.util.Finder;
-import it.tidalwave.util.spi.SimpleFinderSupport;
-import it.tidalwave.role.Composite;
-import it.tidalwave.role.ui.PresentationModel;
-import com.vaadin.data.Container;
-import com.vaadin.data.Item;
-import com.vaadin.data.util.BeanItem;
-import lombok.extern.slf4j.Slf4j;
-
-/***********************************************************************************************************************
- *
- * An adapter between {@link PresentationModel} and {@link Container}.
- * 
- * @stereotype Adapter
- * 
- * @author  Fabrizio Giudici
- * @author based on LazyQyeryFinder by Tommi S.E. Laukkanen
- * @version $Id$
- *
- **********************************************************************************************************************/
-@Slf4j
-public class ReadOnlyPresentationModelContainer extends IndexedContainerSupport 
-  {
-    private static final long serialVersionUID = 345346356345349283L;
-    
-    // TODO: move to Finder
-    private static final Finder<PresentationModel> EMPTY_FINDER = new SimpleFinderSupport<PresentationModel>("EMPTY_FINDER") 
-      {
-        @Override  @Nonnull
-        protected List<? extends PresentationModel> computeResults()
-          {
-            return Collections.emptyList();
-          }
-      };
-    
-    @Nonnull
-    private final Finder<PresentationModel> finder;
-    
-    private final int batchSize = 20;
-
-    private final Map<Object, Format> formatMapByPropertyId = new HashMap<Object, Format>();    
-    
-    /*******************************************************************************************************************
-     *
-     * Creates an empty instance for the given datum type.
-     * 
-     * @param  datumType   the datum type
-     *
-     ******************************************************************************************************************/
-    public ReadOnlyPresentationModelContainer (final @Nonnull Class<?> datumType)
-      {
-        super(datumType);
-        this.finder = EMPTY_FINDER;
-      }
-
-    /*******************************************************************************************************************
-     *
-     * Creates an instance for the given {@link PresentationModel} and datum type.
-     * 
-     * @param  presentationModel   the {@code PresentationModel}
-     * @param  datumType           the datum type
-     *
-     ******************************************************************************************************************/
-    public ReadOnlyPresentationModelContainer (final @Nonnull PresentationModel presentationModel,
-                                               final @Nonnull Class<?> datumType) 
-      {
-        super(datumType);
-        this.finder = presentationModel.as(Composite.class).findChildren();
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override @Nonnegative
-    public final int size() 
-      {
-        return finder.count();
-      }
-
-    /*******************************************************************************************************************
-     *
-     * {@inheritDoc}
-     *
-     ******************************************************************************************************************/
-    @Override @Nonnull
-    public final Item getItem (final @Nonnull Object itemId)
-      {
-        final int index = (Integer) itemId;
-        final int baseIndex = index - index % batchSize;
-        final PresentationModel pm = finder.from(baseIndex).max(batchSize).results().get(index - baseIndex);
-        final Object object = pm.as(datumType);
-        return new FormattedItemDecorator(new BeanItem<Object>(object), formatMapByPropertyId);
-      }
-    
-    public void registerPropertyFormat (final @Nonnull Object propertyId, final @Nonnull Format format)
-      {
-        formatMapByPropertyId.put(propertyId, format);      
-      }
-  }

modules/Vaadin/src/main/java/it/tidalwave/ui/vaadin/TableModel.java

-/***********************************************************************************************************************
- *
- * blueBill Stats
- * Copyright (C) 2011-2011 by Tidalwave s.a.s. (http://www.tidalwave.it)
- *
- ***********************************************************************************************************************
- *
- * Licensed under the Apache 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.
- *
- ***********************************************************************************************************************
- *
- * WWW: http://bluebill.tidalwave.it/mobile/
- * SCM: http://java.net/hg/bluebill-server~stats-src
- *
- **********************************************************************************************************************/
-package it.tidalwave.ui.vaadin;
-
-import javax.annotation.Nonnull;
-import java.util.List;
-import it.tidalwave.util.NotFoundException;
-import com.vaadin.data.Container;
-
-/***********************************************************************************************************************
- *
- * This class extends {@link Container} to provide all the required data to populate a {@link Table}, such as the 
- * header labels and so on.
- * 
- * @stereotype  Model
- *
- * @author  Fabrizio Giudici
- * @version $Id$
- *
- **********************************************************************************************************************/
-public interface TableModel extends Container
-  {
-    /*******************************************************************************************************************
-     *
-     * Returns the labels for the table headers. For a convenient implementation, delegate to 
-     * {@link HeaderLabelProvider}.
-     * 
-     * @return                     the labels
-     * @throws  NotFoundException  if the {@code Table} must not have header labels 
-     *
-     ******************************************************************************************************************/
-    @Nonnull
-    public List<String> getHeaderLabels()
-      throws NotFoundException; 
-  }

modules/Vaadin/src/main/java/it/tidalwave/ui/vaadin/VaadinBindings.java

-/***********************************************************************************************************************
- *
- * blueBill Stats
- * Copyright (C) 2011-2011 by Tidalwave s.a.s. (http://www.tidalwave.it)
- *
- ***********************************************************************************************************************
- *
- * Licensed under the Apache 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.
- *
- ***********************************************************************************************************************
- *
- * WWW: http://bluebill.tidalwave.it/mobile/
- * SCM: http://java.net/hg/bluebill-server~stats-src
- *
- **********************************************************************************************************************/
-package it.tidalwave.ui.vaadin;
-
-import javax.annotation.Nonnull;
-import com.vaadin.ui.Table;
-import it.tidalwave.util.NotFoundException;
-import lombok.NoArgsConstructor;
-import static lombok.AccessLevel.PRIVATE;
-
-/***********************************************************************************************************************
- *
- * @author  Fabrizio Giudici
- * @version $Id$
- *
- **********************************************************************************************************************/
-@NoArgsConstructor(access=PRIVATE)
-public final class VaadinBindings 
-  {
-    /*******************************************************************************************************************
-     *
-     *
-     ******************************************************************************************************************/
-    public static void bind (final @Nonnull Table table, final @Nonnull TableModel tableModel)
-      {
-        table.setContainerDataSource(tableModel);
-        
-        try 
-          {
-            table.setColumnHeaders(tableModel.getHeaderLabels().toArray(new String[0]));
-          } 
-        catch (NotFoundException e) 
-          {
-             table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
-          }
-      }
-  }

modules/VaadinWebapp/pom.xml

         </dependency>
         
         <dependency>
-            <groupId>it.tidalwave.vaadin</groupId>
+            <groupId>it.tidalwave.thesefoolishthings</groupId>
             <artifactId>it-tidalwave-ui-vaadin</artifactId>
         </dependency>
         <dependency>
             </dependency>
             <dependency>
                 <groupId>it.tidalwave.superpom</groupId>
-                <artifactId>platform12</artifactId>
+                <artifactId>platform13</artifactId>
                 <version>${netbeans.version}</version>
                 <type>pom</type>
                 <scope>import</scope>
     <modules>
         <module>Commons</module>
         <module>TestCommons</module>
-        <module>Vaadin</module>
         <module>Core</module>
         <module>JPA</module>
         <module>Rest</module>
     <parent>
         <groupId>it.tidalwave.superpom</groupId>
         <artifactId>superpom</artifactId>
-        <version>1.6</version>
+        <version>1.11</version>
     </parent>
 
     <groupId>it.tidalwave.bluebill</groupId>
         <javax.validation-api.version>1.0.0.GA</javax.validation-api.version>
         <org.springframework.version>3.0.5.RELEASE</org.springframework.version>
         <openbluesky.version>0.12</openbluesky.version>
-        <thesefoolishthings.version>1.17.1</thesefoolishthings.version>
-        <netbeans.version>RELEASE691</netbeans.version>
+        <thesefoolishthings.version>1.21-SNAPSHOT</thesefoolishthings.version>
+        <netbeans.version>RELEASE70</netbeans.version>
         <slf4j.version>1.6.1</slf4j.version>
         <logback.version>0.9.28</logback.version>
         <jersey.version>1.8</jersey.version>
                 <version>1.0.2-SNAPSHOT</version>
             </dependency>
             <dependency>
-                <groupId>it.tidalwave.vaadin</groupId>
-                <artifactId>it-tidalwave-ui-vaadin</artifactId>
-                <version>1.0.2-SNAPSHOT</version>
-            </dependency>
-            <dependency>
                 <groupId>it.tidalwave.bluebill</groupId>
                 <artifactId>it-tidalwave-bluebill-stats-core</artifactId>
                 <version>1.0.6-SNAPSHOT</version>