Subversion Repositories eFlore/Archives.cel-v2

Rev

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

Rev 16 Rev 18
Line 3... Line 3...
3
import java.util.Date;
3
import java.util.Date;
Line 4... Line 4...
4
 
4
 
5
import org.tela_botanica.client.image.ImageMediateur;
5
import org.tela_botanica.client.image.ImageMediateur;
Line -... Line 6...
-
 
6
import org.tela_botanica.client.interfaces.Rafraichissable;
-
 
7
 
-
 
8
import com.google.gwt.core.client.JavaScriptObject;
-
 
9
import com.google.gwt.user.client.ui.ClickListener;
-
 
10
import com.google.gwt.user.client.ui.Label;
-
 
11
import com.google.gwt.user.client.ui.TextBox;
6
import org.tela_botanica.client.interfaces.Rafraichissable;
12
import com.google.gwt.user.client.ui.Widget;
7
 
13
import com.gwtext.client.core.EventObject;
8
import com.gwtext.client.core.NameValuePair;
14
import com.gwtext.client.core.NameValuePair;
-
 
15
import com.gwtext.client.data.Store;
-
 
16
import com.gwtext.client.data.StringFieldDef;
9
import com.gwtext.client.data.Store;
17
import com.gwtext.client.widgets.Button;
10
import com.gwtext.client.data.StringFieldDef;
18
import com.gwtext.client.widgets.Component;
-
 
19
import com.gwtext.client.widgets.Panel;
-
 
20
import com.gwtext.client.widgets.TabPanel;
-
 
21
import com.gwtext.client.widgets.event.ButtonListener;
-
 
22
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-
 
23
import com.gwtext.client.widgets.form.DateField;
11
import com.gwtext.client.widgets.Panel;
24
import com.gwtext.client.widgets.form.TextArea;
12
import com.gwtext.client.widgets.TabPanel;
25
import com.gwtext.client.widgets.form.TextField;
-
 
26
import com.gwtext.client.widgets.grid.GridView;
-
 
27
import com.gwtext.client.widgets.grid.PropertyGridPanel;
-
 
28
import com.gwtext.client.widgets.layout.RowLayout;
-
 
29
import com.gwtext.client.widgets.layout.RowLayoutData;
-
 
30
import com.gwtext.client.widgets.layout.VerticalLayout;
Line 13... Line 31...
13
import com.gwtext.client.widgets.grid.GridView;
31
import com.gwtext.client.widgets.menu.DateItem;
Line 14... Line 32...
14
import com.gwtext.client.widgets.grid.PropertyGridPanel;
32
import com.gwtext.client.widgets.menu.Menu;
Line 25... Line 43...
25
	
43
	
26
	private Panel panneauExifGrid = null; 
44
	private Panel panneauExifGrid = null; 
27
	private Panel panneauIptcGrid = null ;
45
	private Panel panneauIptcGrid = null ;
Line -... Line 46...
-
 
46
	private Panel panneauInfoGrid = null ;
-
 
47
	
-
 
48
	private TextField commentaireGeneral = null ;
-
 
49
	private DateField dateImage = null ;
28
	private Panel panneauInfoGrid = null ;
50
	Button validerInfo = null ;
Line 29... Line 51...
29
	
51
	
30
	boolean estInstancie = false ;
52
	boolean estInstancie = false ;
31
	
53
	
Line 37... Line 59...
37
		
59
		
38
		panneauExifGrid = new Panel("Exif") ;
60
		panneauExifGrid = new Panel("Exif") ;
39
		panneauIptcGrid = new Panel("Iptc") ;
61
		panneauIptcGrid = new Panel("Iptc") ;
Line -... Line 62...
-
 
62
		panneauInfoGrid = new Panel("info") ;
-
 
63
		
-
 
64
		panneauInfoGrid.setLayout(new VerticalLayout());
-
 
65
		panneauInfoGrid.setHeight(500);
-
 
66
		Label labelComm = new Label("Commentaires :") ;
-
 
67
		labelComm.setHeight("20px") ;
-
 
68
		commentaireGeneral = new TextArea() ;
-
 
69
		commentaireGeneral.setAutoWidth(true) ;
-
 
70
		Label labelDate = new Label("Date :") ;
-
 
71
		
-
 
72
		labelDate.setHeight("20px") ;
-
 
73
		
-
 
74
		dateImage = new DateField() ;
-
 
75
		dateImage.setAutoWidth(true) ;
-
 
76
		dateImage.setFormat("d/m/y") ;
-
 
77
		
-
 
78
		validerInfo = new Button("OK") ;
-
 
79
		validerInfo.addListener(new ButtonListenerAdapter() {
-
 
80
 
-
 
81
			public void onClick(Button button, EventObject e) {
-
 
82
				
-
 
83
				getIMediateur().mettreAJourInfo(commentaireGeneral.getText(), dateImage.getRawValue()) ;
-
 
84
				
-
 
85
			}	
-
 
86
		});
-
 
87
		
-
 
88
		panneauInfoGrid.add(labelComm) ;
-
 
89
		panneauInfoGrid.add(commentaireGeneral) ;
-
 
90
		panneauInfoGrid.add(labelDate) ;
-
 
91
		panneauInfoGrid.add(dateImage) ;
-
 
92
		panneauInfoGrid.add(validerInfo) ;
Line 40... Line 93...
40
		panneauInfoGrid = new Panel("info") ;
93
		
41
		
94
		
42
		
95
		
Line 83... Line 136...
83
		if(nouvelleDonnees instanceof Object[])
136
		if(nouvelleDonnees instanceof Object[])
84
		{
137
		{
85
			Object meta[] = (Object[])nouvelleDonnees ;
138
			Object meta[] = (Object[])nouvelleDonnees ;
86
			String[][] exif = (String[][])meta[0] ;
139
			String[][] exif = (String[][])meta[0] ;
87
			String[][] iptc = (String[][])meta[1] ;
140
			String[][] iptc = (String[][])meta[1] ;
-
 
141
			String[][] gen = (String[][])meta[2] ;
Line 88... Line 142...
88
			
142
			
89
			NameValuePair[] exifSource = new NameValuePair[exif.length] ;
143
			NameValuePair[] exifSource = new NameValuePair[exif.length] ;
Line 111... Line 165...
111
				{
165
				{
112
					iptcSource[i] = new NameValuePair(iptc[i][0],iptc[i][1]) ;
166
					iptcSource[i] = new NameValuePair(iptc[i][0],iptc[i][1]) ;
113
				}
167
				}
114
			}
168
			}
Line -... Line 169...
-
 
169
			
-
 
170
			commentaireGeneral.setValue(gen[0][1]) ;
-
 
171
			
Line 115... Line 172...
115
			
172
			dateImage.setValue(gen[1][1]) ;
116
			
173
			
-
 
174
			ExifGrid.setSource(exifSource);
Line 117... Line 175...
117
			ExifGrid.setSource(exifSource);
175
			IptcGrid.setSource(iptcSource);
118
			IptcGrid.setSource(iptcSource);
176
		
Line 119... Line 177...
119
			
177