Package com.globalmentor.event
Class ProgressEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.globalmentor.event.ProgressEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class ProgressEvent extends java.util.EventObject
An event used to notify interested parties that progress has been made.- Author:
- Garret Wilson
- See Also:
ProgressListener
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProgressEvent(java.lang.Object source, long value)
Value constructor.ProgressEvent(java.lang.Object source, long value, long maximum)
Value and maximum constructor.ProgressEvent(java.lang.Object source, long delta, long value, long maximum)
Delta, value, and maximum constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDelta()
long
getMaximum()
java.lang.String
getProgressBarString()
long
getValue()
java.lang.String
toString()
This implementation returns a string indicating the current progress in the form123/1000
.
-
-
-
Constructor Detail
-
ProgressEvent
public ProgressEvent(java.lang.Object source, long value)
Value constructor.- Parameters:
source
- The object on which the event initially occurred.value
- The total progress to this point, or-1
if not known.
-
ProgressEvent
public ProgressEvent(java.lang.Object source, long value, long maximum)
Value and maximum constructor.- Parameters:
source
- The object on which the event initially occurred.value
- The total progress to this point, or-1
if not known.maximum
- The goal, or-1
if not known.
-
ProgressEvent
public ProgressEvent(java.lang.Object source, long delta, long value, long maximum)
Delta, value, and maximum constructor.- Parameters:
source
- The object on which the event initially occurred.delta
- The amount of recent progress, or-1
if not known.value
- The total progress to this point, or-1
if not known.maximum
- The goal, or-1
if not known.
-
-
Method Detail
-
getDelta
public long getDelta()
- Returns:
- The amount of recent progress, or
-1
if not known.
-
getValue
public long getValue()
- Returns:
- The total progress to this point, or
-1
if not known.
-
getMaximum
public long getMaximum()
- Returns:
- The goal, or
-1
if not known.
-
getProgressBarString
public java.lang.String getProgressBarString()
- Returns:
- A string representing a progress bar with the current progress.
-
toString
public java.lang.String toString()
This implementation returns a string indicating the current progress in the form123/1000
.- Overrides:
toString
in classjava.util.EventObject
-
-