Interface TuckBox.BoxSizer

  • All Known Implementing Classes:
    TuckBox.SimpleDepthwiseSizer, TuckBox.SimpleHeightwiseSizer
    Enclosing class:
    TuckBox

    public static interface TuckBox.BoxSizer
    A sizing tool for a particular type of component. The sizer's toString method should return a human-readable description of the type of component(s) that this sizer produces box measurements for.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean allowSleeves()
      Returns true if this helper uses sleeve thickness as part of its sizing algorithm.
      double[] size​(int cards, double sleeveThicknessInMicrons)
      Returns the dimensions for a box of the type represented by this sizer that allows sufficient space to hold a number of cards equal to cards.
    • Method Detail

      • size

        double[] size​(int cards,
                      double sleeveThicknessInMicrons)
        Returns the dimensions for a box of the type represented by this sizer that allows sufficient space to hold a number of cards equal to cards. The dimensions are returned as an array of three double values which measure the width, height, and depth in mm (respectively).
        Parameters:
        cards - the number of objects the box should hold
        sleeveThicknessInMicrons - the tickness rating of the plastic sleeve in microns, 0 for no sleeves
        Returns:
        an array of millimetre measurements for the box's width, height and depth
      • allowSleeves

        boolean allowSleeves()
        Returns true if this helper uses sleeve thickness as part of its sizing algorithm. Non-card components typically don't have a suitable sleeve available, so sizers for such components would return false.
        Returns:
        true if and only if the user can store this component type on plastic sleeves