uk.ac.starlink.table.gui
Interface TableConsumer

All Known Implementing Classes:
BasicTableConsumer

public interface TableConsumer

Interface which provides callback methods for a table load. The correct sequence must be observed when an instance of this class is used: you must either call

loadStarted followed by loadSucceeded or
or
loadStarted followed by loadFailed.
You can't nest these. All these calls must be performed from the event dispatch thread.

Since:
29 Nov 2004
See Also:
TableLoadChooser

Method Summary
 void loadFailed(Throwable th)
          Called when a table load has failed for some reason.
 void loadStarted(String id)
          Called when an attempt to load a table has been initiated.
 boolean loadSucceeded(StarTable table)
          Called when a table has successfully been loaded.
 

Method Detail

loadStarted

public void loadStarted(String id)
Called when an attempt to load a table has been initiated.

Parameters:
id - identifier for the source of the table (such as a filename)

loadSucceeded

public boolean loadSucceeded(StarTable table)
Called when a table has successfully been loaded. The return value should indicate whether this consumer considers the table load a success.

Parameters:
table - the table that has been acquired
Returns:
true if this consumer accepts the presented table

loadFailed

public void loadFailed(Throwable th)
Called when a table load has failed for some reason. A null exception may indicate that the load is no longer required, for instance was cancelled at the user's request.

Parameters:
th - exception describing what went wrong (may be null)

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.