KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > clif > scenario > util > isac > util > tree > nodes > ChoiceNode


1 /*
2 * CLIF is a Load Injection Framework
3 * Copyright (C) 2004 France Telecom R&D
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * CLIF
20 *
21 * Contact: clif@objectweb.org
22 */

23 package org.objectweb.clif.scenario.util.isac.util.tree.nodes;
24
25 import java.util.Hashtable JavaDoc;
26 import java.util.Vector JavaDoc;
27
28 import org.objectweb.clif.scenario.util.isac.plugin.gui.ParametersWidgetsNode;
29 import org.objectweb.clif.scenario.util.isac.plugin.gui.WidgetDescription;
30 import org.objectweb.clif.scenario.util.isac.util.tree.Node;
31 import org.objectweb.clif.scenario.util.isac.util.tree.NodeDescription;
32
33 /**
34  * This class is an implementation of some methods wich will be used to build some
35  * nodes of type 'choice'
36  *
37  * @author JC Meillaud
38  * @author A Peyrard
39  */

40 public class ChoiceNode {
41      
42     /**
43      * Create a node description for a choice
44      * @return The node description for this controler
45      */

46     public static NodeDescription createNodeDescription() {
47         // create a new desc
48
NodeDescription desc = new NodeDescription(Node.CHOICE) ;
49         Hashtable JavaDoc values = new Hashtable JavaDoc() ;
50         values.put("proba","");
51         desc.setParams(values) ;
52         return desc ;
53     }
54     
55     /**
56      * Create the parameters widgets tree
57      * @return The tree created
58      */

59     public static ParametersWidgetsNode createParametersWidgetsNode() {
60         ParametersWidgetsNode pwn = new ParametersWidgetsNode(null) ;
61         // add the proba parameter field
62
ParametersWidgetsNode child = new ParametersWidgetsNode(new WidgetDescription(WidgetDescription.TEXT_FIELD, "proba",null, null)) ;
63         pwn.addChild(child) ;
64         return pwn ;
65     }
66     
67     /**
68      * This method return the help of an choice node
69    * @return The help lines
70      */

71     public static Vector JavaDoc getHelp() {
72         Vector JavaDoc help = new Vector JavaDoc() ;
73         return help ;
74     }
75 }
76
Popular Tags