Package uk.ac.starlink.topcat.plot2

## Class Progresser

- java.lang.Object
- - uk.ac.starlink.topcat.plot2.Progresser

-     public class Progresser
      extends java.lang.Object

  Manages use of a JProgressBar model. The methods of this class may be called from any thread.
  Since:
    18 Nov 2013
  Author:
    Mark Taylor

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Progresser​(javax.swing.BoundedRangeModel progModel, long count)` | Constructs a progresser with default step values.
    `Progresser​(javax.swing.BoundedRangeModel progModel, long count, int maxStepCount, int minStepSize, long minStartMillis, long minUpdateMillis)` | Constructs a progresser with step value configuration.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `increment()` | Records a single increment contributing to the progress.
    `void` | `init()` | Prepares this progresser for use.
    `void` | `reset()` | Resets this progresser and its GUI to its initial state (no progress).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Progresser

          public Progresser​(javax.swing.BoundedRangeModel progModel,
                            long count)

      Constructs a progresser with default step values.
      Parameters:
        `progModel` - progress bar model
        `count` - number of increments expected for progress completion

    - #### Progresser

          public Progresser​(javax.swing.BoundedRangeModel progModel,
                            long count,
                            int maxStepCount,
                            int minStepSize,
                            long minStartMillis,
                            long minUpdateMillis)

      Constructs a progresser with step value configuration.
      Parameters:
        `progModel` - progress bar model
        `count` - number of increments expected for progress completion
        `maxStepCount` - maximum number of steps that will be recorded in the GUI for progress completion
        `minStepSize` - minimum number of increments before a step is recorded in the GUI
        `minStartMillis` - minimum interval in milliseconds after initialisation before the first update is made
        `minUpdateMillis` - minimum interval in milliseconds between updates

  - ### Method Detail

    - #### init

          public void init()

      Prepares this progresser for use. Must be called before any increments.

    - #### increment

          public void increment()

      Records a single increment contributing to the progress.

    - #### reset

          public void reset()

      Resets this progresser and its GUI to its initial state (no progress).

Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.