use of net.sf.sdedit.drawable.BroadcastArrow in project abstools by abstools.
the class BroadcastMessage method updateView.
@Override
public void updateView() {
if (getData().getBroadcastType() == FIRST) {
getDiagram().getPaintDevice().announce(getConfiguration().getSpaceBeforeActivation() + 3 + Arrow.getInnerHeight(this) + diagram.arrowSize / 2);
extendLifelines(getConfiguration().getSpaceBeforeActivation() + 3);
}
Arrow arrow;
if (getCaller().getPosition() < getCallee().getPosition()) {
arrow = new BroadcastArrow(this, Direction.RIGHT, v());
} else {
arrow = new BroadcastArrow(this, Direction.LEFT, v());
}
setArrow(arrow);
if (getData().getBroadcastType() == LAST) {
extendLifelines(arrow.getInnerHeight());
for (Lifeline callee : otherCallees) {
if (!callee.isAlwaysActive() && isActivating()) {
callee.setActive(true);
}
}
if (!getCallee().isAlwaysActive() && isActivating()) {
getCallee().setActive(true);
}
}
getDiagram().getPaintDevice().addSequenceElement(arrow);
}
Aggregations