Package ag.ion.bion.officelayer.draw.shapes

Examples of ag.ion.bion.officelayer.draw.shapes.IConnector


    return closedBezierShape;
  }

  @Override
  public IConnector createConnector() {
    IConnector connector = new Connector(drawPage
        .createShape(IShape.CONNECTOR), drawPage);
    return connector;
  }
View Full Code Here


    return edge.getTarget();
  }

  public IShape createShape(IShape sourceShape, IShape targetShape,
      IShapeFactory shapeFactory) {
    IConnector connector = shapeFactory.createConnector();
    connector.addToPage();
    boolean above = sourceShape.getXShape().getPosition().Y > targetShape
        .getXShape().getPosition().Y;
    boolean left = sourceShape.getXShape().getPosition().X > targetShape
        .getXShape().getPosition().X;

    if ("3002".equals(edge.getType())) { //$NON-NLS-1$
      if (left) {
        connector.setStart(sourceShape, Orientation.Top);
        connector.setEnd(targetShape, Orientation.Left);
      } else {
        connector.setStart(sourceShape, Orientation.Top);
        connector.setEnd(targetShape, Orientation.Right);
      }
      connector.getLineProperties().setEndArrow(Arrow.LINE);
      connector.getLineProperties().setEndArrowWidth(200);
    } else if ("3003".equals(edge.getType())) { //$NON-NLS-1$
      if (above) {
        connector.setStart(targetShape, Orientation.Bottom);
        connector.setEnd(sourceShape, Orientation.Top);
      } else {
        connector.setStart(targetShape, Orientation.Top);
        connector.setEnd(sourceShape, Orientation.Bottom);
      }
      connector.getLineProperties().setStartArrow(new InheritanceArrow());
      connector.getLineProperties().setStartArrowWidth(900);
    }
    return connector;
  }
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.draw.shapes.IConnector

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.