# ProgressMonitor Class

> Represents the progress of an operation.

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2e
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/ProgressMonitor
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/llms.txt

```java
class ProgressMonitor
```

**Namespace:** `com::datalogics::PDFL`

## Description

Represents the progress of an operation. The class can display a dialog if a process will take time, and the Progress method can indicate how long the process will last.

**Referenced by:** [`Document`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Document.md), [`PDFOptimizer`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/PDFOptimizer.md), [`SignDoc`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/SignDoc.md)

## Constructors

### ProgressMonitor

```java
com.datalogics.PDFL.ProgressMonitor.ProgressMonitor()
```

*constructor*

Creates a new ProgressMonitor with duration and current value initialized to zero.

## Methods

### beginOperation

```java
void com.datalogics.PDFL.ProgressMonitor.beginOperation()
```

**Returns:** `void`

Initializes the progress monitor and displays it with a current value of zero. This method will be called first when the progress monitor is used.

### delete

```java
synchronized void com.datalogics.PDFL.ProgressMonitor.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.ProgressMonitor.delete()
```

**Returns:** `synchronized void`

### endOperation

```java
void com.datalogics.PDFL.ProgressMonitor.endOperation()
```

**Returns:** `void`

Draws the progress monitor with its current value set to the progress monitor's duration (a full progress monitor), then removes the progress monitor from the display.

### finalize

```java
void com.datalogics.PDFL.ProgressMonitor.finalize()
```

*protected*

**Returns:** `void`

### getCurrentValue

```java
int com.datalogics.PDFL.ProgressMonitor.getCurrentValue()
```

**Returns:** `int`

The progress monitor's current value.

Gets the current value of the progress monitor. The allowed value ranges from 0 (empty) to the value passed to SetDuration.

For example, if the progress monitor's duration is 10, the current value must be between 0 and 10, inclusive.

### getDuration

```java
int com.datalogics.PDFL.ProgressMonitor.getDuration()
```

**Returns:** `int`

The maximum value the progress monitor is allowed to have, as set by SetDuration.

Gets the progress monitor's duration.

### setCurrentValue

```java
void com.datalogics.PDFL.ProgressMonitor.setCurrentValue(int currentValue)
```

**Parameters**

- `currentValue` (`int`): The progress monitor's current value.

**Returns:** `void`

Sets the current value of the progress monitor and updates the display. The allowed value ranges from 0 (empty) to the value passed to SetDuration.

For example, if the progress monitor's duration is 10, the current value must be between 0 and 10, inclusive.

### setDuration

```java
void com.datalogics.PDFL.ProgressMonitor.setDuration(int duration)
```

**Parameters**

- `duration` (`int`): The maximum value the progress monitor will be allowed to have.

**Returns:** `void`

Sets the value that corresponds to a full progress monitor display. The progress monitor is subsequently filled in by setting its current value. This method will be called before setting the progress monitor's current value.

### setText

```java
void com.datalogics.PDFL.ProgressMonitor.setText(String text)
```

**Parameters**

- `text` (`String`): The UTF-8 encoded text string to display.

**Returns:** `void`

Display a UTF-8 text string in the progress monitor.
