Subversion Repositories eFlore/Applications.coel

Rev

Rev 66 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
61 jpm 1
package org.tela_botanica.client.composants;
2
 
3
import com.extjs.gxt.ui.client.Style.LayoutRegion;
4
import com.extjs.gxt.ui.client.fx.FxConfig;
5
import com.extjs.gxt.ui.client.util.Margins;
6
import com.extjs.gxt.ui.client.widget.ContentPanel;
7
import com.extjs.gxt.ui.client.widget.Dialog;
8
import com.extjs.gxt.ui.client.widget.button.Button;
9
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
10
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
11
 
12
public class AideFenetre extends Dialog {
13
 
14
	public AideFenetre() {
15
		setBodyBorder(false);
16
		setButtons(Dialog.OK);
17
		setIconStyle("icon-app-side");
18
		setHeading("COEL - Aide");
19
		setWidth(400);
20
		setHeight(225);
21
		setHideOnButtonClick(true);
22
 
23
		BorderLayout layout = new BorderLayout();
24
		setLayout(layout);
25
 
26
		// Panneau Ouest
27
		ContentPanel panel = new ContentPanel();
28
		panel.setHeading("Sommaire");
29
		BorderLayoutData data = new BorderLayoutData(LayoutRegion.WEST, 150, 100, 250);
30
		data.setMargins(new Margins(0, 5, 0, 0));
31
		data.setSplit(true);
32
		data.setCollapsible(true);
33
		data.setFloatable(true);
34
		add(panel, data);
35
 
36
		// Panneau Central
37
		panel = new ContentPanel();
38
		data = new BorderLayoutData(LayoutRegion.CENTER);
39
		add(panel, data);
40
	}
41
 
42
	/**
43
	 * Sur une fermeture on fait un fadeOut.
44
	 *
45
	 */
46
	protected void onButtonPressed(Button btn) {
47
		if (this.isHideOnButtonClick()) {
48
			this.el().fadeOut(FxConfig.NONE);
49
		} else {
50
			super.onButtonPressed(btn);
51
		}
52
	}
53
}