|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.commons.io.SubTaskProgressMonitor
public class SubTaskProgressMonitor
Create a top ProgressMonitor with totalSteps set to number of SubTaskProgressMonitor * SubTaskProgressMonitor amounts.
ProgressMonitor topMonitor = new ProgressDialog(); topMonitor.setTotalSteps(7 * 100); for (int i = 0; i < 7; i++) { new SubTaskProgressMonitor(topMonitor, 100, totalStepsOfSubTask); }
Constructor Summary | |
---|---|
SubTaskProgressMonitor(ProgressMonitor monitor,
int amount,
long totalSteps)
|
Method Summary | |
---|---|
void |
done()
|
Component |
getComponent()
Returns the component that displays the progress. |
long |
getValue()
|
boolean |
isCancelled()
Returns true, if the operation has been cancelled by the user. |
void |
setCancelEnabled(boolean enabled)
Enables the cancel button. |
void |
setText(String text)
Sets the message text. |
void |
setTotalSteps(long totalSteps)
Sets the maximum value. |
void |
setValue(long value)
Sets the current value. |
void |
work(long amount)
Increase the value by amount. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubTaskProgressMonitor(ProgressMonitor monitor, int amount, long totalSteps)
Method Detail |
---|
public long getValue()
public void setTotalSteps(long totalSteps)
ProgressMonitor
setTotalSteps
in interface ProgressMonitor
public void setValue(long value)
ProgressMonitor
setValue
in interface ProgressMonitor
value
- min <= value <= maxpublic void work(long amount)
ProgressMonitor
work
in interface ProgressMonitor
public void done()
public boolean isCancelled()
ProgressMonitor
isCancelled
in interface ProgressMonitor
public void setCancelEnabled(boolean enabled)
ProgressMonitor
Per default we assume cancelling is enabled.
setCancelEnabled
in interface ProgressMonitor
public void setText(String text)
ProgressMonitor
setText
in interface ProgressMonitor
public Component getComponent()
ProgressMonitor
null
.
getComponent
in interface ProgressMonitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |