我想知道是否有可能用UML2表示UMLet?(http://www.uml.org.cn/oobject/images/seq02.gif)序列图的边界/控制/实体符号。
我是否必须自己编写他们的java代码,还是已经存在了?
发布于 2015-04-02 08:11:07
我不确定你指的是顺序,还是顺序。
虽然不支持这些新的生命线,但您可以很容易地向前者添加一个自定义元素。这里有一个很好很简单的教程,如何在这里添加一个新元素http://www.umlet.com/ce/ce.htm
如果您想要将其添加到全部在一起,则需要深入到内部,因为它还需要在文本解析器中进行更改。
发布于 2015-05-02 20:49:36
所以我在诺亚的基础上做了一些模型。它远不是一个专业的东西,而且代码很脏,但我想它在一段时间内起了作用。因此,如果在UMLet中更好地实现这些符号之前,有人遇到了与我相同的问题:
实体:
int h = height - textHeight() * textlines.size();
int radius = h*2/5;
int w = radius*2 ;
double x = (width - w)/2 + radius ;
double y = h/10 + radius;
double x2 = x + radius/4 * Math.sqrt(3);
double y2 = y - radius/4 ;
drawCircle((int)x, (int) y, radius);
drawLine((int)x-radius , (int)y + radius , (int) x+ radius, (int) y+radius);
drawLine((int)x - radius , (int) y - 2*radius , (int) x + radius, (int) y - 2*radius);
for(String textline : textlines) {
printCenter(textline, h);
}管制:
int h = height - textHeight() * textlines.size();
int radius = h*2/5;
int w = radius*2 ;
double x1 = (width - w)/2 + radius ;
double y1 = h/10;
double x2 = x1 + radius/4 * Math.sqrt(3);
double y2 = y1 - radius/4 ;
double x3 = x1 + radius/4 * Math.sqrt(3);
double y3 = y1 + radius/4;
drawCircle((int)x1, (int) y1+radius, radius);
drawLine((int)x1, (int) y1 , (int)x2, (int)y2);
drawLine((int)x1, (int) y1 , (int)x3, (int)y3);
int y = textHeight()+5;
for(String textline : textlines) {
printCenter(textline, h);
}https://stackoverflow.com/questions/29005157
复制相似问题