toolkit.html

来自「API資料大全」· HTML 代码 · 共 1,279 行 · 第 1/5 页

HTML
1,279
字号
<!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:33:06 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  Toolkit</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Toolkit.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/awt/TexturePaint.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/awt/Window.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>  &nbsp;&nbsp;<A HREF="Toolkit.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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  Toolkit</H2><PRE><A HREF="../../java/lang/Object.html">java.lang.Object</A>  |  +--<B>java.awt.Toolkit</B></PRE><HR><DL><DT>public abstract class <B>Toolkit</B><DT>extends <A HREF="../../java/lang/Object.html">Object</A></DL><P>This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit. Subclasses of <code>Toolkit</code> are used to bind the various components to particular native toolkit implementations. <p> Most applications should not call any of the methods in this class directly. The methods defined by <code>Toolkit</code> are the "glue" that joins the platform-independent classes in the <code>java.awt</code> package with their counterparts in <code>java.awt.peer</code>. Some methods defined by <code>Toolkit</code> query the native operating system directly.<P><DL><DT><B>Since: </B><DD>JDK1.0</DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../java/util/Map.html">Map</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#desktopProperties">desktopProperties</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../java/beans/PropertyChangeSupport.html">PropertyChangeSupport</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#desktopPropsSupport">desktopPropsSupport</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ======== 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/Toolkit.html#Toolkit()">Toolkit</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ========== 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>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#addAWTEventListener(java.awt.event.AWTEventListener, long)">addAWTEventListener</A></B>(<A HREF="../../java/awt/event/AWTEventListener.html">AWTEventListener</A>&nbsp;listener,                    long&nbsp;eventMask)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given <code>eventMask</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)">addPropertyChangeListener</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name,                          <A HREF="../../java/beans/PropertyChangeListener.html">PropertyChangeListener</A>&nbsp;pcl)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add the specified property change listener for the named desktop  property If pcl is null, no exception is thrown and no action is performed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#beep()">beep</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Emits an audio beep.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver)">checkImage</A></B>(<A HREF="../../java/awt/Image.html">Image</A>&nbsp;image,           int&nbsp;width,           int&nbsp;height,           <A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;observer)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates the construction status of a specified image that is being prepared for display.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract &nbsp;java.awt.peer.ButtonPeer</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#createButton(java.awt.Button)">createButton</A></B>(<A HREF="../../java/awt/Button.html">Button</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates this toolkit's implementation of <code>Button</code> using the specified peer interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract &nbsp;java.awt.peer.CanvasPeer</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#createCanvas(java.awt.Canvas)">createCanvas</A></B>(<A HREF="../../java/awt/Canvas.html">Canvas</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates this toolkit's implementation of <code>Canvas</code> using the specified peer interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract &nbsp;java.awt.peer.CheckboxPeer</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#createCheckbox(java.awt.Checkbox)">createCheckbox</A></B>(<A HREF="../../java/awt/Checkbox.html">Checkbox</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates this toolkit's implementation of <code>Checkbox</code> using the specified peer interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract &nbsp;java.awt.peer.CheckboxMenuItemPeer</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#createCheckboxMenuItem(java.awt.CheckboxMenuItem)">createCheckboxMenuItem</A></B>(<A HREF="../../java/awt/CheckboxMenuItem.html">CheckboxMenuItem</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates this toolkit's implementation of <code>CheckboxMenuItem</code> using the specified peer interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract &nbsp;java.awt.peer.ChoicePeer</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#createChoice(java.awt.Choice)">createChoice</A></B>(<A HREF="../../java/awt/Choice.html">Choice</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates this toolkit's implementation of <code>Choice</code> using the specified peer interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;java.awt.peer.LightweightPeer</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#createComponent(java.awt.Component)">createComponent</A></B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a peer for a component or container.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Cursor.html">Cursor</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String)">createCustomCursor</A></B>(<A HREF="../../java/awt/Image.html">Image</A>&nbsp;cursor,                   <A HREF="../../java/awt/Point.html">Point</A>&nbsp;hotSpot,                   <A HREF="../../java/lang/String.html">String</A>&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new custom cursor object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract &nbsp;java.awt.peer.DialogPeer</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Toolkit.html#createDialog(java.awt.Dialog)">createDialog</A></B>(<A HREF="../../java/awt/Dialog.html">Dialog</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates this toolkit's implementation of <code>Dialog</code> using the specified peer interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?