Class AddressArrayTableModel

All Implemented Interfaces:
ConfigurableColumnTableModel, DynamicColumnTableModel<Address>, RowObjectFilterModel<Address>, RowObjectTableModel<Address>, SelectionStorage<Address>, SortedTableModel, VariableColumnTableModel, ProgramTableModel, Serializable, EventListener, ChangeListener, TableModel

public class AddressArrayTableModel extends AddressPreviewTableModel
This table model of addresses is used when you already have an Address array built.

If you need to compute the address array, then you should extend AddressPreviewTableModel and override the doLoad(Accumulator<Address> accumulator, TaskMonitor monitor) method which will be called in a dedicated thread.

Alternatively, you can create an instance of the CustomLoadingAddressTableModel, supplying your own loading via the TableModelLoader.

See Also:
  • Constructor Details

    • AddressArrayTableModel

      public AddressArrayTableModel(String title, ServiceProvider serviceProvider, Program prog, Address[] addrs, TaskMonitor monitor)
      Constructor.
      Parameters:
      title - title of the query
      serviceProvider - from which to get services
      prog - program
      addrs - array of addresses in the model
      monitor - monitor that is used to show progress; may be null
    • AddressArrayTableModel

      public AddressArrayTableModel(String title, ServiceProvider serviceProvider, Program prog, Address[] addrs)
      Constructor.
      Parameters:
      title - title of the query
      serviceProvider - from which to get services
      prog - program
      addrs - array of addresses in the model
  • Method Details

    • doLoad

      protected void doLoad(Accumulator<Address> accumulator, TaskMonitor monitor) throws CancelledException
      Description copied from class: ThreadedTableModel
      The basic method that all children must implement. This is where children load their data.
      Specified by:
      doLoad in class ThreadedTableModel<Address,Program>
      Parameters:
      accumulator - the datastructure into which you should incrementally place you table row data
      monitor - the task monitor to check for cancellations and to update progress
      Throws:
      CancelledException - if the task monitor has been cancelled and a call is made to monitor.checkCancelled();.
    • setAddresses

      public void setAddresses(Address[] addresses)