uk.ac.starlink.table.gui
Class ProgressBarStarTable
java.lang.Object
uk.ac.starlink.table.WrapperStarTable
uk.ac.starlink.table.gui.ProgressBarStarTable
- All Implemented Interfaces:
- StarTable
- public class ProgressBarStarTable
- extends WrapperStarTable
A WrapperStarTable which behaves the same as its base, except that
UI intervention is permitted on any RowSequence which is taken out
on it. For one thing, the RowSequence will update a supplied
JProgressBar component as it iterates, and for another thing
Thread.interrupt()
ing the thread in which the RowSequence
is being iterated over will cause the next method
to throw an IOException.
Said RowSequences may be used from any thread, that is
they are not restricted to use from the AWT event dispatcher thread.
However you don't want to be using two such
row sequences simultaneously or the progress bar will be getting two
sets of updates at once.
You might think this should be based on a
BoundedRangeModel
(JProgressBar's model) instead,
but unfortunately that doesn't allow you use of
indeterminate progress states.
Methods inherited from class uk.ac.starlink.table.WrapperStarTable |
checkedLongToInt, getBaseTable, getCell, getColumnAuxDataInfos, getColumnCount, getColumnInfo, getName, getParameterByName, getParameters, getRow, getRowCount, getURL, isRandom, setName, setParameter, setURL, toString |
ProgressBarStarTable
public ProgressBarStarTable(StarTable baseTable)
ProgressBarStarTable
public ProgressBarStarTable(StarTable baseTable,
JProgressBar progBar)
setProgressBar
public void setProgressBar(JProgressBar progBar)
getProgressBar
public JProgressBar getProgressBar()
getRowSequence
public RowSequence getRowSequence()
throws IOException
- Description copied from interface:
StarTable
- Returns an object which can iterate over all the rows in the table
sequentially.
- Specified by:
getRowSequence
in interface StarTable
- Overrides:
getRowSequence
in class WrapperStarTable
- Throws:
IOException