1 /* |
1 /* |
2 * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
27 |
27 |
28 import java.awt.geom.AffineTransform; |
28 import java.awt.geom.AffineTransform; |
29 import java.awt.geom.Point2D; |
29 import java.awt.geom.Point2D; |
30 import java.awt.geom.Rectangle2D; |
30 import java.awt.geom.Rectangle2D; |
31 |
31 |
32 import javax.tools.annotation.GenerateNativeHeader; |
32 import java.lang.annotation.Native; |
33 |
33 |
34 /** |
34 /** |
35 * The <code>PageFormat</code> class describes the size and |
35 * The <code>PageFormat</code> class describes the size and |
36 * orientation of a page to be printed. |
36 * orientation of a page to be printed. |
37 */ |
37 */ |
38 /* No native methods here, but the constants are needed in the supporting JNI code */ |
|
39 @GenerateNativeHeader |
|
40 public class PageFormat implements Cloneable |
38 public class PageFormat implements Cloneable |
41 { |
39 { |
42 |
40 |
43 /* Class Constants */ |
41 /* Class Constants */ |
44 |
42 |
46 * The origin is at the bottom left of the paper with |
44 * The origin is at the bottom left of the paper with |
47 * x running bottom to top and y running left to right. |
45 * x running bottom to top and y running left to right. |
48 * Note that this is not the Macintosh landscape but |
46 * Note that this is not the Macintosh landscape but |
49 * is the Window's and PostScript landscape. |
47 * is the Window's and PostScript landscape. |
50 */ |
48 */ |
51 public static final int LANDSCAPE = 0; |
49 @Native public static final int LANDSCAPE = 0; |
52 |
50 |
53 /** |
51 /** |
54 * The origin is at the top left of the paper with |
52 * The origin is at the top left of the paper with |
55 * x running to the right and y running down the |
53 * x running to the right and y running down the |
56 * paper. |
54 * paper. |
57 */ |
55 */ |
58 public static final int PORTRAIT = 1; |
56 @Native public static final int PORTRAIT = 1; |
59 |
57 |
60 /** |
58 /** |
61 * The origin is at the top right of the paper with x |
59 * The origin is at the top right of the paper with x |
62 * running top to bottom and y running right to left. |
60 * running top to bottom and y running right to left. |
63 * Note that this is the Macintosh landscape. |
61 * Note that this is the Macintosh landscape. |
64 */ |
62 */ |
65 public static final int REVERSE_LANDSCAPE = 2; |
63 @Native public static final int REVERSE_LANDSCAPE = 2; |
66 |
64 |
67 /* Instance Variables */ |
65 /* Instance Variables */ |
68 |
66 |
69 /** |
67 /** |
70 * A description of the physical piece of paper. |
68 * A description of the physical piece of paper. |