JGraph扩展应用。自定义Renderer,自定义视图View实现自定义工作流控件
源代码在线查看: message.java
/**
*
*/
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;
}
}