public final class ProgressEvent extends Object
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_FINISH |
static int |
TYPE_PROGRESS |
static int |
TYPE_REQUEST_STOP |
static int |
TYPE_SILENT |
static int |
TYPE_START |
static int |
TYPE_SWITCH |
Constructor and Description |
---|
ProgressEvent(InternalHandle src,
int type,
boolean isWatched)
Creates a new instance of ProgressEvent
|
ProgressEvent(InternalHandle src,
int type,
boolean isWatched,
String msg)
Creates a new instance of ProgressEvent
|
ProgressEvent(InternalHandle src,
String msg,
int units,
double percentage,
long estimate,
boolean isWatched) |
ProgressEvent(InternalHandle src,
String msg,
int units,
double percentage,
long estimate,
boolean isWatched,
String displayName) |
Modifier and Type | Method and Description |
---|---|
void |
copyMessageFromEarlier(ProgressEvent last)
used in controller, preserve dynamic message from earlier events
if this one doesn't have it's own.
|
String |
getDisplayName() |
long |
getEstimatedCompletion() |
String |
getMessage() |
double |
getPercentageDone() |
InternalHandle |
getSource() |
int |
getType() |
int |
getWorkunitsDone() |
boolean |
isSwitched() |
boolean |
isWatched() |
void |
markAsSwitched() |
String |
toString() |
public static final int TYPE_START
public static final int TYPE_FINISH
public static final int TYPE_REQUEST_STOP
public static final int TYPE_PROGRESS
public static final int TYPE_SWITCH
public static final int TYPE_SILENT
public ProgressEvent(InternalHandle src, int type, boolean isWatched)
type
- one of TYPE_START, TYPE_REQUEST_STOP, TYPE_FINISH, TYPE_SWITCHEDpublic ProgressEvent(InternalHandle src, int type, boolean isWatched, String msg)
type
- one of TYPE_SILENTpublic ProgressEvent(InternalHandle src, String msg, int units, double percentage, long estimate, boolean isWatched)
percentage
- completed work percentageestimate
- estimate of completion in secondspublic ProgressEvent(InternalHandle src, String msg, int units, double percentage, long estimate, boolean isWatched, String displayName)
public InternalHandle getSource()
public long getEstimatedCompletion()
public double getPercentageDone()
public int getWorkunitsDone()
public String getMessage()
public int getType()
public boolean isWatched()
public void copyMessageFromEarlier(ProgressEvent last)
public void markAsSwitched()
public boolean isSwitched()
public String getDisplayName()