summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/AbstractSelect.java
diff options
context:
space:
mode:
authorPekka Hyvönen <pekka@vaadin.com>2012-09-04 10:33:22 +0300
committerLeif Åstrand <leif@vaadin.com>2012-09-04 10:36:39 +0300
commitdd6265dcf5376fe4ead3fab7dbe10df2099389c7 (patch)
tree2426b72e5ab881ddf2473560feb05fe81a2e9e04 /server/src/com/vaadin/ui/AbstractSelect.java
parent17ea270b740bdea84143c3467166bf8618ab6ef5 (diff)
downloadvaadin-framework-dd6265dcf5376fe4ead3fab7dbe10df2099389c7.tar.gz
vaadin-framework-dd6265dcf5376fe4ead3fab7dbe10df2099389c7.zip
inner Event classes converted to static nested classes (#5855)
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractSelect.java')
-rw-r--r--server/src/com/vaadin/ui/AbstractSelect.java25
1 files changed, 18 insertions, 7 deletions
diff --git a/server/src/com/vaadin/ui/AbstractSelect.java b/server/src/com/vaadin/ui/AbstractSelect.java
index 2fc3bf4080..2f420b9286 100644
--- a/server/src/com/vaadin/ui/AbstractSelect.java
+++ b/server/src/com/vaadin/ui/AbstractSelect.java
@@ -19,6 +19,7 @@ package com.vaadin.ui;
import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
+import java.util.EventObject;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -1612,7 +1613,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
protected void firePropertySetChange() {
if (propertySetEventListeners != null
&& !propertySetEventListeners.isEmpty()) {
- final Container.PropertySetChangeEvent event = new PropertySetChangeEvent();
+ final Container.PropertySetChangeEvent event = new PropertySetChangeEvent(
+ this);
final Object[] listeners = propertySetEventListeners.toArray();
for (int i = 0; i < listeners.length; i++) {
((Container.PropertySetChangeListener) listeners[i])
@@ -1627,7 +1629,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
*/
protected void fireItemSetChange() {
if (itemSetEventListeners != null && !itemSetEventListeners.isEmpty()) {
- final Container.ItemSetChangeEvent event = new ItemSetChangeEvent();
+ final Container.ItemSetChangeEvent event = new ItemSetChangeEvent(
+ this);
final Object[] listeners = itemSetEventListeners.toArray();
for (int i = 0; i < listeners.length; i++) {
((Container.ItemSetChangeListener) listeners[i])
@@ -1640,8 +1643,12 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Implementation of item set change event.
*/
- private class ItemSetChangeEvent implements Serializable,
- Container.ItemSetChangeEvent {
+ private static class ItemSetChangeEvent extends EventObject implements
+ Serializable, Container.ItemSetChangeEvent {
+
+ private ItemSetChangeEvent(Container source) {
+ super(source);
+ }
/**
* Gets the Property where the event occurred.
@@ -1650,7 +1657,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
*/
@Override
public Container getContainer() {
- return AbstractSelect.this;
+ return (Container) getSource();
}
}
@@ -1658,9 +1665,13 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
/**
* Implementation of property set change event.
*/
- private class PropertySetChangeEvent implements
+ private static class PropertySetChangeEvent extends EventObject implements
Container.PropertySetChangeEvent, Serializable {
+ private PropertySetChangeEvent(Container source) {
+ super(source);
+ }
+
/**
* Retrieves the Container whose contents have been modified.
*
@@ -1668,7 +1679,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
*/
@Override
public Container getContainer() {
- return AbstractSelect.this;
+ return (Container) getSource();
}
}