📄 jprogressbar.html
字号:
<B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="JProgressBar()"><!-- --></A><H3>JProgressBar</H3><PRE>public <B>JProgressBar</B>()</PRE><DL><DD>Creates a horizontal progress bar. The default orientation for progress bars is <code>JProgressBar.HORIZONTAL</code>. By default, the String is set to <code>null</code> and the StringPainted is not painted. The border is painted by default. Uses the defaultMinimum (0) and defaultMaximum (100). Uses the defaultMinimum for the initial value of the progress bar.</DL><HR><A NAME="JProgressBar(int)"><!-- --></A><H3>JProgressBar</H3><PRE>public <B>JProgressBar</B>(int orient)</PRE><DL><DD>Creates a progress bar with the specified orientation, which can be either <code>JProgressBar.VERTICAL</code> or <code>JProgressBar.HORIZONTAL</code>. By default, the String is set to <code>null</code> and the StringPainted is not painted. The border is painted by default. Uses the defaultMinimum (0) and defaultMaximum (100). Uses the defaultMinimum for the initial value of the progress bar.</DL><HR><A NAME="JProgressBar(int, int)"><!-- --></A><H3>JProgressBar</H3><PRE>public <B>JProgressBar</B>(int min, int max)</PRE><DL><DD>Creates a horizontal progress bar, which is the default. By default, the String is set to <code>null</code> and the StringPainted is not painted. The border is painted by default. Uses the specified minimum and maximum. Uses the specified minimum for the initial value of the progress bar.</DL><HR><A NAME="JProgressBar(int, int, int)"><!-- --></A><H3>JProgressBar</H3><PRE>public <B>JProgressBar</B>(int orient, int min, int max)</PRE><DL><DD>Creates a progress bar using the specified orientation, minimum, and maximum. By default, the String is set to <code>null</code> and the StringPainted is not painted. The border is painted by default. Sets the inital value of the progress bar to the specified minimum. The BoundedRangeModel that sits underneath the progress bar handles any issues that may arrise from improperly setting the minimum, value, and maximum on the progress bar.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/BoundedRangeModel.html"><CODE>BoundedRangeModel</CODE></A>, <A HREF="../../javax/swing/JProgressBar.html#setOrientation(int)"><CODE>setOrientation(int)</CODE></A>, <A HREF="../../javax/swing/JProgressBar.html#setBorderPainted(boolean)"><CODE>setBorderPainted(boolean)</CODE></A>, <A HREF="../../javax/swing/JProgressBar.html#setStringPainted(boolean)"><CODE>setStringPainted(boolean)</CODE></A>, <A HREF="../../javax/swing/JProgressBar.html#setString(java.lang.String)"><CODE>setString(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="JProgressBar(javax.swing.BoundedRangeModel)"><!-- --></A><H3>JProgressBar</H3><PRE>public <B>JProgressBar</B>(<A HREF="../../javax/swing/BoundedRangeModel.html">BoundedRangeModel</A> newModel)</PRE><DL><DD>Creates a horizontal progress bar, the default orientation. By default, the String is set to <code>null</code> and the StringPainted is not painted. The border is painted by default. Uses the specified BoundedRangeModel which holds the minimum, value, and maximum.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/BoundedRangeModel.html"><CODE>BoundedRangeModel</CODE></A>, <A HREF="../../javax/swing/JProgressBar.html#setOrientation(int)"><CODE>setOrientation(int)</CODE></A>, <A HREF="../../javax/swing/JProgressBar.html#setBorderPainted(boolean)"><CODE>setBorderPainted(boolean)</CODE></A>, <A HREF="../../javax/swing/JProgressBar.html#setStringPainted(boolean)"><CODE>setStringPainted(boolean)</CODE></A>, <A HREF="../../javax/swing/JProgressBar.html#setString(java.lang.String)"><CODE>setString(java.lang.String)</CODE></A></DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getOrientation()"><!-- --></A><H3>getOrientation</H3><PRE>public int <B>getOrientation</B>()</PRE><DL><DD>Returns <code>JProgressBar.VERTICAL</code> or <code>JProgressBar.HORIZONTAL</code>, depending on the orientation of the progress bar. The default orientation is <code>HORIZONTAL</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>HORIZONTAL or VERTICAL<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JProgressBar.html#setOrientation(int)"><CODE>setOrientation(int)</CODE></A></DL></DD></DL><HR><A NAME="setOrientation(int)"><!-- --></A><H3>setOrientation</H3><PRE>public void <B>setOrientation</B>(int newOrientation)</PRE><DL><DD>Sets the progress bar's orientation to <I>newOrientation</I>, which must be <code>JProgressBar.VERTICAL</code> or <code>JProgressBar.HORIZONTAL</code>. The default orientation is <code>HORIZONTAL</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newOrientation</CODE> - HORIZONTAL or VERTICAL<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <I>newOrientation</I> is an illegal value<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JProgressBar.html#getOrientation()"><CODE>getOrientation()</CODE></A></DL></DD></DL><HR><A NAME="isStringPainted()"><!-- --></A><H3>isStringPainted</H3><PRE>public boolean <B>isStringPainted</B>()</PRE><DL><DD>Returns true if the progress bar will render a string onto the representation of the progress bar. Returns false if it will not do this rendering. The default is false - the progress bar does not draw the string by default.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>whether the progress bar renders a string<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JProgressBar.html#setStringPainted(boolean)"><CODE>setStringPainted(boolean)</CODE></A>, <A HREF="../../javax/swing/JProgressBar.html#setString(java.lang.String)"><CODE>setString(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="setStringPainted(boolean)"><!-- --></A><H3>setStringPainted</H3><PRE>public void <B>setStringPainted</B>(boolean b)</PRE><DL><DD>Sets whether the progress bar will render a string.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - true if the progress bar will render a string.<DT><B>See Also: </B><DD><A HREF="../../javax/swing/JProgressBar.htm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -