Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JRE 8 rt.jar - java.* Package Source Code
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime environment included in JDK 8. JRE 8 rt.jar libraries are divided into 6 packages:
com.* - Internal Oracle and Sun Microsystems libraries java.* - Standard Java API libraries. javax.* - Extended Java API libraries. jdk.* - JDK supporting libraries. org.* - Third party libraries. sun.* - Old libraries developed by Sun Microsystems.
JAR File Information:
Directory of C:\fyicenter\jdk-1.8.0_191\jre\lib 63,596,151 rt.jar
Here is the list of Java classes of the java.* package in JRE 1.8.0_191 rt.jar. Java source codes are also provided.
✍: FYIcenter
⏎ java/awt/print/PageFormat.java
/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.awt.print; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.lang.annotation.Native; /** * The <code>PageFormat</code> class describes the size and * orientation of a page to be printed. */ public class PageFormat implements Cloneable { /* Class Constants */ /** * The origin is at the bottom left of the paper with * x running bottom to top and y running left to right. * Note that this is not the Macintosh landscape but * is the Window's and PostScript landscape. */ @Native public static final int LANDSCAPE = 0; /** * The origin is at the top left of the paper with * x running to the right and y running down the * paper. */ @Native public static final int PORTRAIT = 1; /** * The origin is at the top right of the paper with x * running top to bottom and y running right to left. * Note that this is the Macintosh landscape. */ @Native public static final int REVERSE_LANDSCAPE = 2; /* Instance Variables */ /** * A description of the physical piece of paper. */ private Paper mPaper; /** * The orientation of the current page. This will be * one of the constants: PORTRIAT, LANDSCAPE, or * REVERSE_LANDSCAPE, */ private int mOrientation = PORTRAIT; /* Constructors */ /** * Creates a default, portrait-oriented * <code>PageFormat</code>. */ public PageFormat() { mPaper = new Paper(); } /* Instance Methods */ /** * Makes a copy of this <code>PageFormat</code> with the same * contents as this <code>PageFormat</code>. * @return a copy of this <code>PageFormat</code>. */ public Object clone() { PageFormat newPage; try { newPage = (PageFormat) super.clone(); newPage.mPaper = (Paper)mPaper.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); newPage = null; // should never happen. } return newPage; } /** * Returns the width, in 1/72nds of an inch, of the page. * This method takes into account the orientation of the * page when determining the width. * @return the width of the page. */ public double getWidth() { double width; int orientation = getOrientation(); if (orientation == PORTRAIT) { width = mPaper.getWidth(); } else { width = mPaper.getHeight(); } return width; } /** * Returns the height, in 1/72nds of an inch, of the page. * This method takes into account the orientation of the * page when determining the height. * @return the height of the page. */ public double getHeight() { double height; int orientation = getOrientation(); if (orientation == PORTRAIT) { height = mPaper.getHeight(); } else { height = mPaper.getWidth(); } return height; } /** * Returns the x coordinate of the upper left point of the * imageable area of the <code>Paper</code> object * associated with this <code>PageFormat</code>. * This method takes into account the * orientation of the page. * @return the x coordinate of the upper left point of the * imageable area of the <code>Paper</code> object * associated with this <code>PageFormat</code>. */ public double getImageableX() { double x; switch (getOrientation()) { case LANDSCAPE: x = mPaper.getHeight() - (mPaper.getImageableY() + mPaper.getImageableHeight()); break; case PORTRAIT: x = mPaper.getImageableX(); break; case REVERSE_LANDSCAPE: x = mPaper.getImageableY(); break; default: /* This should never happen since it signifies that the * PageFormat is in an invalid orientation. */ throw new InternalError("unrecognized orientation"); } return x; } /** * Returns the y coordinate of the upper left point of the * imageable area of the <code>Paper</code> object * associated with this <code>PageFormat</code>. * This method takes into account the * orientation of the page. * @return the y coordinate of the upper left point of the * imageable area of the <code>Paper</code> object * associated with this <code>PageFormat</code>. */ public double getImageableY() { double y; switch (getOrientation()) { case LANDSCAPE: y = mPaper.getImageableX(); break; case PORTRAIT: y = mPaper.getImageableY(); break; case REVERSE_LANDSCAPE: y = mPaper.getWidth() - (mPaper.getImageableX() + mPaper.getImageableWidth()); break; default: /* This should never happen since it signifies that the * PageFormat is in an invalid orientation. */ throw new InternalError("unrecognized orientation"); } return y; } /** * Returns the width, in 1/72nds of an inch, of the imageable * area of the page. This method takes into account the orientation * of the page. * @return the width of the page. */ public double getImageableWidth() { double width; if (getOrientation() == PORTRAIT) { width = mPaper.getImageableWidth(); } else { width = mPaper.getImageableHeight(); } return width; } /** * Return the height, in 1/72nds of an inch, of the imageable * area of the page. This method takes into account the orientation * of the page. * @return the height of the page. */ public double getImageableHeight() { double height; if (getOrientation() == PORTRAIT) { height = mPaper.getImageableHeight(); } else { height = mPaper.getImageableWidth(); } return height; } /** * Returns a copy of the {@link Paper} object associated * with this <code>PageFormat</code>. Changes made to the * <code>Paper</code> object returned from this method do not * affect the <code>Paper</code> object of this * <code>PageFormat</code>. To update the <code>Paper</code> * object of this <code>PageFormat</code>, create a new * <code>Paper</code> object and set it into this * <code>PageFormat</code> by using the {@link #setPaper(Paper)} * method. * @return a copy of the <code>Paper</code> object associated * with this <code>PageFormat</code>. * @see #setPaper */ public Paper getPaper() { return (Paper)mPaper.clone(); } /** * Sets the <code>Paper</code> object for this * <code>PageFormat</code>. * @param paper the <code>Paper</code> object to which to set * the <code>Paper</code> object for this <code>PageFormat</code>. * @exception NullPointerException * a null paper instance was passed as a parameter. * @see #getPaper */ public void setPaper(Paper paper) { mPaper = (Paper)paper.clone(); } /** * Sets the page orientation. <code>orientation</code> must be * one of the constants: PORTRAIT, LANDSCAPE, * or REVERSE_LANDSCAPE. * @param orientation the new orientation for the page * @throws IllegalArgumentException if * an unknown orientation was requested * @see #getOrientation */ public void setOrientation(int orientation) throws IllegalArgumentException { if (0 <= orientation && orientation <= REVERSE_LANDSCAPE) { mOrientation = orientation; } else { throw new IllegalArgumentException(); } } /** * Returns the orientation of this <code>PageFormat</code>. * @return this <code>PageFormat</code> object's orientation. * @see #setOrientation */ public int getOrientation() { return mOrientation; } /** * Returns a transformation matrix that translates user * space rendering to the requested orientation * of the page. The values are placed into the * array as * { m00, m10, m01, m11, m02, m12} in * the form required by the {@link AffineTransform} * constructor. * @return the matrix used to translate user space rendering * to the orientation of the page. * @see java.awt.geom.AffineTransform */ public double[] getMatrix() { double[] matrix = new double[6]; switch (mOrientation) { case LANDSCAPE: matrix[0] = 0; matrix[1] = -1; matrix[2] = 1; matrix[3] = 0; matrix[4] = 0; matrix[5] = mPaper.getHeight(); break; case PORTRAIT: matrix[0] = 1; matrix[1] = 0; matrix[2] = 0; matrix[3] = 1; matrix[4] = 0; matrix[5] = 0; break; case REVERSE_LANDSCAPE: matrix[0] = 0; matrix[1] = 1; matrix[2] = -1; matrix[3] = 0; matrix[4] = mPaper.getWidth(); matrix[5] = 0; break; default: throw new IllegalArgumentException(); } return matrix; } }
⏎ java/awt/print/PageFormat.java
Or download all of them as a single archive file:
File name: jre-rt-java-1.8.0_191-src.zip File size: 6664831 bytes Release date: 2018-10-28 Download
⇒ JRE 8 rt.jar - javax.* Package Source Code
2023-08-23, 247548👍, 4💬
Popular Posts:
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...
JRE 8 plugin.jar is the JAR file for JRE 8 Java Control Panel Plugin interface and tools. JRE (Java ...
What Is jtds-1.2.2.jar? jtds-1.2.2.jar is the JAR files of jTDS Java library 1.2.2, which is a JDBC ...
commons-lang-2.6.jar is the JAR file for Apache Commons Lang 2.6, which provides a host of helper ut...
JDK 11 java.base.jmod is the JMOD file for JDK 11 Base module. JDK 11 Base module compiled class fil...