Rev 195 | Rev 680 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package org.tela_botanica.client.vues.image.filtres;import org.tela_botanica.client.image.ImageMediateur;import org.tela_botanica.client.interfaces.Filtrable;import com.google.gwt.user.client.ui.Label;import com.gwtext.client.widgets.Panel;import com.gwtext.client.widgets.form.Checkbox;public class SelectionFiltreVue extends Panel implements Filtrable {private ImageMediateur iMediateur = null;private boolean filtreModifie = false;private Checkbox check = null;@SuppressWarnings("unused")private SelectionFiltreVue(){super() ;}public SelectionFiltreVue(ImageMediateur im) {super();iMediateur = im ;Label labelRecherche = new Label("Afficher uniquement les images dans le tampon :");add(labelRecherche);setBorder(false);setPaddings(5);/** combo = new ComboBox() ; String tout = "toutes les images "; String* selection = "dans le tampon seulement" ; Object[][] data = new* Object[2][2]; data[0][0] = 1 ; data[0][1] = tout ; data[1][0] = 2 ;* data[1][1] = selection ;* // creation du store qui les contient FieldDef defIdChoix = new* IntegerFieldDef("id_choix"); FieldDef defNomChoix = new* StringFieldDef("nom_choix");** FieldDef[] defTab = {defIdChoix, defNomChoix}; RecordDef rd = new* RecordDef(defTab) ;** final MemoryProxy dataProxy = new MemoryProxy(data); final* ArrayReader reader = new ArrayReader(rd);** st = new Store(dataProxy, reader); st.load() ; combo.setStore(st) ;* combo.setGrow(true) ; combo.setMode(ComboBox.LOCAL);* combo.setEditable(false) ; //combo.setDisplayField("nom_choix") ;* add(combo) ;*/check = new Checkbox();check.setChecked(false) ;add(check);}public boolean renvoyerEtatFiltre() {return filtreModifie;}public String renvoyerNomFiltre() {return "Filtre par tampon";}public String[] renvoyerValeursAFiltrer() {if (check.getValue()) {String[] val = { "ci_id_tampon", iMediateur.renvoyerSelection() };return val;}String[] val = { "ci_id_tampon", "" };return val;}public void valider() {filtreModifie = true;}}