Subversion Repositories eFlore/Applications.del

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1151 aurelien 1
package org.tela_botanica.del.client.navigation.evenement.ajoutmotcleimage;
2
 
1152 aurelien 3
import java.util.ArrayList;
4
import java.util.List;
5
 
1151 aurelien 6
import com.google.gwt.event.shared.GwtEvent;
7
 
8
public class EvenementAjoutMotCleImage extends GwtEvent<GestionnaireEvenementAjoutMotCleImage> {
9
 
10
	public static com.google.gwt.event.shared.GwtEvent.Type<GestionnaireEvenementAjoutMotCleImage> TYPE = new com.google.gwt.event.shared.GwtEvent.Type<GestionnaireEvenementAjoutMotCleImage>();
11
	private String idImage;
1152 aurelien 12
	private List<String> motsCles;
1151 aurelien 13
 
14
	public EvenementAjoutMotCleImage(String idImage, String motCle) {
15
		this.idImage = idImage;
1152 aurelien 16
		if(motCle.indexOf(",") != -1) {
17
			String[] motsClesTab = motCle.split(",");
18
			motsCles = new ArrayList<String>(motsClesTab.length);
19
			for (int i = 0; i < motsClesTab.length; i++) {
20
				motsCles.add(motsClesTab[i]);
21
			}
22
		} else {
23
			motsCles = new ArrayList<String>(1);
24
			motsCles.add(motCle);
25
		}
1151 aurelien 26
	}
27
 
28
	@Override
29
	protected void dispatch(GestionnaireEvenementAjoutMotCleImage handler) {
30
		handler.onAjoutMotCleImage(this);
31
	}
32
 
33
	public String getIdImage() {
34
		return idImage;
35
	}
36
 
1152 aurelien 37
	public List<String> getMotsCles() {
38
		return motsCles;
1151 aurelien 39
	}
40
 
41
	@Override
42
	public com.google.gwt.event.shared.GwtEvent.Type<GestionnaireEvenementAjoutMotCleImage> getAssociatedType() {
43
		return TYPE;
44
	}
45
}