Package lupos.gui.operatorgraph

Examples of lupos.gui.operatorgraph.AbstractSuperGuiComponent


            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
View Full Code Here


      if (op instanceof MultiInputOperator) {
        final GraphWrapperBasicOperator gw = new GraphWrapperBasicOperator(
            op);

        final AbstractSuperGuiComponent annotation = new AnnotationPanel(
            parent, gw, Integer.toString(opIDt.getId()));

        annotations.put(gw, annotation);
      }
    }
View Full Code Here

      final BasicOperatorByteArray op = opIDt.getOperator();

      if (op.isMultiInputOperator()) {
        final GraphWrapperBasicOperatorByteArray gw = new GraphWrapperBasicOperatorByteArray(op);

        final AbstractSuperGuiComponent annotation = new AnnotationPanel(parent, gw, Integer.toString(opIDt.getId()));

        annotations.put(gw, annotation);
      }
    }
View Full Code Here

TOP

Related Classes of lupos.gui.operatorgraph.AbstractSuperGuiComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.