Package pl.tecna.gwt.connectors.client.elements

Examples of pl.tecna.gwt.connectors.client.elements.Section


     */
    for (ConnectionPoint cp : shape.connectionPoints) {
      for (EndPoint ep : cp.gluedEndPoints) {
        Connector conn = ep.connector;
        if (conn.sections.size() > 1) {
          Section secondFromShape = null;
          int sectionLength;
          boolean start = false;
          if (conn.endEndPoint.equals(ep)) {
            secondFromShape = conn.sections.get(conn.sections.size() - 2);

          } else if (conn.startEndPoint.equals(ep)) {
            start = true;
            secondFromShape = conn.sections.get(1);
          }

          if (secondFromShape.isHorizontal()) {
            sectionLength = secondFromShape.endPoint.getLeft() - secondFromShape.startPoint.getLeft();
          } else {
            sectionLength = secondFromShape.endPoint.getTop() - secondFromShape.startPoint.getTop();
          }

          if (start) {
            sectionLength = -sectionLength;
          }

          if (Math.abs(sectionLength) < Shape.SECTION_TOLERANCE) {
            if (secondFromShape.isHorizontal()) {
              horSectionsMap.put(sectionLength, secondFromShape);
            } else {
              vertSectionsMap.put(sectionLength, secondFromShape);
            }
          }
        }
      }
    }

    Integer minHorizontal = Integer.MAX_VALUE;
    Integer minVertical = Integer.MAX_VALUE;
    Section lastHorizontalSection = null;
    Section lastVerticalSection = null;

    for (Integer length : horSectionsMap.keySet()) {
      if (length < minHorizontal) {
        minHorizontal = length;
        lastHorizontalSection = horSectionsMap.get(length);
View Full Code Here

TOP

Related Classes of pl.tecna.gwt.connectors.client.elements.Section

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.