Subversion Repositories eFlore/Archives.cel-v2

Compare Revisions

Ignore whitespace Rev 15 → Rev 16

/trunk/src/org/tela_botanica/client/vues/ListeImageVue.java
55,8 → 55,10
private ColumnConfig appImage ;
private ColumnModel modeleColonnes ;
private boolean estInstancie = false ;
// données locales
// store qui gère les données de la liste d'images
private Store st = null ;
67,6 → 69,8
super() ;
this.setId("listeImageGrid") ;
this.iMediateur = im ;
numImage = new ColumnConfig("numéro","num_image",100,true);
112,6 → 116,7
private void initialiser() {
getIMediateur().obtenirPhotoGalerie(this);
estInstancie = true ;
}
147,9 → 152,9
}
 
 
public void rafraichir(Object nouvelleDonnees) {
public void rafraichir(Object nouvelleDonnees, boolean repandreRafraichissement) {
if(nouvelleDonnees instanceof ListeImage)
if(nouvelleDonnees instanceof ListeImage && estInstancie)
{
ListeImage data = (ListeImage) nouvelleDonnees ;
Object[][] photoData = new Object[data.size()][5];
179,6 → 184,11
this.reconfigure(st, this.getColumnModel());
photoStore.load();
}
if(repandreRafraichissement)
{
getIMediateur().synchroniserZoomListeGalerie(nouvelleDonnees, this) ;
}
}
 
 
/trunk/src/org/tela_botanica/client/vues/ZoomImageVue.java
55,7 → 55,7
}
 
public void rafraichir(Object nouvelleDonnees) {
public void rafraichir(Object nouvelleDonnees, boolean repandreRafraichissement) {
if(nouvelleDonnees instanceof String)
{
/trunk/src/org/tela_botanica/client/vues/PanneauMetadonneesVue.java
New file
0,0 → 1,125
package org.tela_botanica.client.vues;
 
import java.util.Date;
 
import org.tela_botanica.client.image.ImageMediateur;
import org.tela_botanica.client.interfaces.Rafraichissable;
 
import com.gwtext.client.core.NameValuePair;
import com.gwtext.client.data.Store;
import com.gwtext.client.data.StringFieldDef;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.TabPanel;
import com.gwtext.client.widgets.grid.GridView;
import com.gwtext.client.widgets.grid.PropertyGridPanel;
 
public class PanneauMetadonneesVue extends TabPanel implements Rafraichissable {
 
private ImageMediateur imediateur = null ;
private PropertyGridPanel ExifGrid = null ;
private PropertyGridPanel IptcGrid = null ;
private GridView gViewExif = null ;
private GridView gViewIptc = null ;
private Panel panneauExifGrid = null;
private Panel panneauIptcGrid = null ;
private Panel panneauInfoGrid = null ;
boolean estInstancie = false ;
public PanneauMetadonneesVue(ImageMediateur im)
{
super() ;
imediateur = im ;
panneauExifGrid = new Panel("Exif") ;
panneauIptcGrid = new Panel("Iptc") ;
panneauInfoGrid = new Panel("info") ;
this.add(panneauInfoGrid) ;
this.add(panneauExifGrid) ;
this.add(panneauIptcGrid) ;
gViewExif = new GridView();
gViewExif.setForceFit(true);
ExifGrid = new PropertyGridPanel() ;
ExifGrid.setId("meta_exif");
ExifGrid.setView(gViewExif);
ExifGrid.setNameText("Métadonnées Exif");
ExifGrid.setAutoWidth(true);
ExifGrid.setAutoHeight(true);
ExifGrid.setSorted(false);
gViewIptc = new GridView();
gViewIptc.setForceFit(true);
IptcGrid = new PropertyGridPanel() ;
IptcGrid.setId("meta_iptc");
IptcGrid.setView(gViewIptc);
IptcGrid.setNameText("Métadonnées IPTC");
IptcGrid.setAutoWidth(true);
IptcGrid.setAutoHeight(true);
IptcGrid.setSorted(false);
panneauExifGrid.add(ExifGrid);
panneauIptcGrid.add(IptcGrid);
}
public ImageMediateur getIMediateur()
{
return imediateur ;
}
public void rafraichir(Object nouvelleDonnees, boolean repandreRafraichissement) {
if(nouvelleDonnees instanceof Object[])
{
Object meta[] = (Object[])nouvelleDonnees ;
String[][] exif = (String[][])meta[0] ;
String[][] iptc = (String[][])meta[1] ;
NameValuePair[] exifSource = new NameValuePair[exif.length] ;
NameValuePair[] iptcSource = new NameValuePair[iptc.length] ;
int maxLength ;
if(exif.length <= iptc.length)
{
maxLength = iptc.length ;
}
else
{
maxLength = exif.length ;
}
for(int i = 0; i < maxLength ; i++)
{
if(i < exif.length)
{
exifSource[i] = new NameValuePair(exif[i][0],exif[i][1]) ;
}
if(i < iptc.length)
{
iptcSource[i] = new NameValuePair(iptc[i][0],iptc[i][1]) ;
}
}
ExifGrid.setSource(exifSource);
IptcGrid.setSource(iptcSource);
gViewExif.refresh(true) ;
gViewIptc.refresh(true) ;
}
}
}
/trunk/src/org/tela_botanica/client/vues/GalerieImageVue.java
181,7 → 181,7
public void rafraichir(Object nouvelleDonnees) {
public void rafraichir(Object nouvelleDonnees, boolean repandreRafraichissement) {
if(nouvelleDonnees instanceof ListeImage)
{
209,7 → 209,13
st = photoStore;
dView.setStore(st);
dView.refresh();
if(repandreRafraichissement)
{
getIMediateur().synchroniserZoomListeGalerie(nouvelleDonnees, this) ;
}
}
 
}