站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.5.0

AggregateProgressHandle (NetBeans Progress API) - NetBeans API Javadoc 5.5.0

org.netbeans.api.progress/1 1.5.22

org.netbeans.api.progress.aggregate
Class AggregateProgressHandle

java.lang.Object
  extended by org.netbeans.api.progress.aggregate.AggregateProgressHandle

public final class AggregateProgressHandle
extends Object

a progress handle that allows aggregation of progress indication from multiple independant sources. All of the progress contributors are considered equal and are given equal share of the global progress. The task progress contributors can be added dynamically and the progress bar adjusts accordingly, never stepping back though. For a more simple version of progress indication, see ProgressHandle


Method Summary
 void addContributor(ProgressContributor contributor)
          add a contributor to the global, aggregated progress.
 void finish()
          finish the task, remove the task's component from the progress bar UI, any additional incoming events from the contributors will be ignored.
 void setDisplayName(String newDisplayName)
          change the display name of the progress task.
 void setInitialDelay(int millis)
          allows to set a custom initial delay for the progress task to appear in the status bar.
 void setMonitor(ProgressMonitor monitor)
          allow to watch the incoming events from the individual progress contributors.
 void start()
          start the progress indication for the task, shows the progress in the UI, events from the contributors are expected after this call.
 void start(long estimate)
          start the progress indication for the task with an initial time estimate, shows the progress in the UI, events from the contributors are expected after this call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

start

public void start()
start the progress indication for the task, shows the progress in the UI, events from the contributors are expected after this call.


start

public void start(long estimate)
start the progress indication for the task with an initial time estimate, shows the progress in the UI, events from the contributors are expected after this call.

Parameters:
estimate - estimated time to process the task in seconds

finish

public void finish()
finish the task, remove the task's component from the progress bar UI, any additional incoming events from the contributors will be ignored.


setInitialDelay

public void setInitialDelay(int millis)
allows to set a custom initial delay for the progress task to appear in the status bar. This delay marks the time between starting of the progress handle and it's appearance in the status bar. If it finishes earlier, it's not shown at all. There is a default < 1s value for this. If you want to to appear earlier or later, call this method with the value you prefer before starting the handle.

Progress bars that are placed in custom dialogs do always appear right away without a delay.

Parameters:
millis - amount of miliseconds that shall pass before the progress appears in status bar.

addContributor

public void addContributor(ProgressContributor contributor)
add a contributor to the global, aggregated progress. Adding makes sense only if the task is still in progress.


setMonitor

public void setMonitor(ProgressMonitor monitor)
allow to watch the incoming events from the individual progress contributors.


setDisplayName

public void setDisplayName(String newDisplayName)
change the display name of the progress task. Use with care, please make sure the changed name is not completely different, or otherwise it might appear to the user as a different task.

Since:
1.5

org.netbeans.api.progress/1 1.5.22

Built on May 28 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.