uk.ac.starlink.table.gui

## 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:
  1. `startSequence()`
  2. `setLabel(java.lang.String)`, `loadSuccess(uk.ac.starlink.table.StarTable)`, `loadFailure(java.lang.Throwable)` (any number of times, in any order)
  3. `endSequence(boolean)`
  Since:
    13 Sept 2010

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `endSequence(boolean cancelled)` Indicates that no more loadSuccess/loadFailure methods will be invoked.
    `StarTableFactory` | `getTableFactory()` Returns the table factory via which all loaded tables will be produced.
    `boolean` | `loadFailure(java.lang.Throwable error)` Presents a failure which has resulted from a table load attempt.
    `boolean` | `loadSuccess(StarTable table)` Presents a table which has been successfully loaded.
    `void` | `setLabel(java.lang.String label)` Sets a short text string suitable for presenting to the user to indicate what is being loaded.
    `void` | `startSequence()` Called before any table load attempts are made.

- - ### Method Detail

    - #### 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

          void setLabel(java.lang.String label)

      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

          boolean loadSuccess(StarTable table)

      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

          boolean loadFailure(java.lang.Throwable error)

      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. The `cancelled` argument 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