Subversion Repositories eFlore/Applications.del

Rev

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

Rev 590 Rev 591
Line 72... Line 72...
72
		
72
		
Line 73... Line 73...
73
		public void ajouterProtocole(String protocole);
73
		public void ajouterProtocole(String protocole);
Line -... Line 74...
-
 
74
 
-
 
75
		public void selectionnerProtocole(int index);
-
 
76
		
-
 
77
		public HasClickHandlers getLabelVote();
-
 
78
		
-
 
79
		public void masquerVoteAscendant();
-
 
80
 
-
 
81
		public void masquerVoteDescendant();
-
 
82
				
-
 
83
		public void afficherVoteAscendant();
-
 
84
		
-
 
85
		public void afficherVoteDescendant();
-
 
86
		
-
 
87
		public HasClickHandlers getLabelDate();
-
 
88
		
-
 
89
		public void masquerDateAscendant();
-
 
90
 
-
 
91
		public void masquerDateDescendant();
-
 
92
				
74
 
93
		public void afficherDateAscendant();
Line 75... Line -...
75
		public void selectionnerProtocole(int index);
-
 
76
		
94
		
77
	}
95
		public void afficherDateDescendant();
Line 78... Line 96...
78
 
96
	}
79
	// new ResultatRechercheImageVue();
97
 
Line 80... Line -...
80
	private Vue vue;
-
 
81
	private ImageService imageService;
98
	private Vue vue;
-
 
99
	private ImageService imageService;
-
 
100
	
Line 82... Line 101...
82
	
101
	private final ProtocoleService protocoleService = MockDatasource.getInstance();
83
	private final ProtocoleService protocoleService = MockDatasource.getInstance();
102
	private List<Protocole> protocoles;
84
	private List<Protocole> protocoles;
103
 
85
 
104
	private String protocoleParDefaut = Protocole.ESTHETISME;
Line 95... Line 114...
95
		composite.add(vue.asWidget());
114
		composite.add(vue.asWidget());
96
		vue.startChargement();
115
		vue.startChargement();
97
		rechercherImagesEtCreerWidgetPagination();
116
		rechercherImagesEtCreerWidgetPagination();
98
		gererEvenements();
117
		gererEvenements();
99
		chargerProtocoles();
118
		chargerProtocoles();
-
 
119
		vue.masquerVoteDescendant();
-
 
120
		vue.masquerVoteAscendant();
-
 
121
		vue.masquerDateDescendant();
-
 
122
		vue.masquerDateAscendant();
100
	}
123
	}
Line 101... Line 124...
101
 
124
 
Line 102... Line 125...
102
	public void gererEvenements() {
125
	public void gererEvenements() {
Line 107... Line 130...
107
			public void onChange(ChangeEvent event) {
130
			public void onChange(ChangeEvent event) {
108
				surChangementProtocole();
131
				surChangementProtocole();
109
			}
132
			}
110
		});
133
		});
Line 111... Line -...
111
		
-
 
112
		vue.getTriParNbVotesAscendant().addClickHandler(new ClickHandler() {
134
		
113
 
-
 
114
			@Override
-
 
115
			public void onClick(ClickEvent arg0) {
-
 
116
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
-
 
117
				int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
-
 
118
				informationsRechercheImages.setTriParNbVotes(ModeTri.TRI_ASCENDANT);
-
 
119
				informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
-
 
120
				informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
-
 
121
				chargerEtAfficherImagesPageEnCours();
-
 
122
			}
-
 
123
		});
-
 
124
 
135
		
125
		vue.getTriParNbVotesDescendant().addClickHandler(new ClickHandler() {
-
 
126
 
136
		vue.getLabelVote().addClickHandler(new ClickHandler() {
127
			@Override
137
			@Override
-
 
138
			public void onClick(ClickEvent event) {
-
 
139
				
-
 
140
				vue.masquerDateDescendant();
-
 
141
				vue.masquerDateAscendant();
-
 
142
				
-
 
143
				if (triCourantVote == ModeTri.TRI_ASCENDANT) {
-
 
144
					triCourantVote = ModeTri.TRI_DESCENDANT;
-
 
145
					vue.masquerVoteAscendant();
-
 
146
					vue.afficherVoteDescendant();
-
 
147
				} else {
-
 
148
					triCourantVote = ModeTri.TRI_ASCENDANT;
-
 
149
					vue.masquerVoteDescendant();
-
 
150
					vue.afficherVoteAscendant();
-
 
151
				}
128
			public void onClick(ClickEvent arg0) {
152
				
129
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
153
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
130
				int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
154
				int IdProtocole = CacheClient.getInstance().getProtocoleCourant().getId();
131
				informationsRechercheImages.setTriParNbVotes(ModeTri.TRI_DESCENDANT);
155
				informationsRechercheImages.setTriParNbVotes(triCourantVote);
132
				informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
156
				informationsRechercheImages.setIdProtocoleSelectionne(IdProtocole + "");
133
				informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
157
				informationsRechercheImages.setTriParDate(ModeTri.PAS_DE_TRI);
-
 
158
				chargerEtAfficherImagesPageEnCours();
134
				chargerEtAfficherImagesPageEnCours();
159
				
135
			}
160
			}
136
		});
161
		});
137
 
-
 
138
		vue.getTriParDateAscendant().addClickHandler(new ClickHandler() {
-
 
139
 
-
 
140
			@Override
-
 
141
			public void onClick(ClickEvent arg0) {
-
 
142
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
-
 
143
				informationsRechercheImages.setTriParDate(ModeTri.TRI_ASCENDANT);
-
 
144
				informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
-
 
145
				chargerEtAfficherImagesPageEnCours();
-
 
146
			}
-
 
147
		});
162
		
148
 
163
		
149
		vue.getTriParDateDescendant().addClickHandler(new ClickHandler() {
-
 
150
 
164
		vue.getLabelDate().addClickHandler(new ClickHandler() {
151
			@Override
165
			@Override
-
 
166
			public void onClick(ClickEvent event) {
-
 
167
				
-
 
168
				vue.masquerVoteDescendant();
-
 
169
				vue.masquerVoteAscendant();
-
 
170
				
-
 
171
				if (triCourantDate == ModeTri.TRI_ASCENDANT) {
-
 
172
					triCourantDate = ModeTri.TRI_DESCENDANT;
-
 
173
					vue.masquerDateAscendant();
-
 
174
					vue.afficherDateDescendant();
-
 
175
				} else {
-
 
176
					triCourantDate = ModeTri.TRI_ASCENDANT;
-
 
177
					vue.masquerDateDescendant();
-
 
178
					vue.afficherDateAscendant();
-
 
179
				}
152
			public void onClick(ClickEvent arg0) {
180
				
153
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
181
				InformationsRecherche informationsRechercheImages = CacheClient.getInstance().getInformationsRechercheImage();
154
				informationsRechercheImages.setTriParDate(ModeTri.TRI_DESCENDANT);
182
				informationsRechercheImages.setTriParDate(triCourantDate);
155
				informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
183
				informationsRechercheImages.setTriParNbVotes(ModeTri.PAS_DE_TRI);
-
 
184
				chargerEtAfficherImagesPageEnCours();
156
				chargerEtAfficherImagesPageEnCours();
185
				
157
			}
186
			}
Line 158... Line 187...
158
		});
187
		});
159
 
188