Class MinSizeTableColumnLayout


public class MinSizeTableColumnLayout extends TableColumnLayout
TableColumnLayout that enforces a minimum column width

Especially on Linux this avoids the "vanishing column" issue when users resize a column to nothing and then moan because it's gone.

Table needs to be created as usual for TableColumnLayout, assigning a ColumnWeightData to each column for automated resize.

Once the user manually adjusts a column, the TableColumnLayout replaces the ColumnWeightData for automated resizing with a ColumnPixelData to hold the exact user-selected width. The 'minimumWidth' of the original ColumnWeightData is lost. This class holds its own min_width which is applied to all columns even after a user manually adjusted a column.

  • Constructor Details

    • MinSizeTableColumnLayout

      public MinSizeTableColumnLayout(int min_width)
      Initialize a TableColumnLayout that always enforces a minimum column size
      Parameters:
      min_width - Minimum column size in pixels
  • Method Details