Subversion Repositories eFlore/Applications.coel

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1943 → Rev 1944

/tags/v1.11-okuzgozu/src/org/tela_botanica/client/vues/ContenuVue.java
New file
0,0 → 1,70
package org.tela_botanica.client.vues;
 
import org.tela_botanica.client.Mediateur;
import org.tela_botanica.client.composants.InfoLogger;
import org.tela_botanica.client.interfaces.Rafraichissable;
import org.tela_botanica.client.modeles.Information;
import org.tela_botanica.client.modeles.collection.CollectionListe;
import org.tela_botanica.client.modeles.commentaire.CommentaireListe;
import org.tela_botanica.client.modeles.personne.PersonneListe;
import org.tela_botanica.client.modeles.publication.PublicationListe;
import org.tela_botanica.client.modeles.structure.StructureListe;
 
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;
 
public class ContenuVue extends LayoutContainer implements Rafraichissable {
private Mediateur mediateur = null;
public ContenuVue(Mediateur mediateurCourant) {
mediateur = mediateurCourant;
setLayout(new FitLayout());
setBorders(true);
}
public Rafraichissable getContenu() {
Rafraichissable contenuPanneauCentre = null;
if (getItems() != null && getItems().size() == 1) {
contenuPanneauCentre = (Rafraichissable) getItem(0);
}
return contenuPanneauCentre;
}
 
//+----------------------------------------------------------------------------------------------------------------+
// RAFRAICHISSEMENT
//+----------------------------------------------------------------------------------------------------------------+
public void rafraichir(Object nouvellesDonnees) {
if (nouvellesDonnees instanceof StructureListe) {
mediateur.afficherListeStructures((StructureListe) nouvellesDonnees);
} else if (nouvellesDonnees instanceof CollectionListe) {
mediateur.afficherListeCollections((CollectionListe) nouvellesDonnees);
} else if (nouvellesDonnees instanceof PersonneListe) {
mediateur.afficherListePersonnes((PersonneListe) nouvellesDonnees);
} else if (nouvellesDonnees instanceof PublicationListe) {
mediateur.afficherListePublication((PublicationListe) nouvellesDonnees);
} else if (nouvellesDonnees instanceof CommentaireListe) {
mediateur.afficherListeCommentaire((CommentaireListe) nouvellesDonnees);
} else if (nouvellesDonnees instanceof Information) {
Information info = (Information) nouvellesDonnees;
if (info.getType().equals("maj_utilisateur")) {
if (getContenu() != null) {
getContenu().rafraichir(info);
}
} else {
// Affichage des éventuels messages de déboguage ou d'alerte
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
GWT.log(info.getMessages().toString(), null);
}
// Traitement en fonction des types d'information
if (info.getType().equals("liste_personne")) {
mediateur.afficherListePersonnes((PersonneListe) info.getDonnee(0));
InfoLogger.display("Chargement d'une liste de personnes", "");
}
}
}
}
}
Property changes:
Added: svn:mergeinfo
Merged /trunk/src/org/tela_botanica/client/vues/ContenuVue.java:r11-443,923-935,1209-1382
Merged /branches/v1.1-aramon/src/org/tela_botanica/client/vues/ContenuVue.java:r1383-1511
Merged /branches/v1.0-syrah/src/org/tela_botanica/client/vues/ContenuVue.java:r1136-1368