Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1239 Rev 1245
Line 246... Line 246...
246
	
246
	
247
	private Button creerBoutonSupprimer() {
247
	private Button creerBoutonSupprimer() {
248
		Button bouton = new Button(i18nC.supprimer());
248
		Button bouton = new Button(i18nC.supprimer());
249
		bouton.setIcon(Images.ICONES.vcardSupprimer());
249
		bouton.setIcon(Images.ICONES.vcardSupprimer());
250
		bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {  
-
 
251
			@Override
250
		bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {  
252
			public void componentSelected(ButtonEvent ce) {
251
			public void componentSelected(ButtonEvent ce) {
253
				CollectionACommentaire commentaireSaisiSelectionnee = grille.getSelectionModel().getSelectedItem();
252
				CollectionACommentaire commentaireSaisiSelectionnee = grille.getSelectionModel().getSelectedItem();
254
				if (commentaireSaisiSelectionnee == null) {
253
				if (commentaireSaisiSelectionnee == null) {
255
					InfoLogger.display(i18nC.informationTitreGenerique(), i18nC.selectionnerCommentaire());
254
					InfoLogger.display(i18nC.informationTitreGenerique(), i18nC.selectionnerCommentaire());
Line 263... Line 262...
263
	
262
	
264
	private Button creerBoutonRafraichir() {
263
	private Button creerBoutonRafraichir() {
265
		Button bouton = new Button(i18nC.rafraichir());
264
		Button bouton = new Button(i18nC.rafraichir());
266
		bouton.setIcon(Images.ICONES.rafraichir());
265
		bouton.setIcon(Images.ICONES.rafraichir());
267
		bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {  
-
 
268
			@Override
266
		bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {  
269
			public void componentSelected(ButtonEvent ce) {
267
			public void componentSelected(ButtonEvent ce) {
270
				actualiserGrille();
268
				actualiserGrille();
271
			}   
269
			}   
272
		});
270
		});
Line 292... Line 290...
292
					}
290
					}
293
				}
291
				}
294
			}
292
			}
295
		});
293
		});
296
		comboBox.addListener(Events.Select, new Listener<BaseEvent>() {
294
		comboBox.addListener(Events.Select, new Listener<BaseEvent>() {
297
			@Override
-
 
298
			public void handleEvent(BaseEvent be) {
295
			public void handleEvent(BaseEvent be) {
299
				if (commentairesSaisisComboBox.getValue() instanceof Commentaire) {
296
				if (commentairesSaisisComboBox.getValue() instanceof Commentaire) {
300
					Commentaire commentaireSaisiSelectionnee = commentairesSaisisComboBox.getValue();
297
					Commentaire commentaireSaisiSelectionnee = commentairesSaisisComboBox.getValue();
301
					ajouterDansGrille(commentaireSaisiSelectionnee);
298
					ajouterDansGrille(commentaireSaisiSelectionnee);
302
					commentairesSaisisComboBox.setValue(null);
299
					commentairesSaisisComboBox.setValue(null);
Line 429... Line 426...
429
				return retour;  
426
				return retour;  
430
			}  
427
			}  
431
		};
428
		};
Line 432... Line 429...
432
 
429
 
433
		GridCellRenderer<CollectionACommentaire> typeRendu = new GridCellRenderer<CollectionACommentaire>() {
-
 
434
			@Override
430
		GridCellRenderer<CollectionACommentaire> typeRendu = new GridCellRenderer<CollectionACommentaire>() {
435
			public String render(CollectionACommentaire model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionACommentaire> store, Grid<CollectionACommentaire> grid) {
431
			public String render(CollectionACommentaire model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionACommentaire> store, Grid<CollectionACommentaire> grid) {
436
				String type = model.get("_type_");
432
				String type = model.get("_type_");
437
				Debug.log("Initialisation type origine :"+type);
433
				Debug.log("Initialisation type origine :"+type);
438
				if (typeCombo.getStore() != null && type != null && (type.matches("[0-9]+") || type.contains(aDonnee.SEPARATEUR_VALEURS))) {
434
				if (typeCombo.getStore() != null && type != null && (type.matches("[0-9]+") || type.contains(aDonnee.SEPARATEUR_VALEURS))) {
Line 449... Line 445...
449
		return typeColonne;
445
		return typeColonne;
450
	}
446
	}
Line 451... Line 447...
451
	
447
	
452
	private ColumnConfig creerColonneAcces() {
448
	private ColumnConfig creerColonneAcces() {
453
		GridCellRenderer<CollectionACommentaire> accesRendu = new GridCellRenderer<CollectionACommentaire>() {
-
 
454
			@Override
449
		GridCellRenderer<CollectionACommentaire> accesRendu = new GridCellRenderer<CollectionACommentaire>() {
455
			public String render(CollectionACommentaire model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionACommentaire> store, Grid<CollectionACommentaire> grid) {
450
			public String render(CollectionACommentaire model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionACommentaire> store, Grid<CollectionACommentaire> grid) {
456
				String acces = (model.getCommentaire().etrePublic() ? i18nC.donneePublic() : i18nC.donneePrivee());
451
				String acces = (model.getCommentaire().etrePublic() ? i18nC.donneePublic() : i18nC.donneePrivee());
457
				model.set("_public_", acces);
452
				model.set("_public_", acces);
458
				return acces;
453
				return acces;