public class InstallMonitor extends Object implements IProgressMonitor
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.
| Modifier and Type | Class and Description |
|---|---|
protected class |
InstallMonitor.MonitorState |
| Modifier and Type | Field and Description |
|---|---|
protected long |
currentCount |
protected IProgressMonitor |
monitor |
protected boolean |
showDetails |
protected String |
subTaskString |
protected Stack |
tasks |
protected String |
taskString |
protected long |
totalCopyCount |
UNKNOWN| Modifier | Constructor and Description |
|---|---|
protected |
InstallMonitor() |
|
InstallMonitor(IProgressMonitor monitor)
Install monitor constructor
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected IProgressMonitor monitor
protected Stack tasks
protected String taskString
protected String subTaskString
protected boolean showDetails
protected long totalCopyCount
protected long currentCount
protected InstallMonitor()
public InstallMonitor(IProgressMonitor monitor)
monitor - base install monitorpublic void beginTask(String name, int totalWork)
beginTask in interface IProgressMonitorname - the name (or description) of the main tasktotalWork - the total number of work units into which
the main task is been subdivided. If the value is UNKNOWN
the implementation is free to indicate progress in a way which
doesn't require the total number of work units in advance.IProgressMonitor.beginTask(String, int)public void done()
done in interface IProgressMonitorIProgressMonitor.done()public void internalWorked(double work)
internalWorked in interface IProgressMonitorwork - the amount of work doneIProgressMonitor.internalWorked(double)public boolean isCanceled()
isCanceled in interface IProgressMonitortrue if cancellation has been requested,
and false otherwiseIProgressMonitor.isCanceled()public void setCanceled(boolean value)
setCanceled in interface IProgressMonitorvalue - true indicates that cancelation has
been requested (but not necessarily acknowledged);
false clears this flagIProgressMonitor.setCanceled(boolean)public void setTaskName(String name)
setTaskName in interface IProgressMonitorname - the name (or description) of the main taskIProgressMonitor.setTaskName(String)public void subTask(String name)
subTask in interface IProgressMonitorname - the name (or description) of the subtaskIProgressMonitor.subTask(String)public void worked(int work)
worked in interface IProgressMonitorwork - the number of work units just completedIProgressMonitor.worked(int)public void saveState()
restoreState()public void restoreState()
saveState()public void showCopyDetails(boolean setting)
setting - true to show the copy count,
false otherwisesetCopyCount(long),
setTotalCount(long)public void setTotalCount(long count)
count - total number of bytes to copy.showCopyDetails(boolean),
setCopyCount(long)public void setCopyCount(long count)
count - number of bytes already copied.showCopyDetails(boolean),
setTotalCount(long)public void incrementCount(long increment)
increment - number of new bytes copied.Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.