Package research

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


   
    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

Related Classes of research.ConnectionFigure

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.