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
Author:
Mark Taylor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    endSequence(boolean cancelled)
    Indicates that no more loadSuccess/loadFailure methods will be invoked.
    Returns the table factory via which all loaded tables will be produced.
    boolean
    Presents a failure which has resulted from a table load attempt.
    boolean
    Presents a table which has been successfully loaded.
    void
    Sets a short text string suitable for presenting to the user to indicate what is being loaded.
    void
    Called 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

      void setLabel(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(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