Subversion Repositories eFlore/Applications.coel

Rev

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

Rev Author Line No. Line
60 jpm 1
package org.tela_botanica.client.modeles;
2
 
3
import java.io.Serializable;
4
 
5
import com.extjs.gxt.ui.client.data.BaseTreeModel;
6
import com.extjs.gxt.ui.client.data.TreeModel;
7
 
8
public class Menu extends BaseTreeModel<TreeModel> implements Serializable {
9
 
64 jpm 10
	/**
11
	 * Identifiant pour sérialisé l'objet...
12
	 */
13
	private static final long serialVersionUID = 4;
14
 
60 jpm 15
	public Menu() {
16
 
17
	}
18
 
312 jp_milcent 19
	public Menu(String nom) {
20
		set("nom", nom);
60 jpm 21
	}
312 jp_milcent 22
	public Menu(String nom, String code) {
23
		set("nom", nom);
24
		set("code", code);
25
	}
60 jpm 26
 
27
	public Menu(String nom, BaseTreeModel[] enfant) {
28
		this(nom);
29
		for (int i = 0; i < enfant.length; i++) {
30
			add(enfant[i]);
31
		}
32
	}
33
 
34
	public String getNom() {
312 jp_milcent 35
		return get("nom");
60 jpm 36
	}
312 jp_milcent 37
 
38
	public String getCode() {
39
		return get("code");
40
	}
60 jpm 41
 
42
	public String toString() {
43
		return getNom();
44
	}
45
 
46
}