Examples of ConnectionFigure


Examples of research.ConnectionFigure

            for (Iterator<FeatureRelation> itRelation = fSrc.getAllRelatedRelation().iterator(); itRelation.hasNext();) {
                FeatureRelation relation = itRelation.next();
                if (relation.getStartFeature().getID().equals(fParent.getID())) {
                    FeatureRelation newRelation = fmEditor.addRelation(relation.getName(), fDist, fTarget);

                    ConnectionFigure cf = null;
                    if (FeatureRelation.ATTRIBUTE.equals(newRelation.getName())) {
                        AttributeConnection dvc = new AttributeConnection();
                        cf = dvc;
                    } else if (FeatureRelation.DECOMPOSE.equals(newRelation.getName())) {
                        DecomposeConnection ic = new DecomposeConnection();
                        cf = ic;
                    } else if (FeatureRelation.REQUIRE.equals(newRelation.getName())) {
                        ConstraintConnection cc = new ConstraintConnection(FeatureRelation.REQUIRE);
                        cc.setEndDecoration(new ArrowTip());
                        cf = cc;
                    } else if (FeatureRelation.EXCLUDE.equals(newRelation.getName())) {
                        ConstraintConnection cc = new ConstraintConnection(FeatureRelation.EXCLUDE);
                        cc.setMidDecoration(new CrossDecoration(5));
                        cf = cc;
                    }

                    if (cf != null) {
                        cf.setAttribute("id", newRelation.getID());
                        cf.startPoint(figureMap.get(newRelation.getStartFeature().getID()).center().x, figureMap.get(newRelation.getStartFeature().getID()).center().y);
                        cf.endPoint(figureMap.get(newRelation.getEndFeature().getID()).center().x, figureMap.get(newRelation.getEndFeature().getID()).center().y);
                        if (de.FeatureModellingTool.Pattern.ConstantDefinition.isStructRelation(relation)) {
                            cf.connectStart(figureMap.get(newRelation.getStartFeature().getID()).getConnectors()[2]);
                            cf.connectEnd(figureMap.get(newRelation.getEndFeature().getID()).getConnectors()[1]);
                        } else {
                            cf.connectStart(figureMap.get(newRelation.getStartFeature().getID()).getConnectors()[0]);
                            cf.connectEnd(figureMap.get(newRelation.getEndFeature().getID()).getConnectors()[0]);
                        }
                        dvDist.add(cf);
                        cf.updateConnection();
                    }

                    break;
                }
            }
View Full Code Here

Examples of research.ConnectionFigure

   
    if (this.featureModel.getAllFeatureRelation()!=null)
      for (Iterator itRelation = this.featureModel.getAllFeatureRelation().values().iterator() ; itRelation.hasNext() ; )
      {
        FeatureRelation featureRelation = (FeatureRelation)itRelation.next();
        ConnectionFigure cf = null;
        if (FeatureRelation.ATTRIBUTE.equals(featureRelation.getName())) {
          AttributeConnection dvc = new AttributeConnection();
          cf = dvc;
        } else if (FeatureRelation.DECOMPOSE.equals(featureRelation.getName())) {
          DecomposeConnection ic = new DecomposeConnection();
          cf = ic;
        } else if (FeatureRelation.REQUIRE.equals(featureRelation.getName())) {
          ConstraintConnection cc = new ConstraintConnection(FeatureRelation.REQUIRE);
              cc.setEndDecoration(new ArrowTip());
          cf = cc;
        } else if (FeatureRelation.EXCLUDE.equals(featureRelation.getName())) {
          ConstraintConnection cc = new ConstraintConnection(FeatureRelation.EXCLUDE);
              cc.setMidDecoration(new CrossDecoration(5));
          cf = cc;
        }
       
        if (cf!=null) {
          cf.setAttribute("id" , featureRelation.getID());
          cf.startPoint(htFigures.get(featureRelation.getStartFeature().getID()).center().x , htFigures.get(featureRelation.getStartFeature().getID()).center().y);
          cf.endPoint(htFigures.get(featureRelation.getEndFeature().getID()).center().x , htFigures.get(featureRelation.getEndFeature().getID()).center().y);
          if (de.FeatureModellingTool.Pattern.ConstantDefinition.isStructRelation(featureRelation)) {
            cf.connectStart(htFigures.get(featureRelation.getStartFeature().getID()).getConnectors()[2]);
            cf.connectEnd(htFigures.get(featureRelation.getEndFeature().getID()).getConnectors()[1]);
          } else {
            cf.connectStart(htFigures.get(featureRelation.getStartFeature().getID()).getConnectors()[0]);
            cf.connectEnd(htFigures.get(featureRelation.getEndFeature().getID()).getConnectors()[0]);
          }
          dv.add(cf);
          cf.updateConnection();
         
          htFigures.put(featureRelation.getID() , cf);
          super.idToFigureMap.add(featureRelation.getID() , cf);
        }
      }
View Full Code Here

Examples of research.ConnectionFigure

   
    if (this.featureModel.getAllFeatureRelation()!=null)
      for (Iterator itRelation = this.featureModel.getAllFeatureRelation().values().iterator() ; itRelation.hasNext() ; )
      {
        FeatureRelation featureRelation = (FeatureRelation)itRelation.next();
        ConnectionFigure cf = null;
        if (FeatureRelation.ATTRIBUTE.equals(featureRelation.getName())) {
          AttributeConnection dvc = new AttributeConnection();
          cf = dvc;
        } else if (FeatureRelation.DECOMPOSE.equals(featureRelation.getName())) {
          DecomposeConnection ic = new DecomposeConnection();
          cf = ic;
        } else if (FeatureRelation.REQUIRE.equals(featureRelation.getName())) {
          ConstraintConnection cc = new ConstraintConnection(FeatureRelation.REQUIRE);
              cc.setEndDecoration(new ArrowTip());
          cf = cc;
        } else if (FeatureRelation.EXCLUDE.equals(featureRelation.getName())) {
          ConstraintConnection cc = new ConstraintConnection(FeatureRelation.EXCLUDE);
              cc.setMidDecoration(new CrossDecoration(5));
          cf = cc;
        }
       
        if (cf!=null) {
          cf.setAttribute("id" , featureRelation.getID());
          cf.startPoint(htFigures.get(featureRelation.getStartFeature().getID()).center().x , htFigures.get(featureRelation.getStartFeature().getID()).center().y);
          cf.endPoint(htFigures.get(featureRelation.getEndFeature().getID()).center().x , htFigures.get(featureRelation.getEndFeature().getID()).center().y);
          if (de.FeatureModellingTool.Pattern.ConstantDefinition.isStructRelation(featureRelation)) {
            cf.connectStart(htFigures.get(featureRelation.getStartFeature().getID()).getConnectors()[2]);
            cf.connectEnd(htFigures.get(featureRelation.getEndFeature().getID()).getConnectors()[1]);
          } else {
            cf.connectStart(htFigures.get(featureRelation.getStartFeature().getID()).getConnectors()[0]);
            cf.connectEnd(htFigures.get(featureRelation.getEndFeature().getID()).getConnectors()[0]);
          }
          dv.add(cf);
          cf.updateConnection();
         
          htFigures.put(featureRelation.getID() , cf);
          super.idToFigureMap.add(featureRelation.getID() , cf);
        }
      }
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.