Package org.openpnp.model

Examples of org.openpnp.model.Package


            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);
View Full Code Here


                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);
View Full Code Here

      @Override
      public void valueChanged(ListSelectionEvent e) {
        if (e.getValueIsAdjusting()) {
          return;
        }
        Package this_package = getSelectedPackage();
       
        deletePackageAction.setEnabled(this_package != null);
       
                CameraView cameraView = MainFrame.cameraPanel.getSelectedCameraView();
                if (cameraView != null) {
View Full Code Here

  }

  @Override
  public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
    try {
      Package this_package = packages.get(rowIndex);
      if (columnIndex == 1) {
        this_package.setDescription((String) aValue);
      }
      configuration.setDirty(true);
    }
    catch (Exception e) {
      // TODO: dialog, bad input
View Full Code Here

      // TODO: dialog, bad input
    }
  }

  public Object getValueAt(int row, int col) {
    Package this_package = packages.get(row);
    switch (col) {
    case 0:
      return this_package.getId();
    case 1:
       return this_package.getDescription();
    default:
      return null;
    }
  }
View Full Code Here

TOP

Related Classes of org.openpnp.model.Package

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.