Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.update.core
Class InstallMonitor

    java.lang.Object
      org.eclipse.update.core.InstallMonitor

All Implemented Interfaces:
  IProgressMonitor

public class InstallMonitor
extends Object
implements IProgressMonitor

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`

Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor
`UNKNOWN`

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.

  Specified by:
    `beginTask` in interface `IProgressMonitor`
  Parameters:
    `name` - the name (or description) of the main task
    `totalWork` - the total number of work units into which the main task is been subdivided. If the value is `UNKNOWN` the implemenation is free to indicate progress in a way which doesn't require the total number of work units in advance.
  Since:
    2.0
  See Also:
    `IProgressMonitor.beginTask(String, int)`

### done

    public void done()

  Indicate completion of monitor activity.

  Specified by:
    `done` in interface `IProgressMonitor`
  Since:
    2.0
  See Also:
    `IProgressMonitor.done()`

### internalWorked

    public void internalWorked(double work)

  Indicate monitor progress.

  Specified by:
    `internalWorked` in interface `IProgressMonitor`
  Parameters:
    `work` - the amound of work done
  Since:
    2.0
  See Also:
    `IProgressMonitor.internalWorked(double)`

### isCanceled

    public boolean isCanceled()

  Check is use indicated that the operation be cancelled.

  Specified by:
    `isCanceled` in interface `IProgressMonitor`
  Returns:
    `true` if cancellation has been requested, and `false` otherwise
  Since:
    2.0
  See Also:
    `IProgressMonitor.isCanceled()`

### setCanceled

    public void setCanceled(boolean value)

  Set the cancellation state.

  Specified by:
    `setCanceled` in interface `IProgressMonitor`
  Parameters:
    `value` - `true` indicates that cancelation has been requested (but not necessarily acknowledged); `false` clears this flag
  Since:
    2.0
  See Also:
    `IProgressMonitor.setCanceled(boolean)`

### setTaskName

    public void setTaskName(String name)

  Set task name.

  Specified by:
    `setTaskName` in interface `IProgressMonitor`
  Parameters:
    `name` - the name (or description) of the main task
  Since:
    2.0
  See Also:
    `IProgressMonitor.setTaskName(String)`

### subTask

    public void subTask(String name)

  Set subtask name.

  Specified by:
    `subTask` in interface `IProgressMonitor`
  Parameters:
    `name` - the name (or description) of the subtask
  Since:
    2.0
  See Also:
    `IProgressMonitor.subTask(String)`

### worked

    public void worked(int work)

  Indicate monitor progress.

  Specified by:
    `worked` in interface `IProgressMonitor`
  Parameters:
    `work` - the number of work units just completed
  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:
    2.0
  See Also:
    `showCopyDetails(boolean)`, `setTotalCount(long)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.