Package com.nomagic.task
Class SimpleProgressStatus
- java.lang.Object
-
- com.nomagic.task.SimpleProgressStatus
-
- All Implemented Interfaces:
ProgressStatus
- Direct Known Subclasses:
ProgressMonitorAdapter.ProgressStatusAdapter
@OpenApiAll public class SimpleProgressStatus extends java.lang.Object implements ProgressStatus
-
-
Constructor Summary
Constructors Constructor Description SimpleProgressStatus()SimpleProgressStatus(long min, long max, java.lang.String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCurrent()Get current progress value.java.lang.StringgetDescription()Get progress description.longgetMax()Get progress maximum value.longgetMin()Get progress minimum value.intgetPercentage()Get completed percentage.voidincrease()Increment progress current value.voidinit(java.lang.String description, long max)Initialize progress.voidinit(java.lang.String description, long min, long max)Initialize progress.voidinit(java.lang.String description, long min, long max, long cur)Initialize progress.booleanisCancel()booleanisCompleted()Checks if progress status completed.booleanisIndeterminate()Checks if progres status is indeterminate,booleanisLocked()Check if progress status is locked.voidreset()Reset progress status.voidsetCancel(boolean cancel)Call this when want current operation be canceled.voidsetCurrent(long cur)Set progress current value.voidsetDescription(java.lang.String description)Set progress description.voidsetIndeterminate(boolean ind)Set progress status as indeterminate.voidsetLocked(boolean lock)Lock the progress status.voidsetMax(long max)Set progress maximum value.voidsetMin(long min)Set progress minimum value.
-
-
-
Method Detail
-
setMin
public void setMin(long min)
Description copied from interface:ProgressStatusSet progress minimum value.- Specified by:
setMinin interfaceProgressStatus
-
setMax
public void setMax(long max)
Description copied from interface:ProgressStatusSet progress maximum value.- Specified by:
setMaxin interfaceProgressStatus
-
setCurrent
public void setCurrent(long cur)
Description copied from interface:ProgressStatusSet progress current value.- Specified by:
setCurrentin interfaceProgressStatus
-
getMin
public long getMin()
Description copied from interface:ProgressStatusGet progress minimum value.- Specified by:
getMinin interfaceProgressStatus- Returns:
-
getMax
public long getMax()
Description copied from interface:ProgressStatusGet progress maximum value.- Specified by:
getMaxin interfaceProgressStatus- Returns:
-
reset
public void reset()
Description copied from interface:ProgressStatusReset progress status.- Specified by:
resetin interfaceProgressStatus
-
getPercentage
public int getPercentage()
Description copied from interface:ProgressStatusGet completed percentage.- Specified by:
getPercentagein interfaceProgressStatus- Returns:
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ProgressStatusGet progress description.- Specified by:
getDescriptionin interfaceProgressStatus- Returns:
-
setDescription
public void setDescription(java.lang.String description)
Description copied from interface:ProgressStatusSet progress description.- Specified by:
setDescriptionin interfaceProgressStatus
-
increase
public void increase()
Description copied from interface:ProgressStatusIncrement progress current value.- Specified by:
increasein interfaceProgressStatus
-
getCurrent
public long getCurrent()
Description copied from interface:ProgressStatusGet current progress value.- Specified by:
getCurrentin interfaceProgressStatus- Returns:
-
isCompleted
public boolean isCompleted()
Description copied from interface:ProgressStatusChecks if progress status completed.- Specified by:
isCompletedin interfaceProgressStatus- Returns:
-
setIndeterminate
public void setIndeterminate(boolean ind)
Description copied from interface:ProgressStatusSet progress status as indeterminate.- Specified by:
setIndeterminatein interfaceProgressStatus
-
isIndeterminate
public boolean isIndeterminate()
Description copied from interface:ProgressStatusChecks if progres status is indeterminate,- Specified by:
isIndeterminatein interfaceProgressStatus- Returns:
-
setLocked
public void setLocked(boolean lock)
Description copied from interface:ProgressStatusLock the progress status. Locked status does not change progress value.- Specified by:
setLockedin interfaceProgressStatus
-
isLocked
public boolean isLocked()
Description copied from interface:ProgressStatusCheck if progress status is locked.- Specified by:
isLockedin interfaceProgressStatus- Returns:
-
init
public void init(java.lang.String description, long min, long max, long cur)Description copied from interface:ProgressStatusInitialize progress.- Specified by:
initin interfaceProgressStatus- Parameters:
description- progress description.min- minimum value.max- maximum value.cur- current value.
-
init
public void init(java.lang.String description, long min, long max)Description copied from interface:ProgressStatusInitialize progress.- Specified by:
initin interfaceProgressStatus- Parameters:
description- progress description.min- minimum value.max- maximum value.
-
init
public void init(java.lang.String description, long max)Description copied from interface:ProgressStatusInitialize progress.- Specified by:
initin interfaceProgressStatus- Parameters:
description- progress description.max- maximum value.
-
isCancel
public boolean isCancel()
- Specified by:
isCancelin interfaceProgressStatus- Returns:
- true if current operation is requested to be canceled.
-
setCancel
public void setCancel(boolean cancel)
Description copied from interface:ProgressStatusCall this when want current operation be canceled. Actual operation can not support cancel.- Specified by:
setCancelin interfaceProgressStatus- Parameters:
cancel- new cancel value.
-
-