|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jomic.tools.AbstractTask
public abstract class AbstractTask
Base for a Task already handling progress related issues.
Constructor Summary | |
---|---|
protected |
AbstractTask()
|
Method Summary | |
---|---|
void |
addProgressChangeListener(ProgressChangeListener newListener)
|
long |
getMaxProgress()
|
long |
getProgress()
|
java.lang.String |
getProgressMessage()
Get a message describing the current progress, for example "Rendering hugo.png". |
protected boolean |
isInterrupted()
Return true if the current thread was interrupted. |
void |
removeProgressChangeListener(ProgressChangeListener listenerToRemove)
|
protected void |
setMaxProgress(long newMaxProgress)
Set maximum progress to newMaxProgress . |
protected void |
setProgress(long newProgress)
Set progress to newProgress and notify progress listeners of it. |
protected void |
setProgressMessage(java.lang.String newMessage)
|
abstract void |
start()
Start the task, which will cause the progress to iterate from 0 to getMaximum . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractTask()
Method Detail |
---|
protected final void setMaxProgress(long newMaxProgress)
newMaxProgress
. This should only be called from the
constructor.
protected void setProgress(long newProgress)
newProgress
and notify progress listeners of it.
protected void setProgressMessage(java.lang.String newMessage)
public long getMaxProgress()
getMaxProgress
in interface Task
public long getProgress()
getProgress
in interface Task
public java.lang.String getProgressMessage()
null
.
getProgressMessage
in interface Task
protected boolean isInterrupted()
true
if the current thread was interrupted.
Thread.isInterrupted()
public void addProgressChangeListener(ProgressChangeListener newListener)
addProgressChangeListener
in interface Task
public void removeProgressChangeListener(ProgressChangeListener listenerToRemove)
removeProgressChangeListener
in interface Task
public abstract void start() throws java.lang.Exception
Task
getMaximum
.
start
in interface Task
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |