📄 basicprogressbarui.html
字号:
</DL><HR><A NAME="uninstallListeners()"><!-- --></A><H3>uninstallListeners</H3><PRE>protected void <B>uninstallListeners</B>()</PRE><DL></DL><HR><A NAME="getPreferredInnerHorizontal()"><!-- --></A><H3>getPreferredInnerHorizontal</H3><PRE>protected <A HREF="../../../../java/awt/Dimension.html">Dimension</A> <B>getPreferredInnerHorizontal</B>()</PRE><DL></DL><HR><A NAME="getPreferredInnerVertical()"><!-- --></A><H3>getPreferredInnerVertical</H3><PRE>protected <A HREF="../../../../java/awt/Dimension.html">Dimension</A> <B>getPreferredInnerVertical</B>()</PRE><DL></DL><HR><A NAME="getSelectionForeground()"><!-- --></A><H3>getSelectionForeground</H3><PRE>protected <A HREF="../../../../java/awt/Color.html">Color</A> <B>getSelectionForeground</B>()</PRE><DL><DD>The "selectionForeground" is the color of the text when it is drawn over a filled area of the progress bar.</DL><HR><A NAME="getSelectionBackground()"><!-- --></A><H3>getSelectionBackground</H3><PRE>protected <A HREF="../../../../java/awt/Color.html">Color</A> <B>getSelectionBackground</B>()</PRE><DL><DD>The "selectionBackground" is the color of the text when it is drawn over an unfilled area of the progress bar.</DL><HR><A NAME="getCellLength()"><!-- --></A><H3>getCellLength</H3><PRE>protected int <B>getCellLength</B>()</PRE><DL><DD>Returns the width (if HORIZONTAL) or height (if VERTICAL) of each of the indivdual cells/units to be rendered in the progress bar. However, for text rendering simplification and aesthetic considerations, this function will return 1 when the progress string is being rendered.<DD><DL><DT><B>Returns:</B><DD>the value representing the spacing between cells<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/plaf/basic/BasicProgressBarUI.html#setCellLength(int)"><CODE>setCellLength(int)</CODE></A>, <A HREF="../../../../javax/swing/JProgressBar.html#isStringPainted()"><CODE>JProgressBar.isStringPainted()</CODE></A></DL></DD></DL><HR><A NAME="setCellLength(int)"><!-- --></A><H3>setCellLength</H3><PRE>protected void <B>setCellLength</B>(int cellLen)</PRE><DL></DL><HR><A NAME="getCellSpacing()"><!-- --></A><H3>getCellSpacing</H3><PRE>protected int <B>getCellSpacing</B>()</PRE><DL><DD>Returns the spacing between each of the cells/units in the progress bar. However, for text rendering simplification and aesthetic considerations, this function will return 0 when the progress string is being rendered.<DD><DL><DT><B>Returns:</B><DD>the value representing the spacing between cells<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/plaf/basic/BasicProgressBarUI.html#setCellSpacing(int)"><CODE>setCellSpacing(int)</CODE></A>, <A HREF="../../../../javax/swing/JProgressBar.html#isStringPainted()"><CODE>JProgressBar.isStringPainted()</CODE></A></DL></DD></DL><HR><A NAME="setCellSpacing(int)"><!-- --></A><H3>setCellSpacing</H3><PRE>protected void <B>setCellSpacing</B>(int cellSpace)</PRE><DL></DL><HR><A NAME="getAmountFull(java.awt.Insets, int, int)"><!-- --></A><H3>getAmountFull</H3><PRE>protected int <B>getAmountFull</B>(<A HREF="../../../../java/awt/Insets.html">Insets</A> b, int width, int height)</PRE><DL><DD>This determines the amount of the progress bar that should be filled based on the percent done gathered from the model. This is a common operation so it was abstracted out. It assumes that your progress bar is linear. That is, if you are making a circular progress indicator, you will want to override this method.</DL><HR><A NAME="paint(java.awt.Graphics, javax.swing.JComponent)"><!-- --></A><H3>paint</H3><PRE>public void <B>paint</B>(<A HREF="../../../../java/awt/Graphics.html">Graphics</A> g, <A HREF="../../../../javax/swing/JComponent.html">JComponent</A> c)</PRE><DL><DD>All purpose paint method that should do the right thing for almost all linear progress bars. By setting a few values in the defaults table, things should work just fine to paint your progress bar. Naturally, override this if you are making a circular or semi-circular progress bar.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/ComponentUI.html#paint(java.awt.Graphics, javax.swing.JComponent)">paint</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/ComponentUI.html">ComponentUI</A></CODE></DL></DD></DL><HR><A NAME="paintString(java.awt.Graphics, int, int, int, int, int, java.awt.Insets)"><!-- --></A><H3>paintString</H3><PRE>protected void <B>paintString</B>(<A HREF="../../../../java/awt/Graphics.html">Graphics</A> g, int x, int y, int width, int height, int amountFull, <A HREF="../../../../java/awt/Insets.html">Insets</A> b)</PRE><DL></DL><HR><A NAME="getStringPlacement(java.awt.Graphics, java.lang.String, int, int, int, int)"><!-- --></A><H3>getStringPlacement</H3><PRE>protected <A HREF="../../../../java/awt/Point.html">Point</A> <B>getStringPlacement</B>(<A HREF="../../../../java/awt/Graphics.html">Graphics</A> g, <A HREF="../../../../java/lang/String.html">String</A> progressString, int x, int y, int width, int height)</PRE><DL><DD>Designate the place where the progress string will be drawn. This implementation places it at the center of the progress bar (in both x and y). Override this if you want to right, left, top, or bottom align the progress string or if you need to nudge it around for any reason.</DL><HR><A NAME="getPreferredSize(javax.swing.JComponent)"><!-- --></A><H3>getPreferredSize</H3><PRE>public <A HREF="../../../../java/awt/Dimension.html">Dimension</A> <B>getPreferredSize</B>(<A HREF="../../../../javax/swing/JComponent.html">JComponent</A> c)</PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/ComponentUI.html#getPreferredSize(javax.swing.JComponent)">getPreferredSize</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/ComponentUI.html">ComponentUI</A></CODE></DL></DD></DL><HR><A NAME="getMinimumSize(javax.swing.JComponent)"><!-- --></A><H3>getMinimumSize</H3><PRE>public <A HREF="../../../../java/awt/Dimension.html">Dimension</A> <B>getMinimumSize</B>(<A HREF="../../../../javax/swing/JComponent.html">JComponent</A> c)</PRE><DL><DD>The Minimum size for this component is 10. The rationale here is that there should be at least one pixel per 10 percent.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/ComponentUI.html#getMinimumSize(javax.swing.JComponent)">getMinimumSize</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/ComponentUI.html">ComponentUI</A></CODE></DL></DD></DL><HR><A NAME="getMaximumSize(javax.swing.JComponent)"><!-- --></A><H3>getMaximumSize</H3><PRE>public <A HREF="../../../../java/awt/Dimension.html">Dimension</A> <B>getMaximumSize</B>(<A HREF="../../../../javax/swing/JComponent.html">JComponent</A> c)</PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/ComponentUI.html#getMaximumSize(javax.swing.JComponent)">getMaximumSize</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/ComponentUI.html">ComponentUI</A></CODE></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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/BasicProgressBarUI.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="../../../../javax/swing/plaf/basic/BasicPopupMenuUI.html"><B>PREV CLASS</B></A> <A HREF="../../../../javax/swing/plaf/basic/BasicProgressBarUI.ChangeHandler.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="BasicProgressBarUI.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> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -