Class IrisTablePanel

All Implemented Interfaces:
Workspace, ImageObserver, MenuContainer, Serializable, Accessible

public class IrisTablePanel extends JPanel implements Workspace
This encapsulates a GuiTable, the JScrollPane for that table, and an optional warning label into a JPanel that we put into our dataPanel.
See Also:
  • Constructor Details

    • IrisTablePanel

      public IrisTablePanel(@NotNull com.fishlib.io.logger.Logger log, @NotNull ExecutorService createViewThreadPool, @NotNull AsyncPanel dataPanel, @NotNull IrisView irisView, @NotNull IrisTable table, @NotNull Function<IrisTableModel,IrisTable> createFreezeTableFunction, @Nullable Function<Table,IrisTable> createGuiTable, @Nullable PersistentQueryClient client, @Nullable EmbeddedDbConsole embeddedDbConsole, boolean allowTotals)
      Create a table panel
      Parameters:
      log - a logger for output
      createViewThreadPool - the shared threadpool to use when computing table updates
      dataPanel - the AsyncPanel into which the components will be placed
      irisView - the IrisView that will contain this panel
      table - the table being displayed
      createFreezeTableFunction - a lambda that can be used to create a freeze table on request
      createGuiTable - a lambda for creating an IrisTable on demand (for use with partition selection)
      client - the client connection to use for sending queries
      embeddedDbConsole - a console object if the panel was created via a console
      allowTotals - if totals tables are allowed.
  • Method Details

    • createFreezeManager

      @ExternalApi protected FreezeColumnsManager createFreezeManager(IrisTable irisTable)
    • setFreezeColumnsManager

      @ExternalApi public void setFreezeColumnsManager(FreezeColumnsManager freezeColumnsManager)
    • getFreezeColumnsManager

      @ExternalApi public FreezeColumnsManager getFreezeColumnsManager()
    • getScrollPane

      public JScrollPane getScrollPane()
    • getTable

      public IrisTable getTable()
    • attachToModel

      public void attachToModel(GuiTable table)
    • setTableSize

      public void setTableSize(long size)
    • setTopChoices

      public void setTopChoices(List<Object> topChoices, Table rawTable)
    • removeViewportListener

      public void removeViewportListener(ViewportAdjuster listenerToRemove)
    • addViewportListener

      public ViewportAdjuster addViewportListener(IrisTable guiTable, JScrollPane scrollPane, boolean addPopUps)
      Adds a viewport adjustment listener to an IrisTable and adds several UI elements (menus and key bindings). Also connects the totals table, the search bar, and connects the viewport adjuster to the scrollbar.
      Parameters:
      guiTable - the table to add the listener to
      scrollPane - the scroll pane containing the table
      addPopUps - if the method should add pop up menus to the table
      Returns:
      the viewport adjustment listener
    • closeDbViewportAdjustmentListeners

      public void closeDbViewportAdjustmentListeners()
      Closes the view port adjustment listeners.
    • getWorkspaceInfo

      public org.jdom2.Element getWorkspaceInfo()
      Description copied from interface: Workspace
      Serialize the class into an element to be stored in the workspace
      Specified by:
      getWorkspaceInfo in interface Workspace
      Returns:
      An Element containing the data to persist.
    • setWorkspaceInfo

      public void setWorkspaceInfo(org.jdom2.Element workspaceInfo)
      Description copied from interface: Workspace
      Restore the class to the state defined by the data persisted in workspaceInfo
      Specified by:
      setWorkspaceInfo in interface Workspace
      Parameters:
      workspaceInfo - An Element containing the persisted state.
    • setAllowTotals

      @ExternalApi public void setAllowTotals(boolean allowTotals)
    • getAllowTotals

      @ExternalApi public boolean getAllowTotals()