Package org.openpnp.model

Examples of org.openpnp.model.Length.convertToUnits()


      return;
    }
    if (length.getUnits() == null) {
      length.setUnits(Configuration.get().getSystemUnits());
    }
    length = length.convertToUnits(Configuration.get().getSystemUnits());
    textField.setText(String.format(Configuration.get().getLengthDisplayFormat(), length.getValue()));
  }
}
View Full Code Here


        return;
    }
    // Determine the scaling factor to go from Outline units to
    // Camera units.
    Length l = new Length(1, footprint.getUnits());
    l = l.convertToUnits(cameraUnitsPerPixelUnits);
    double unitScale = l.getValue();
   
    // Create a transform to scale the Shape by
    AffineTransform tx = new AffineTransform();
   
View Full Code Here

        return;
    }
    // Determine the scaling factor to go from Outline units to
    // Camera units.
    Length l = new Length(1, outline.getUnits());
    l = l.convertToUnits(cameraUnitsPerPixelUnits);
    double unitScale = l.getValue();
   
    // Create a transform to scale the Shape by
    AffineTransform tx = new AffineTransform();
   
View Full Code Here

    }
    if (displayNativeUnits && l.getUnits() != configuration.getSystemUnits()) {
      return String.format(configuration.getLengthDisplayFormatWithUnits(), l.getValue(), l.getUnits().getShortName());
    }
    else {
      l = l.convertToUnits(configuration.getSystemUnits());
      return String.format(configuration.getLengthDisplayFormat(), l.getValue());
    }
  }
}
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.