src/java.desktop/share/classes/javax/swing/JProgressBar.java

Print this page




 173     protected String progressString;
 174 
 175     /**
 176      * Whether to display a string of text on the progress bar.
 177      * The default is <code>false</code>.
 178      * Setting this to <code>true</code> causes a textual
 179      * display of the progress to be rendered on the progress bar. If
 180      * the <code>progressString</code> is <code>null</code>,
 181      * the percentage of completion is displayed on the progress bar.
 182      * Otherwise, the <code>progressString</code> is
 183      * rendered on the progress bar.
 184      *
 185      * @see #setStringPainted
 186      * @see #setString
 187      */
 188     protected boolean paintString;
 189 
 190     /**
 191      * The default minimum for a progress bar is 0.
 192      */
 193     static final private int defaultMinimum = 0;
 194     /**
 195      * The default maximum for a progress bar is 100.
 196      */
 197     static final private int defaultMaximum = 100;
 198     /**
 199      * The default orientation for a progress bar is <code>HORIZONTAL</code>.
 200      */
 201     static final private int defaultOrientation = HORIZONTAL;
 202 
 203     /**
 204      * Only one <code>ChangeEvent</code> is needed per instance since the
 205      * event's only interesting property is the immutable source, which
 206      * is the progress bar.
 207      * The event is lazily created the first time that an
 208      * event notification is fired.
 209      *
 210      * @see #fireStateChanged
 211      */
 212     protected transient ChangeEvent changeEvent = null;
 213 
 214     /**
 215      * Listens for change events sent by the progress bar's model,
 216      * redispatching them
 217      * to change-event listeners registered upon
 218      * this progress bar.
 219      *
 220      * @see #createChangeListener
 221      */




 173     protected String progressString;
 174 
 175     /**
 176      * Whether to display a string of text on the progress bar.
 177      * The default is <code>false</code>.
 178      * Setting this to <code>true</code> causes a textual
 179      * display of the progress to be rendered on the progress bar. If
 180      * the <code>progressString</code> is <code>null</code>,
 181      * the percentage of completion is displayed on the progress bar.
 182      * Otherwise, the <code>progressString</code> is
 183      * rendered on the progress bar.
 184      *
 185      * @see #setStringPainted
 186      * @see #setString
 187      */
 188     protected boolean paintString;
 189 
 190     /**
 191      * The default minimum for a progress bar is 0.
 192      */
 193     private static final int defaultMinimum = 0;
 194     /**
 195      * The default maximum for a progress bar is 100.
 196      */
 197     private static final int defaultMaximum = 100;
 198     /**
 199      * The default orientation for a progress bar is <code>HORIZONTAL</code>.
 200      */
 201     private static final int defaultOrientation = HORIZONTAL;
 202 
 203     /**
 204      * Only one <code>ChangeEvent</code> is needed per instance since the
 205      * event's only interesting property is the immutable source, which
 206      * is the progress bar.
 207      * The event is lazily created the first time that an
 208      * event notification is fired.
 209      *
 210      * @see #fireStateChanged
 211      */
 212     protected transient ChangeEvent changeEvent = null;
 213 
 214     /**
 215      * Listens for change events sent by the progress bar's model,
 216      * redispatching them
 217      * to change-event listeners registered upon
 218      * this progress bar.
 219      *
 220      * @see #createChangeListener
 221      */