Class PaperFormat

java.lang.Object
com.kheops.util.PaperFormat

public class PaperFormat extends Object
A class which defines a paper format. New paper formats are automatically registered in the paper formats list and can be accessed using the PaperFormat.getPaperFormats() method.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final PaperFormat
    Specifies the ISO A0 size, 841 mm by 1189 mm.
    static final PaperFormat
    Specifies the ISO A1 size, 594 mm by 841 mm.
    static final PaperFormat
    Specifies the ISO A10 size, 26 mm by 37 mm.
    static final PaperFormat
    Specifies the ISO A2 size, 420 mm by 594 mm.
    static final PaperFormat
    Specifies the ISO A3 size, 297 mm by 420 mm.
    static final PaperFormat
    Specifies the ISO A4 size, 210 mm by 297 mm.
    static final PaperFormat
    Specifies the ISO A5 size, 148 mm by 210 mm.
    static final PaperFormat
    Specifies the ISO A6 size, 105 mm by 148 mm.
    static final PaperFormat
    Specifies the ISO A7 size, 74 mm by 105 mm.
    static final PaperFormat
    Specifies the ISO A8 size, 52 mm by 74 mm.
    static final PaperFormat
    Specifies the ISO A9 size, 37 mm by 52 mm.
    static final PaperFormat
    Specifies the ANSI C size, 432 mm by 559 mm.
    static final PaperFormat
    Specifies the ANSI D size, 559 mm by 864 mm.
    static final PaperFormat
    Specifies the ANSI E size, 864 mm by 1118 mm.
    static final PaperFormat
    Specifies the Architectural A size, 9 x 12 inches.
    static final PaperFormat
    Specifies the Architectural B size, 12 x 18 inches.
    static final PaperFormat
    Specifies the Architectural C size, 18 x 24 inches.
    static final PaperFormat
    Specifies the Architectural D size, 24 x 36 inches.
    static final PaperFormat
    Specifies the Architectural E size, 36 x 48 inches.
    static final PaperFormat
    Specifies the Architectural E1 size, 30 x 42 inches.
    static final PaperFormat
    Specifies the Architectural E2 size, 26 x 38 inches.
    static final PaperFormat
    Specifies the Architectural E3 size, 27 x 39 inches.
    static final PaperFormat
    Specifies the ISO B0 size, 1000 mm by 1414 mm.
    static final PaperFormat
    Specifies the ISO B1 size, 707 mm by 1000 mm.
    static final PaperFormat
    Specifies the ISO B10 size, 31 mm by 44 mm.
    static final PaperFormat
    Specifies the ISO B2 size, 500 mm by 707 mm.
    static final PaperFormat
    Specifies the ISO B3 size, 353 mm by 500 mm.
    static final PaperFormat
    Specifies the ISO B4 size, 250 mm by 353 mm.
    static final PaperFormat
    Specifies the ISO B5 size, 176 mm by 250 mm.
    static final PaperFormat
    Specifies the ISO B6 size, 125 mm by 176 mm.
    static final PaperFormat
    Specifies the ISO B7 size, 88 mm by 125 mm.
    static final PaperFormat
    Specifies the ISO B8 size, 62 mm by 88 mm.
    static final PaperFormat
    Specifies the ISO B9 size, 44 mm by 62 mm.
    static final PaperFormat
    Specifies the ISO C0 size, 917 mm by 1297 mm.
    static final PaperFormat
    Specifies the ISO C1 size, 648 mm by 917 mm.
    static final PaperFormat
    Specifies the ISO C2 size, 458 mm by 648 mm.
    static final PaperFormat
    Specifies the ISO C3 size, 324 mm by 458 mm.
    static final PaperFormat
    Specifies the ISO C4 size, 229 mm by 324 mm.
    static final PaperFormat
    Specifies the ISO C5 size, 162 mm by 229 mm.
    static final PaperFormat
    Specifies the ISO C6 size, 114 mm by 162 mm.
    static final double
    Value of the ratio used to convert centimeters in inches
    static final double
    Value of the ratio used to convert inches to centimeters
    static final PaperFormat
    Specifies the North American legal size, 8.5 inches by 14 inches.
    static final PaperFormat
    Specifies the North American letter size, 8.5 inches by 11 inches.
    static final int
    Constant which defines the metric system.
    static final PaperFormat
    Specifies the North American 11 inch by 17 inch paper.
    static final PaperFormat
    Specifies the North American 5 inch by 7 inch paper.
    static final PaperFormat
    Specifies the North American 8 inch by 10 inch paper.
    static final int
    Constant which defines the imperial measurement system.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PaperFormat(int unit, double width, double height, String name)
    Creates a new paper format.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    add(PaperFormat format)
     
    static void
     
     
     
    int
     
    int
     
    static void
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • CM_TO_INCH

      public static final double CM_TO_INCH
      Value of the ratio used to convert centimeters in inches
      See Also:
    • INCH_TO_CM

      public static final double INCH_TO_CM
      Value of the ratio used to convert inches to centimeters
      See Also:
    • METRIC_UNIT

      public static final int METRIC_UNIT
      Constant which defines the metric system.
      See Also:
    • US_UNIT

      public static final int US_UNIT
      Constant which defines the imperial measurement system.
      See Also:
    • LETTER

      public static final PaperFormat LETTER
      Specifies the North American letter size, 8.5 inches by 11 inches.
    • ANSI_C

      public static final PaperFormat ANSI_C
      Specifies the ANSI C size, 432 mm by 559 mm.
    • ANSI_D

      public static final PaperFormat ANSI_D
      Specifies the ANSI D size, 559 mm by 864 mm.
    • ANSI_E

      public static final PaperFormat ANSI_E
      Specifies the ANSI E size, 864 mm by 1118 mm.
    • NA_5X7

      public static final PaperFormat NA_5X7
      Specifies the North American 5 inch by 7 inch paper.
    • NA_8X10

      public static final PaperFormat NA_8X10
      Specifies the North American 8 inch by 10 inch paper.
    • NA_11X17

      public static final PaperFormat NA_11X17
      Specifies the North American 11 inch by 17 inch paper.
    • A0

      public static final PaperFormat A0
      Specifies the ISO A0 size, 841 mm by 1189 mm.
    • A1

      public static final PaperFormat A1
      Specifies the ISO A1 size, 594 mm by 841 mm.
    • A2

      public static final PaperFormat A2
      Specifies the ISO A2 size, 420 mm by 594 mm.
    • A3

      public static final PaperFormat A3
      Specifies the ISO A3 size, 297 mm by 420 mm.
    • A4

      public static final PaperFormat A4
      Specifies the ISO A4 size, 210 mm by 297 mm.
    • A5

      public static final PaperFormat A5
      Specifies the ISO A5 size, 148 mm by 210 mm.
    • A6

      public static final PaperFormat A6
      Specifies the ISO A6 size, 105 mm by 148 mm.
    • A7

      public static final PaperFormat A7
      Specifies the ISO A7 size, 74 mm by 105 mm.
    • A8

      public static final PaperFormat A8
      Specifies the ISO A8 size, 52 mm by 74 mm.
    • A9

      public static final PaperFormat A9
      Specifies the ISO A9 size, 37 mm by 52 mm.
    • A10

      public static final PaperFormat A10
      Specifies the ISO A10 size, 26 mm by 37 mm.
    • B0

      public static final PaperFormat B0
      Specifies the ISO B0 size, 1000 mm by 1414 mm.
    • B1

      public static final PaperFormat B1
      Specifies the ISO B1 size, 707 mm by 1000 mm.
    • B2

      public static final PaperFormat B2
      Specifies the ISO B2 size, 500 mm by 707 mm.
    • B3

      public static final PaperFormat B3
      Specifies the ISO B3 size, 353 mm by 500 mm.
    • B4

      public static final PaperFormat B4
      Specifies the ISO B4 size, 250 mm by 353 mm.
    • B5

      public static final PaperFormat B5
      Specifies the ISO B5 size, 176 mm by 250 mm.
    • B6

      public static final PaperFormat B6
      Specifies the ISO B6 size, 125 mm by 176 mm.
    • B7

      public static final PaperFormat B7
      Specifies the ISO B7 size, 88 mm by 125 mm.
    • B8

      public static final PaperFormat B8
      Specifies the ISO B8 size, 62 mm by 88 mm.
    • B9

      public static final PaperFormat B9
      Specifies the ISO B9 size, 44 mm by 62 mm.
    • B10

      public static final PaperFormat B10
      Specifies the ISO B10 size, 31 mm by 44 mm.
    • C0

      public static final PaperFormat C0
      Specifies the ISO C0 size, 917 mm by 1297 mm.
    • C1

      public static final PaperFormat C1
      Specifies the ISO C1 size, 648 mm by 917 mm.
    • C2

      public static final PaperFormat C2
      Specifies the ISO C2 size, 458 mm by 648 mm.
    • C3

      public static final PaperFormat C3
      Specifies the ISO C3 size, 324 mm by 458 mm.
    • C4

      public static final PaperFormat C4
      Specifies the ISO C4 size, 229 mm by 324 mm.
    • C5

      public static final PaperFormat C5
      Specifies the ISO C5 size, 162 mm by 229 mm.
    • C6

      public static final PaperFormat C6
      Specifies the ISO C6 size, 114 mm by 162 mm.
    • archA

      public static final PaperFormat archA
      Specifies the Architectural A size, 9 x 12 inches.
    • archB

      public static final PaperFormat archB
      Specifies the Architectural B size, 12 x 18 inches.
    • archC

      public static final PaperFormat archC
      Specifies the Architectural C size, 18 x 24 inches.
    • archD

      public static final PaperFormat archD
      Specifies the Architectural D size, 24 x 36 inches.
    • archE

      public static final PaperFormat archE
      Specifies the Architectural E size, 36 x 48 inches.
    • archE1

      public static final PaperFormat archE1
      Specifies the Architectural E1 size, 30 x 42 inches.
    • archE2

      public static final PaperFormat archE2
      Specifies the Architectural E2 size, 26 x 38 inches.
    • archE3

      public static final PaperFormat archE3
      Specifies the Architectural E3 size, 27 x 39 inches.
  • Constructor Details

    • PaperFormat

      public PaperFormat(int unit, double width, double height, String name)
      Creates a new paper format. To add the new format to the system list, use the static add() method:
      PaperFormat.add(   new PaperFormat(PaperFormat.US_UNIT, 6, 30, "My custom format") );
      Parameters:
      unit - the unit size of the format (METRIC_UNIT or US_UNIT)
      width - the width of the paper
      height - the height of the paper
      name - the name of the format (should be unique)
  • Method Details

    • clear

      public static void clear()
    • add

      public static void add(PaperFormat format)
    • remove

      public static void remove(PaperFormat format)
    • getSystemUnit

      public int getSystemUnit()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getPaperFormats

      public static Enumeration getPaperFormats()
    • getPaperFormat

      public static PaperFormat getPaperFormat(String name)