|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.starlink.table.gui.BasicTableConsumer
Provides a basic implementation of TableConsumer
.
This provides a callback routine tableLoaded(uk.ac.starlink.table.StarTable)
which is called
if a successful table load completes. If the load fails, the user
is informed in a popup dialogue. A cancel()
method is provided
to allow loading to be interrupted.
Constructor Summary | |
BasicTableConsumer(Component parent)
Constructor. |
Method Summary | |
void |
cancel()
Called when the loading sequence is over, because a table load has completed successfully or unsuccessfully. |
boolean |
isLoading()
Determines whether this consumer is currently waiting for a load to finish. |
void |
loadFailed(Throwable th)
Loading fails. |
void |
loadStarted(String id)
Loading starts. |
void |
loadSucceeded(StarTable table)
Loading succeeds. |
protected void |
setLoading(boolean isLoading)
Called when the loading status changes. |
protected abstract void |
tableLoaded(StarTable table)
Called from the event dispatch thread if and when a table is successfully loaded. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BasicTableConsumer(Component parent)
parent
- parent component (may be null)Method Detail |
protected abstract void tableLoaded(StarTable table)
table
- the loaded tablepublic void cancel()
tableLoaded(uk.ac.starlink.table.StarTable)
being called in the future
(until after another loadStarted(java.lang.String)
call).
Calling this method when loading is not in progress has no effect.
public boolean isLoading()
protected void setLoading(boolean isLoading)
isLoading
- whether the status is now waiting or not waitingpublic void loadStarted(String id)
loadStarted
in interface TableConsumer
id
- load target name
IllegalStateException
- if a load is already in progresspublic void loadSucceeded(StarTable table)
tableLoaded(uk.ac.starlink.table.StarTable)
is called unless the operation
has already been cancelled.
loadSucceeded
in interface TableConsumer
table
- tablepublic void loadFailed(Throwable th)
loadFailed
in interface TableConsumer
th
- error
|
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 |