summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/javax/swing/ProgressMonitor.java
diff options
context:
space:
mode:
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-14 23:12:35 +0000
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-14 23:12:35 +0000
commitffde862e033a0825e1e9972a89c0f1f80b261a8e (patch)
tree97037d2c09c8384d80531f67ec36a01205df6bdb /libjava/classpath/javax/swing/ProgressMonitor.java
parentb415ff10527e977c3758234fd930e2c027bfa17d (diff)
downloadppe42-gcc-ffde862e033a0825e1e9972a89c0f1f80b261a8e.tar.gz
ppe42-gcc-ffde862e033a0825e1e9972a89c0f1f80b261a8e.zip
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92 * HACKING: Add more importing hints. Update automake version requirement. * configure.ac (gconf-peer): New enable AC argument. Add --disable-gconf-peer and --enable-default-preferences-peer to classpath configure when gconf is disabled. * scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and gnu/java/awt/dnd/peer/gtk to bc. Classify gnu/java/security/Configuration.java as generated source file. * gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java, gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java, gnu/java/lang/management/VMClassLoadingMXBeanImpl.java, gnu/java/lang/management/VMRuntimeMXBeanImpl.java, gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java, gnu/java/lang/management/VMThreadMXBeanImpl.java, gnu/java/lang/management/VMMemoryMXBeanImpl.java, gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub classes. * java/lang/management/VMManagementFactory.java: Likewise. * java/net/VMURLConnection.java: Likewise. * gnu/java/nio/VMChannel.java: Likewise. * java/lang/Thread.java (getState): Add stub implementation. * java/lang/Class.java (isEnum): Likewise. * java/lang/Class.h (isEnum): Likewise. * gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed. * javax/naming/spi/NamingManager.java: New override for StackWalker functionality. * configure, sources.am, Makefile.in, gcj/Makefile.in, include/Makefile.in, testsuite/Makefile.in: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116139 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/javax/swing/ProgressMonitor.java')
-rw-r--r--libjava/classpath/javax/swing/ProgressMonitor.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/libjava/classpath/javax/swing/ProgressMonitor.java b/libjava/classpath/javax/swing/ProgressMonitor.java
index 28d22e8a63e..b4c3d222349 100644
--- a/libjava/classpath/javax/swing/ProgressMonitor.java
+++ b/libjava/classpath/javax/swing/ProgressMonitor.java
@@ -142,12 +142,12 @@ public class ProgressMonitor
*/
public void close()
{
- if ( progressDialog != null )
+ if (progressDialog != null)
{
progressDialog.setVisible(false);
}
- if ( timer != null )
+ if (timer != null)
{
timer.stop();
timer = null;
@@ -173,7 +173,7 @@ public class ProgressMonitor
// Initializes and starts a timer with a task
// which measures the duration and displays
// a progress dialog if neccessary.
- if ( timer == null && progressDialog == null )
+ if (timer == null && progressDialog == null)
{
timer = new Timer(25, null);
timer.addActionListener(new TimerListener());
@@ -182,7 +182,7 @@ public class ProgressMonitor
// Cancels timer and hides progress dialog if the
// maximum value is reached.
- if ( progressBar != null && this.progress >= progressBar.getMaximum() )
+ if (progressBar != null && this.progress >= progressBar.getMaximum())
{
// The reason for using progressBar.getMaximum() instead of max is that
// we want to prevent that changes to the value have any effect after the
@@ -326,7 +326,7 @@ public class ProgressMonitor
*/
public void setNote(String note)
{
- if ( noteLabel != null )
+ if (noteLabel != null)
{
noteLabel.setText(note);
}
@@ -401,18 +401,18 @@ public class ProgressMonitor
{
long now = System.currentTimeMillis();
- if ( first )
+ if (first)
{
- if (( now - timestamp ) > millisToDecideToPopup )
+ if ((now - timestamp) > millisToDecideToPopup)
{
first = false;
- long expected = ( progress - min == 0 ) ?
- ( now - timestamp ) * ( max - min ) :
- ( now - timestamp ) * ( max - min ) / ( progress - min );
+ long expected = (progress - min == 0) ?
+ (now - timestamp) * (max - min) :
+ (now - timestamp) * (max - min) / (progress - min);
- if ( expected > millisToPopup )
+ if (expected > millisToPopup)
{
createDialog();
}
@@ -424,14 +424,14 @@ public class ProgressMonitor
return;
}
}
- else if ( progressDialog != null )
+ else if (progressDialog != null)
{
// The progress dialog is being displayed. We now calculate
// whether setting the progress bar to the current progress
// value would result in a visual difference.
int delta = progress - progressBar.getValue();
- if ( ( delta * progressBar.getWidth() / (max - min) ) > 0 )
+ if ((delta * progressBar.getWidth() / (max - min)) > 0)
{
// At least one pixel would change.
progressBar.setValue(progress);
OpenPOWER on IntegriCloud