|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.DefaultBoundedRangeModel
uk.ac.starlink.table.join.RangeModelProgressIndicator
public class RangeModelProgressIndicator
ProgressIndicator implementation that can serve as the model for
a JProgressBar
.
Calls to startStage, setLevel and endStage
cause the state of the BoundedRangeModel
that
this implements to be updated accordingly (asynchronously of course).
The string messages passed to startStage and
logMessage are ignored -
subclasses should override these methods (calling the superclass
implementations as well) to do something with these strings.
Field Summary |
---|
Fields inherited from class javax.swing.DefaultBoundedRangeModel |
---|
changeEvent, listenerList |
Constructor Summary | |
---|---|
RangeModelProgressIndicator(boolean profile)
|
Method Summary | |
---|---|
void |
endStage()
Indicates that no more ProgressIndicator.setLevel(double) calls will be made until
the next ProgressIndicator.startStage(java.lang.String) . |
void |
logMessage(java.lang.String msg)
Registers a comment about the progress of the algorithm. |
void |
run()
Updates the state of the BoundedRangeModel - should only be called from the event dispatch thread. |
void |
setLevel(double lev)
Specifies that the work of the most recently-started stage is a certain proportion complete. |
void |
startStage(java.lang.String stage)
Indicates that a number of ProgressIndicator.setLevel(double) calls may follow,
followed by a ProgressIndicator.endStage() call. |
Methods inherited from class javax.swing.DefaultBoundedRangeModel |
---|
addChangeListener, fireStateChanged, getChangeListeners, getExtent, getListeners, getMaximum, getMinimum, getValue, getValueIsAdjusting, removeChangeListener, setExtent, setMaximum, setMinimum, setRangeProperties, setValue, setValueIsAdjusting, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RangeModelProgressIndicator(boolean profile)
Method Detail |
---|
public void startStage(java.lang.String stage)
ProgressIndicator
ProgressIndicator.setLevel(double)
calls may follow,
followed by a ProgressIndicator.endStage()
call.
startStage
in interface ProgressIndicator
stage
- name/description of the processing stagepublic void setLevel(double lev) throws java.lang.InterruptedException
ProgressIndicator
ProgressIndicator.startStage(java.lang.String)
and ProgressIndicator.endStage()
,
preferably with non-decreasing values of level.
The method may throw an InterruptedException as a message to the caller that the work should be interrupted. A caller which receives such an exception should stop using resources and tidy up as soon as is convenient.
setLevel
in interface ProgressIndicator
lev
- value between 0. and 1. indicating amount of completion
java.lang.InterruptedException
- as a message to the caller that the
work is no longer required
Is this abuse of InterruptedException??public void endStage()
ProgressIndicator
ProgressIndicator.setLevel(double)
calls will be made until
the next ProgressIndicator.startStage(java.lang.String)
.
endStage
in interface ProgressIndicator
public void logMessage(java.lang.String msg)
ProgressIndicator
ProgressIndicator.startStage(java.lang.String)
and ProgressIndicator.endStage()
.
logMessage
in interface ProgressIndicator
msg
- messagepublic void run()
run
in interface java.lang.Runnable
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |