Subversion Repositories eFlore/Applications.coel

Rev

Rev 64 | Rev 499 | 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;
import com.extjs.gxt.ui.client.data.TreeModel;

public class Menu extends BaseTreeModel<TreeModel> 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 String getCode() {
                return get("code");
        }

        public String toString() {
                return getNom();
        }

}