- 浏览: 183536 次
- 性别:
- 来自: 广州
文章分类
最新评论
-
Brooke:
啥时候分享一下源码呗 学习一下
基于eclipse RCP的文件夹管理工具 -
红耳飞鹏:
貌似懂了之后才能看的懂,个人看法
刷新 javaFX2.0 数据视图(TableView/ListView/TreeView) -
leaow567:
这个要支持啊
基于eclipse RCP的文件夹管理工具--FileTools -
yunchow:
luoyu-ds 写道我是来看博主的头像的+1
eclipse RCP 模仿win7资源管理器地址栏功能 -
luoyu-ds:
我是来看博主的头像的
eclipse RCP 模仿win7资源管理器地址栏功能
您好!请教一个问题:jhotdraw7.6中samples中draw实例中有个file菜单中有个“open”的功能,可以根据xml文件生成图形,请问这个功能的代码在哪儿?谢谢
你好,我用的是7.5的版本,我想应该是一样的。
实现机制:
draw的存储接口是DOMStorable,负责drawing的IO操作;所有继承或实现该接口的子类都必须实现了read和write方法,即实现具体类的读入和写出责任。AbstractAttributedFigure和Drawing都继承该接口。
读取文件的顺序为:
- openAction读入文件,调用DrawView的read方法读取该文件;
- DrawView中维护多个inputFormat,每个inputFormat负责读取特定的Figure;当调用read方法时,DrawView尝试让所有的inputFormat读取该文件,但只要有一个inputFormat读取成功就停止。
至于DrawView装载了多少InputFromat,可以参考org.jhotdraw.samples.draw.DrawView.createDrawing():
protected Drawing createDrawing() { Drawing drawing = new QuadTreeDrawing(); DOMStorableInputOutputFormat ioFormat = new DOMStorableInputOutputFormat(new DrawFigureFactory()); drawing.addInputFormat(ioFormat); ImageFigure prototype = new ImageFigure(); drawing.addInputFormat(new ImageInputFormat(prototype)); drawing.addInputFormat(new TextInputFormat(new TextFigure())); TextAreaFigure taf = new TextAreaFigure(); taf.setBounds(new Point2D.Double(10,10), new Point2D.Double(60,40)); drawing.addInputFormat(new TextInputFormat(taf)); drawing.addOutputFormat(ioFormat); drawing.addOutputFormat(new ImageOutputFormat()); return drawing; }
参考org.jhotdraw.draw.LineConnectionFigure对write()和read()的实现:
//org.jhotdraw.draw.LineConnectionFigure.read public void read(DOMInput in) throws IOException { readAttributes(in); readLiner(in); // Note: Points must be read after Liner, because Liner influences // the location of the points. readPoints(in); } //org.jhotdraw.draw.AbstractAttributedFigure.readAttributes protected void readAttributes(DOMInput in) throws IOException { if (in.getElementCount("a") > 0) { in.openElement("a"); for (int i=in.getElementCount() - 1; i >= 0; i-- ) { in.openElement(i); String name = in.getTagName(); Object value = in.readObject(); AttributeKey key = getAttributeKey(name); if (key != null && key.isAssignable(value)) { if (forbiddenAttributes == null || ! forbiddenAttributes.contains(key)) { set(key, value); } } in.closeElement(); } in.closeElement(); } } protected void readLiner(DOMInput in) throws IOException { if (in.getElementCount("liner") > 0) { in.openElement("liner"); liner = (Liner) in.readObject(); in.closeElement(); } else { liner = null; } } //org.jhotdraw.draw.LineConnectionFigure.readPoints protected void readPoints(DOMInput in) throws IOException { super.readPoints(in); in.openElement("startConnector"); setStartConnector((Connector) in.readObject()); in.closeElement(); in.openElement("endConnector"); setEndConnector((Connector) in.readObject()); in.closeElement(); }
读入机制参见:
org.jhotdraw.app.action.file.OpenFileAction#openViewFromURI() line 105
org.jhotdraw.samples.draw.DrawView#read()
org.jhotdraw.xml.DOMFactory
评论
5 楼
sxpyrgz
2011-10-20
c.zhiwu 写道
sxpyrgz 写道
哥门儿你在玩JHOTDRAW吗?
我也在整,不过过程中还有不少的问题
4 楼
c.zhiwu
2011-10-13
sxpyrgz 写道
哥门儿你在玩JHOTDRAW吗?
3 楼
sxpyrgz
2011-10-12
哥门儿你在玩JHOTDRAW吗?
2 楼
c.zhiwu
2011-05-11
是在实现Figure的具体类中实现IO的,如果要修改,可以参考Figure的子类。
1 楼
hust_axu
2011-05-06
您好,请教一个问题。我想讲他自动生成的xml代码
<drawing>
- <figures>
- <start-state id="0" x="40" y="49" w="60" h="40" name="开始">
- <a>
- <fontFace>
<font id="1" name="宋体" style="0" size="20" />
</fontFace>
- <fontSize>
<double id="2">20.0</double>
</fontSize>
</a>
<transition name="到拟稿" to="拟稿" />
</start-state>
- <task-node id="3" x="42" y="148" w="60" h="40" name="拟稿">
- <a>
- <text>
<string id="4">拟稿</string>
</text>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="到审批" to="审批" />
- <task name="拟稿">
<description>draft</description>
<assignment class="test.assignment.DraftAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
</task-node>
- <task-node id="5" x="40" y="238" w="60" h="40" name="审批">
- <a>
- <text>
<string id="6">审批</string>
</text>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="到判断" to="判断" />
- <task name="审批">
<description>examine</description>
<assignment class="test.assignment.ExamineAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
</task-node>
- <task-node id="7" x="40" y="346" w="60" h="40" name="成文">
- <a>
- <text>
<string id="8">成文</string>
</text>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="到传阅" to="传阅" />
- <task name="成文">
<description>write</description>
<assignment class="test.assignment.WriteAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
</task-node>
- <task-node id="9" x="187" y="344" w="60" h="40" name="传阅">
- <a>
- <text>
<string id="a">传阅</string>
</text>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="到归档" to="归档" />
- <task name="传阅">
<description>read</description>
<assignment class="test.assignment.ReadAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
</task-node>
- <decision id="b" x="179" y="232" w="60" h="40" name="判断">
- <a>
- <fillColor>
<color id="c" rgba="#ffffff00" />
</fillColor>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="同意" to="成文" />
<transition name="不同意" to="拟稿" />
<handler class="test.handler.TestDecisionHandler" />
</decision>
- <end-state id="d" x="462" y="337" w="60" h="40" name="结束">
- <a>
- <fillColor>
<color id="e" rgba="#ffff0000" />
</fillColor>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
</end-state>
- <task-node id="f" x="313" y="343" w="60" h="40" name="归档">
- <a>
- <text>
<string id="10">归档</string>
</text>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="到结束" to="结束" />
- <task name="归档">
<description>file</description>
<assignment class="test.assignment.FileAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
</task-node>
- <transition id="11">
- <points>
<p colinear="true" x="70.41414141414141" y="89.5" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="71.58585858585859" y="147.5" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="12">
- <Owner>
<start-state ref="0" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="13">
- <Owner>
<task-node ref="3" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color id="14" rgba="#ff000000" />
</strokeColor>
- <strokeWidth>
<double id="15">1.0</double>
</strokeWidth>
</a>
</transition>
- <transition id="16">
- <points>
<p colinear="true" x="71.54444444444445" y="188.5" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="70.45555555555555" y="237.5" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="17">
- <Owner>
<task-node ref="3" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="18">
- <Owner>
<task-node ref="5" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="19">
- <points>
<p colinear="true" x="100.5" y="256.68345323741005" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="178.5" y="253.31654676258992" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="1a">
- <Owner>
<task-node ref="5" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="1b">
- <Owner>
<decision ref="b" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="1c">
- <points>
<p colinear="true" x="178.5" y="233.2992700729927" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="102.5" y="186.7007299270073" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="1d">
- <Owner>
<decision ref="b" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="1e">
- <Owner>
<task-node ref="3" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="1f">
- <points>
<p colinear="true" x="184.00438596491227" y="272.5" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="94.99561403508773" y="345.5" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="20">
- <Owner>
<decision ref="b" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="21">
- <Owner>
<task-node ref="7" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="22">
- <points>
<p colinear="true" x="100.5" y="365.5850340136054" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="186.5" y="364.4149659863946" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="23">
- <Owner>
<task-node ref="7" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="24">
- <Owner>
<task-node ref="9" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="25">
- <points>
<p colinear="true" x="247.5" y="363.7579365079365" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="312.5" y="363.2420634920635" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="26">
- <Owner>
<task-node ref="9" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="27">
- <Owner>
<task-node ref="f" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="28">
- <points>
<p colinear="true" x="373.5" y="361.7718120805369" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="461.5" y="358.2281879194631" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="29">
- <Owner>
<task-node ref="f" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="2a">
- <Owner>
<end-state ref="d" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
</figures>
</drawing>
修改成文一下形式的xml文件
<?xml version="1.0" encoding="UTF-8" ?>
- <process-definition xmlns="" name="document">
- <start-state name="开始">
<transition to="拟稿" />
</start-state>
- <task-node name="拟稿">
- <task name="拟稿">
<description>draft</description>
<assignment class="test.assignment.DraftAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
<transition to="审批" />
</task-node>
- <task-node name="归档">
- <task name="归档">
<description>file</description>
<assignment class="test.assignment.FileAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
<transition to="结束" />
</task-node>
- <task-node name="传阅">
- <task name="传阅">
<description>read</description>
<assignment class="test.assignment.ReadAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
<transition to="归档" />
</task-node>
- <task-node name="成文">
- <task name="成文">
<description>write</description>
<assignment class="test.assignment.WriteAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
<transition to="传阅" />
</task-node>
- <task-node name="审批">
- <task name="审批">
<description>examine</description>
<assignment class="test.assignment.ExamineAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
<transition to="判断" />
</task-node>
- <decision name="判断">
<handler class="test.handler.TestDecisionHandler" />
<transition to="成文" name="同意" />
<transition to="拟稿" name="不同意" />
</decision>
<end-state name="结束" />
</process-definition>
请问需要修改哪些文件啊?
<drawing>
- <figures>
- <start-state id="0" x="40" y="49" w="60" h="40" name="开始">
- <a>
- <fontFace>
<font id="1" name="宋体" style="0" size="20" />
</fontFace>
- <fontSize>
<double id="2">20.0</double>
</fontSize>
</a>
<transition name="到拟稿" to="拟稿" />
</start-state>
- <task-node id="3" x="42" y="148" w="60" h="40" name="拟稿">
- <a>
- <text>
<string id="4">拟稿</string>
</text>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="到审批" to="审批" />
- <task name="拟稿">
<description>draft</description>
<assignment class="test.assignment.DraftAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
</task-node>
- <task-node id="5" x="40" y="238" w="60" h="40" name="审批">
- <a>
- <text>
<string id="6">审批</string>
</text>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="到判断" to="判断" />
- <task name="审批">
<description>examine</description>
<assignment class="test.assignment.ExamineAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
</task-node>
- <task-node id="7" x="40" y="346" w="60" h="40" name="成文">
- <a>
- <text>
<string id="8">成文</string>
</text>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="到传阅" to="传阅" />
- <task name="成文">
<description>write</description>
<assignment class="test.assignment.WriteAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
</task-node>
- <task-node id="9" x="187" y="344" w="60" h="40" name="传阅">
- <a>
- <text>
<string id="a">传阅</string>
</text>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="到归档" to="归档" />
- <task name="传阅">
<description>read</description>
<assignment class="test.assignment.ReadAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
</task-node>
- <decision id="b" x="179" y="232" w="60" h="40" name="判断">
- <a>
- <fillColor>
<color id="c" rgba="#ffffff00" />
</fillColor>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="同意" to="成文" />
<transition name="不同意" to="拟稿" />
<handler class="test.handler.TestDecisionHandler" />
</decision>
- <end-state id="d" x="462" y="337" w="60" h="40" name="结束">
- <a>
- <fillColor>
<color id="e" rgba="#ffff0000" />
</fillColor>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
</end-state>
- <task-node id="f" x="313" y="343" w="60" h="40" name="归档">
- <a>
- <text>
<string id="10">归档</string>
</text>
- <fontFace>
<font ref="1" />
</fontFace>
- <fontSize>
<double ref="2" />
</fontSize>
</a>
<transition name="到结束" to="结束" />
- <task name="归档">
<description>file</description>
<assignment class="test.assignment.FileAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
</task-node>
- <transition id="11">
- <points>
<p colinear="true" x="70.41414141414141" y="89.5" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="71.58585858585859" y="147.5" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="12">
- <Owner>
<start-state ref="0" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="13">
- <Owner>
<task-node ref="3" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color id="14" rgba="#ff000000" />
</strokeColor>
- <strokeWidth>
<double id="15">1.0</double>
</strokeWidth>
</a>
</transition>
- <transition id="16">
- <points>
<p colinear="true" x="71.54444444444445" y="188.5" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="70.45555555555555" y="237.5" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="17">
- <Owner>
<task-node ref="3" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="18">
- <Owner>
<task-node ref="5" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="19">
- <points>
<p colinear="true" x="100.5" y="256.68345323741005" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="178.5" y="253.31654676258992" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="1a">
- <Owner>
<task-node ref="5" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="1b">
- <Owner>
<decision ref="b" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="1c">
- <points>
<p colinear="true" x="178.5" y="233.2992700729927" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="102.5" y="186.7007299270073" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="1d">
- <Owner>
<decision ref="b" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="1e">
- <Owner>
<task-node ref="3" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="1f">
- <points>
<p colinear="true" x="184.00438596491227" y="272.5" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="94.99561403508773" y="345.5" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="20">
- <Owner>
<decision ref="b" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="21">
- <Owner>
<task-node ref="7" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="22">
- <points>
<p colinear="true" x="100.5" y="365.5850340136054" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="186.5" y="364.4149659863946" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="23">
- <Owner>
<task-node ref="7" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="24">
- <Owner>
<task-node ref="9" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="25">
- <points>
<p colinear="true" x="247.5" y="363.7579365079365" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="312.5" y="363.2420634920635" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="26">
- <Owner>
<task-node ref="9" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="27">
- <Owner>
<task-node ref="f" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
- <transition id="28">
- <points>
<p colinear="true" x="373.5" y="361.7718120805369" c1x="0" c1y="0" c2x="0" c2y="0" />
<p colinear="true" x="461.5" y="358.2281879194631" c1x="0" c1y="0" c2x="0" c2y="0" />
</points>
- <startConnector>
- <rConnector id="29">
- <Owner>
<task-node ref="f" />
</Owner>
</rConnector>
</startConnector>
- <endConnector>
- <rConnector id="2a">
- <Owner>
<end-state ref="d" />
</Owner>
</rConnector>
</endConnector>
- <a>
- <strokeColor>
<color ref="14" />
</strokeColor>
- <strokeWidth>
<double ref="15" />
</strokeWidth>
</a>
</transition>
</figures>
</drawing>
修改成文一下形式的xml文件
<?xml version="1.0" encoding="UTF-8" ?>
- <process-definition xmlns="" name="document">
- <start-state name="开始">
<transition to="拟稿" />
</start-state>
- <task-node name="拟稿">
- <task name="拟稿">
<description>draft</description>
<assignment class="test.assignment.DraftAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
<transition to="审批" />
</task-node>
- <task-node name="归档">
- <task name="归档">
<description>file</description>
<assignment class="test.assignment.FileAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
<transition to="结束" />
</task-node>
- <task-node name="传阅">
- <task name="传阅">
<description>read</description>
<assignment class="test.assignment.ReadAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
<transition to="归档" />
</task-node>
- <task-node name="成文">
- <task name="成文">
<description>write</description>
<assignment class="test.assignment.WriteAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
<transition to="传阅" />
</task-node>
- <task-node name="审批">
- <task name="审批">
<description>examine</description>
<assignment class="test.assignment.ExamineAssignment" />
- <controller>
<variable access="read,write" name="documentId" />
</controller>
</task>
<transition to="判断" />
</task-node>
- <decision name="判断">
<handler class="test.handler.TestDecisionHandler" />
<transition to="成文" name="同意" />
<transition to="拟稿" name="不同意" />
</decision>
<end-state name="结束" />
</process-definition>
请问需要修改哪些文件啊?
发表评论
-
【转】开源项目JHotDraw分析报告
2011-02-17 14:37 2152开源项目JHotDraw分析报告 (图片资源请参考附件) ... -
JHotDraw让你成为程序设计的毕加索
2010-12-20 00:29 1756原文地址:http://article.yeeyan.org/ ... -
Tool
2010-12-19 15:47 0包 org.jhotdraw.draw.tool 定义用于 ... -
jhotdraw docs: org.jhotdraw.app.application
2010-08-28 22:47 1728<!-- ========= END OF TOP ... -
JHotDraw之旅: 3.3 面向文档基本框架
2010-07-30 23:47 2393通过前文, 我们大概了解了JHotDraw的MVC架 ... -
JHotDraw之旅: 3.2 MVC架构
2010-07-28 18:59 14083.2 MVC架构 这里只介绍JHotDraw框架的MVC模 ... -
JHotDraw之旅: 3.1 MVC架构
2010-07-25 00:25 27601. JHotDraw框架概述 开发应用程序时, 大 ... -
JHotDraw之旅: 2.6 源码分析的准备
2010-07-23 13:44 24681. 获取JHotDraw 在http://so ... -
JHotDraw之旅: 2.5 JHotDraw初体验
2010-07-22 11:11 19472.5 Teddy Teddy 是一个应用在JHotD ... -
JHotDraw之旅: 2.4 JHotDraw初体验
2010-07-22 10:57 23032.4 SVG 原文链接: http://c-zhiwu. ... -
JHotDraw之旅:2.3 JHotDraw初体验
2010-07-21 17:30 17222.3 PERT PERT是一个基于JHotDra ... -
JHotDraw之旅:2.2 JHotDraw初体验
2010-07-21 17:01 18372.2 NET NET是由两种图形(节点图NodeF ... -
JHotDraw之旅: 2.1 JHotDraw初体验
2010-07-20 11:48 24601.下载JHotDraw 最新的JHotDraw ... -
JHotdraw之旅.1.jhotdraw简介
2010-07-19 20:58 2772JHotDraw之旅 JHotDra ...
相关推荐
Java二进制IO类与文件复制操作实例 16个目标文件 内容索引:Java源码,初学实例,二进制,文件复制 Java二进制IO类与文件复制操作实例,好像是一本书的例子,源代码有的是独立运行的,与同目录下的其它代码文件互不联系...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。 预输入搜索 Cleo Cleo 是一个灵活的软件库用于处理一些预输入和自动完成的搜索功能,该项目是 LinkedIn 公司...