graphics.html

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

HTML
1,220
字号
</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, java.awt.Rectangle)">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,               <A HREF="../../../java/awt/Rectangle.html">Rectangle</A>&nbsp;r)</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 a Rectangle object.</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>CellRendererPane.</B><B><A HREF="../../../javax/swing/CellRendererPane.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;Shouldn't be called.</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>CellRendererPane.</B><B><A HREF="../../../javax/swing/CellRendererPane.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;Shouldn't be called.</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>CellRendererPane.</B><B><A HREF="../../../javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics, java.awt.Component, java.awt.Container, int, int, int, int, boolean)">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,               boolean&nbsp;shouldValidate)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paint a cell renderer component c on graphics object 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>CellRendererPane.</B><B><A HREF="../../../javax/swing/CellRendererPane.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;Calls this.paintComponent(g, c, p, x, y, w, h, false).</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>CellRendererPane.</B><B><A HREF="../../../javax/swing/CellRendererPane.html#paintComponent(java.awt.Graphics, java.awt.Component, java.awt.Container, java.awt.Rectangle)">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,               <A HREF="../../../java/awt/Rectangle.html">Rectangle</A>&nbsp;r)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calls this.paintComponent() with the rectangles x,y,width,height fields.</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>JInternalFrame.</B><B><A HREF="../../../javax/swing/JInternalFrame.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;&nbsp;</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>JFrame.</B><B><A HREF="../../../javax/swing/JFrame.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>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B>JSplitPane.</B><B><A HREF="../../../javax/swing/JSplitPane.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;Subclassed to message the UI with <code>finishedPaintingChildren</code> after super has been messaged, as well as painting the 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>Icon.</B><B><A HREF="../../../javax/swing/Icon.html#paintIcon(java.awt.Component, java.awt.Graphics, int, int)">paintIcon</A></B>(<A HREF="../../../java/awt/Component.html">Component</A>&nbsp;c,          <A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,          int&nbsp;x,          int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw the icon at the specified location.</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>JToolBar.</B><B><A HREF="../../../javax/swing/JToolBar.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 toolbar'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>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B>JMenuBar.</B><B><A HREF="../../../javax/swing/JMenuBar.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 menubar'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>ImageIcon.</B><B><A HREF="../../../javax/swing/ImageIcon.html#paintIcon(java.awt.Component, java.awt.Graphics, int, int)">paintIcon</A></B>(<A HREF="../../../java/awt/Component.html">Component</A>&nbsp;c,          <A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,          int&nbsp;x,          int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paints the icon.</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>JProgressBar.</B><B><A HREF="../../../javax/swing/JProgressBar.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 progress bar's border if BorderPainted 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>JDialog.</B><B><A HREF="../../../javax/swing/JDialog.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 <code>paint(g)</code>.</TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TD COLSPAN=2>Constructors 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><CODE><B><A HREF="../../../javax/swing/DebugGraphics.html#DebugGraphics(java.awt.Graphics, javax.swing.JComponent)">DebugGraphics</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;graphics,              <A HREF="../../../javax/swing/JComponent.html">JComponent</A>&nbsp;component)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/swing/DebugGraphics.html#DebugGraphics(java.awt.Graphics)">DebugGraphics</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;graphics)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.</TD></TR></TABLE>&nbsp;<P><A NAME="javax.swing.border"><!-- --></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/border/package-summary.html">javax.swing.border</A></FONT></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/border/package-summary.html">javax.swing.border</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>&nbsp;void</CODE></FONT></TD><TD><CODE><B>AbstractBorder.</B><B><A HREF="../../../javax/swing/border/AbstractBorder.html#paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)">paintBorder</A></B>(<A HREF="../../../java/awt/Component.html">Component</A>&nbsp;c,            <A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,            int&nbsp;x,            int&nbsp;y,            int&nbsp;width,            int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This default implementation does no painting.</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>BevelBorder.</B><B><A HREF="../../../javax/swing/border/BevelBorder.html#paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)">paintBorder</A></B>(<A HREF="../../../java/awt/Component.html">Component</A>&nbsp;c,            <A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,            int&nbsp;x,            int&nbsp;y,            int&nbsp;width,            int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paints the border for the specified component with the specified position and size.</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>BevelBorder.</B><B><A HREF="../../../javax/swing/border/BevelBorder.html#paintRaisedBevel(java.awt.Component, java.awt.Graphics, int, int, int, int)">paintRaisedBevel</A></B>(<A HREF="../../../java/awt/Component.html">Component</A>&nbsp;c,                 <A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,                 int&nbsp;x,                 int&nbsp;y,                 int&nbsp;width,                 int&nbsp;height)</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;void</CODE></FONT></TD><TD><CODE><B>BevelBorder.</B><B><A HREF="../../../javax/swing/border/BevelBorder.html#paintLoweredBevel(java.awt.Component, java.awt.Graphics, int, int, int, int)">paintLoweredBevel</A></B>(<A HREF="../../../java/awt/Component.html">Component</A>&nbsp;c,                  <A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,                  int&nbsp;x,                  int&nbsp;y,                  int&nbsp;width,                  int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">

⌨️ 快捷键说明

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