Class TableChooserDialog

  • All Implemented Interfaces:
    ActionContextProvider, NavigatableRemovalListener, StatusListener, TaskListener

    public class TableChooserDialog
    extends DialogComponentProvider
    implements NavigatableRemovalListener
    Dialog to show a table of items. If the dialog is constructed with a non-null TableChooserExecutor, then a button will be placed in the dialog, allowing the user to perform the action defined by the executor.

    Each button press will use the selected items as the items to be processed. While the items are scheduled to be processed, they will still be in the table, painted light gray. Attempting to reschedule any of these pending items will have no effect. Each time the button is pressed, a new SwingWorker is created, which will put the processing into a background thread. Further, by using multiple workers, the work will be performed in parallel.

    • Method Detail

      • setClosedListener

        public void setClosedListener​(Callback callback)
        Sets the given listener that will get notified when this dialog is closed
        Parameters:
        callback - the callback to notify
      • add

        public void add​(AddressableRowObject rowObject)
        Adds the given object to this dialog. This method can be called from any thread.
        Parameters:
        rowObject - the object to add
      • remove

        public void remove​(AddressableRowObject rowObject)
        Removes the given object from this dialog. Nothing will happen if the given item is not in this dialog. This method can be called from any thread.
        Parameters:
        rowObject - the object to remove
      • show

        public void show()
      • isBusy

        public boolean isBusy()
      • addCustomColumn

        public void addCustomColumn​(ColumnDisplay<?> columnDisplay)
      • setMessage

        public void setMessage​(java.lang.String message)
      • getRowCount

        public int getRowCount()
      • clearSelection

        public void clearSelection()
      • selectRows

        public void selectRows​(int... rows)
      • getSelectedRows

        public int[] getSelectedRows()
      • dispose

        public void dispose()