Subversion Repositories eFlore/Applications.coel

Rev

Rev 1513 | Rev 1881 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.tela_botanica.client.modeles;

import java.io.Serializable;

import com.extjs.gxt.ui.client.data.BaseTreeModel;

public class Menu extends BaseTreeModel implements Serializable {

        /**
         * Identifiant pour sérialisé l'objet...
         */
        private static final long serialVersionUID = 4;

        public Menu() {
        }

        public Menu(String nom) {
                set("nom", nom);
        }
        public Menu(String nom, String code) {
                set("nom", nom);
                set("code", code);
        }

        public Menu(String nom, BaseTreeModel[] enfant) {
                this(nom);
                for (int i = 0; i < enfant.length; i++) {
                        add(enfant[i]);
                }
        }

        public String getNom() {
                return get("nom");
        }
        public void setNom(String nom) {
                set("nom", nom);
        }
        
        public String getCode() {
                return get("code");
        }
        public void setCode(String code) {
                set("code", code);
        }

        public String toString() {
                return getNom()+" - Nbre enfant :"+this.getChildCount();
        }

}