63,57 → 63,28 |
*/ |
private ObservationMediateur observationMediateur = null; |
|
|
/** |
* Config de colonne |
*/ |
private ColumnConfig etatObservation; |
/** |
* Config de colonne |
*/ |
private ColumnConfig referentielTaxoObservation; |
private ColumnConfig nomSaisiObservation; |
/** |
* Config de colonne |
*/ |
private ColumnConfig nomRetenuObservation; |
/** |
* Config de colonne |
*/ |
private ColumnConfig lieuObservation; |
/** |
* Config de colonne |
*/ |
private ColumnConfig dateObservation; |
/** |
* Config de colonne |
*/ |
private ColumnConfig ordreObservation; |
/** |
* Config de colonne |
*/ |
private ColumnConfig abondanceObservation; |
/** |
* Config de colonne |
*/ |
private ColumnConfig certitudeObservation; |
|
/** |
* Modele de colonnes |
*/ |
private ColumnConfig abondanceObservation; |
private ColumnConfig certitudeObservation; |
private ColumnModel modeleColonnes; |
|
|
/** |
* Store qui contient les données à afficher |
*/ |
private Store st = null; |
|
|
/** |
* Barre de pagination |
*/ |
private BarrePaginationVue bt = null ; |
|
/** |
* Numéro de page en cours |
*/ |
141,6 → 112,8 |
|
|
private boolean tailleInitialisee = false ; |
|
private ColumnConfig phenologieObservation; |
|
/** |
* Constructeur sans arguments (privé car ne doit pas être utilisé) |
161,9 → 134,7 |
|
setId("x-list-obs"); |
|
setHeader(true); |
|
|
setHeader(true); |
// on place la barre de pagination |
bt = new BarrePaginationVue(this); |
bt.setLabelElement("Observations"); |
258,18 → 229,12 |
public String render(Object value, CellMetadata cellMetadata, |
Record record, int rowIndex, int colNum, Store store) { |
|
if(value == null || value.equals("null") || value.equals("000null") || value.equals("0000-00-00 00:00:00")) { |
|
return "" ; |
} |
else |
{ |
|
String valeur = ""; |
if(value != null && !value.equals("null") && !value.equals("000null") && !value.equals("0000-00-00 00:00:00")) { |
valeur = value.toString() ; |
} |
|
return value.toString() ; |
return valeur; |
} |
|
} ; |
|
Renderer dateRend = new Renderer() { |
313,9 → 278,10 |
} |
|
}); |
nomSaisiObservation = new ColumnConfig("Nom saisi", "nomSaisi_observation", 200, true, colRend); |
nomRetenuObservation = new ColumnConfig("Nom retenu", "nomRetenu_observation", 200, true, colRend); |
lieuObservation = new ColumnConfig("Lieu", "lieu_observation", 200, true, colRend); |
referentielTaxoObservation = new ColumnConfig("Référentiel", "referentiel_taxo_observation", 15, true, colRend); |
nomSaisiObservation = new ColumnConfig("Nom saisi", "nomSaisi_observation", 130, true, colRend); |
nomRetenuObservation = new ColumnConfig("Nom retenu", "nomRetenu_observation", 130, true, colRend); |
lieuObservation = new ColumnConfig("Lieu", "lieu_observation", 130, true, colRend); |
dateObservation = new ColumnConfig("Date", "date_observation", 70, true, dateRend); |
abondanceObservation = new ColumnConfig("Abondance", "abondance", 50, true, colRend); |
certitudeObservation = new ColumnConfig("Identification", "certitude", 50, true, new Renderer() { |
326,8 → 292,9 |
} |
|
}); |
ordreObservation = new ColumnConfig("Ordre", "ordre_observation", 50, true, colRend); |
ColumnConfig[] cm = {etatObservation, nomSaisiObservation, certitudeObservation, nomRetenuObservation, abondanceObservation, lieuObservation, dateObservation, ordreObservation}; |
phenologieObservation = new ColumnConfig("Phénologie", "phenologie", 40, true, colRend); |
ordreObservation = new ColumnConfig("Ordre", "ordre_observation", 70, true, colRend); |
ColumnConfig[] cm = {etatObservation, referentielTaxoObservation, nomSaisiObservation, certitudeObservation, nomRetenuObservation, abondanceObservation, phenologieObservation, lieuObservation, dateObservation, ordreObservation}; |
|
return cm; |
} |
575,7 → 542,7 |
if(nouvelleDonnees instanceof ListeObservation) |
{ |
ListeObservation data = (ListeObservation) nouvelleDonnees ; |
Object[][] observationData = new Object[data.size()][9]; |
Object[][] observationData = new Object[data.size()][11]; |
int i = 0 ; |
|
if(data.size() == 0) |
590,14 → 557,16 |
Observation obs=data.get(it.next()); |
|
observationData[i][0] = obs.getTransmis(); |
observationData[i][1] = obs.getNomSaisi(); |
observationData[i][2] = obs.getCertitude(); |
observationData[i][3] = obs.getNomRetenu(); |
observationData[i][4] = obs.getAbondance(); |
observationData[i][5] = Util.formaterLieu(obs, modeleLieu); |
observationData[i][6] = obs.getDate(); |
observationData[i][7] = obs.getNumeroOrdre(); |
observationData[i][8] = obs.getNumeroNomenclaturalSaisi(); |
observationData[i][1] = obs.getCodeCourtReferentielTaxo(); |
observationData[i][2] = obs.getNomSaisi(); |
observationData[i][3] = obs.getCertitude(); |
observationData[i][4] = obs.getNomRetenu(); |
observationData[i][5] = obs.getAbondance(); |
observationData[i][6] = obs.getPhenologie(); |
observationData[i][7] = Util.formaterLieu(obs, modeleLieu); |
observationData[i][8] = obs.getDate(); |
observationData[i][9] = obs.getNumeroOrdre(); |
observationData[i][10] = obs.getNumeroNomenclaturalSaisi(); |
|
i++ ; |
} |
634,8 → 603,12 |
// et on notifie de le mediateur du changement des valeurs |
changerPageMaxEtCourante(pageMax,pageEncours,taillePage,pages[0]) ; |
|
masquerChargement(); |
observationMediateur.obtenirListeObservation(this); |
if(nbElements > 0) { |
masquerChargement(); |
observationMediateur.obtenirListeObservation(this); |
} else { |
this.rafraichir(new ListeObservation(0), false); |
} |
} |
|
|
677,10 → 650,12 |
private FieldDef[] getDefinitionChamps() { |
// creation du store qui les contient |
FieldDef defEtatObservation = new StringFieldDef("etat_observation"); |
FieldDef defRefTaxObservation = new StringFieldDef("referentiel_taxo_observation"); |
FieldDef defNomSaisiObservation = new StringFieldDef("nomSaisi_observation"); |
FieldDef defCertitudeObservation = new StringFieldDef("certitude"); |
FieldDef defNomRetenuObservation = new StringFieldDef("nomRetenu_observation"); |
FieldDef defAbondanceObservation = new StringFieldDef("abondance"); |
FieldDef defPhenologieObservation = new StringFieldDef("phenologie"); |
FieldDef defLieuObservation = new StringFieldDef("lieu_observation"); |
FieldDef defDateObservation = new StringFieldDef("date_observation"); |
FieldDef defOrdreObservation = new IntegerFieldDef("ordre_observation"); |
688,8 → 663,8 |
// Non affiches : |
FieldDef defNumeroNomenclaturalSaisiObservation = new StringFieldDef("numeroNomenclaturalSaisi_observation"); |
|
FieldDef[] defTab = { defEtatObservation, defNomSaisiObservation, defCertitudeObservation, defNomRetenuObservation, defAbondanceObservation, |
defLieuObservation, defDateObservation, defOrdreObservation, defNumeroNomenclaturalSaisiObservation }; |
FieldDef[] defTab = {defEtatObservation, defRefTaxObservation,defNomSaisiObservation, defCertitudeObservation, defNomRetenuObservation, defAbondanceObservation, |
defPhenologieObservation, defLieuObservation, defDateObservation, defOrdreObservation, defNumeroNomenclaturalSaisiObservation }; |
|
return defTab; |
} |