graphics.html

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

HTML
1,220
字号
<CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B>PropertyEditor.</B><B><A HREF="../../../java/beans/PropertyEditor.html#paintValue(java.awt.Graphics, java.awt.Rectangle)">paintValue</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;gfx,           <A HREF="../../../java/awt/Rectangle.html">Rectangle</A>&nbsp;box)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paint a representation of the value into a given area of screen real estate.</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>PropertyEditorSupport.</B><B><A HREF="../../../java/beans/PropertyEditorSupport.html#paintValue(java.awt.Graphics, java.awt.Rectangle)">paintValue</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;gfx,           <A HREF="../../../java/awt/Rectangle.html">Rectangle</A>&nbsp;box)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paint a representation of the value into a given area of screen real estate.</TD></TR></TABLE>&nbsp;<P><A NAME="javax.swing"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2">Uses of <A HREF="../../../java/awt/Graphics.html">Graphics</A> in <A HREF="../../../javax/swing/package-summary.html">javax.swing</A></FONT></TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TD COLSPAN=2>Subclasses of <A HREF="../../../java/awt/Graphics.html">Graphics</A> in <A HREF="../../../javax/swing/package-summary.html">javax.swing</A></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/DebugGraphics.html">DebugGraphics</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Graphics subclass supporting graphics debugging.</TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TD COLSPAN=2>Methods in <A HREF="../../../javax/swing/package-summary.html">javax.swing</A> that return <A HREF="../../../java/awt/Graphics.html">Graphics</A></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../java/awt/Graphics.html">Graphics</A></CODE></FONT></TD><TD><CODE><B>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#getComponentGraphics(java.awt.Graphics)">getComponentGraphics</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the graphics object used to paint this component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Graphics.html">Graphics</A></CODE></FONT></TD><TD><CODE><B>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#getGraphics()">getGraphics</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns this component's graphics context, which lets you draw on a component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Graphics.html">Graphics</A></CODE></FONT></TD><TD><CODE><B>DebugGraphics.</B><B><A HREF="../../../javax/swing/DebugGraphics.html#create()">create</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Overrides <code>Graphics.create</code> to return a DebugGraphics object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Graphics.html">Graphics</A></CODE></FONT></TD><TD><CODE><B>DebugGraphics.</B><B><A HREF="../../../javax/swing/DebugGraphics.html#create(int, int, int, int)">create</A></B>(int&nbsp;x,       int&nbsp;y,       int&nbsp;width,       int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Overrides <code>Graphics.create</code> to return a DebugGraphics object.</TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TD COLSPAN=2>Methods in <A HREF="../../../javax/swing/package-summary.html">javax.swing</A> with parameters of type <A HREF="../../../java/awt/Graphics.html">Graphics</A></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../java/awt/Graphics.html">Graphics</A></CODE></FONT></TD><TD><CODE><B>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#getComponentGraphics(java.awt.Graphics)">getComponentGraphics</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the graphics object used to paint this component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#paintComponent(java.awt.Graphics)">paintComponent</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the UI delegate is non-null, calls its paint method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#paintChildren(java.awt.Graphics)">paintChildren</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paints this component's children.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#paintBorder(java.awt.Graphics)">paintBorder</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paints the component's border.</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>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#update(java.awt.Graphics)">update</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calls paint(g).</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>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#paint(java.awt.Graphics)">paint</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is invoked by Swing to draw components.</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>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#printAll(java.awt.Graphics)">printAll</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoke this method to print the receiver.</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>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#print(java.awt.Graphics)">print</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoke this method to print the receiver.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#printComponent(java.awt.Graphics)">printComponent</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is invoked during a printing operation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#printChildren(java.awt.Graphics)">printChildren</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prints this component's children.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B>JComponent.</B><B><A HREF="../../../javax/swing/JComponent.html#printBorder(java.awt.Graphics)">printBorder</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prints the component's border.</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>JViewport.</B><B><A HREF="../../../javax/swing/JViewport.html#paint(java.awt.Graphics)">paint</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Depending on whether the <code>backingStore</code> is enabled, either paint the image through the backing store or paint just the recently exposed part, using the backing store to "blit" the remainder.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B>AbstractButton.</B><B><A HREF="../../../javax/swing/AbstractButton.html#paintBorder(java.awt.Graphics)">paintBorder</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paint the button's border if <code>BorderPainted</code> property is true.</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>JLayeredPane.</B><B><A HREF="../../../javax/swing/JLayeredPane.html#paint(java.awt.Graphics)">paint</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paints this JLayeredPane within the specified graphics context.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B>JPopupMenu.</B><B><A HREF="../../../javax/swing/JPopupMenu.html#paintBorder(java.awt.Graphics)">paintBorder</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paints the popup menu's border if <code>BorderPainted</code> property is true.</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>JApplet.</B><B><A HREF="../../../javax/swing/JApplet.html#update(java.awt.Graphics)">update</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Just calls <code>paint(g)</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B>SwingUtilities.</B><B><A HREF="../../../javax/swing/SwingUtilities.html#paintComponent(java.awt.Graphics, java.awt.Component, java.awt.Container, int, int, int, int)">paintComponent</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,               <A HREF="../../../java/awt/Component.html">Component</A>&nbsp;c,               <A HREF="../../../java/awt/Container.html">Container</A>&nbsp;p,               int&nbsp;x,               int&nbsp;y,               int&nbsp;w,               int&nbsp;h)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paint a component c on an abitrary graphics g in the specified rectangle, specifying the rectangle's upper left corner and size.</TD>

⌨️ 快捷键说明

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