@Override
 public void tryToCreateRelationshipPolyAt(int screenX, int screenY) {
   for (IAsmElementUmlInteractive<ClassFull<ClassUml>, DRI, SD, PRI> asmClassUml :
       asmListAsmClassesFull.getListElementsUml()) {
     if (asmClassUml.isContainsScreenPoint(screenX, screenY)) {
       IAsmElementUmlInteractive<
               RelationshipPoly<
                   RectangleRelationship<ClassFull<ClassUml>, ClassUml>,
                   ClassFull<ClassUml>,
                   ClassUml>,
               DRI,
               SD,
               PRI>
           asmRelationshipPoly = factoryAsmRelationshipPolyClass.createAsmElementUml();
       asmRelationshipPoly.getElementUml().setKind(ERelationshipKind.ASSOCIATION);
       RectangleRelationship<ClassFull<ClassUml>, ClassUml> rectangleRelationship =
           new RectangleRelationship<ClassFull<ClassUml>, ClassUml>();
       rectangleRelationship.setShapeFull(asmClassUml.getElementUml());
       rectangleRelationship.setSideJoint(EJointSide.BOTTOM);
       rectangleRelationship.setSideLength(asmClassUml.getElementUml().getShape().getWidth() / 2);
       rectangleRelationship.setEndType(ERelationshipEndType.END);
       asmRelationshipPoly.getElementUml().getShapesRelationship().add(rectangleRelationship);
       asmRelationshipPoly.getElementUml().getSharedJoint().setTypeJoint(EJoint2DType.BUS_X);
       asmRelationshipPoly
           .getElementUml()
           .getSharedJoint()
           .setX(
               asmClassUml.getElementUml().getShape().getPointStart().getX()
                   + asmClassUml.getElementUml().getShape().getWidth() / 2);
       asmRelationshipPoly
           .getElementUml()
           .getSharedJoint()
           .setY(
               asmClassUml.getElementUml().getShape().getPointStart().getY()
                   + asmClassUml.getElementUml().getShape().getHeight() * 1.5);
       asmClassUml
           .getElementUml()
           .getClassRelationsPoly()
           .add(asmRelationshipPoly.getElementUml().getShapesRelationship().get(0));
       UtilsRectangleRelationship.evalPointJoint(
           asmRelationshipPoly.getElementUml().getShapesRelationship().get(0));
       makeElementSelected(asmRelationshipPoly);
       tryToAddIntoContainer(asmRelationshipPoly, screenX, screenY);
       asmListAsmRelationshipsPolyClass.addElementUml(asmRelationshipPoly);
       setIsChanged(true);
       asmRelationshipPoly.startEdit();
       getDiagramUml().setIsAbleToChangeByDoclet(false);
       refreshGui();
       break;
     }
   }
 }
 @Override
 public void tryToCreateRelationshipAt(ERelationshipKind relationKind, int screenX, int screenY)
     throws Exception {
   for (IAsmElementUmlInteractive<ClassFull<ClassUml>, DRI, SD, PRI> asmClassUml :
       asmListAsmClassesFull.getListElementsUml()) {
     if (asmClassUml.isContainsScreenPoint(screenX, screenY)) {
       double realX = UtilsGraphMath.toRealX(getHolderApp().getSettingsGraphicUml(), screenX);
       double realY = UtilsGraphMath.toRealY(getHolderApp().getSettingsGraphicUml(), screenY);
       IAsmElementUmlInteractive<
               RelationshipBinary<
                   RectangleRelationship<ClassFull<ClassUml>, ClassUml>,
                   ClassFull<ClassUml>,
                   ClassUml>,
               DRI,
               SD,
               PRI>
           asmRelUml = factoryAsmRelationshipBinaryClass.createAsmElementUml();
       asmRelUml.getElementUml().setKind(relationKind);
       asmRelUml.getElementUml().getShapeRelationshipStart().setEndType(ERelationshipEndType.END);
       asmRelUml
           .getElementUml()
           .getShapeRelationshipStart()
           .setShapeFull(asmClassUml.getElementUml());
       UtilsRectangleRelationship.setPointJointAt(
           asmRelUml.getElementUml().getShapeRelationshipStart(),
           getGuiApp().getSettingsGraphicUml(),
           screenX,
           screenY);
       asmRelUml
           .getElementUml()
           .getShapeRelationshipEnd()
           .getPointJoint()
           .setX(realX + getHolderApp().getSettingsGraphicUml().fromInchToCurrentMeasure(1));
       asmRelUml.getElementUml().getShapeRelationshipEnd().getPointJoint().setY(realY);
       asmClassUml
           .getElementUml()
           .getRelationshipsBinary()
           .add(
               new ClassRelationFull<ClassUml>(
                   asmRelUml.getElementUml().getShapeRelationshipStart(),
                   asmRelUml.getElementUml()));
       makeElementSelected(asmRelUml);
       tryToAddIntoContainer(asmRelUml, screenX, screenY);
       asmListAsmRelationshipsBinaryClass.addElementUml(asmRelUml);
       setIsChanged(true);
       getDiagramUml().setIsAbleToChangeByDoclet(false);
       refreshGui();
       break;
     }
   }
 }
 @Override
 public void tryToCreateRelationshipSelfAt(int screenX, int screenY) {
   for (IAsmElementUmlInteractive<ClassFull<ClassUml>, DRI, SD, PRI> asmClassUml :
       asmListAsmClassesFull.getListElementsUml()) {
     if (asmClassUml.isContainsScreenPoint(screenX, screenY)) {
       IAsmElementUmlInteractive<
               RelationshipSelf<
                   RectangleRelationship<ClassFull<ClassUml>, ClassUml>,
                   ClassFull<ClassUml>,
                   ClassUml>,
               DRI,
               SD,
               PRI>
           asmRelationshipSelf = factoryAsmRelationshipSelfClass.createAsmElementUml();
       asmRelationshipSelf.getElementUml().setKind(ERelationshipKind.ASSOCIATION);
       asmRelationshipSelf
           .getElementUml()
           .getShapeRelationshipStart()
           .setShapeFull(asmClassUml.getElementUml());
       asmRelationshipSelf
           .getElementUml()
           .getShapeRelationshipStart()
           .setSideJoint(EJointSide.LEFT);
       asmRelationshipSelf
           .getElementUml()
           .getShapeRelationshipStart()
           .setSideLength(asmClassUml.getElementUml().getShape().getHeight() / 2);
       asmRelationshipSelf
           .getElementUml()
           .getShapeRelationshipEnd()
           .setShapeFull(asmClassUml.getElementUml());
       asmRelationshipSelf.getElementUml().getShapeRelationshipEnd().setSideJoint(EJointSide.TOP);
       asmRelationshipSelf
           .getElementUml()
           .getShapeRelationshipEnd()
           .setSideLength(asmClassUml.getElementUml().getShape().getWidth() / 2);
       asmRelationshipSelf
           .getElementUml()
           .getShapeRelationshipEnd()
           .setEndType(ERelationshipEndType.END);
       asmRelationshipSelf
           .getElementUml()
           .getSharedJoint()
           .setX(
               asmClassUml.getElementUml().getShape().getPointStart().getX()
                   - asmClassUml.getElementUml().getShape().getWidth() / 4);
       asmRelationshipSelf
           .getElementUml()
           .getSharedJoint()
           .setY(
               asmClassUml.getElementUml().getShape().getPointStart().getY()
                   - asmClassUml.getElementUml().getShape().getHeight() / 4);
       UtilsRectangleRelationship.evalPointsJointAndShared(asmRelationshipSelf.getElementUml());
       asmClassUml.getElementUml().getRelationshipsSelf().add(asmRelationshipSelf.getElementUml());
       makeElementSelected(asmRelationshipSelf);
       tryToAddIntoContainer(asmRelationshipSelf, screenX, screenY);
       asmListAsmRelationshipsSelfClass.addElementUml(asmRelationshipSelf);
       setIsChanged(true);
       getDiagramUml().setIsAbleToChangeByDoclet(false);
       refreshGui();
       break;
     }
   }
 }