Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1073 Rev 1104
Line 2... Line 2...
2
 
2
 
3
 
3
 
4
import org.tela_botanica.client.ComposantId;
4
import org.tela_botanica.client.ComposantId;
-
 
5
import org.tela_botanica.client.Mediateur;
5
import org.tela_botanica.client.Mediateur;
6
import org.tela_botanica.client.RegistreId;
6
import org.tela_botanica.client.RegistreId;
7
import org.tela_botanica.client.i18n.Constantes;
7
import org.tela_botanica.client.images.Images;
8
import org.tela_botanica.client.images.Images;
Line 8... Line 9...
8
import org.tela_botanica.client.interfaces.Rafraichissable;
9
import org.tela_botanica.client.interfaces.Rafraichissable;
9
import org.tela_botanica.client.modeles.Information;
10
import org.tela_botanica.client.modeles.Information;
-
 
11
 
-
 
12
import com.extjs.gxt.ui.client.Registry;
10
 
13
import com.extjs.gxt.ui.client.Style.Scroll;
11
import com.extjs.gxt.ui.client.Registry;
14
import com.extjs.gxt.ui.client.event.ButtonEvent;
12
import com.extjs.gxt.ui.client.Style.Scroll;
15
import com.extjs.gxt.ui.client.event.SelectionListener;
13
import com.extjs.gxt.ui.client.util.Format;
16
import com.extjs.gxt.ui.client.util.Format;
14
import com.extjs.gxt.ui.client.util.Params;
17
import com.extjs.gxt.ui.client.util.Params;
Line 22... Line 25...
22
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
25
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
23
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
26
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
24
import com.google.gwt.user.client.ui.HTML;
27
import com.google.gwt.user.client.ui.HTML;
Line 25... Line 28...
25
 
28
 
26
public class LicenceFenetre extends Dialog implements Rafraichissable{
29
public class LicenceFenetre extends Dialog implements Rafraichissable{
-
 
30
	
-
 
31
	private Constantes i18nC = null;
-
 
32
	protected Button validerBouton = null;
-
 
33
	private Button annulerBouton = null;
27
 
34
	
28
	private String messageErreurTpl = "<div id='" + ComposantId.DIV_IDENTIFICATION_MSG + "'>{message}</div>";
35
	private String messageErreurTpl = "<div id='" + ComposantId.DIV_IDENTIFICATION_MSG + "'>{message}</div>";
29
	private LayoutContainer messageErreur;
36
	private LayoutContainer messageErreur;
30
	private HTML texteLicence;
37
	private HTML texteLicence;
31
	private String licenceTpl = "<div style='padding:15px; width:400px;'>{licence}</div>";
38
	private String licenceTpl = "<div style='padding:15px; width:400px;'>{licence}</div>";
Line 84... Line 91...
84
		texteLicence.setHTML(Format.substitute(licenceTpl, param));
91
		texteLicence.setHTML(Format.substitute(licenceTpl, param));
85
	}
92
	}
Line 86... Line 93...
86
 
93
 
87
	@Override
94
	@Override
-
 
95
	protected void createButtons() {
-
 
96
		// FIXME : l'instanciation dans le constructeur ne marche pas pour cette méthode...
-
 
97
		i18nC = Mediateur.i18nC;
-
 
98
		
-
 
99
		getButtonBar().removeAll();
-
 
100
		
-
 
101
		validerBouton = new Button(i18nC.valider());
-
 
102
		validerBouton.setItemId(OK);
-
 
103
		validerBouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
88
	protected void createButtons() {
104
			public void componentSelected(ButtonEvent ce) {
-
 
105
				onButtonPressed(ce.getButton());
-
 
106
			}
-
 
107
		});
-
 
108
		
-
 
109
		annulerBouton = new Button(i18nC.annuler());
-
 
110
		annulerBouton.setItemId(CANCEL);
-
 
111
		annulerBouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
-
 
112
			public void componentSelected(ButtonEvent ce) {
-
 
113
				onButtonPressed(ce.getButton());
-
 
114
			}
-
 
115
		});
-
 
116
		
-
 
117
		addButton(annulerBouton);
89
		super.createButtons();
118
		addButton(validerBouton);
Line -... Line 119...
-
 
119
	}
90
	}
120
	
91
	
121
	@Override
92
	protected void onButtonPressed(Button button) {
122
	protected void onButtonPressed(Button button) {
93
		if (Dialog.OK.equals(button.getItemId()))	{
123
		if (Dialog.OK.equals(button.getItemId()))	{
94
			button.setEnabled(false);
124
			button.setEnabled(false);
Line 101... Line 131...
101
		} else {
131
		} else {
102
			hide();
132
			hide();
103
		}
133
		}
104
	}
134
	}
Line 105... Line -...
105
	
-
 
106
	@Override
135
	
107
	public void rafraichir(Object nouvellesDonnees) {
136
	public void rafraichir(Object nouvellesDonnees) {
108
		if (nouvellesDonnees instanceof Information)	{
137
		if (nouvellesDonnees instanceof Information)	{
109
			Information info = (Information) nouvellesDonnees;
138
			Information info = (Information) nouvellesDonnees;