Subversion Repositories eFlore/Applications.cel

Rev

Rev 400 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 400 Rev 413
Line 49... Line 49...
49
import com.gwtext.client.widgets.event.ComponentListenerAdapter;
49
import com.gwtext.client.widgets.event.ComponentListenerAdapter;
50
import com.gwtext.client.widgets.event.ContainerListener;
50
import com.gwtext.client.widgets.event.ContainerListener;
51
import com.gwtext.client.widgets.event.ContainerListenerAdapter;
51
import com.gwtext.client.widgets.event.ContainerListenerAdapter;
52
import com.gwtext.client.widgets.event.PanelListener;
52
import com.gwtext.client.widgets.event.PanelListener;
53
import com.gwtext.client.widgets.event.PanelListenerAdapter;
53
import com.gwtext.client.widgets.event.PanelListenerAdapter;
-
 
54
import com.gwtext.client.widgets.event.TabPanelListenerAdapter;
54
import com.gwtext.client.widgets.grid.GridDragData;
55
import com.gwtext.client.widgets.grid.GridDragData;
55
import com.gwtext.client.widgets.layout.BorderLayout;
56
import com.gwtext.client.widgets.layout.BorderLayout;
56
import com.gwtext.client.widgets.layout.BorderLayoutData;
57
import com.gwtext.client.widgets.layout.BorderLayoutData;
57
import com.gwtext.client.widgets.layout.FitLayout;
58
import com.gwtext.client.widgets.layout.FitLayout;
58
import com.gwtext.client.widgets.menu.BaseItem;
59
import com.gwtext.client.widgets.menu.BaseItem;
Line 707... Line 708...
707
	
708
	
Line 708... Line 709...
708
	public void changerModeLiaison(boolean mode) {
709
	public void changerModeLiaison(boolean mode) {
709
		
710
		
-
 
711
		if(mode) {
710
		if(mode) {
712
			obtenirObservationsAssociees() ;
711
			obtenirObservationsAssociees() ;
713
			metadonneesIptcExif.getRechercheFiltreTaxonVue().disable();
712
		}
714
		}
-
 
715
		else {
713
		else {
716
			obtenirNombreMiniListeObservations() ;
714
			obtenirMiniListeObservations(getMetadonneesIptcExif().getMiniListeObservation()) ;
717
			metadonneesIptcExif.getRechercheFiltreTaxonVue().enable();
Line 715... Line 718...
715
		}
718
		}
716
	}
719
	}
Line 741... Line 744...
741
	 */
744
	 */
742
	public void clicGalerieImage(int index, Element node, EventObject e) {
745
	public void clicGalerieImage(int index, Element node, EventObject e) {
743
		Record rd = getGalerieImage().getDView().getRecord(node);
746
		Record rd = getGalerieImage().getDView().getRecord(node);
744
		String imgUrl = rd.getAsString("url_image");
747
		String imgUrl = rd.getAsString("url_image");
745
		String imgNum = rd.getAsString("num_image");
748
		String imgNum = rd.getAsString("num_image");
-
 
749
		String imgTaxon = rd.getAsString("obs_associees");
746
		String[] imgXY = getIModele().obtenirTailleImage(
750
		String[] imgXY = getIModele().obtenirTailleImage(
747
				rd.getAsString("num_image"));
751
				rd.getAsString("num_image"));
748
		String[] infosImage = { imgUrl, imgXY[0], imgXY[1], imgNum };
752
		String[] infosImage = { imgUrl, imgXY[0], imgXY[1], imgNum, imgTaxon};
Line 749... Line 753...
749
 
753
 
750
		getZoomImage().rafraichir(infosImage, false);
754
		getZoomImage().rafraichir(infosImage, false);
Line 751... Line 755...
751
		dernierIndexOnglet = 0;
755
		dernierIndexOnglet = 0;
Line 768... Line 772...
768
	 */
772
	 */
769
	public void clicListeImage(int rowIndex) {
773
	public void clicListeImage(int rowIndex) {
770
		Record rd = getListeImage().getSelectionModel().getSelected();
774
		Record rd = getListeImage().getSelectionModel().getSelected();
771
		String imgUrl = rd.getAsString("url_image");
775
		String imgUrl = rd.getAsString("url_image");
772
		String imgNum = rd.getAsString("num_image");
776
		String imgNum = rd.getAsString("num_image");
-
 
777
		String imgTaxon = rd.getAsString("obs_associees");
773
		String[] imgXY = getIModele().obtenirTailleImage(
778
		String[] imgXY = getIModele().obtenirTailleImage(
774
				rd.getAsString("num_image"));
779
				rd.getAsString("num_image"));
775
		String[] infosImage = { imgUrl, imgXY[0], imgXY[1], imgNum };
780
		String[] infosImage = { imgUrl, imgXY[0], imgXY[1], imgNum, imgTaxon };
Line 776... Line 781...
776
 
781
 
777
		getZoomImage().rafraichir(infosImage, false);
-
 
778
 
782
		getZoomImage().rafraichir(infosImage, false);
Line 779... Line 783...
779
		dernierIndexOnglet = 1;
783
		dernierIndexOnglet = 1;
780
 
784
 
Line 785... Line 789...
785
	 * gestion du double clic dans la liste
789
	 * gestion du double clic dans la liste
786
	 * 
790
	 * 
787
	 * @param rowIndex
791
	 * @param rowIndex
788
	 */
792
	 */
789
	public void doubleClicListeImage(int rowIndex) {
793
	public void doubleClicListeImage(int rowIndex) {
790
		clicListeImage(rowIndex);
-
 
791
		getOngletsImage().setActiveTab(2);
794
		getOngletsImage().setActiveTab(2);
792
	}
795
	}
Line 793... Line 796...
793
 
796
 
794
	/**
797
	/**
Line 886... Line 889...
886
				nRec = st.getAt(storeIndex);
889
				nRec = st.getAt(storeIndex);
887
			}
890
			}
888
		}
891
		}
Line 889... Line 892...
889
 
892
 
-
 
893
		if (nRec != null) {
890
		if (nRec != null) {
894
						
891
			String imgUrl = nRec.getAsString("url_image");
895
			String imgUrl = nRec.getAsString("url_image");
892
			String imgNum = nRec.getAsString("num_image");
896
			String imgNum = nRec.getAsString("num_image");
893
			String[] imgXY = getIModele().obtenirTailleImage(
897
			String[] imgXY = getIModele().obtenirTailleImage(
-
 
898
					nRec.getAsString("num_image"));
894
					nRec.getAsString("num_image"));
899
			String imgTaxon = nRec.getAsString("obs_associees");
895
			String[] infosImage = { imgUrl, imgXY[0], imgXY[1], imgNum };
900
			String[] infosImage = { imgUrl, imgXY[0], imgXY[1], imgNum, imgTaxon };
Line 896... Line 901...
896
			getZoomImage().rafraichir(infosImage, false);
901
			getZoomImage().rafraichir(infosImage, false);
897
 
902
 
898
			if (getGalerieImage().isRendered()) {
903
			if (getGalerieImage().isRendered()) {
Line 1237... Line 1242...
1237
	 * 
1242
	 * 
1238
	 * @return Les noms et valeurs des filtres
1243
	 * @return Les noms et valeurs des filtres
1239
	 */
1244
	 */
1240
	public String[][] renvoyerFiltres() {
1245
	public String[][] renvoyerFiltres() {
1241
		String[][] valeursFiltres = filtres.renvoyerValeursAFiltrer();
1246
		String[][] valeursFiltres = filtres.renvoyerValeursAFiltrer();
1242
		
-
 
1243
		/*for (int i = 0; i < valeursFiltres.length; i++) {
-
 
1244
			
-
 
1245
			if(valeursFiltres[i].equals(null))
-
 
1246
			{
-
 
1247
				Window.alert("Le filtre "+i+" est nul") ;
-
 
1248
			}
-
 
1249
			else
-
 
1250
			{
-
 
1251
				if(valeursFiltres[i][0].equals(null))
-
 
1252
				{
-
 
1253
					Window.alert("Le nom du filtre "+i+" est nul") ;
-
 
1254
				}
-
 
1255
				
-
 
1256
				if(valeursFiltres[i][1].equals(null))
-
 
1257
				{
-
 
1258
					Window.alert("La valeur du filtre "+i+" est nulle") ;
-
 
1259
				}
-
 
1260
			}
-
 
1261
		}*/
-
 
Line 1262... Line 1247...
1262
 
1247
 
1263
		return valeursFiltres;
1248
		return valeursFiltres;
Line 1264... Line 1249...
1264
	}
1249
	}
Line 1633... Line 1618...
1633
					
1618
					
1634
				}) ;
1619
				}) ;
1635
			}
1620
			}
1636
		}
1621
		}
-
 
1622
	}
-
 
1623
	
-
 
1624
	public String[] renvoyerFiltresObservation() {
-
 
1625
		String[] rien = {"nom_taxon",""};
-
 
1626
		if(getMetadonneesIptcExif() != null) {
-
 
1627
			return getMetadonneesIptcExif().getRechercheFiltreTaxonVue().renvoyerValeursAFiltrer();
-
 
1628
		} else {
-
 
1629
			return rien;
-
 
1630
		}
-
 
1631
	
-
 
1632
	}
-
 
1633
	
-
 
1634
	public void obtenirNombreMiniListeObservations(
-
 
1635
			Rafraichissable r) {
-
 
1636
		iModele.obtenirNombreMiniListeObservations(r, renvoyerFiltresObservation()); 
-
 
1637
	}
-
 
1638
	
-
 
1639
 
-
 
1640
	public void obtenirNombreMiniListeObservations() {
-
 
1641
		iModele.obtenirNombreMiniListeObservations(getMetadonneesIptcExif().getMiniListeObservation(), renvoyerFiltresObservation()); 
Line 1637... Line 1642...
1637
	}
1642
	}
1638
 
1643
 
Line 1639... Line 1644...
1639
	public void obtenirMiniListeObservations(
1644
	public void obtenirMiniListeObservations(
Line 1640... Line 1645...
1640
			Rafraichissable r) {
1645
			Rafraichissable r, int taillePage, int numeroPage) {
Line 1641... Line 1646...
1641
		
1646