Package com.nomagic.task
Class EmptyProgressStatus
java.lang.Object
com.nomagic.task.EmptyProgressStatus
- All Implemented Interfaces:
ProgressStatus
- Version:
- $Revision$, $Date$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGet current progress value.static EmptyProgressStatusGet progress description.longgetMax()Get progress maximum value.longgetMin()Get progress minimum value.intGet completed percentage.voidincrease()Increment progress current value.voidInitialize progress.voidInitialize progress.voidInitialize progress.booleanisCancel()booleanChecks if progress status completed.booleanChecks 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(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.nomagic.task.ProgressStatus
cancelIfCanceled
-
Constructor Details
-
EmptyProgressStatus
protected EmptyProgressStatus()Constructor.
-
-
Method Details
-
setMin
public void setMin(long min) Description copied from interface:ProgressStatusSet progress minimum value.- Specified by:
setMinin interfaceProgressStatus- Parameters:
min- minimum value
-
setMax
public void setMax(long max) Description copied from interface:ProgressStatusSet progress maximum value.- Specified by:
setMaxin interfaceProgressStatus- Parameters:
max- maximum value
-
setCurrent
public void setCurrent(long cur) Description copied from interface:ProgressStatusSet progress current value.- Specified by:
setCurrentin interfaceProgressStatus- Parameters:
cur- current value
-
setDescription
Description copied from interface:ProgressStatusSet progress description.- Specified by:
setDescriptionin interfaceProgressStatus- Parameters:
description- progress description
-
getPercentage
public int getPercentage()Description copied from interface:ProgressStatusGet completed percentage.- Specified by:
getPercentagein interfaceProgressStatus- Returns:
- completed percentage
-
getMin
public long getMin()Description copied from interface:ProgressStatusGet progress minimum value.- Specified by:
getMinin interfaceProgressStatus- Returns:
- minimum value
-
getMax
public long getMax()Description copied from interface:ProgressStatusGet progress maximum value.- Specified by:
getMaxin interfaceProgressStatus- Returns:
- maximum value
-
getCurrent
public long getCurrent()Description copied from interface:ProgressStatusGet current progress value.- Specified by:
getCurrentin interfaceProgressStatus- Returns:
- current value
-
getDescription
Description copied from interface:ProgressStatusGet progress description.- Specified by:
getDescriptionin interfaceProgressStatus- Returns:
- progress description
-
reset
public void reset()Description copied from interface:ProgressStatusReset progress status.- Specified by:
resetin interfaceProgressStatus
-
increase
public void increase()Description copied from interface:ProgressStatusIncrement progress current value.- Specified by:
increasein interfaceProgressStatus
-
init
Description copied from interface:ProgressStatusInitialize progress.- Specified by:
initin interfaceProgressStatus- Parameters:
description- progress description.min- minimum value.max- maximum value.cur- current value.
-
init
Description copied from interface:ProgressStatusInitialize progress.- Specified by:
initin interfaceProgressStatus- Parameters:
description- progress description.min- minimum value.max- maximum value.
-
init
Description copied from interface:ProgressStatusInitialize progress.- Specified by:
initin interfaceProgressStatus- Parameters:
description- progress description.max- maximum value.
-
isCompleted
public boolean isCompleted()Description copied from interface:ProgressStatusChecks if progress status completed.- Specified by:
isCompletedin interfaceProgressStatus- Returns:
truewhen progress status completed
-
setIndeterminate
public void setIndeterminate(boolean ind) Description copied from interface:ProgressStatusSet progress status as indeterminate.- Specified by:
setIndeterminatein interfaceProgressStatus- Parameters:
ind-truefor progress status as indeterminate.
-
isIndeterminate
public boolean isIndeterminate()Description copied from interface:ProgressStatusChecks if progres status is indeterminate,- Specified by:
isIndeterminatein interfaceProgressStatus- Returns:
truewhen progress status as indeterminate.
-
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- Parameters:
lock-truefor progress status locking.
-
isLocked
public boolean isLocked()Description copied from interface:ProgressStatusCheck if progress status is locked.- Specified by:
isLockedin interfaceProgressStatus- Returns:
truewhen progress status is locked.
-
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.
-
getDefault
-