We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
您可以执行以下操作:
Here's what you could do:
这是另一种选择,尽管只是史蒂芬方法的变体。
首先绘制两个关联的类,以及连接它们的关联对象。
然后绘制一个简单的 Line 对象,该对象与关联对象连接到相同的连接点。当然,现在您已经有了这条丑陋的额外线条,因此要修复该问题,请双击该线条(或右键单击“属性”),然后更改颜色以匹配背景颜色,从而有效地将其隐藏在视图中。
现在,关联线的中间有一个连接点,您可以在其中附加一条连接到关联类的虚线。
您可能需要确保在不可见线上使用菜单“对象”、“发送到底层”,以便它不会绘制在其他对象之上。
通过这种方法,您不必确保关联对象保持直线,您还可以四处移动对象,并且所有内容都将保持连接。
Here's another alternative, albeit merely a variation of Steffen's approach.
First draw your two associated classes, and the Association object connecting them.
Then draw a simple Line object that attaches to the same exact connection points as the association object. Of course now you've got this ugly extra line in there, so to fix that double-click the line (or right-click, Properties), and change the color to match the background color, effectively hiding it from view.
Now you have a connection point right at the middle of the association line where you can attach a dotted line connected to your Association Class.
You'll probably want to ensure you use menu Objects, Send to Back on your invisible line so that it doesn't get drawn over top of other objects.
With this approach, you don't have to ensure that your Association object stays as a straight line, and you can also move your objects all around and everything will stay connected.
好消息:UML 关联已得到改进,并将允许此类连接:http: //git.gnome.org/browse/dia/commit/?id=302d5038e755cabb5ce9292d66d0ab9113153e15
这项新功能将包含在即将发布的 0.98 版本中。在发布之前,您可以使用 Dia Development VM 来测试新功能:http://dia -installer.de/developer/index.html
Good news: The UML association has been improved and will allow for such connections: http://git.gnome.org/browse/dia/commit/?id=302d5038e755cabb5ce9292d66d0ab9113153e15
This new feature will be included in the upcoming version 0.98. Until it is released, you can use the Dia Development VM to testdrive the new functionalities: http://dia-installer.de/developer/index.html