Skip to content

Commit

Permalink
clear repair
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Tsarevskiy committed Aug 26, 2013
1 parent a443863 commit f485753
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
10 changes: 6 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.haulmont.thirdparty</groupId>
<artifactId>notifique</artifactId>
<packaging>jar</packaging>
<version>1.1.0</version>
<version>1.1.2</version>
<name>Vaadin Notifique Addon</name>


Expand Down Expand Up @@ -48,16 +48,19 @@
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
<version>${vaadin.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
<version>${vaadin.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
<version>${vaadin.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
Expand All @@ -66,15 +69,14 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<groupId>com.haulmont.thirdparty</groupId>
<artifactId>animator</artifactId>
<version>1.7.3</version>
<version>1.7.4</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
</dependencies>

Expand Down
14 changes: 13 additions & 1 deletion src/org/vaadin/notifique/Notifique.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.vaadin.notifique;

import java.io.Serializable;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -318,8 +319,19 @@ public void layoutClick(LayoutClickEvent event) {
*/
public void clear() {
synchronized (items) {
final LinkedList<Component> l = new LinkedList<Component>();

for (final Iterator<Component> i = css.getComponentIterator(); i.hasNext();) {
l.add(i.next());
}

for (final Iterator<Component> i = l.iterator(); i.hasNext();) {
Component component = i.next();
if (component instanceof CssLayout) {
css.removeComponent(component);
}
}
items.clear();
root.setContent(null);
}
}

Expand Down

0 comments on commit f485753

Please sign in to comment.