svg gwt 监控软件 大的 大 发了佛法ffffffffff发的司法

源代码在线查看: script.java

软件大小: 7579 K
上传用户: jwl119
关键词: ffffffffff svg gwt 监控软件
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.mc.svg.script;
				
				import java.util.ArrayList;
				import java.util.List;
				
				import org.w3c.dom.Document;
				import org.w3c.dom.Element;
				
				import com.mc.svg.SVGCanvas;
				import com.mc.svg.menu.MenuAction;
				
				public class Script {
				
					public List fuctions = new ArrayList();
					
					//private String beginStr = "					private String beginStr = "";
					
					//private String endStr = "]]>";
					private String endStr = "";
					
					private Element root = null;
					
					public Script(Document doc){
						root = doc.createElementNS(SVGCanvas.svgNS,"script");
						//setType("text/ecmascript");
					}
					
					public void setType(String type){
						root.setAttributeNS(null,"type",type);
					}
					
					public Function findFunction(String functionName){
						for(int i=0;i							if(fuctions.get(i) instanceof  Function){
								Function a = (Function)fuctions.get(i); 
								if(functionName.equals(a.getFunctionName())){
									return a;
								}
							}
						}
						return null;
					}
					
					@SuppressWarnings("unchecked")
					public void addSentence(String str){
						fuctions.add(str+"\n");
					}
					
					@SuppressWarnings("unchecked")
					public void addFuntion(MenuAction action){
						fuctions.add(action);
					}
					
					@SuppressWarnings("unchecked")
					public void addFuntion(Function function){
						fuctions.add(function);
					}
					
					public Element getElement(){
						String str = beginStr + "\n";
						
						for(int i=0;i							Object obj = (Object)fuctions.get(i);
							String tmp = " ";
							if(obj instanceof  Function){
								tmp = Function.toString((Function)obj);
							}else{
								tmp = (String)obj;
							}
							
							str += tmp + "\n";
						}
						
						str += endStr+"\n";
						
						root.setTextContent(str);
						
						return root;
					}
					
				}
							

相关资源