使用泳道和矩阵将图划分为树分区还是......?
我知道这可能看起来很愚蠢,但是为了使我的模型更加连贯,我想将我的图表分为 3 个分区,其中两个是水平的,一个是垂直的,并且所有分区都有不同的背景颜色!比如:
-------------------
part1 | paart2 |
-------------------|
part3 |
-------------------
我找不到任何形状。泳道可以是垂直的,也可以是水平的。
o"m 使用 Sparx Enterprise Architect 7.5 有什么想法吗?
提前致谢
I know it may seems silly, however in order to make my model more coherent, I want to divide my diagram into 3 partitions which two of them are horizontal, and one of them is vertical and all of them with different background color! something like :
-------------------
part1 | paart2 |
-------------------|
part3 |
-------------------
I couldn't find any shape. and swimlanes are either vertical or horizontal.
o"m using Sparx Enterprise Architect 7.5
Any idea?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我现在是9.0,所以YMMV。
泳道不允许设置背景颜色,它们就像你所说的水平或垂直。
矩阵(不确定 7.5 中是否存在)允许设置背景颜色,但需要严格的矩阵布局(只能启用/禁用整个行/列) - 所以第一行中的 2 列不可以,并且第二行中只有一列第二。泳道和矩阵不能组合。您可以为图表定义这两者,但一次只能有一个处于活动状态。
普通边界可以为您提供所需的布局,但它们不允许设置背景颜色。
但如果它真的很重要,这里有一个巧妙的方法来完成它:使用图像。
首先,创建简单的图像(在画图或其他工具中),其中只有您想要的背景颜色。它们不必具有特定的尺寸; EA可以拉伸图像。
然后,在图中创建一个图像(位于通用工具箱中的边界旁边)。这首先会弹出“边界创建”对话框(因为图像实际上只是一个填充的边界),然后是“图像选择”对话框。单击添加新...按钮导入您的图像。对每个分区重复此操作。
请注意,EA 将图像存储在项目(数据库)中,并将其转换为位图。您可以在模型中的多个位置使用相同的图像,但这显然意味着如果您在一个位置更改图像,则会影响所有使用。
另请注意,当您开始将模型元素拖放到分区上时,您可能需要使用 Z 顺序才能看到它们。此外,由于 EA 使用 3D/悬停效果,它可能看起来并不完美,这会在元素边缘周围添加一些图表背景颜色。
但由于图像实际上是边界,因此当您移动图像时,放置在图像上的任何元素都会保留在图像内,因此从图表角度来看,它确实有效。
I'm on 9.0, so YMMV.
Swimlanes don't allow setting a background colour, and they are as you say either horizontal or vertical.
Matrix (not sure if this exists in 7.5) allows setting a background colour, but requires a strict matrix layout (only entire rows/columns can be enabled/disabled) - so no to the 2 columns in the first row and only one in the second. Swimlanes and matrix cannot be combined. You can define both for a diagram, but only one can be active at a time.
Ordinary Boundaries can give you the layout you're after, but they don't allow setting a background colour.
But if it's really important, here's a hacky way to get it done: use images.
First, create simple images (in Paint or whatever), which just have the background colour you want. They don't have to be a specific size; EA can stretch images.
Then, in the diagram, create an Image (right next to Boundary in the Common toolbox). This brings up first the Boundary creation dialog (because an Image is really just a filled Boundary), then the Image selection dialog. Click the Add New... button to import your image. Repeat for each partition.
Please note that EA stores images in the project (database), and converts them to bitmaps. You can use the same image in many locations in your model, but obviously this means that if you make changes to the image in one place it affects all uses.
Also note that when you start dropping model elements onto your partitions, you may need to play with the Z order to see them. In addition, it may not look perfect because of the 3D/hover effect EA employs, which adds a bit of the diagram background colour around the edges of an element.
But since the Images are in fact Boundaries, any elements you've dropped onto them stay inside the Image when you move it so in diagramming terms it does work.