Package com.nomagic.task
Class EmptyProgressStatus
java.lang.Object
com.nomagic.task.EmptyProgressStatus
- All Implemented Interfaces:
ProgressStatus
- Version:
- $Revision$, $Date$
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Get current progress value.static EmptyProgressStatus
Get progress description.long
getMax()
Get progress maximum value.long
getMin()
Get progress minimum value.int
Get completed percentage.void
increase()
Increment progress current value.void
Initialize progress.void
Initialize progress.void
Initialize progress.boolean
isCancel()
boolean
Checks if progress status completed.boolean
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
(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:ProgressStatus
Set progress minimum value.- Specified by:
setMin
in interfaceProgressStatus
- Parameters:
min
- minimum value
-
setMax
public void setMax(long max) Description copied from interface:ProgressStatus
Set progress maximum value.- Specified by:
setMax
in interfaceProgressStatus
- Parameters:
max
- maximum value
-
setCurrent
public void setCurrent(long cur) Description copied from interface:ProgressStatus
Set progress current value.- Specified by:
setCurrent
in interfaceProgressStatus
- Parameters:
cur
- current value
-
setDescription
Description copied from interface:ProgressStatus
Set progress description.- Specified by:
setDescription
in interfaceProgressStatus
- Parameters:
description
- progress description
-
getPercentage
public int getPercentage()Description copied from interface:ProgressStatus
Get completed percentage.- Specified by:
getPercentage
in interfaceProgressStatus
- Returns:
- completed percentage
-
getMin
public long getMin()Description copied from interface:ProgressStatus
Get progress minimum value.- Specified by:
getMin
in interfaceProgressStatus
- Returns:
- minimum value
-
getMax
public long getMax()Description copied from interface:ProgressStatus
Get progress maximum value.- Specified by:
getMax
in interfaceProgressStatus
- Returns:
- maximum value
-
getCurrent
public long getCurrent()Description copied from interface:ProgressStatus
Get current progress value.- Specified by:
getCurrent
in interfaceProgressStatus
- Returns:
- current value
-
getDescription
Description copied from interface:ProgressStatus
Get progress description.- Specified by:
getDescription
in interfaceProgressStatus
- Returns:
- progress description
-
reset
public void reset()Description copied from interface:ProgressStatus
Reset progress status.- Specified by:
reset
in interfaceProgressStatus
-
increase
public void increase()Description copied from interface:ProgressStatus
Increment progress current value.- Specified by:
increase
in interfaceProgressStatus
-
init
Description copied from interface:ProgressStatus
Initialize progress.- Specified by:
init
in interfaceProgressStatus
- Parameters:
description
- progress description.min
- minimum value.max
- maximum value.cur
- current value.
-
init
Description copied from interface:ProgressStatus
Initialize progress.- Specified by:
init
in interfaceProgressStatus
- Parameters:
description
- progress description.min
- minimum value.max
- maximum value.
-
init
Description copied from interface:ProgressStatus
Initialize progress.- Specified by:
init
in interfaceProgressStatus
- Parameters:
description
- progress description.max
- maximum value.
-
isCompleted
public boolean isCompleted()Description copied from interface:ProgressStatus
Checks if progress status completed.- Specified by:
isCompleted
in interfaceProgressStatus
- Returns:
true
when progress status completed
-
setIndeterminate
public void setIndeterminate(boolean ind) Description copied from interface:ProgressStatus
Set progress status as indeterminate.- Specified by:
setIndeterminate
in interfaceProgressStatus
- Parameters:
ind
-true
for progress status as indeterminate.
-
isIndeterminate
public boolean isIndeterminate()Description copied from interface:ProgressStatus
Checks if progres status is indeterminate,- Specified by:
isIndeterminate
in interfaceProgressStatus
- Returns:
true
when progress status as indeterminate.
-
setLocked
public void setLocked(boolean lock) Description copied from interface:ProgressStatus
Lock the progress status. Locked status does not change progress value.- Specified by:
setLocked
in interfaceProgressStatus
- Parameters:
lock
-true
for progress status locking.
-
isLocked
public boolean isLocked()Description copied from interface:ProgressStatus
Check if progress status is locked.- Specified by:
isLocked
in interfaceProgressStatus
- Returns:
true
when progress status is locked.
-
isCancel
public boolean isCancel()- Specified by:
isCancel
in interfaceProgressStatus
- Returns:
- true if current operation is requested to be canceled.
-
setCancel
public void setCancel(boolean cancel) Description copied from interface:ProgressStatus
Call this when want current operation be canceled. Actual operation can not support cancel.- Specified by:
setCancel
in interfaceProgressStatus
- Parameters:
cancel
- new cancel value.
-
getDefault
-