diff options
-rw-r--r-- | src/com/vaadin/data/util/BeanItem.java | 2 | ||||
-rw-r--r-- | src/com/vaadin/data/util/DefaultItemSorter.java | 4 | ||||
-rw-r--r-- | src/com/vaadin/data/util/IndexedContainer.java | 4 | ||||
-rw-r--r-- | src/com/vaadin/data/util/PropertysetItem.java | 4 | ||||
-rw-r--r-- | src/com/vaadin/data/util/QueryContainer.java | 3 | ||||
-rw-r--r-- | src/com/vaadin/data/util/filter/Compare.java | 2 | ||||
-rw-r--r-- | src/com/vaadin/data/util/filter/IsNull.java | 2 | ||||
-rw-r--r-- | src/com/vaadin/data/util/filter/SimpleStringFilter.java | 2 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java | 2 | ||||
-rw-r--r-- | src/com/vaadin/ui/AbstractSelect.java | 8 | ||||
-rw-r--r-- | src/com/vaadin/ui/Form.java | 44 | ||||
-rw-r--r-- | src/com/vaadin/ui/Table.java | 30 |
12 files changed, 54 insertions, 53 deletions
diff --git a/src/com/vaadin/data/util/BeanItem.java b/src/com/vaadin/data/util/BeanItem.java index 595a0ae93b..a69c23f377 100644 --- a/src/com/vaadin/data/util/BeanItem.java +++ b/src/com/vaadin/data/util/BeanItem.java @@ -164,7 +164,7 @@ public class BeanItem<BT> extends PropertysetItem { final Method getMethod = pd.getReadMethod(); if ((getMethod != null) && getMethod.getDeclaringClass() != Object.class) { - VaadinPropertyDescriptor<BT> vaadinPropertyDescriptor = new MethodPropertyDescriptor( + VaadinPropertyDescriptor<BT> vaadinPropertyDescriptor = new MethodPropertyDescriptor<BT>( pd.getName(), pd.getPropertyType(), pd.getReadMethod(), pd.getWriteMethod()); pdMap.put(pd.getName(), vaadinPropertyDescriptor); diff --git a/src/com/vaadin/data/util/DefaultItemSorter.java b/src/com/vaadin/data/util/DefaultItemSorter.java index 7167253339..68886c8343 100644 --- a/src/com/vaadin/data/util/DefaultItemSorter.java +++ b/src/com/vaadin/data/util/DefaultItemSorter.java @@ -122,8 +122,8 @@ public class DefaultItemSorter implements ItemSorter { Item item1, Item item2) { // Get the properties to compare - final Property property1 = item1.getItemProperty(propertyId); - final Property property2 = item2.getItemProperty(propertyId); + final Property<?> property1 = item1.getItemProperty(propertyId); + final Property<?> property2 = item2.getItemProperty(propertyId); // Get the values to compare final Object value1 = (property1 == null) ? null : property1.getValue(); diff --git a/src/com/vaadin/data/util/IndexedContainer.java b/src/com/vaadin/data/util/IndexedContainer.java index a6e03970cc..79d9d89b90 100644 --- a/src/com/vaadin/data/util/IndexedContainer.java +++ b/src/com/vaadin/data/util/IndexedContainer.java @@ -76,7 +76,7 @@ public class IndexedContainer extends /** * Set of properties that are read-only. */ - private HashSet<Property> readOnlyProperties = new HashSet<Property>(); + private HashSet<Property<?>> readOnlyProperties = new HashSet<Property<?>>(); /** * List of all Property value change event listeners listening all the @@ -1053,7 +1053,7 @@ public class IndexedContainer extends getPropertySetChangeListeners()) : null); nc.propertyValueChangeListeners = propertyValueChangeListeners != null ? (LinkedList<Property.ValueChangeListener>) propertyValueChangeListeners .clone() : null; - nc.readOnlyProperties = readOnlyProperties != null ? (HashSet<Property>) readOnlyProperties + nc.readOnlyProperties = readOnlyProperties != null ? (HashSet<Property<?>>) readOnlyProperties .clone() : null; nc.singlePropertyValueChangeListeners = singlePropertyValueChangeListeners != null ? (Hashtable<Object, Map<Object, List<Property.ValueChangeListener>>>) singlePropertyValueChangeListeners .clone() : null; diff --git a/src/com/vaadin/data/util/PropertysetItem.java b/src/com/vaadin/data/util/PropertysetItem.java index 09d12dd9a0..6224d3a01c 100644 --- a/src/com/vaadin/data/util/PropertysetItem.java +++ b/src/com/vaadin/data/util/PropertysetItem.java @@ -34,7 +34,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier, /** * Mapping from property id to property. */ - private HashMap<Object, Property> map = new HashMap<Object, Property>(); + private HashMap<Object, Property<?>> map = new HashMap<Object, Property<?>>(); /** * List of all property ids to maintain the order. @@ -262,7 +262,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier, npsi.list = list != null ? (LinkedList<Object>) list.clone() : null; npsi.propertySetChangeListeners = propertySetChangeListeners != null ? (LinkedList<PropertySetChangeListener>) propertySetChangeListeners .clone() : null; - npsi.map = (HashMap<Object, Property>) map.clone(); + npsi.map = (HashMap<Object, Property<?>>) map.clone(); return npsi; } diff --git a/src/com/vaadin/data/util/QueryContainer.java b/src/com/vaadin/data/util/QueryContainer.java index 0d94e35bb4..10e308f43c 100644 --- a/src/com/vaadin/data/util/QueryContainer.java +++ b/src/com/vaadin/data/util/QueryContainer.java @@ -136,7 +136,8 @@ public class QueryContainer implements Container, Container.Ordered, for (int i = 1; i <= count; i++) { final String columnName = metadata.getColumnName(i); list.add(columnName); - final Property p = getContainerProperty(new Integer(1), columnName); + final Property<?> p = getContainerProperty(new Integer(1), + columnName); propertyTypes.put(columnName, p == null ? Object.class : p.getType()); } diff --git a/src/com/vaadin/data/util/filter/Compare.java b/src/com/vaadin/data/util/filter/Compare.java index 754c119812..6fefb9fde2 100644 --- a/src/com/vaadin/data/util/filter/Compare.java +++ b/src/com/vaadin/data/util/filter/Compare.java @@ -228,7 +228,7 @@ public abstract class Compare implements Filter { } public boolean passesFilter(Object itemId, Item item) { - final Property p = item.getItemProperty(getPropertyId()); + final Property<?> p = item.getItemProperty(getPropertyId()); if (null == p) { return false; } diff --git a/src/com/vaadin/data/util/filter/IsNull.java b/src/com/vaadin/data/util/filter/IsNull.java index 6fc959f310..38d25df06a 100644 --- a/src/com/vaadin/data/util/filter/IsNull.java +++ b/src/com/vaadin/data/util/filter/IsNull.java @@ -35,7 +35,7 @@ public final class IsNull implements Filter { public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException { - final Property p = item.getItemProperty(getPropertyId()); + final Property<?> p = item.getItemProperty(getPropertyId()); if (null == p) { return false; } diff --git a/src/com/vaadin/data/util/filter/SimpleStringFilter.java b/src/com/vaadin/data/util/filter/SimpleStringFilter.java index 0dbf1fc43b..cffe10afd6 100644 --- a/src/com/vaadin/data/util/filter/SimpleStringFilter.java +++ b/src/com/vaadin/data/util/filter/SimpleStringFilter.java @@ -40,7 +40,7 @@ public final class SimpleStringFilter implements Filter { } public boolean passesFilter(Object itemId, Item item) { - final Property p = item.getItemProperty(propertyId); + final Property<?> p = item.getItemProperty(propertyId); if (p == null) { return false; } diff --git a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java index c952623156..63c9453798 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java @@ -1520,7 +1520,7 @@ public abstract class AbstractCommunicationManager implements if (owner instanceof AbstractField) { try { - handled = ((AbstractField) owner).handleError(errorEvent); + handled = ((AbstractField<?>) owner).handleError(errorEvent); } catch (Exception handlerException) { /* * If there is an error in the component error handler we pass diff --git a/src/com/vaadin/ui/AbstractSelect.java b/src/com/vaadin/ui/AbstractSelect.java index d4bf600651..0343419cf1 100644 --- a/src/com/vaadin/ui/AbstractSelect.java +++ b/src/com/vaadin/ui/AbstractSelect.java @@ -1078,7 +1078,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements break; case ITEM_CAPTION_MODE_PROPERTY: - final Property p = getContainerProperty(itemId, + final Property<?> p = getContainerProperty(itemId, getItemCaptionPropertyId()); if (p != null) { Object value = p.getValue(); @@ -1129,7 +1129,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements return null; } - final Property ip = getContainerProperty(itemId, + final Property<?> ip = getContainerProperty(itemId, getItemIconPropertyId()); if (ip == null) { return null; @@ -1708,7 +1708,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements Collection<?> pids = i.getItemPropertyIds(); if (pids != null) { for (Iterator<?> it = pids.iterator(); it.hasNext();) { - Property p = i.getItemProperty(it.next()); + Property<?> p = i.getItemProperty(it.next()); if (p != null && p instanceof Property.ValueChangeNotifier) { ((Property.ValueChangeNotifier) p) @@ -1720,7 +1720,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements } break; case ITEM_CAPTION_MODE_PROPERTY: - final Property p = getContainerProperty(itemId, + final Property<?> p = getContainerProperty(itemId, getItemCaptionPropertyId()); if (p != null && p instanceof Property.ValueChangeNotifier) { ((Property.ValueChangeNotifier) p) diff --git a/src/com/vaadin/ui/Form.java b/src/com/vaadin/ui/Form.java index 464ee3e60f..ed83649453 100644 --- a/src/com/vaadin/ui/Form.java +++ b/src/com/vaadin/ui/Form.java @@ -99,12 +99,12 @@ public class Form extends AbstractField<Object> implements Item.Editor, /** * Mapping from propertyName to corresponding field. */ - private final HashMap<Object, Field> fields = new HashMap<Object, Field>(); + private final HashMap<Object, Field<?>> fields = new HashMap<Object, Field<?>>(); /** * Form may act as an Item, its own properties are stored here. */ - private final HashMap<Object, Property> ownProperties = new HashMap<Object, Property>(); + private final HashMap<Object, Property<?>> ownProperties = new HashMap<Object, Property<?>>(); /** * Field factory for this form. @@ -242,7 +242,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, field.getCaption()); } break; - } else if (f instanceof Field && !((Field) f).isValid()) { + } else if (f instanceof Field && !((Field<?>) f).isValid()) { // Something is wrong with the field, but no proper // error is given. Generate one. validationError = new Validator.InvalidValueException( @@ -321,7 +321,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, // Try to commit all for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) { try { - final Field f = (fields.get(i.next())); + final Field<?> f = (fields.get(i.next())); // Commit only non-readonly fields. if (!f.isReadOnly()) { f.commit(); @@ -408,7 +408,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, @Override public boolean isModified() { for (final Iterator<Object> i = propertyIds.iterator(); i.hasNext();) { - final Field f = fields.get(i.next()); + final Field<?> f = fields.get(i.next()); if (f != null && f.isModified()) { return true; } @@ -485,7 +485,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, ownProperties.put(id, property); // Gets suitable field - final Field field = fieldFactory.createField(this, id, this); + final Field<?> field = fieldFactory.createField(this, id, this); if (field == null) { return false; } @@ -536,7 +536,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, * @param field * the Field that should be registered */ - private void registerField(Object propertyId, Field field) { + private void registerField(Object propertyId, Field<?> field) { if (propertyId == null || field == null) { return; } @@ -600,12 +600,12 @@ public class Form extends AbstractField<Object> implements Item.Editor, * @see com.vaadin.data.Item#getItemProperty(Object) */ public Property getItemProperty(Object id) { - final Field field = fields.get(id); + final Field<?> field = fields.get(id); if (field == null) { // field does not exist or it is not (yet) created for this property return ownProperties.get(id); } - final Property property = field.getPropertyDataSource(); + final Property<?> property = field.getPropertyDataSource(); if (property != null) { return property; @@ -637,7 +637,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, public boolean removeItemProperty(Object id) { ownProperties.remove(id); - final Field field = fields.get(id); + final Field<?> field = fields.get(id); if (field != null) { propertyIds.remove(id); @@ -750,9 +750,9 @@ public class Form extends AbstractField<Object> implements Item.Editor, // Adds all the properties to this form for (final Iterator<?> i = propertyIds.iterator(); i.hasNext();) { final Object id = i.next(); - final Property property = itemDatasource.getItemProperty(id); + final Property<?> property = itemDatasource.getItemProperty(id); if (id != null && property != null) { - final Field f = fieldFactory.createField(itemDatasource, id, + final Field<?> f = fieldFactory.createField(itemDatasource, id, this); if (f != null) { f.setPropertyDataSource(property); @@ -802,7 +802,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, if (layout != null) { final Object[] properties = propertyIds.toArray(); for (int i = 0; i < properties.length; i++) { - Field f = getField(properties[i]); + Field<?> f = getField(properties[i]); detachField(f); if (newLayout instanceof CustomLayout) { ((CustomLayout) newLayout).addComponent(f, @@ -849,7 +849,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, } // Gets the old field - final Field oldField = fields.get(propertyId); + final Field<?> oldField = fields.get(propertyId); if (oldField == null) { throw new IllegalArgumentException("Field with given propertyid '" + propertyId.toString() + "' can not be found."); @@ -926,7 +926,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, } // Sets the property data source - final Property property = oldField.getPropertyDataSource(); + final Property<?> property = oldField.getPropertyDataSource(); oldField.setPropertyDataSource(null); newField.setPropertyDataSource(property); @@ -1133,7 +1133,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, if (getItemPropertyIds() != null) { for (Object id : getItemPropertyIds()) { if (id != null) { - Field field = getField(id); + Field<?> field = getField(id); if (field.isEnabled() && !field.isReadOnly()) { return field; } @@ -1222,7 +1222,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, */ @Override public void focus() { - final Field f = getFirstFocusableField(); + final Field<?> f = getFirstFocusableField(); if (f != null) { f.focus(); } @@ -1248,8 +1248,8 @@ public class Form extends AbstractField<Object> implements Item.Editor, @Override public void setImmediate(boolean immediate) { super.setImmediate(immediate); - for (Iterator<Field> i = fields.values().iterator(); i.hasNext();) { - Field f = i.next(); + for (Iterator<Field<?>> i = fields.values().iterator(); i.hasNext();) { + Field<?> f = i.next(); if (f instanceof AbstractComponent) { ((AbstractComponent) f).setImmediate(immediate); } @@ -1260,10 +1260,10 @@ public class Form extends AbstractField<Object> implements Item.Editor, @Override protected boolean isEmpty() { - for (Iterator<Field> i = fields.values().iterator(); i.hasNext();) { - Field f = i.next(); + for (Iterator<Field<?>> i = fields.values().iterator(); i.hasNext();) { + Field<?> f = i.next(); if (f instanceof AbstractField) { - if (!((AbstractField) f).isEmpty()) { + if (!((AbstractField<?>) f).isEmpty()) { return false; } } diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index 5fa63531bb..c97d8588da 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -309,7 +309,7 @@ public class Table extends AbstractSelect implements Action.Container, * Set of properties listened - the list is kept to release the listeners * later. */ - private HashSet<Property> listenedProperties = null; + private HashSet<Property<?>> listenedProperties = null; /** * Set of visible components - the is used for needsRepaint calculation. @@ -404,7 +404,7 @@ public class Table extends AbstractSelect implements Action.Container, private RowGenerator rowGenerator = null; - private final Map<Field, Property> associatedProperties = new HashMap<Field, Property>(); + private final Map<Field<?>, Property<?>> associatedProperties = new HashMap<Field<?>, Property<?>>(); private boolean painted = false; @@ -1718,13 +1718,13 @@ public class Table extends AbstractSelect implements Action.Container, final Object[] colids = getVisibleColumns(); final int cols = colids.length; - HashSet<Property> oldListenedProperties = listenedProperties; + HashSet<Property<?>> oldListenedProperties = listenedProperties; HashSet<Component> oldVisibleComponents = visibleComponents; if (replaceListeners) { // initialize the listener collections, this should only be done if // the entire cache is refreshed (through refreshRenderedCells) - listenedProperties = new HashSet<Property>(); + listenedProperties = new HashSet<Property<?>>(); visibleComponents = new HashSet<Component>(); } @@ -1784,7 +1784,7 @@ public class Table extends AbstractSelect implements Action.Container, if (isColumnCollapsed(colids[j])) { continue; } - Property p = null; + Property<?> p = null; Object value = ""; boolean isGeneratedRow = generatedRow != null; boolean isGeneratedColumn = columnGenerators @@ -1904,8 +1904,8 @@ public class Table extends AbstractSelect implements Action.Container, visibleComponents.add(component); } - private void listenProperty(Property p, - HashSet<Property> oldListenedProperties) { + private void listenProperty(Property<?> p, + HashSet<Property<?>> oldListenedProperties) { if (p instanceof Property.ValueChangeNotifier) { if (oldListenedProperties == null || !oldListenedProperties.contains(p)) { @@ -1945,7 +1945,7 @@ public class Table extends AbstractSelect implements Action.Container, visibleComponents.remove(cellVal); unregisterComponent((Component) cellVal); } else { - Property p = getContainerProperty( + Property<?> p = getContainerProperty( pageBuffer[CELL_ITEMID][i + ix], colids[c]); if (p instanceof ValueChangeNotifier && listenedProperties.contains(p)) { @@ -1970,7 +1970,7 @@ public class Table extends AbstractSelect implements Action.Container, * set of components that where attached in last render */ private void unregisterPropertiesAndComponents( - HashSet<Property> oldListenedProperties, + HashSet<Property<?>> oldListenedProperties, HashSet<Component> oldVisibleComponents) { if (oldVisibleComponents != null) { for (final Iterator<Component> i = oldVisibleComponents.iterator(); i @@ -1983,8 +1983,8 @@ public class Table extends AbstractSelect implements Action.Container, } if (oldListenedProperties != null) { - for (final Iterator<Property> i = oldListenedProperties.iterator(); i - .hasNext();) { + for (final Iterator<Property<?>> i = oldListenedProperties + .iterator(); i.hasNext();) { Property.ValueChangeNotifier o = (ValueChangeNotifier) i.next(); if (!listenedProperties.contains(o)) { o.removeListener(this); @@ -2017,8 +2017,8 @@ public class Table extends AbstractSelect implements Action.Container, * fields in memory. */ if (component instanceof Field) { - Field field = (Field) component; - Property associatedProperty = associatedProperties + Field<?> field = (Field<?>) component; + Property<?> associatedProperty = associatedProperties .remove(component); if (associatedProperty != null && field.getPropertyDataSource() == associatedProperty) { @@ -3399,8 +3399,8 @@ public class Table extends AbstractSelect implements Action.Container, protected Object getPropertyValue(Object rowId, Object colId, Property property) { if (isEditable() && fieldFactory != null) { - final Field f = fieldFactory.createField(getContainerDataSource(), - rowId, colId, this); + final Field<?> f = fieldFactory.createField( + getContainerDataSource(), rowId, colId, this); if (f != null) { // Remember that we have made this association so we can remove // it when the component is removed |