Package de.FeatureModellingTool.Customize

Examples of de.FeatureModellingTool.Customize.Customization


//    } else if (customization.equals(Customization.Undecided)) {
//      iconName += "undecided";
//    }
//   
//    return htIcon.get(iconName);
    Customization cFinal = node.getCustomizationVersion().getFinalCustomizationById(node.getFeature().getID());
    Customization cSelf = node.getCustomizationVersion().getCustomizationById(node.getFeature().getID());
   
    return ImageManager.getInstance().getCustomizationIcon(cFinal , cSelf , !node.getCustomizationVersion().isFeatureCustomizedByParentVersion(node.getFeature().getID()));
  }
View Full Code Here


 
  public class ConstraintExplorerCellRenderHelper {
    protected int getCustomizationCount(List<Customization> cus , Customization target) {
      int result = 0;
      for (Iterator<Customization> itCustomization=cus.iterator() ; itCustomization.hasNext() ; ) {
        Customization c = itCustomization.next();
        if (c.getName().equals(target.getName())) {
          result ++;
        }
      }
     
      return result;
View Full Code Here

                cf = constraintModel.getCFRelation(feature , gc , false);
            }
            sCustomization.add(super.convertCustomization(cv.getFinalCustomizationById(feature.getID()) , cf));
          }
         
          Customization value = Customization.Undecided;
          if (gc.getType().getName().equals(GroupConstraintType.SingleGroup.getName())) {
            if (super.getCustomizationCount(sCustomization , Customization.Selected)>1) {
              value = Customization.Unselected;
            } else if (super.getCustomizationCount(sCustomization , Customization.Undecided)==0) {
              value = Customization.Selected;
View Full Code Here

          if (cf==null) {
              cf = constraintModel.getCFRelation(feature , vp , false);
          }
          sCustomization.add(super.convertCustomization(cv.getFinalCustomizationById(feature.getID()) , cf));
        }
        Customization lValue = Customization.Undecided;
        if (lType.getName().equals(CompositeConstraintPortType.Single.getName())) {
          if (super.getCustomizationCount(sCustomization , Customization.Undecided)>0) {
            lValue = Customization.Undecided;
          } else if (super.getCustomizationCount(sCustomization , Customization.Selected)==1) {
            lValue = Customization.Selected;
          } else {
            lValue = Customization.Unselected;
          }
        } else if (lType.getName().equals(CompositeConstraintPortType.All.getName())) {
          if (super.getCustomizationCount(sCustomization , Customization.Undecided)>0) {
            lValue = Customization.Undecided;
          } else if (super.getCustomizationCount(sCustomization , Customization.Unselected)==0) {
            lValue = Customization.Selected;
          } else {
            lValue = Customization.Unselected;
          }
        } else /*if (gc.getType().getName().equals(GroupConstraintType.SingleGroup))*/ {
          if (super.getCustomizationCount(sCustomization , Customization.Selected)>0) {
            lValue = Customization.Selected;
          } else if (super.getCustomizationCount(sCustomization , Customization.Undecided)>0) {
            lValue = Customization.Undecided;
          } else {
            lValue = Customization.Unselected;
          }
        }
       
        sCustomization = new ArrayList<Customization>();
        for (Iterator<Feature> itFeature=vp.getSinkFeatureSet().iterator() ; itFeature.hasNext() ; ) {
          Feature feature = itFeature.next();
          CFRelation cf = constraintModel.getCFRelation(feature , vp , true);
          if (cf==null) {
              cf = constraintModel.getCFRelation(feature , vp , false);
          }
          sCustomization.add(super.convertCustomization(cv.getFinalCustomizationById(feature.getID()) , cf));
        }
        Customization rValue = Customization.Undecided;
        if (rType.getName().equals(CompositeConstraintPortType.Single.getName())) {
          if (super.getCustomizationCount(sCustomization , Customization.Undecided)>0) {
            rValue = Customization.Undecided;
          } else if (super.getCustomizationCount(sCustomization , Customization.Selected)==1) {
            rValue = Customization.Selected;
View Full Code Here

          if (cf==null) {
              cf = constraintModel.getCFRelation(feature , cc , false);
          }
          sCustomization.add(super.convertCustomization(cv.getFinalCustomizationById(feature.getID()) , cf));
        }
        Customization lValue = Customization.Undecided;
        if (cc.getSourceType().getName().equals(CompositeConstraintPortType.Single.getName())) {
          if (super.getCustomizationCount(sCustomization , Customization.Undecided)>0) {
            lValue = Customization.Undecided;
          } else if (super.getCustomizationCount(sCustomization , Customization.Selected)==1) {
            lValue = Customization.Selected;
          } else {
            lValue = Customization.Unselected;
          }
        } else if (cc.getSourceType().getName().equals(CompositeConstraintPortType.All.getName())) {
          if (super.getCustomizationCount(sCustomization , Customization.Undecided)>0) {
            lValue = Customization.Undecided;
          } else if (super.getCustomizationCount(sCustomization , Customization.Unselected)==0) {
            lValue = Customization.Selected;
          } else {
            lValue = Customization.Unselected;
          }
        } else /*if (gc.getType().getName().equals(GroupConstraintType.SingleGroup))*/ {
          if (super.getCustomizationCount(sCustomization , Customization.Selected)>0) {
            lValue = Customization.Selected;
          } else if (super.getCustomizationCount(sCustomization , Customization.Undecided)>0) {
            lValue = Customization.Undecided;
          } else {
            lValue = Customization.Unselected;
          }
        }
       
        sCustomization = new ArrayList<Customization>();
        for (Iterator<Feature> itFeature=cc.getSinkFeatureSet().iterator() ; itFeature.hasNext() ; ) {
          Feature feature = itFeature.next();
          CFRelation cf = constraintModel.getCFRelation(feature , cc , true);
          if (cf==null) {
              cf = constraintModel.getCFRelation(feature , cc , false);
          }
          sCustomization.add(super.convertCustomization(cv.getFinalCustomizationById(feature.getID()) , cf));
        }
        Customization rValue = Customization.Undecided;
        if (cc.getSinkType().getName().equals(CompositeConstraintPortType.Single.getName())) {
          if (super.getCustomizationCount(sCustomization , Customization.Undecided)>0) {
            rValue = Customization.Undecided;
          } else if (super.getCustomizationCount(sCustomization , Customization.Selected)==1) {
            rValue = Customization.Selected;
View Full Code Here

                            3);
                }
            }

            //gh start
            Customization ct = (Customization) getAttribute(ConstantDefinition.CURRENT_CUSTOMIZATION);
            if (ct != null) {
                int x = 0;
                int y = 0;
                int width = 0;
                int height = 0;

                if (r.width < titleHeight) {
                    x = r.x + 1;
                    y = r.y + 1;
                    width = r.width - 1;
                    height = titleHeight - 1;
                } else {
                    x = r.x + (r.width - titleHeight) / 2 + 1;
                    y = r.y + 1;
                    width = titleHeight - 1;
                    height = titleHeight - 1;
                }

                Boolean customizable = (Boolean) getAttribute(ConstantDefinition.CURRENT_CUSTOMIZATION_CUSTOMIZABLE);
                if (customizable != null && !customizable.booleanValue()) {
                    g.setColor(Color.GRAY);
                    g.fillOval(x, y, width, height);
                }

                Color oldColor = g.getColor();

                g.setColor(Color.BLACK);
                if (Customization.Selected.getName().equals(ct.getName())) {
                    g.drawLine(x, y + height / 2, x + width, y + height / 2);
                    g.drawLine(x + width / 2, y, x + width / 2, y + height);
                }
                if (Customization.Unselected.getName().equals(ct.getName())) {
                    g.drawLine(x, y + height / 2, x + width, y + height / 2);
                }

                g.setColor(oldColor);
            }
View Full Code Here

                            3);
                }
            }

            //gh start
            Customization ct = (Customization) getAttribute(ConstantDefinition.CURRENT_CUSTOMIZATION);
            if (ct != null) {
                int x = 0;
                int y = 0;
                int width = 0;
                int height = 0;

                if (r.width < titleHeight) {
                    x = r.x + 1;
                    y = r.y + 1;
                    width = r.width - 1;
                    height = titleHeight - 1;
                } else {
                    x = r.x + (r.width - titleHeight) / 2 + 1;
                    y = r.y + 1;
                    width = titleHeight - 1;
                    height = titleHeight - 1;
                }

                Boolean customizable = (Boolean) getAttribute(ConstantDefinition.CURRENT_CUSTOMIZATION_CUSTOMIZABLE);
                if (customizable != null && !customizable.booleanValue()) {
                    g.setColor(Color.GRAY);
                    g.fillOval(x, y, width, height);
                }

                Color oldColor = g.getColor();

                g.setColor(Color.BLACK);
                if (Customization.Selected.getName().equals(ct.getName())) {
                    g.drawLine(x, y + height / 2, x + width, y + height / 2);
                    g.drawLine(x + width / 2, y, x + width / 2, y + height);
                }
                if (Customization.Unselected.getName().equals(ct.getName())) {
                    g.drawLine(x, y + height / 2, x + width, y + height / 2);
                }

                g.setColor(oldColor);
            }
View Full Code Here

  }
 
  public static void fillPredicate(Collection<Feature> features , Constraint cons , ConstraintModel cm , CustomizationVersion cv , Predicate pDest) {
    for (Iterator<Feature> itFeature = features.iterator() ; itFeature.hasNext() ; ) {
      Feature f = itFeature.next();
      Customization cus = getCFCustomization(f , cv.getFinalCustomizationById(f.getID()) , cons , cm);
      pDest.addValue(cus);
    }
  }
View Full Code Here

    if (!fr.getName().equals(FeatureRelation.REQUIRE) && !fr.getName().equals(FeatureRelation.EXCLUDE)) {
      return true;
    }
    Feature fStart = fr.getStartFeature();
    Feature fEnd = fr.getEndFeature();
    Customization cStart = cv.getFinalCustomizationById(fStart.getID());
    Customization cEnd = cv.getFinalCustomizationById(fEnd.getID());
   
    if (fr.getName().equals(FeatureRelation.REQUIRE)) {
      if (Customization.Selected.equals(cStart)) {
        if (Customization.Selected.equals(cEnd)) {
          removeFeatureRelation(fr.getID() , fme , figure , dv);
View Full Code Here

TOP

Related Classes of de.FeatureModellingTool.Customize.Customization

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.