Subversion Repositories eFlore/Applications.cel

Rev

Rev 683 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 683 Rev 1292
Line 1... Line 1...
1
package org.tela_botanica.client.vues.observation.filtres;
1
package org.tela_botanica.client.vues.observation.filtres;
Line 2... Line 2...
2
 
2
 
3
import org.tela_botanica.client.interfaces.Filtrable;
3
import org.tela_botanica.client.interfaces.Filtrable;
Line 4... Line -...
4
import org.tela_botanica.client.observation.ObservationMediateur;
-
 
5
 
4
import org.tela_botanica.client.observation.ObservationMediateur;
6
import com.google.gwt.user.client.ui.ClickListener;
5
 
7
import com.gwtext.client.core.EventCallback;
-
 
8
import com.gwtext.client.core.EventObject;
6
import com.gwtext.client.core.EventCallback;
9
import com.google.gwt.user.client.ui.Widget;
7
import com.gwtext.client.core.EventObject;
10
import com.gwtext.client.widgets.Button;
-
 
11
import com.gwtext.client.widgets.Panel;
8
import com.gwtext.client.widgets.Button;
12
import com.gwtext.client.widgets.event.ButtonListener;
9
import com.gwtext.client.widgets.Panel;
Line 13... Line 10...
13
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
10
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
Line 37... Line 34...
37
		champRecherche.setWidth("90%");
34
		champRecherche.setWidth("90%");
38
		boutonRechercher = new Button("Rechercher");
35
		boutonRechercher = new Button("Rechercher");
Line 39... Line 36...
39
		
36
		
Line -... Line 37...
-
 
37
		boutonRechercher.addListener(new ButtonListenerAdapter() {
40
		boutonRechercher.addListener(new ButtonListenerAdapter() {
38
 
41
 
39
			@Override
42
			public void onClick(Button button, EventObject e) {
40
			public void onClick(Button button, EventObject e) {
43
				valider();
41
				valider();
Line 44... Line 42...
44
			}
42
			}
Line -... Line 43...
-
 
43
		});
45
		});
44
		
Line 46... Line 45...
46
		
45
		champRecherche.addKeyPressListener(new EventCallback()	{
47
		champRecherche.addKeyPressListener(new EventCallback()	{
46
	    	
48
	    	
47
    	    @Override
49
    	    public void execute(EventObject e) {
48
			public void execute(EventObject e) {
Line 63... Line 62...
63
		setTitleCollapse(true);
62
		setTitleCollapse(true);
64
		setPaddings(5);
63
		setPaddings(5);
65
	}
64
	}
Line -... Line 65...
-
 
65
 
66
 
66
 
67
 
67
	@Override
68
	public boolean renvoyerEtatFiltre() {
68
	public boolean renvoyerEtatFiltre() {
Line -... Line 69...
-
 
69
		return estModifie;
69
		return estModifie;
70
	}
70
	}
71
 
71
 
72
 
Line -... Line 73...
-
 
73
	@Override
72
 
74
	public String renvoyerNomFiltre() {
Line 73... Line 75...
73
	public String renvoyerNomFiltre() {
75
		return "Taxon";
Line 74... Line 76...
74
		return "Taxon";
76
	}
Line 89... Line 91...
89
		String[] valeurs = {nom,valeurRecherchee};
91
		String[] valeurs = {nom,valeurRecherchee};
90
		return valeurs;
92
		return valeurs;
91
	}
93
	}
Line -... Line 94...
-
 
94
 
92
 
95
 
93
 
96
	@Override
94
	public void valider() {
97
	public void valider() {
95
		if(champRecherche.getValueAsString() != null && champRecherche.getValueAsString() != valeurRecherchee) {
98
		if(champRecherche.getValueAsString() != null && champRecherche.getValueAsString() != valeurRecherchee) {
96
			estModifie = true;
99
			estModifie = true;
Line 105... Line 108...
105
			champRecherche.reset();
108
			champRecherche.reset();
106
			valeurRecherchee = "";
109
			valeurRecherchee = "";
107
		}
110
		}
108
	}
111
	}
Line -... Line 112...
-
 
112
 
109
 
113
	@Override
110
	public void viderFiltre() {
114
	public void viderFiltre() {
111
		champRecherche.setValue("");
115
		champRecherche.setValue("");
112
		valeurRecherchee = "";
116
		valeurRecherchee = "";
113
	}
117
	}