Search in sources :

Example 1 with LoopArrow

use of net.sf.sdedit.drawable.LoopArrow in project abstools by abstools.

the class MessageToSelf method updateView.

@Override
public void updateView() {
    getDiagram().getPaintDevice().announce(getConfiguration().getSpaceBeforeActivation() + Arrow.getInnerHeight(this) + diagram.arrowSize / 2);
    extendLifelines(getConfiguration().getSpaceBeforeSelfMessage());
    Direction align = getCallee().getDirection();
    if (align == Direction.CENTER) {
        // This is true for instantly returning self-messages directed onto
        // the root lifeline
        align = Direction.RIGHT;
    }
    Arrow arrow = new LoopArrow(this, ArrowStroke.SOLID, align, v());
    setArrow(arrow);
    extendLifelines(arrow.getInnerHeight());
    getCallee().setActive(true);
    getDiagram().getPaintDevice().addSequenceElement(arrow);
}
Also used : LoopArrow(net.sf.sdedit.drawable.LoopArrow) Arrow(net.sf.sdedit.drawable.Arrow) LoopArrow(net.sf.sdedit.drawable.LoopArrow) Direction(net.sf.sdedit.util.Direction)

Example 2 with LoopArrow

use of net.sf.sdedit.drawable.LoopArrow in project abstools by abstools.

the class AnswerToSelf method updateView.

public void updateView() {
    getDiagram().getPaintDevice().announce(getConfiguration().getSpaceBeforeAnswerToSelf() + Arrow.getInnerHeight(this) + diagram.arrowSize / 2);
    getDiagram().getFragmentManager().finishFragmentsNotIncluding(this);
    extendLifelines(getConfiguration().getSpaceBeforeAnswerToSelf());
    Direction align = getCaller().getDirection();
    Arrow arrow = new LoopArrow(this, ArrowStroke.DASHED, align, v());
    arrow.setVisible(getText().length() > 0 || diagram.returnArrowVisible);
    setArrow(arrow);
    getDiagram().getPaintDevice().addSequenceElement(arrow);
    terminate();
    extendLifelines(arrow.getInnerHeight());
}
Also used : LoopArrow(net.sf.sdedit.drawable.LoopArrow) Arrow(net.sf.sdedit.drawable.Arrow) LoopArrow(net.sf.sdedit.drawable.LoopArrow) Direction(net.sf.sdedit.util.Direction)

Aggregations

Arrow (net.sf.sdedit.drawable.Arrow)2 LoopArrow (net.sf.sdedit.drawable.LoopArrow)2 Direction (net.sf.sdedit.util.Direction)2