JGraph扩展应用。自定义Renderer,自定义视图View实现自定义工作流控件

源代码在线查看: message.java

软件大小: 3338 K
上传用户: kelvinitc
关键词: Renderer JGraph View 自定义
下载地址: 免注册下载 普通下载 VIP

相关代码

				/**
				 * 
				 */
				package flow.graph.gui.graph.cell.bpel;
				
				import java.io.Serializable;
				import java.util.Vector;
				
				/**
				 * @author Administrator
				 *
				 */
				public class Message implements Serializable{
					public final static String REQUEST_TYPE = "request";
					public final static String RESPONSE_TYPE = "response";
					
					public static String[] MessageType = {"", REQUEST_TYPE, RESPONSE_TYPE};
					
					public final static String STRING_TYPE = "string";
					public final static String INT_TYPE = "int";
					
					public static String[] DataType = {"", STRING_TYPE, INT_TYPE};
					                     
					private String name = "";
					private String type = "";
					private Vector list = new Vector();
					
					public Message(){}
					public Message(String s, String t){setName(s);setType(t);}
					public void setName(String s){name = s;}
					public String getName(){return name;}
					public void setType(String t){type = t;}
					public String getType(){return type;}
					public void addPart(Part p){list.add(p);}
					public void setParts(Vector v){list = v;}
					public Vector getParts(){return list;}
					public void removePart(String s){
						if(list != null){
							for(int i=0;i								Part p = (Part)list.get(i);
								if(p.getName().equals(s)){
									list.remove(p);
								}
							}
						}
					}
					
					public String toString(){
						String s = "\t\t\n";
						if(list != null){
							for(int i=0;i								s += ((Part)list.get(i)).toString();
							}
						}
						s += "\t\t\n";
						return s;
					}
				}
							

相关资源