continue;
}
GraphWrapper previousAnnotationGW = lineAnnotationsGWsIt
.next();
AbstractSuperGuiComponent previousAnnotation = lineAnnotations
.get(previousAnnotationGW);
// walk through all but the first annotation...
while (lineAnnotationsGWsIt.hasNext()) {
// get current GW...
final GraphWrapper lineAnnotationGW = lineAnnotationsGWsIt
.next();
// get current annotation....
final AbstractSuperGuiComponent annotation = lineAnnotations
.get(lineAnnotationGW);
// check for overlapping...
if (previousAnnotation.isOverlapping(annotation)) {
final GraphBox previousAnnotationTargetBox = boxes
.get(previousAnnotationGW);
final GraphBox annotationTargetBox = boxes
.get(lineAnnotationGW);
// move annotation target box...
if (previousAnnotationTargetBox.getX() <= annotationTargetBox
.getX()) {
final int annotationDistance = (previousAnnotation
.getLocation().x + previousAnnotation
.getPreferredSize().width)
- annotation.getLocation().x;
final int newX = annotationTargetBox.getX()
+ annotationTargetBox.width
+ (int) Math
.ceil(operatorgraph.PADDING)
+ annotationDistance;
annotationTargetBox
.setXWithoutUpdatingParentsSize(newX);
}
// move previousAnnotation target box...
else if (previousAnnotationTargetBox.getX() > annotationTargetBox
.getX()) {
final int annotationDistance = (annotation
.getLocation().x + annotation
.getPreferredSize().width)
- previousAnnotation.getLocation().x;
final int newX = previousAnnotationTargetBox
.getX()
+ previousAnnotationTargetBox.width