KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejtools > jmx > browser > state > rules > GraphInternalFrameRule


1 /*
2
3  * Created on 20 juin 2003
4
5  *
6
7  * To change this generated comment go to
8
9  * Window>Preferences>Java>Code Generation>Code Template
10
11  */

12
13 package org.ejtools.jmx.browser.state.rules;
14
15
16
17 import java.beans.beancontext.BeanContextServices JavaDoc;
18
19 import java.util.Map JavaDoc;
20
21
22
23 import org.ejtools.graph.frame.GraphInternalFrame;
24
25 import org.ejtools.util.state.DefaultRule;
26
27 import org.xml.sax.Attributes JavaDoc;
28
29
30
31 /**
32
33  * @author letiemble
34
35  * @created 20 juin 2003
36
37  * @version $Revision: 1.2 $
38
39  */

40
41 public class GraphInternalFrameRule extends DefaultRule
42
43 {
44
45    /**
46
47     * Description of the Method
48
49     *
50
51     * @param context Description of the Parameter
52
53     */

54
55    public void loadEnter(Map JavaDoc context)
56
57    {
58
59       BeanContextServices JavaDoc container = (BeanContextServices JavaDoc) context.get("CONTAINER");
60
61
62
63       GraphInternalFrame frame = new GraphInternalFrame();
64
65       Attributes JavaDoc attrs = (Attributes JavaDoc) context.get("ATTRIBUTES");
66
67
68
69       String JavaDoc name = attrs.getValue("name");
70
71       frame.setName(name);
72
73
74
75       String JavaDoc delay = attrs.getValue("delay");
76
77       frame.setName(name);
78
79       frame.setDelay(Long.parseLong(delay));
80
81
82
83       String JavaDoc scale = attrs.getValue("scale");
84
85       frame.setName(name);
86
87       frame.setScale(Double.parseDouble(scale));
88
89
90
91       container.add(frame);
92
93    }
94
95 }
96
97
Popular Tags