Subversion Repositories eFlore/Applications.del

Rev

Rev 9 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9 Rev 14
Line 1... Line 1...
1
package org.tela_botanica.del.client.navigation.event;
1
package org.tela_botanica.del.client.navigation.event;
Line 2... Line 2...
2
 
2
 
3
import org.tela_botanica.del.client.cache.ClientCache;
3
import org.tela_botanica.del.client.cache.CacheClient;
4
import org.tela_botanica.del.client.history.NavigationStatesConstants;
4
import org.tela_botanica.del.client.history.ConstantesNavigation;
5
import org.tela_botanica.del.client.modeles.Observation;
5
import org.tela_botanica.del.client.modeles.Observation;
6
import org.tela_botanica.del.client.navigation.event.validateobservation.ValidateImageEvent;
6
import org.tela_botanica.del.client.navigation.event.validationobservation.EvenementValidation;
Line 7... Line 7...
7
import org.tela_botanica.del.client.navigation.event.validateobservation.ValidateImageEventHandler;
7
import org.tela_botanica.del.client.navigation.event.validationobservation.GestionnaireEvenementValidation;
8
 
8
 
Line 9... Line 9...
9
import com.google.gwt.event.shared.HandlerManager;
9
import com.google.gwt.event.shared.HandlerManager;
Line 10... Line 10...
10
import com.google.gwt.user.client.History;
10
import com.google.gwt.user.client.History;
Line 11... Line 11...
11
 
11
 
12
public class EventBus extends HandlerManager {
12
public class BusEvenementiel extends HandlerManager {
13
 
13
 
14
	private static EventBus instance;
14
	private static BusEvenementiel instance;
15
 
15
 
Line 16... Line 16...
16
	private EventBus() {
16
	private BusEvenementiel() {
17
		super(null);
17
		super(null);
18
		instance = this;
18
		instance = this;
19
		createHandlers();
19
		createHandlers();
20
	}
20
	}
21
 
21
 
Line 22... Line 22...
22
	public static EventBus getInstance() {
22
	public static BusEvenementiel getInstance() {
23
		if (instance == null) {
23
		if (instance == null) {
Line 24... Line 24...
24
			instance = new EventBus();
24
			instance = new BusEvenementiel();
25
		}
25
		}
26
		return instance;
26
		return instance;
Line 27... Line 27...
27
	}
27
	}
28
 
28
 
29
	private void createHandlers() {
29
	private void createHandlers() {
Line 30... Line 30...
30
		addHandler(ValidateImageEvent.TYPE, new ValidateImageEventHandler() {
30
		addHandler(EvenementValidation.TYPE, new GestionnaireEvenementValidation() {
31
 
31
 
32
			@Override
32
			@Override
33
			public void onValidateImage(ValidateImageEvent event) {
33
			public void onValidateImage(EvenementValidation event) {
34
				doValidateImage(event.getImageCel());
34
				doValidateImage(event.getImageCel());
Line 35... Line 35...
35
 
35