Class FreezeColumnsTransferHandler

java.lang.Object
javax.swing.TransferHandler
com.illumon.iris.gui.widget.FreezeColumnsTransferHandler
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ViewportTransferHandler

public class FreezeColumnsTransferHandler extends TransferHandler
A Transfer Handler that takes into account freeze tables. This transfer handler will copy columns from both the Freeze Table and Main Table. It leans heavily on FreezeColumnManager to do this. This was lifted from the TableTransferHandler in BasicUITable; the BasicTransferable is also from the swing platform but is not public so is copied as an inner class here.
See Also:
  • Field Details

  • Constructor Details

    • FreezeColumnsTransferHandler

      public FreezeColumnsTransferHandler()
  • Method Details

    • exportToClipboard

      public void exportToClipboard(JComponent comp, Clipboard clip, int action) throws IllegalStateException
      Overrides:
      exportToClipboard in class TransferHandler
      Throws:
      IllegalStateException
    • getSelectedColumnSet

      protected BitSet getSelectedColumnSet(GuiTable table)
      Get a BitSet of the selected columns from the table
      Parameters:
      table - The table to get the selected columns from
      Returns:
      A BitSet
    • buildTransferable

      protected Transferable buildTransferable(Collection<String> columnNames, BitSet columns, PrimitiveIterator.OfLong selectedRows, com.fishlib.base.Function.Binary<Object,Integer,Integer> getValueAt)
      Build a Transferable based on the input table and set of rows optionally including the table headers
      Parameters:
      columnNames - optional collection of column names for writing out headers
      columns - The set of columns to copy
      selectedRows - The selected rows to copy
      getValueAt - A binary method to get the actual value at the [row][col]
      Returns:
      A Transferable containing the data to be transferred.
    • getSourceActions

      public int getSourceActions(JComponent c)
      Overrides:
      getSourceActions in class TransferHandler