Always call ProgressCounter#stop() when your task is done, because there is a background timer that
periodically updates the ETA.
| Modifier and Type | Class and Description |
|---|---|
| private static record |
| Modifier and Type | Field and Description |
|---|---|
| private final StringProperty | |
| private static final Duration | |
| private final ScheduledExecutorService | |
| private static final List | |
| private final IntegerProperty | |
| private final IntegerProperty | |
| private final Instant |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public String | |
| public int | |
| public int | |
| public void | |
| public void | |
| public void | |
| public void | |
| public ReadOnlyStringProperty | |
| public void | |
| public void | |
| public void | |
| private void | |
| public void | |
| private void | |
| public IntegerProperty | |
| public IntegerProperty |
| message | back to summary |
|---|---|
| private final StringProperty message | |
| PERIODIC_UPDATE_DURATION | back to summary |
|---|---|
| private static final Duration PERIODIC_UPDATE_DURATION | |
| periodicUpdate | back to summary |
|---|---|
| private final ScheduledExecutorService periodicUpdate | |
| PROGRESS_MESSAGES | back to summary |
|---|---|
| private static final List<ProgressCounter. | |
| workDone | back to summary |
|---|---|
| private final IntegerProperty workDone | |
| workMax | back to summary |
|---|---|
| private final IntegerProperty workMax | |
| workStartTime | back to summary |
|---|---|
| private final Instant workStartTime | |
| ProgressCounter | back to summary |
|---|---|
| public ProgressCounter() | |
| end | back to summary |
|---|---|
public void end()
| |
| getMessage | back to summary |
|---|---|
| public String getMessage() | |
| getWorkDone | back to summary |
|---|---|
| public int getWorkDone() | |
| getWorkMax | back to summary |
|---|---|
| public int getWorkMax() | |
| increaseWorkDone | back to summary |
|---|---|
| public void increaseWorkDone(int incr) | |
| increaseWorkMax | back to summary |
|---|---|
| public void increaseWorkMax(int incr) | |
| increment | back to summary |
|---|---|
public void increment(long increment)
| |
| listenToAllProperties | back to summary |
|---|---|
| public void listenToAllProperties(Runnable runnable) | |
| messageProperty | back to summary |
|---|---|
| public ReadOnlyStringProperty messageProperty() | |
| reset | back to summary |
|---|---|
public void reset(String message, long max, String trailingMessage)
| |
| start | back to summary |
|---|---|
public void start(long initialProgress)
| |
| stop | back to summary |
|---|---|
| public void stop() | |
| update | back to summary |
|---|---|
| private void update() | |
| update | back to summary |
|---|---|
public void update(long progress, String message)
| |
| updateMessage | back to summary |
|---|---|
| private void updateMessage(Duration eta) | |
| workDoneProperty | back to summary |
|---|---|
| public IntegerProperty workDoneProperty() | |
| workMaxProperty | back to summary |
|---|---|
| public IntegerProperty workMaxProperty() | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public int | |
| public String | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| maxTime | back to summary |
|---|---|
| private final int maxTime Record Component accessed by maxTime(). | |
| message | back to summary |
|---|---|
| private final String message Record Component accessed by message(). | |
| ProgressMessage | back to summary |
|---|---|
| private ProgressMessage(int maxTime, String message) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| maxTime | back to summary |
|---|---|
| public int maxTime() Record Component getter of maxTime. | |
| message | back to summary |
|---|---|
| public String message() Record Component getter of message. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |