Examples of PLConnection


Examples of de.FeatureModellingTool.GraphicalEditor.PLConnection

          modifier = CFRModifier.Affirmation;
        }
      }
      CFRelation cfrDest = cmeDest.addCFRelation(f , gcDest , false , modifier);
     
      PLConnection plc = new PLConnection();
      plc.setAttribute("id" , cfrDest.getID());
//      result.setAttribute("frameColor" , cfSrc.getAttribute("frameColor"));
//      plc.setAttribute("type" , cfSrc.getAttribute("type"));
      plc.setAttribute("CFRModifier" , modifier.getName());
      plc.startPoint(gcfDest.getDisplayBox().x , gcfDest.getDisplayBox().y);
      Figure figureSrc = mFigure.get(f.getID());
      plc.endPoint(figureSrc.getDisplayBox().x , figureSrc.getDisplayBox().y);
    }
  }
View Full Code Here

Examples of de.FeatureModellingTool.GraphicalEditor.PLConnection

        } else {
          modifier = CFRModifier.Affirmation;
        }
      }
      CFRelation cfrDest = cme.addCFRelation(f , gcDest , false , modifier);
      PLConnection plcOld = (PLConnection)mFigure.get(cfrSrc.getID());
     
     
      PLConnection plcNew = new PLConnection();
      plcNew.setAttribute("id" , cfrDest.getID());
      plcNew.setAttribute("frameColor" , plcOld.getAttribute("frameColor"));
      plcNew.setAttribute("type" , plcOld.getAttribute("type"));
      plcNew.setAttribute("CFRModifier" , modifier.getName());
     
      for (int i=0 ; i<plcOld.pointCount() ; i++) {
        plcNew.addPoint(plcOld.pointAt(i).x , plcOld.pointAt(i).y);
      }
      plcNew.startPoint(gcf.getConnectors()[0].getDisplayBox().x , gcf.getConnectors()[0].getDisplayBox().y);
      plcNew.connectStart(gcf.getConnectors()[0]);
      Figure featureFigure = mFigure.get(f.getID());
      plcNew.endPoint(featureFigure.getConnectors()[3].getDisplayBox().x , featureFigure.getConnectors()[3].getDisplayBox().y);
      plcNew.connectEnd(featureFigure.getConnectors()[3]);
     
      dv.add(plcNew);
    }
   
    return true;
View Full Code Here

Examples of de.FeatureModellingTool.GraphicalEditor.PLConnection

     
      cme.removeCFRelation(rOld.getID());
     
      CFRelation rNew = cme.addCFRelation(rOld.getID() , feature , cc , isSource, CFRModifier.Affirmation.equals(rOld.getModifier()) ? CFRModifier.Negation : CFRModifier.Affirmation);
     
      PLConnection fOld = (PLConnection)mFigure.get(rOld.getID());
      fOld.setAttribute("CFRModifier" , rNew.getModifier().getName());
    }
  }
View Full Code Here

Examples of de.FeatureModellingTool.GraphicalEditor.PLConnection

      Figure figureSource = mFigure.get(fSource.getID());
      CFRelation rOld = cm.getCFRelation(fSource , cOld , true);
      if (rOld==null) {
        rOld = cm.getCFRelation(fSource , cOld , false);
      }
      PLConnection plcOld = (PLConnection)mFigure.get(rOld.getID());
     
      CFRelation rNew = cme.addCFRelation(fSource , ccNew , true
          , rOld.getModifier().equals(CFRModifier.Affirmation) ? (revertSourceRelation ? CFRModifier.Negation : CFRModifier.Affirmation) : (revertSourceRelation ? CFRModifier.Affirmation : CFRModifier.Negation));
           
      PLConnection plcNew = new PLConnection();
      plcNew.setAttribute("id" , rNew.getID());
      plcNew.setAttribute("frameColor" , plcOld.getAttribute("frameColor"));
      plcNew.setAttribute("type" , plcOld.getAttribute("type"));
      plcNew.setAttribute("CFRModifier" , rNew.getModifier().getName());

      for (int i=0 ; i<plcOld.pointCount() ; i++) {
        plcNew.addPoint(plcOld.pointAt(i).x , plcOld.pointAt(i).y);
      }
      plcNew.startPoint(plfNew.getConnectors()[0].getDisplayBox().x , plfNew.getConnectors()[0].getDisplayBox().y);
      plcNew.connectStart(plfNew.getConnectors()[0]);
      plcNew.endPoint(figureSource.getConnectors()[4].getDisplayBox().x , figureSource.getConnectors()[4].getDisplayBox().y);
      plcNew.connectEnd(figureSource.getConnectors()[4]);
      dv.add(plcNew);
    }
   
    for (Iterator<Feature> itFeature=fSinks.iterator() ; itFeature.hasNext() ; ) {
      Feature fSink = itFeature.next();
      Figure figureSink = mFigure.get(fSink.getID());
      CFRelation rOld = cm.getCFRelation(fSink , cOld , true);
      if (rOld==null) {
        rOld = cm.getCFRelation(fSink , cOld , false);
      }
      CFRelation rNew = cme.addCFRelation(fSink , ccNew , true
          , rOld.getModifier().equals(CFRModifier.Affirmation) ? (revertSinkRelation ? CFRModifier.Negation : CFRModifier.Affirmation) : (revertSinkRelation ? CFRModifier.Affirmation : CFRModifier.Negation));
           
      PLConnection plcOld = (PLConnection)mFigure.get(rOld.getID());
      PLConnection plcNew = new PLConnection();
      plcNew.setAttribute("id" , rNew.getID());
      plcNew.setAttribute("frameColor" , plcOld.getAttribute("frameColor"));
      plcNew.setAttribute("type" , plcOld.getAttribute("type"));
      plcNew.setAttribute("CFRModifier" , rNew.getModifier().getName());

      for (int i=0 ; i<plcOld.pointCount() ; i++) {
        plcNew.addPoint(plcOld.pointAt(i).x , plcOld.pointAt(i).y);
      }
      plcNew.startPoint(plfNew.getConnectors()[1].getDisplayBox().x , plfNew.getConnectors()[1].getDisplayBox().y);
      plcNew.connectStart(plfNew.getConnectors()[1]);
      plcNew.endPoint(figureSink.getConnectors()[3].getDisplayBox().x , figureSink.getConnectors()[3].getDisplayBox().y);
      plcNew.connectEnd(figureSink.getConnectors()[3]);
      dv.add(plcNew);
    }
   
    return true;
  }
View Full Code Here

Examples of de.FeatureModellingTool.GraphicalEditor.PLConnection

      result = new ConstraintConnection((String)cfSrc.getAttribute("type"));
      ((ConstraintConnection)result).setStartDecoration(((ConstraintConnection)cfSrc).getStartDecoration());
      ((ConstraintConnection)result).setMidDecoration(((ConstraintConnection)cfSrc).getMidDecoration());
      ((ConstraintConnection)result).setEndDecoration(((ConstraintConnection)cfSrc).getEndDecoration());
    } else if (cfSrc instanceof PLConnection){
      result = new PLConnection();
      result.setAttribute("frameColor" , cfSrc.getAttribute("frameColor"));
      result.setAttribute("type" , cfSrc.getAttribute("type"));
      result.setAttribute("CFRModifier" , cfSrc.getAttribute("CFRModifier"));
    } else {
      return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.