1,5 → 1,6 |
package org.tela_botanica.client; |
|
import java.util.HashMap; |
import java.util.Iterator; |
import java.util.List; |
|
27,6 → 28,7 |
import org.tela_botanica.client.modeles.collection.CollectionAPublication; |
import org.tela_botanica.client.modeles.collection.CollectionAPublicationListe; |
import org.tela_botanica.client.modeles.collection.CollectionListe; |
import org.tela_botanica.client.modeles.collection.UniteRangement; |
import org.tela_botanica.client.modeles.commentaire.Commentaire; |
import org.tela_botanica.client.modeles.commentaire.CommentaireListe; |
import org.tela_botanica.client.modeles.personne.Personne; |
102,6 → 104,8 |
private StatutVue panneauSud = null; |
private FenetreJournal fenetreJournal = null; |
|
private HashMap<Object, Integer> fileDAttenteChargement = null; |
|
private IdentificationFenetre fenetreIdentification = null; |
private int nbElements = Integer.valueOf(((Dictionary) Dictionary.getDictionary("configuration")).get("nbElementsPage")); |
|
129,6 → 133,9 |
// Connection de l'utilisateur |
connecterUtilisateur(null, null); |
|
// Creer la table qui gère le panneau de chargement/déchargement |
fileDAttenteChargement = new HashMap<Object, Integer>(); |
|
// Retour à GWT du Viewport une fois constuit |
RootPanel.get().add(viewport); |
} |
241,8 → 248,7 |
//+----------------------------------------------------------------------------------------------------------------+ |
|
public void clicMenu(String codeMenuClique) { |
|
activerChargement(codeMenuClique); |
|
panneauOuest.getMenu().selectionMenu(codeMenuClique); |
|
if (codeMenuClique.equals(MenuApplicationId.ACCUEIL)) { |
262,20 → 268,51 |
} else { |
GWT.log(i18nM.nonImplemente(codeMenuClique), null); |
} |
|
panneauCentre.layout(); |
} |
|
public void activerChargement(String message) { |
public void activerChargement(Object caller, String message) { |
if (fileDAttenteChargement.get(caller) == null) fileDAttenteChargement.put(caller, 1); |
else fileDAttenteChargement.put(caller, fileDAttenteChargement.get(caller)+1); |
activerChargement(message); |
} |
|
private void activerChargement(String message) { |
afficherPopinChargement(); |
panneauCentre.disable(); |
panneauSud.showBusy(i18nC.chargement()+" "+message); |
} |
|
public void desactiverChargement() { |
public void desactiverChargement(Object caller) { |
if (fileDAttenteChargement.get(caller) == null) Debug.log("Problème : l'objet "+caller+" essaie de désactiver le chargement alors qu'il ne l'a pas initié."); |
else fileDAttenteChargement.put(caller, fileDAttenteChargement.get(caller)-1); |
|
if (!chargementsEnCours()) desactiverChargement(); |
} |
|
private void desactiverChargement() { |
masquerPopinChargement(); |
panneauCentre.enable(); |
panneauSud.clear(); |
} |
|
private boolean chargementsEnCours() { |
boolean chargementEnCours = false; |
Iterator<Object> it = fileDAttenteChargement.keySet().iterator(); |
while (it.hasNext() && !chargementEnCours) { |
chargementEnCours = (fileDAttenteChargement.get(it.next()) > 0); |
} |
return chargementEnCours; |
} |
|
private void debugFileAttente() { |
Iterator<Object> it = fileDAttenteChargement.keySet().iterator(); |
while (it.hasNext()) { |
Object o = it.next(); |
Debug.log("==> ["+o+"] = "+fileDAttenteChargement.get(o)); |
} |
} |
|
//+----------------------------------------------------------------------------------------------------------------+ |
// GESTION DES FENÊTRES |