src/java.desktop/share/classes/javax/print/attribute/standard/MediaSize.java

Print this page




 271         return MediaSize.class;
 272     }
 273 
 274     /**
 275      * Get the name of the category of which this attribute value is an
 276      * instance.
 277      * <P>
 278      * For class MediaSize and any vendor-defined subclasses, the category
 279      * name is <CODE>"media-size"</CODE>.
 280      *
 281      * @return  Attribute category name.
 282      */
 283     public final String getName() {
 284         return "media-size";
 285     }
 286 
 287     /**
 288      * Class MediaSize.ISO includes {@link MediaSize MediaSize} values for ISO
 289      * media.
 290      */
 291     public final static class ISO {
 292         /**
 293          * Specifies the ISO A0 size, 841 mm by 1189 mm.
 294          */
 295         public static final MediaSize
 296             A0 = new MediaSize(841, 1189, Size2DSyntax.MM, MediaSizeName.ISO_A0);
 297         /**
 298          * Specifies the ISO A1 size, 594 mm by 841 mm.
 299          */
 300         public static final MediaSize
 301             A1 = new MediaSize(594, 841, Size2DSyntax.MM, MediaSizeName.ISO_A1);
 302         /**
 303          * Specifies the ISO A2 size, 420 mm by 594 mm.
 304          */
 305         public static final MediaSize
 306             A2 = new MediaSize(420, 594, Size2DSyntax.MM, MediaSizeName.ISO_A2);
 307         /**
 308          * Specifies the ISO A3 size, 297 mm by 420 mm.
 309          */
 310         public static final MediaSize
 311             A3 = new MediaSize(297, 420, Size2DSyntax.MM, MediaSizeName.ISO_A3);


 420         public static final MediaSize
 421             C6 = new MediaSize(114, 162, Size2DSyntax.MM, MediaSizeName.ISO_C6);
 422         /**
 423          * Specifies the ISO Designated Long size, 110 mm by 220 mm.
 424          */
 425         public static final MediaSize
 426             DESIGNATED_LONG = new MediaSize(110, 220, Size2DSyntax.MM,
 427                                             MediaSizeName.ISO_DESIGNATED_LONG);
 428 
 429         /**
 430          * Hide all constructors.
 431          */
 432         private ISO() {
 433         }
 434     }
 435 
 436     /**
 437      * Class MediaSize.JIS includes {@link MediaSize MediaSize} values for JIS
 438      * (Japanese) media.      *
 439      */
 440     public final static class JIS {
 441 
 442         /**
 443          * Specifies the JIS B0 size, 1030 mm by 1456 mm.
 444          */
 445         public static final MediaSize
 446             B0 = new MediaSize(1030, 1456, Size2DSyntax.MM, MediaSizeName.JIS_B0);
 447         /**
 448          * Specifies the JIS B1 size, 728 mm by 1030 mm.
 449          */
 450         public static final MediaSize
 451             B1 = new MediaSize(728, 1030, Size2DSyntax.MM, MediaSizeName.JIS_B1);
 452         /**
 453          * Specifies the JIS B2 size, 515 mm by 728 mm.
 454          */
 455         public static final MediaSize
 456             B2 = new MediaSize(515, 728, Size2DSyntax.MM, MediaSizeName.JIS_B2);
 457         /**
 458          * Specifies the JIS B3 size, 364 mm by 515 mm.
 459          */
 460         public static final MediaSize


 584         public static final MediaSize YOU_5 = new MediaSize(95, 217, Size2DSyntax.MM);
 585         /**
 586          * Specifies the JIS You ("Western") #6 envelope size, 98 mm by 190 mm.
 587          */
 588         public static final MediaSize YOU_6 = new MediaSize(98, 190, Size2DSyntax.MM);
 589         /**
 590          * Specifies the JIS You ("Western") #7 envelope size, 92 mm by 165 mm.
 591          */
 592         public static final MediaSize YOU_7 = new MediaSize(92, 165, Size2DSyntax.MM);
 593         /**
 594          * Hide all constructors.
 595          */
 596         private JIS() {
 597         }
 598     }
 599 
 600     /**
 601      * Class MediaSize.NA includes {@link MediaSize MediaSize} values for North
 602      * American media.
 603      */
 604     public final static class NA {
 605 
 606         /**
 607          * Specifies the North American letter size, 8.5 inches by 11 inches.
 608          */
 609         public static final MediaSize
 610             LETTER = new MediaSize(8.5f, 11.0f, Size2DSyntax.INCH,
 611                                                 MediaSizeName.NA_LETTER);
 612         /**
 613          * Specifies the North American legal size, 8.5 inches by 14 inches.
 614          */
 615         public static final MediaSize
 616             LEGAL = new MediaSize(8.5f, 14.0f, Size2DSyntax.INCH,
 617                                                MediaSizeName.NA_LEGAL);
 618         /**
 619          * Specifies the North American 5 inch by 7 inch paper.
 620          */
 621         public static final MediaSize
 622             NA_5X7 = new MediaSize(5, 7, Size2DSyntax.INCH,
 623                                    MediaSizeName.NA_5X7);
 624         /**


 704         public static final MediaSize
 705             NA_10x14_ENVELOPE = new MediaSize(10.0f, 14.0f, Size2DSyntax.INCH,
 706                                               MediaSizeName.NA_10X14_ENVELOPE);
 707         /**
 708          * Specifies the North American 10 inch by 15 inch envelope size.
 709          */
 710         public static final MediaSize
 711             NA_10X15_ENVELOPE = new MediaSize(10.0f, 15.0f, Size2DSyntax.INCH,
 712                                               MediaSizeName.NA_10X15_ENVELOPE);
 713         /**
 714          * Hide all constructors.
 715          */
 716         private NA() {
 717         }
 718     }
 719 
 720     /**
 721      * Class MediaSize.Engineering includes {@link MediaSize MediaSize} values
 722      * for engineering media.
 723      */
 724     public final static class Engineering {
 725 
 726         /**
 727          * Specifies the engineering A size, 8.5 inch by 11 inch.
 728          */
 729         public static final MediaSize
 730             A = new MediaSize(8.5f, 11.0f, Size2DSyntax.INCH,
 731                               MediaSizeName.A);
 732         /**
 733          * Specifies the engineering B size, 11 inch by 17 inch.
 734          */
 735         public static final MediaSize
 736             B = new MediaSize(11.0f, 17.0f, Size2DSyntax.INCH,
 737                               MediaSizeName.B);
 738         /**
 739          * Specifies the engineering C size, 17 inch by 22 inch.
 740          */
 741         public static final MediaSize
 742             C = new MediaSize(17.0f, 22.0f, Size2DSyntax.INCH,
 743                               MediaSizeName.C);
 744         /**


 747         public static final MediaSize
 748             D = new MediaSize(22.0f, 34.0f, Size2DSyntax.INCH,
 749                               MediaSizeName.D);
 750         /**
 751          * Specifies the engineering E size, 34 inch by 44 inch.
 752          */
 753         public static final MediaSize
 754             E = new MediaSize(34.0f, 44.0f, Size2DSyntax.INCH,
 755                               MediaSizeName.E);
 756         /**
 757          * Hide all constructors.
 758          */
 759         private Engineering() {
 760         }
 761     }
 762 
 763     /**
 764      * Class MediaSize.Other includes {@link MediaSize MediaSize} values for
 765      * miscellaneous media.
 766      */
 767     public final static class Other {
 768         /**
 769          * Specifies the executive size, 7.25 inches by 10.5 inches.
 770          */
 771         public static final MediaSize
 772             EXECUTIVE = new MediaSize(7.25f, 10.5f, Size2DSyntax.INCH,
 773                                       MediaSizeName.EXECUTIVE);
 774         /**
 775          * Specifies the ledger size, 11 inches by 17 inches.
 776          */
 777         public static final MediaSize
 778             LEDGER = new MediaSize(11.0f, 17.0f, Size2DSyntax.INCH,
 779                                    MediaSizeName.LEDGER);
 780 
 781         /**
 782          * Specifies the tabloid size, 11 inches by 17 inches.
 783          * @since 1.5
 784          */
 785         public static final MediaSize
 786             TABLOID = new MediaSize(11.0f, 17.0f, Size2DSyntax.INCH,
 787                                    MediaSizeName.TABLOID);




 271         return MediaSize.class;
 272     }
 273 
 274     /**
 275      * Get the name of the category of which this attribute value is an
 276      * instance.
 277      * <P>
 278      * For class MediaSize and any vendor-defined subclasses, the category
 279      * name is <CODE>"media-size"</CODE>.
 280      *
 281      * @return  Attribute category name.
 282      */
 283     public final String getName() {
 284         return "media-size";
 285     }
 286 
 287     /**
 288      * Class MediaSize.ISO includes {@link MediaSize MediaSize} values for ISO
 289      * media.
 290      */
 291     public static final class ISO {
 292         /**
 293          * Specifies the ISO A0 size, 841 mm by 1189 mm.
 294          */
 295         public static final MediaSize
 296             A0 = new MediaSize(841, 1189, Size2DSyntax.MM, MediaSizeName.ISO_A0);
 297         /**
 298          * Specifies the ISO A1 size, 594 mm by 841 mm.
 299          */
 300         public static final MediaSize
 301             A1 = new MediaSize(594, 841, Size2DSyntax.MM, MediaSizeName.ISO_A1);
 302         /**
 303          * Specifies the ISO A2 size, 420 mm by 594 mm.
 304          */
 305         public static final MediaSize
 306             A2 = new MediaSize(420, 594, Size2DSyntax.MM, MediaSizeName.ISO_A2);
 307         /**
 308          * Specifies the ISO A3 size, 297 mm by 420 mm.
 309          */
 310         public static final MediaSize
 311             A3 = new MediaSize(297, 420, Size2DSyntax.MM, MediaSizeName.ISO_A3);


 420         public static final MediaSize
 421             C6 = new MediaSize(114, 162, Size2DSyntax.MM, MediaSizeName.ISO_C6);
 422         /**
 423          * Specifies the ISO Designated Long size, 110 mm by 220 mm.
 424          */
 425         public static final MediaSize
 426             DESIGNATED_LONG = new MediaSize(110, 220, Size2DSyntax.MM,
 427                                             MediaSizeName.ISO_DESIGNATED_LONG);
 428 
 429         /**
 430          * Hide all constructors.
 431          */
 432         private ISO() {
 433         }
 434     }
 435 
 436     /**
 437      * Class MediaSize.JIS includes {@link MediaSize MediaSize} values for JIS
 438      * (Japanese) media.      *
 439      */
 440     public static final class JIS {
 441 
 442         /**
 443          * Specifies the JIS B0 size, 1030 mm by 1456 mm.
 444          */
 445         public static final MediaSize
 446             B0 = new MediaSize(1030, 1456, Size2DSyntax.MM, MediaSizeName.JIS_B0);
 447         /**
 448          * Specifies the JIS B1 size, 728 mm by 1030 mm.
 449          */
 450         public static final MediaSize
 451             B1 = new MediaSize(728, 1030, Size2DSyntax.MM, MediaSizeName.JIS_B1);
 452         /**
 453          * Specifies the JIS B2 size, 515 mm by 728 mm.
 454          */
 455         public static final MediaSize
 456             B2 = new MediaSize(515, 728, Size2DSyntax.MM, MediaSizeName.JIS_B2);
 457         /**
 458          * Specifies the JIS B3 size, 364 mm by 515 mm.
 459          */
 460         public static final MediaSize


 584         public static final MediaSize YOU_5 = new MediaSize(95, 217, Size2DSyntax.MM);
 585         /**
 586          * Specifies the JIS You ("Western") #6 envelope size, 98 mm by 190 mm.
 587          */
 588         public static final MediaSize YOU_6 = new MediaSize(98, 190, Size2DSyntax.MM);
 589         /**
 590          * Specifies the JIS You ("Western") #7 envelope size, 92 mm by 165 mm.
 591          */
 592         public static final MediaSize YOU_7 = new MediaSize(92, 165, Size2DSyntax.MM);
 593         /**
 594          * Hide all constructors.
 595          */
 596         private JIS() {
 597         }
 598     }
 599 
 600     /**
 601      * Class MediaSize.NA includes {@link MediaSize MediaSize} values for North
 602      * American media.
 603      */
 604     public static final class NA {
 605 
 606         /**
 607          * Specifies the North American letter size, 8.5 inches by 11 inches.
 608          */
 609         public static final MediaSize
 610             LETTER = new MediaSize(8.5f, 11.0f, Size2DSyntax.INCH,
 611                                                 MediaSizeName.NA_LETTER);
 612         /**
 613          * Specifies the North American legal size, 8.5 inches by 14 inches.
 614          */
 615         public static final MediaSize
 616             LEGAL = new MediaSize(8.5f, 14.0f, Size2DSyntax.INCH,
 617                                                MediaSizeName.NA_LEGAL);
 618         /**
 619          * Specifies the North American 5 inch by 7 inch paper.
 620          */
 621         public static final MediaSize
 622             NA_5X7 = new MediaSize(5, 7, Size2DSyntax.INCH,
 623                                    MediaSizeName.NA_5X7);
 624         /**


 704         public static final MediaSize
 705             NA_10x14_ENVELOPE = new MediaSize(10.0f, 14.0f, Size2DSyntax.INCH,
 706                                               MediaSizeName.NA_10X14_ENVELOPE);
 707         /**
 708          * Specifies the North American 10 inch by 15 inch envelope size.
 709          */
 710         public static final MediaSize
 711             NA_10X15_ENVELOPE = new MediaSize(10.0f, 15.0f, Size2DSyntax.INCH,
 712                                               MediaSizeName.NA_10X15_ENVELOPE);
 713         /**
 714          * Hide all constructors.
 715          */
 716         private NA() {
 717         }
 718     }
 719 
 720     /**
 721      * Class MediaSize.Engineering includes {@link MediaSize MediaSize} values
 722      * for engineering media.
 723      */
 724     public static final class Engineering {
 725 
 726         /**
 727          * Specifies the engineering A size, 8.5 inch by 11 inch.
 728          */
 729         public static final MediaSize
 730             A = new MediaSize(8.5f, 11.0f, Size2DSyntax.INCH,
 731                               MediaSizeName.A);
 732         /**
 733          * Specifies the engineering B size, 11 inch by 17 inch.
 734          */
 735         public static final MediaSize
 736             B = new MediaSize(11.0f, 17.0f, Size2DSyntax.INCH,
 737                               MediaSizeName.B);
 738         /**
 739          * Specifies the engineering C size, 17 inch by 22 inch.
 740          */
 741         public static final MediaSize
 742             C = new MediaSize(17.0f, 22.0f, Size2DSyntax.INCH,
 743                               MediaSizeName.C);
 744         /**


 747         public static final MediaSize
 748             D = new MediaSize(22.0f, 34.0f, Size2DSyntax.INCH,
 749                               MediaSizeName.D);
 750         /**
 751          * Specifies the engineering E size, 34 inch by 44 inch.
 752          */
 753         public static final MediaSize
 754             E = new MediaSize(34.0f, 44.0f, Size2DSyntax.INCH,
 755                               MediaSizeName.E);
 756         /**
 757          * Hide all constructors.
 758          */
 759         private Engineering() {
 760         }
 761     }
 762 
 763     /**
 764      * Class MediaSize.Other includes {@link MediaSize MediaSize} values for
 765      * miscellaneous media.
 766      */
 767     public static final class Other {
 768         /**
 769          * Specifies the executive size, 7.25 inches by 10.5 inches.
 770          */
 771         public static final MediaSize
 772             EXECUTIVE = new MediaSize(7.25f, 10.5f, Size2DSyntax.INCH,
 773                                       MediaSizeName.EXECUTIVE);
 774         /**
 775          * Specifies the ledger size, 11 inches by 17 inches.
 776          */
 777         public static final MediaSize
 778             LEDGER = new MediaSize(11.0f, 17.0f, Size2DSyntax.INCH,
 779                                    MediaSizeName.LEDGER);
 780 
 781         /**
 782          * Specifies the tabloid size, 11 inches by 17 inches.
 783          * @since 1.5
 784          */
 785         public static final MediaSize
 786             TABLOID = new MediaSize(11.0f, 17.0f, Size2DSyntax.INCH,
 787                                    MediaSizeName.TABLOID);