@OpenApiAll public class SimpleProgressStatus extends java.lang.Object implements ProgressStatus
Constructor and Description |
---|
SimpleProgressStatus() |
SimpleProgressStatus(long min,
long max,
java.lang.String description) |
Modifier and Type | Method and Description |
---|---|
long |
getCurrent()
Get current progress value.
|
java.lang.String |
getDescription()
Get progress description.
|
long |
getMax()
Get progress maximum value.
|
long |
getMin()
Get progress minimum value.
|
int |
getPercentage()
Get completed percentage.
|
void |
increase()
Increment progress current value.
|
void |
init(java.lang.String description,
long max)
Initialize progress.
|
void |
init(java.lang.String description,
long min,
long max)
Initialize progress.
|
void |
init(java.lang.String description,
long min,
long max,
long cur)
Initialize progress.
|
boolean |
isCancel() |
boolean |
isCompleted()
Checks if progress status completed.
|
boolean |
isIndeterminate()
Checks if progres status is indeterminate,
|
boolean |
isLocked()
Check if progress status is locked.
|
void |
reset()
Reset progress status.
|
void |
setCancel(boolean cancel)
Call this when want current operation be canceled.
|
void |
setCurrent(long cur)
Set progress current value.
|
void |
setDescription(java.lang.String description)
Set progress description.
|
void |
setIndeterminate(boolean ind)
Set progress status as indeterminate.
|
void |
setLocked(boolean lock)
Lock the progress status.
|
void |
setMax(long max)
Set progress maximum value.
|
void |
setMin(long min)
Set progress minimum value.
|
public SimpleProgressStatus()
public SimpleProgressStatus(long min, long max, java.lang.String description)
public void setMin(long min)
ProgressStatus
setMin
in interface ProgressStatus
public void setMax(long max)
ProgressStatus
setMax
in interface ProgressStatus
public void setCurrent(long cur)
ProgressStatus
setCurrent
in interface ProgressStatus
public long getMin()
ProgressStatus
getMin
in interface ProgressStatus
public long getMax()
ProgressStatus
getMax
in interface ProgressStatus
public void reset()
ProgressStatus
reset
in interface ProgressStatus
public int getPercentage()
ProgressStatus
getPercentage
in interface ProgressStatus
public java.lang.String getDescription()
ProgressStatus
getDescription
in interface ProgressStatus
public void setDescription(java.lang.String description)
ProgressStatus
setDescription
in interface ProgressStatus
public void increase()
ProgressStatus
increase
in interface ProgressStatus
public long getCurrent()
ProgressStatus
getCurrent
in interface ProgressStatus
public boolean isCompleted()
ProgressStatus
isCompleted
in interface ProgressStatus
public void setIndeterminate(boolean ind)
ProgressStatus
setIndeterminate
in interface ProgressStatus
public boolean isIndeterminate()
ProgressStatus
isIndeterminate
in interface ProgressStatus
public void setLocked(boolean lock)
ProgressStatus
setLocked
in interface ProgressStatus
public boolean isLocked()
ProgressStatus
isLocked
in interface ProgressStatus
public void init(java.lang.String description, long min, long max, long cur)
ProgressStatus
init
in interface ProgressStatus
description
- progress description.min
- minimum value.max
- maximum value.cur
- current value.public void init(java.lang.String description, long min, long max)
ProgressStatus
init
in interface ProgressStatus
description
- progress description.min
- minimum value.max
- maximum value.public void init(java.lang.String description, long max)
ProgressStatus
init
in interface ProgressStatus
description
- progress description.max
- maximum value.public boolean isCancel()
isCancel
in interface ProgressStatus
public void setCancel(boolean cancel)
ProgressStatus
setCancel
in interface ProgressStatus
cancel
- new cancel value.