1 12 13 package org.ejtools.jmx.browser.state.rules; 14 15 16 17 import java.beans.beancontext.BeanContextServices ; 18 19 import java.util.Map ; 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 ; 28 29 30 31 40 41 public class GraphInternalFrameRule extends DefaultRule 42 43 { 44 45 54 55 public void loadEnter(Map context) 56 57 { 58 59 BeanContextServices container = (BeanContextServices ) context.get("CONTAINER"); 60 61 62 63 GraphInternalFrame frame = new GraphInternalFrame(); 64 65 Attributes attrs = (Attributes ) context.get("ATTRIBUTES"); 66 67 68 69 String name = attrs.getValue("name"); 70 71 frame.setName(name); 72 73 74 75 String delay = attrs.getValue("delay"); 76 77 frame.setName(name); 78 79 frame.setDelay(Long.parseLong(delay)); 80 81 82 83 String 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 |