pageattributes.html
来自「API資料大全」· HTML 代码 · 共 941 行 · 第 1/3 页
HTML
941 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:32:52 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class PageAttributes</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PageAttributes.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/awt/MenuShortcut.html"><B>PREV CLASS</B></A> <A HREF="../../java/awt/PageAttributes.ColorType.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="PageAttributes.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_class_summary">INNER</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt</FONT><BR>Class PageAttributes</H2><PRE><A HREF="../../java/lang/Object.html">java.lang.Object</A> | +--<B>java.awt.PageAttributes</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../java/lang/Cloneable.html">Cloneable</A></DD></DL><HR><DL><DT>public final class <B>PageAttributes</B><DT>extends <A HREF="../../java/lang/Object.html">Object</A><DT>implements <A HREF="../../java/lang/Cloneable.html">Cloneable</A></DL><P>A set of attributes which control the output of a printed page. <p> Instances of this class control the color state, paper size (media type), orientation, logical origin, print quality, and resolution of every page which uses the instance. Attribute names are compliant with the Internet Printing Protocol (IPP) 1.1 where possible. Attribute values are partially compliant where possible. <p> To use a method which takes an inner class type, pass a reference to one of the constant fields of the inner class. Client code cannot create new instances of the inner class types because none of those classes has a public constructor. For example, to set the color state to monochrome, use the following code: <pre> import java.awt.PageAttributes; public class MonochromeExample { public void setMonochrome(PageAttributes pageAttributes) { pageAttributes.setColor(PageAttributes.ColorType.MONOCHROME); } } </pre> <p> Every IPP attribute which supports an <i>attributeName</i>-default value has a corresponding <code>set<i>attributeName</i>ToDefault</code> method. Default value fields are not provided.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><A NAME="inner_class_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Inner Class Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.ColorType.html">PageAttributes.ColorType</A></B></CODE><BR> A type-safe enumeration of possible color states.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.MediaType.html">PageAttributes.MediaType</A></B></CODE><BR> A type-safe enumeration of possible paper sizes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.OrientationRequestedType.html">PageAttributes.OrientationRequestedType</A></B></CODE><BR> A type-safe enumeration of possible orientations.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.OriginType.html">PageAttributes.OriginType</A></B></CODE><BR> A type-safe enumeration of possible origins.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.PrintQualityType.html">PageAttributes.PrintQualityType</A></B></CODE><BR> A type-safe enumeration of possible print qualities.</TD></TR></TABLE> <!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#PageAttributes()">PageAttributes</A></B>()</CODE><BR> Constructs a PageAttributes instance with default values for every attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#PageAttributes(java.awt.PageAttributes.ColorType, java.awt.PageAttributes.MediaType, java.awt.PageAttributes.OrientationRequestedType, java.awt.PageAttributes.OriginType, java.awt.PageAttributes.PrintQualityType, int[])">PageAttributes</A></B>(<A HREF="../../java/awt/PageAttributes.ColorType.html">PageAttributes.ColorType</A> color, <A HREF="../../java/awt/PageAttributes.MediaType.html">PageAttributes.MediaType</A> media, <A HREF="../../java/awt/PageAttributes.OrientationRequestedType.html">PageAttributes.OrientationRequestedType</A> orientationRequested, <A HREF="../../java/awt/PageAttributes.OriginType.html">PageAttributes.OriginType</A> origin, <A HREF="../../java/awt/PageAttributes.PrintQualityType.html">PageAttributes.PrintQualityType</A> printQuality, int[] printerResolution)</CODE><BR> Constructs a PageAttributes instance with the specified values for every attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#PageAttributes(java.awt.PageAttributes)">PageAttributes</A></B>(<A HREF="../../java/awt/PageAttributes.html">PageAttributes</A> obj)</CODE><BR> Constructs a PageAttributes instance which is a copy of the supplied PageAttributes.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#clone()">clone</A></B>()</CODE><BR> Creates and returns a copy of this PageAttributes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../java/lang/Object.html">Object</A> obj)</CODE><BR> Determines whether two PageAttributes are equal to each other.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/PageAttributes.ColorType.html">PageAttributes.ColorType</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#getColor()">getColor</A></B>()</CODE><BR> Returns whether pages using these attributes will be rendered in color or monochrome.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/PageAttributes.MediaType.html">PageAttributes.MediaType</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#getMedia()">getMedia</A></B>()</CODE><BR> Returns the paper size for pages using these attributes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/PageAttributes.OrientationRequestedType.html">PageAttributes.OrientationRequestedType</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#getOrientationRequested()">getOrientationRequested</A></B>()</CODE><BR> Returns the print orientation for pages using these attributes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/PageAttributes.OriginType.html">PageAttributes.OriginType</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#getOrigin()">getOrigin</A></B>()</CODE><BR> Returns whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#getPrinterResolution()">getPrinterResolution</A></B>()</CODE><BR> Returns the print resolution for pages using these attributes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/PageAttributes.PrintQualityType.html">PageAttributes.PrintQualityType</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#getPrintQuality()">getPrintQuality</A></B>()</CODE><BR> Returns the print quality for pages using these attributes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#hashCode()">hashCode</A></B>()</CODE><BR> Returns a hash code value for this PageAttributes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#set(java.awt.PageAttributes)">set</A></B>(<A HREF="../../java/awt/PageAttributes.html">PageAttributes</A> obj)</CODE><BR> Sets all of the attributes of this PageAttributes to the same values as the attributes of obj.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#setColor(java.awt.PageAttributes.ColorType)">setColor</A></B>(<A HREF="../../java/awt/PageAttributes.ColorType.html">PageAttributes.ColorType</A> color)</CODE><BR> Specifies whether pages using these attributes will be rendered in color or monochrome.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#setMedia(java.awt.PageAttributes.MediaType)">setMedia</A></B>(<A HREF="../../java/awt/PageAttributes.MediaType.html">PageAttributes.MediaType</A> media)</CODE><BR> Specifies the desired paper size for pages using these attributes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#setMediaToDefault()">setMediaToDefault</A></B>()</CODE><BR> Sets the paper size for pages using these attributes to the default size for the default locale.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/PageAttributes.html#setOrientationRequested(int)">setOrientationRequested</A></B>(int orientationRequested)</CODE>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?