umlsymbolssequence-diagramumlet

UML 2 sequence diagram symbols in UMLet?


I would like to know if there is any possibility of representing the UML2 Boundary/Control/Entity symbols of a Sequence Diagram in UMLet ? (http://www.uml.org.cn/oobject/images/seq02.gif)

Do I have to write their java code myself or does it already exist somewhere ?


Solution

  • This is the snippet I used to create a boundary symbol in UMLet. You can alter it as needed.

    int h = height - textHeight() * textlines.size();
    int radius = h/2;
    drawCircle(width-radius, radius, radius);
    drawLine(0, 10, 0, h-10);
    drawLine(0, radius, width-h, radius);
    
    int y = textHeight()+5;
    for(String textline : textlines) {
        printCenter(textline, height-3);
    }
    

    Preview:

    enter image description here