Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1630 → Rev 1633

/trunk/src/org/tela_botanica/client/vues/structure/StructureListeVue.java
5,6 → 5,7
 
import org.tela_botanica.client.Mediateur;
import org.tela_botanica.client.RegistreId;
import org.tela_botanica.client.composants.ChampFiltreRecherche;
import org.tela_botanica.client.composants.InfoLogger;
import org.tela_botanica.client.i18n.Constantes;
import org.tela_botanica.client.images.Images;
13,6 → 14,7
import org.tela_botanica.client.modeles.Utilisateur;
import org.tela_botanica.client.modeles.personne.Personne;
import org.tela_botanica.client.modeles.publication.Publication;
import org.tela_botanica.client.modeles.publication.PublicationListe;
import org.tela_botanica.client.modeles.structure.Structure;
import org.tela_botanica.client.modeles.structure.StructureListe;
import org.tela_botanica.client.vues.BarrePaginationVue;
51,6 → 53,7
private Button supprimer;
private Button ajouter;
private ChampFiltreRecherche champFiltreRecherche = null;
private BarrePaginationVue pagination = null;
private int indexElementSelectionne = 0;
131,8 → 134,10
});
add(grille);
StructureListe structureListe = new StructureListe();
champFiltreRecherche = new ChampFiltreRecherche(mediateurCourant, toolBar, structureListe);
// Définition de la barre de pagination
pagination = new BarrePaginationVue(new StructureListe(), mediateur);
pagination = new BarrePaginationVue(structureListe, mediateur);
setBottomComponent(pagination);
}
 
162,6 → 167,8
public void rafraichir(Object nouvellesDonnees) {
if (nouvellesDonnees instanceof StructureListe) {
StructureListe structures = (StructureListe) nouvellesDonnees;
champFiltreRecherche.setListePaginable(structures);
pagination.setlistePaginable(structures);
pagination.rafraichir(structures.getPageTable());
/trunk/src/org/tela_botanica/client/vues/projet/ProjetListeVue.java
7,6 → 7,7
 
import org.tela_botanica.client.Mediateur;
import org.tela_botanica.client.RegistreId;
import org.tela_botanica.client.composants.ChampFiltreRecherche;
import org.tela_botanica.client.composants.InfoLogger;
import org.tela_botanica.client.i18n.Constantes;
import org.tela_botanica.client.images.Images;
51,6 → 52,8
private Grid<Projet> grille = null;
private ListStore<Projet> store = null;
private ColumnModel modeleDesColonnes = null;
private ChampFiltreRecherche champFiltreRecherche = null;
private BarrePaginationVue pagination = null;
private Button ajouter;
143,8 → 146,10
});
add(grille);
ProjetListe projetListe = new ProjetListe();
champFiltreRecherche = new ChampFiltreRecherche(mediateurCourant, toolBar, projetListe);
// Définition de la barre de pagination
pagination = new BarrePaginationVue(new StructureListe(), mediateur);
pagination = new BarrePaginationVue(projetListe, mediateur);
setBottomComponent(pagination);
}
173,6 → 178,7
public void rafraichir(Object nouvellesDonnees) {
if (nouvellesDonnees instanceof ProjetListe) {
ProjetListe projets = (ProjetListe) nouvellesDonnees;
champFiltreRecherche.setListePaginable(projets);
pagination.setlistePaginable(projets);
pagination.rafraichir(projets.getPageTable());
/trunk/src/org/tela_botanica/client/vues/commentaire/CommentaireListeVue.java
7,6 → 7,7
 
import org.tela_botanica.client.Mediateur;
import org.tela_botanica.client.RegistreId;
import org.tela_botanica.client.composants.ChampFiltreRecherche;
import org.tela_botanica.client.composants.InfoLogger;
import org.tela_botanica.client.i18n.Constantes;
import org.tela_botanica.client.images.Images;
68,6 → 69,7
private Button supprimer;
private BarrePaginationVue pagination = null;
private ChampFiltreRecherche champFiltreRecherche = null;
private CommentaireListe commentaires = null;
protected boolean commentairesChargementOk = false;
177,8 → 179,10
});
add(grille);
CommentaireListe commentaireListe = new CommentaireListe();
champFiltreRecherche = new ChampFiltreRecherche(mediateur, toolBar, commentaireListe);
// Définition de la barre de pagination
pagination = new BarrePaginationVue(new StructureListe(), mediateur);
pagination = new BarrePaginationVue(commentaireListe, mediateur);
setBottomComponent(pagination);
}
260,6 → 264,8
if (nouvellesDonnees instanceof CommentaireListe) {
commentaires = (CommentaireListe) nouvellesDonnees;
champFiltreRecherche.setListePaginable(commentaires);
pagination.setlistePaginable(commentaires);
pagination.rafraichir(commentaires.getPageTable());
/trunk/src/org/tela_botanica/client/vues/MenuVue.java
14,6 → 14,7
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.treepanel.TreePanel;
import com.google.gwt.user.client.Window;
 
public class MenuVue extends ContentPanel {
 
63,7 → 64,7
arbreMenus.getStyle().setNodeOpenIcon(null);
arbreMenus.setDisplayProperty("nom");
arbreMenus.setHeight("100%");
; arbreMenus.addListener(Events.OnClick, new Listener<TreePanelEvent<Menu>>(){
arbreMenus.addListener(Events.OnClick, new Listener<TreePanelEvent<Menu>>(){
public void handleEvent(TreePanelEvent<Menu> tpe) {
Menu menuCourant = arbreMenus.getSelectionModel().getSelectedItem();
mediateur.clicMenu(menuCourant.getCode());
/trunk/src/org/tela_botanica/client/vues/BarrePaginationVue.java
53,11 → 53,6
private TextField<String> champPage = new TextField<String>();
private SimpleComboBox<Integer> selecteurTaillePage = new SimpleComboBox<Integer>();
private Text labelFiltre;
private TextField<String> filtre;
private Button annulerFiltre;
private boolean filtreActive = false;
private String termeRecherche = "";
private LinkedList<Integer> intervallePages = new LinkedList<Integer>();
private ListStore storeIntervalle = new ListStore() ;
165,22 → 160,7
//Séparation
add(new SeparatorToolItem());
labelFiltre = new Text("Recherche rapide : ");
labelFiltre.setStyleAttribute("padding-right", "5px");
add(labelFiltre);
filtre = new TextField<String>();
filtre.setWidth(150);
this.add(filtre);
annulerFiltre = new Button();
annulerFiltre.setIcon(Images.ICONES.annuler());
annulerFiltre.setVisible(false);
add(annulerFiltre);
add(new FillToolItem());
intervalleElements = new Text(i18nM.elementsAffiches(UtilString.ucFirst(labelElement),
pageCourante * taillePage, (pageCourante + 1) * taillePage, nbElement));
add(intervalleElements);
234,7 → 214,6
surTotalPage.setEnabled(etat);
afficherNbElem.setEnabled(etat);
nbElemParPage.setEnabled(etat);
annulerFiltre.setVisible(!etat);
}
/**
295,36 → 274,6
}
});
annulerFiltre.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
filtre.setValue("");
termeRecherche = "";
filtreActive = false;
listePaginable.changerNumeroPage(pageCourante);
labelFiltre.setStyleAttribute("font-weight", "normal");
changerEtatBarre(true);
}
});
filtre.addKeyListener(new KeyListener(){
public void componentKeyUp(ComponentEvent ce) {
if (ce.getKeyCode() == KeyCodes.KEY_ENTER) {
termeRecherche = filtre.getValue();
if (termeRecherche == null || termeRecherche.equals("")) {
filtreActive = false;
labelFiltre.setStyleAttribute("font-weight", "normal");
listePaginable.changerNumeroPage(pageCourante);
changerEtatBarre(true);
} else {
changerEtatBarre(false);
listePaginable.filtrerParNom(termeRecherche);
labelFiltre.setStyleAttribute("font-weight", "bold");
filtreActive = true;
}
}
}
});
champPage.addKeyListener(new KeyListener() {
public void componentKeyUp(ComponentEvent ce) {
393,30 → 342,26
* d'éléments à partir des variables de classes
*/
public void rafraichirNumeroPage() {
if (filtreActive == true) {
intervalleElements.setText("<b><i>Recherche active : </i></b>" + termeRecherche);
surTotalPage.setText(" sur " + pageTotale);
if (nbElement == 0) {
champPage.setValue("" + (0));
// on met simplement à jour l'intervalle qui contient toujours le
// même nombre d'éléments
intervalleElements.setText(i18nM.elementsAffiches(UtilString.ucFirst(labelElement), 0,0,0));
} else {
surTotalPage.setText(" sur " + pageTotale);
if (nbElement == 0) {
champPage.setValue("" + (0));
// on met simplement à jour l'intervalle qui contient toujours le
// même nombre d'éléments
intervalleElements.setText(i18nM.elementsAffiches(UtilString.ucFirst(labelElement), 0,0,0));
champPage.setValue("" + (pageCourante + 1));
// si la page n'est pas la dernière
if (pageCourante + 1 != pageTotale) {
// sauf pour la dernière page qui contient souvent moins
// d'élements que le nombre d'élements par page
intervalleElements.setText(i18nM.elementsAffiches(UtilString.ucFirst(labelElement), pageCourante * taillePage,
(pageCourante + 1) * taillePage, nbElement));
} else {
champPage.setValue("" + (pageCourante + 1));
// si la page n'est pas la dernière
if (pageCourante + 1 != pageTotale) {
// sauf pour la dernière page qui contient souvent moins
// d'élements que le nombre d'élements par page
intervalleElements.setText(i18nM.elementsAffiches(UtilString.ucFirst(labelElement), pageCourante * taillePage,
(pageCourante + 1) * taillePage, nbElement));
} else {
// on met simplement à jour l'intervalle qui contient toujours
// le même nombre d'éléments
intervalleElements.setText(i18nM.elementsAffiches(UtilString.ucFirst(labelElement), pageCourante * taillePage,
nbElement, nbElement));
}
// on met simplement à jour l'intervalle qui contient toujours
// le même nombre d'éléments
intervalleElements.setText(i18nM.elementsAffiches(UtilString.ucFirst(labelElement), pageCourante * taillePage,
nbElement, nbElement));
}
}
}
/trunk/src/org/tela_botanica/client/vues/publication/PublicationListeVue.java
6,6 → 6,7
 
import org.tela_botanica.client.Mediateur;
import org.tela_botanica.client.RegistreId;
import org.tela_botanica.client.composants.ChampFiltreRecherche;
import org.tela_botanica.client.composants.InfoLogger;
import org.tela_botanica.client.i18n.Constantes;
import org.tela_botanica.client.images.Images;
54,6 → 55,7
private Button modifier;
private Button supprimer;
private ChampFiltreRecherche champFiltreRecherche = null;
private BarrePaginationVue pagination = null;
private int indexElementSelectionne = 0;
142,8 → 144,10
});
add(grille);
PublicationListe publicationListe = new PublicationListe();
champFiltreRecherche = new ChampFiltreRecherche(mediateurCourant, toolBar, publicationListe);
// Définition de la barre de pagination
pagination = new BarrePaginationVue(new StructureListe(), mediateur);
pagination = new BarrePaginationVue(publicationListe, mediateur);
setBottomComponent(pagination);
}
197,6 → 201,7
if (nouvellesDonnees instanceof PublicationListe) {
PublicationListe publications = (PublicationListe) nouvellesDonnees;
champFiltreRecherche.setListePaginable(publications);
pagination.setlistePaginable(publications);
pagination.rafraichir(publications.getPageTable());
/trunk/src/org/tela_botanica/client/vues/personne/PersonneListeVue.java
6,6 → 6,7
 
import org.tela_botanica.client.Mediateur;
import org.tela_botanica.client.RegistreId;
import org.tela_botanica.client.composants.ChampFiltreRecherche;
import org.tela_botanica.client.composants.InfoLogger;
import org.tela_botanica.client.images.Images;
import org.tela_botanica.client.interfaces.Rafraichissable;
45,7 → 46,10
private Grid<Personne> grille = null;
private ListStore<Personne> store = null;
private ChampFiltreRecherche champFiltreRecherche = null;
private BarrePaginationVue pagination = null;
private ColumnModel modeleColonnes = null;
private Button ajouter = null;
private Button modifier = null;
142,8 → 146,10
});
add(grille);
PersonneListe personneListe = new PersonneListe();
champFiltreRecherche = new ChampFiltreRecherche(mediateur, toolBar, personneListe);
// Définition de la barre de pagination
pagination = new BarrePaginationVue(new PersonneListe(), mediateur);
pagination = new BarrePaginationVue(personneListe, mediateur);
setBottomComponent(pagination);
}
 
178,6 → 184,7
if (nouvellesDonnees instanceof PersonneListe) {
PersonneListe listePersonnes = (PersonneListe) nouvellesDonnees;
champFiltreRecherche.setListePaginable(listePersonnes);
pagination.setlistePaginable(listePersonnes);
pagination.rafraichir(listePersonnes.getPageTable());
/trunk/src/org/tela_botanica/client/vues/collection/CollectionListeVue.java
6,6 → 6,7
 
import org.tela_botanica.client.Mediateur;
import org.tela_botanica.client.RegistreId;
import org.tela_botanica.client.composants.ChampFiltreRecherche;
import org.tela_botanica.client.composants.InfoLogger;
import org.tela_botanica.client.i18n.Constantes;
import org.tela_botanica.client.images.Images;
51,6 → 52,7
private Button supprimer;
private Button ajouter;
private BarrePaginationVue pagination = null;
private ChampFiltreRecherche champFiltreRecherche = null;
private int indexElementSelectionne = 0;
private Collection collectionSelectionnee = null;
92,7 → 94,7
});
supprimer.setToolTip(i18nC.indicationSupprimerUneFiche());
toolBar.add(supprimer);
 
setTopComponent(toolBar);
 
List<ColumnConfig> colonnes = new ArrayList<ColumnConfig>();
132,8 → 134,10
});
add(grille);
CollectionListe collectionListe = new CollectionListe();
champFiltreRecherche = new ChampFiltreRecherche(mediateur, toolBar, collectionListe);
// Définition de la barre de pagination
pagination = new BarrePaginationVue(new CollectionListe(), mediateur);
pagination = new BarrePaginationVue(collectionListe, mediateur);
setBottomComponent(pagination);
}
 
171,6 → 175,7
pagination.setlistePaginable(collections);
int[] pt = collections.getPageTable();
pagination.rafraichir(collections.getPageTable());
champFiltreRecherche.setListePaginable(collections);
if (collections != null) {
List<Collection> liste = collections.toList();