|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.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. |
boolean |
loadSucceeded(StarTable table)
Loading succeeds. |
protected void |
processError(Throwable th)
Disposes of a throwable which has resulted from a failed load. |
protected void |
setLoading(boolean isLoading)
Called when the loading status changes. |
protected abstract boolean |
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 boolean tableLoaded(StarTable table)
table
- the loaded table
public 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 boolean loadSucceeded(StarTable table)
tableLoaded(uk.ac.starlink.table.StarTable)
is called unless the operation
has already been cancelled.
loadSucceeded
in interface TableConsumer
table
- table
public void loadFailed(Throwable th)
loadFailed
in interface TableConsumer
th
- errorprotected void processError(Throwable th)
BasicTableConsumer
implementation displays
the message in a modal dialogue.
th
- error (may be null)
|
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 |