transitionimpl.java

来自「用JGraph编的软件」· Java 代码 · 共 35 行

JAVA
35
字号
package org.jgpd.io.jbpm.definition.impl;

import org.jgpd.io.jbpm.definition.*;

public class TransitionImpl extends DefinitionObjectImpl implements Transition {
	
	
	public TransitionImpl() {}
	
	public Node getFrom() { return this.from; }
	public void setFrom(Node from) { this.from = from; }
	
	public Node getTo() { return this.to; }
	public void setTo(Node to) { this.to = to; }
	
	public String writeXML(String indent)
	{
		String xml = "";
		
		xml += indent + "<transition ";
		if ( getName() != null )
		{
			if ( !(getName().equals("")) )
			xml += "name=\"" + getName() + "\"\t\t";
		}
		
		xml += "to=\"" + to.getName() + "\" />\n";
		
		return xml;
	}
	
	private Node from = null;
	private Node to = null;
}

⌨️ 快捷键说明

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