flowgraphcell.java

来自「JGraph扩展应用。自定义Renderer,自定义视图View实现自定义工作流」· Java 代码 · 共 50 行

JAVA
50
字号
/**
 * 
 */
package flow.graph.gui.graph.cell;

import org.jgraph.JGraph;
import org.jgraph.graph.DefaultGraphCell;

import flow.graph.gui.graph.FlowGraphConstants;
import flow.graph.gui.graph.cell.ui.AssignForm;
import flow.graph.gui.graph.cell.ui.InvokeForm;
import flow.graph.gui.graph.cell.ui.ModelForm;
import flow.graph.gui.graph.cell.ui.WhileForm;

/**
 * @author Administrator
 *
 */
public class FlowGraphCell extends DefaultGraphCell implements EditBPEL{
	public FlowGraphCell(){
		super();
	}
	
	public FlowGraphCell(String s){
		super(s);
	}
	
	public void EditCell(JGraph graph) {
		// TODO Auto-generated method stub
		if(FlowGraphConstants.getBpelType(getAttributes()).toString().equals(BPELFlag.BPEL_ASSIGN)){
			//赋值操作
			new AssignForm(this, graph);
		}
		else if(FlowGraphConstants.getBpelType(getAttributes()).toString().equals(BPELFlag.BPEL_WHILE)){
			//循环操作
			new WhileForm(this, graph);
		}
		else if(FlowGraphConstants.getBpelType(getAttributes()).toString().equals(BPELFlag.BPEL_MODEL)){
			//函数模板操作
			new ModelForm(this, graph);
		}
		else if(FlowGraphConstants.getBpelType(getAttributes()).toString().equals(BPELFlag.BPEL_INVOKE)){
			//函数调用操作
			new InvokeForm(this, graph);
		}
		
	}
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?