Interface TableLoadClient
public interface TableLoadClient
Interface for a GUI-based consumer of tables which are being loaded.
All its methods are called on the Event Dispatch Thread, and must be
called in sequence:
startSequence()setLabel(String),loadSuccess(StarTable),loadFailure(Throwable)(any number of times, in any order)endSequence(boolean)
- Since:
- 13 Sept 2010
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionvoidendSequence(boolean cancelled) Indicates that no more loadSuccess/loadFailure methods will be invoked.Returns the table factory via which all loaded tables will be produced.booleanloadFailure(Throwable error) Presents a failure which has resulted from a table load attempt.booleanloadSuccess(StarTable table) Presents a table which has been successfully loaded.voidSets a short text string suitable for presenting to the user to indicate what is being loaded.voidCalled before any table load attempts are made.
-
Method Details
-
getTableFactory
StarTableFactory getTableFactory()Returns the table factory via which all loaded tables will be produced.- Returns:
- table factory
-
startSequence
void startSequence()Called before any table load attempts are made. -
setLabel
Sets a short text string suitable for presenting to the user to indicate what is being loaded. May be invoked one or more times during the load sequence. -
loadSuccess
Presents a table which has been successfully loaded. The return value indicates whether this client is interested in attempts to load more tables, if there are more.- Parameters:
table- loaded table- Returns:
- true iff more loadSuccess/loadFailure calls are acceptable
-
loadFailure
Presents a failure which has resulted from a table load attempt. The return value indicates whether this client is interested in attempts to load more tables, if there are more.- Parameters:
error- error- Returns:
- true iff more loadSuccess/loadFailure calls are acceptable
-
endSequence
void endSequence(boolean cancelled) Indicates that no more loadSuccess/loadFailure methods will be invoked. Thecancelledargument indicates whether the sequence finished naturally, or was cancelled by a deliberate act of the user.- Parameters:
cancelled- true iff the sequence was cancelled by a user action
-