|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 ProgressMonitorpublic void setValue(long value)
ProgressMonitor
setValue in interface ProgressMonitorvalue - min <= value <= maxpublic void work(long amount)
ProgressMonitor
work in interface ProgressMonitorpublic void done()
public boolean isCancelled()
ProgressMonitor
isCancelled in interface ProgressMonitorpublic void setCancelEnabled(boolean enabled)
ProgressMonitorPer default we assume cancelling is enabled.
setCancelEnabled in interface ProgressMonitorpublic void setText(String text)
ProgressMonitor
setText in interface ProgressMonitorpublic Component getComponent()
ProgressMonitornull.
getComponent in interface ProgressMonitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||