Package org.openpnp.model

Examples of org.openpnp.model.Configuration


              LengthUnit.Millimeters,
              placementX,
              placementY,
              0,
              placementRotation));
      Configuration cfg = Configuration.get();
            if (cfg != null && createMissingParts) {
                String partId = pkgName + "-" + partValue;
                Part part = cfg.getPart(partId);
                if (part == null) {
                    part = new Part(partId);
                    Package pkg = cfg.getPackage(pkgName);
                    if (pkg == null) {
                        pkg = new Package(pkgName);
                        cfg.addPackage(pkg);
                    }
                    part.setPackage(pkg);

                    cfg.addPart(part);
                }
                placement.setPart(part);

            }
View Full Code Here


              LengthUnit.Millimeters,
              Double.parseDouble(matcher.group(2)),
              Double.parseDouble(matcher.group(3)),
              0,
              Double.parseDouble(matcher.group(4))));
      Configuration cfg = Configuration.get();
            if (cfg != null && createMissingParts) {
                String packageId = matcher.group(6);

                String partId = packageId + "-" + matcher.group(5);
                Part part = cfg.getPart(partId);
                if (part == null) {
                    part = new Part(partId);
                    Package pkg = cfg.getPackage(packageId);
                    if (pkg == null) {
                        pkg = new Package(packageId);
                        cfg.addPackage(pkg);
                    }
                    part.setPackage(pkg);

                    cfg.addPart(part);
                }
                placement.setPart(part);

            }
View Full Code Here

    l.add(ZippyNozzleTip.class);
    return l;
  }
 
    public List<NozzleTip> getNozzleTips() {
      Configuration configuration = Configuration.get();
      List<NozzleTip> nozzletips = new ArrayList<NozzleTip>();
    for (Head head : configuration.getMachine().getHeads()) { //for each head
      for (Nozzle nozzle : head.getNozzles()) { //for each nozzle
        for (NozzleTip nozzletip : nozzle.getNozzleTips()) { //for each nozzletip
          nozzletips.add(nozzletip); //add to list from above
        }
      }
View Full Code Here

    logger = LoggerFactory.getLogger(Main.class);
   
    logger.debug(String.format("OpenPnP %s Started.", Main.getVersion()));
   
    Configuration.initialize(configurationDirectory);
    final Configuration configuration = Configuration.get();
    EventQueue.invokeLater(new Runnable() {
      public void run() {
        try {
          MainFrame frame = new MainFrame(configuration);
          frame.setVisible(true);
View Full Code Here

TOP

Related Classes of org.openpnp.model.Configuration

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.