Eclipse eRCP
Release 1.1

org.eclipse.update.core
Class InstallMonitor

java.lang.Object
  extended byorg.eclipse.update.core.InstallMonitor

public class InstallMonitor
extends Object

Install progress monitor Delegating wrapper for IProgressMonitor used for installation handling.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
2.0

Nested Class Summary
protected  class InstallMonitor.MonitorState
           
 
Field Summary
protected  long currentCount
           
protected  IProgressMonitor monitor
           
protected  boolean showDetails
           
protected  String subTaskString
           
protected  Stack tasks
           
protected  String taskString
           
protected  long totalCopyCount
           
 
Constructor Summary
protected InstallMonitor()
           
  InstallMonitor(IProgressMonitor monitor)
          Install monitor constructor
 
Method Summary
 void beginTask(String name, int totalWork)
          Begin new monitor task.
 void done()
          Indicate completion of monitor activity.
 void incrementCount(long increment)
          Increments the number of bytes copied.
 void internalWorked(double work)
          Indicate monitor progress.
 boolean isCanceled()
          Check is use indicated that the operation be cancelled.
 void restoreState()
          Restore the monitor state.
 void saveState()
          Save the current monitor state.
 void setCanceled(boolean value)
          Set the cancellation state.
 void setCopyCount(long count)
          Sets the number of bytes already copied.
 void setTaskName(String name)
          Set task name.
 void setTotalCount(long count)
          Sets the total number of bytes to copy.
 void showCopyDetails(boolean setting)
          Indicate whether the monitor subtask message should include copy progress counts.
 void subTask(String name)
          Set subtask name.
 void worked(int work)
          Indicate monitor progress.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

monitor

protected IProgressMonitor monitor

tasks

protected Stack tasks

taskString

protected String taskString

subTaskString

protected String subTaskString

showDetails

protected boolean showDetails

totalCopyCount

protected long totalCopyCount

currentCount

protected long currentCount
Constructor Detail

InstallMonitor

protected InstallMonitor()

InstallMonitor

public InstallMonitor(IProgressMonitor monitor)
Install monitor constructor

Parameters:
monitor - base install monitor
Since:
2.0
Method Detail

beginTask

public void beginTask(String name,
                      int totalWork)
Begin new monitor task.

Since:
2.0
See Also:
IProgressMonitor#beginTask(String, int)

done

public void done()
Indicate completion of monitor activity.

Since:
2.0
See Also:
IProgressMonitor#done()

internalWorked

public void internalWorked(double work)
Indicate monitor progress.

Since:
2.0
See Also:
IProgressMonitor#internalWorked(double)

isCanceled

public boolean isCanceled()
Check is use indicated that the operation be cancelled.

Since:
2.0
See Also:
IProgressMonitor#isCanceled()

setCanceled

public void setCanceled(boolean value)
Set the cancellation state.

Since:
2.0
See Also:
IProgressMonitor#setCanceled(boolean)

setTaskName

public void setTaskName(String name)
Set task name.

Since:
2.0
See Also:
IProgressMonitor#setTaskName(String)

subTask

public void subTask(String name)
Set subtask name.

Since:
2.0
See Also:
IProgressMonitor#subTask(String)

worked

public void worked(int work)
Indicate monitor progress.

Since:
2.0
See Also:
IProgressMonitor#worked(int)

saveState

public void saveState()
Save the current monitor state. The states are saved on a push-down stack. Prior states can be restored by calling restorState()

Since:
2.0
See Also:
restoreState()

restoreState

public void restoreState()
Restore the monitor state.

Since:
2.0
See Also:
saveState()

showCopyDetails

public void showCopyDetails(boolean setting)
Indicate whether the monitor subtask message should include copy progress counts.

Parameters:
setting - true to show the copy count, false otherwise
Since:
2.0
See Also:
setCopyCount(long), setTotalCount(long)

setTotalCount

public void setTotalCount(long count)
Sets the total number of bytes to copy.

Parameters:
count - total number of bytes to copy.
Since:
2.0
See Also:
showCopyDetails(boolean), setCopyCount(long)

setCopyCount

public void setCopyCount(long count)
Sets the number of bytes already copied.

Parameters:
count - number of bytes already copied.
Since:
2.0
See Also:
showCopyDetails(boolean), setTotalCount(long)

incrementCount

public void incrementCount(long increment)
Increments the number of bytes copied.

Parameters:
increment - number of new bytes copied.
Since:
3.0

Eclipse eRCP
Release 1.1