1,7 → 1,6 |
package org.tela_botanica.client.composants; |
|
import java.util.List; |
import java.util.Map; |
|
import org.tela_botanica.client.composants.pagination.ChargeurListe; |
import org.tela_botanica.client.composants.pagination.Proxy; |
13,15 → 12,10 |
import com.extjs.gxt.ui.client.event.Events; |
import com.extjs.gxt.ui.client.event.Listener; |
import com.extjs.gxt.ui.client.store.ListStore; |
import com.extjs.gxt.ui.client.util.Size; |
import com.extjs.gxt.ui.client.util.Util; |
import com.extjs.gxt.ui.client.widget.LayoutContainer; |
import com.extjs.gxt.ui.client.widget.VerticalPanel; |
import com.extjs.gxt.ui.client.widget.form.ComboBox; |
import com.extjs.gxt.ui.client.widget.layout.FormData; |
import com.extjs.gxt.ui.client.widget.layout.FormLayout; |
|
import com.extjs.gxt.ui.client.data.BaseModelData; |
import com.extjs.gxt.ui.client.data.BasePagingLoadConfig; |
import com.extjs.gxt.ui.client.data.LoadEvent; |
import com.extjs.gxt.ui.client.data.Loader; |
38,6 → 32,8 |
private ListStore<ModelData> store = null; |
private ComboBox<ModelData> combo = null; |
|
private String recherche = ""; |
|
private Proxy<?> proxy = null; |
private TransformateurJSONaModelData<PagingLoadResult<ModelData>> reader = null; |
private ChargeurListe<PagingLoadResult<ModelData>> loader = null; |
46,12 → 42,11 |
private int limit = 10; |
private int largeur = 200; |
|
private LayoutContainer lc = null; |
private BasePagingLoadConfig plc = null; |
private ModelType modeltype = null; |
private String displayName = ""; |
private String recherche = ""; |
|
|
//-------------// |
// METHODES // |
//-------------// |
113,10 → 108,10 |
|
}); |
|
lc = new LayoutContainer(); |
lc.add(combo); |
VerticalPanel vp = new VerticalPanel(); |
vp.add(combo); |
|
add(lc); |
add(vp); |
} |
|
|
128,10 → 123,9 |
return this.combo; |
} |
|
public ModelData getValeur() |
public Valeur getValeur() |
{ |
if (!Util.isEmptyString(combo.getRawValue())) return combo.getSelection().get(0); |
else return null; |
return new Valeur(combo.getSelection().get(0)); |
} |
|
public ListStore<?> getStore() |
145,18 → 139,7 |
this.combo.setWidth(largeur); |
} |
|
public void setWidth(int tailleLabel, int largeurTotale) |
{ |
this.largeur = largeurTotale; |
// FIXME - problème avec la largeur de la combobox |
this.combo.setWidth(largeurTotale - tailleLabel); |
|
FormLayout fl = new FormLayout(); |
fl.setLabelWidth(tailleLabel); |
this.lc.setSize(largeurTotale, 0); |
this.lc.setLayout(fl); |
} |
|
/*----------------------------- |
Gestion du contenu du champ |
-----------------------------*/ |
176,6 → 159,7 |
Méthode privées |
-----------------*/ |
|
|
} |
|
|