ColumnControlButton extends JButton { protected ColumnVisibilityAction createColumnVisibilityAction(TableColumn column) { return new ColumnVisibilityAction(column); } ColumnControlButton(JXTable table);  ColumnControlButton(JXTable table, Icon icon); @Override void updateUI(); void togglePopup(); boolean getAdditionalActionsVisible(); void setAdditionalActionsVisible(boolean additionalActionsVisible); void setActionGrouper(ActionGrouper grouper); @Override void applyComponentOrientation(ComponentOrientation o); static final String COLUMN_CONTROL_MARKER; static final String COLUMN_CONTROL_BUTTON_ICON_KEY; static final String COLUMN_CONTROL_BUTTON_MARGIN_KEY; }
@Test public void testNullVisibilityAction() { JXTable table = new JXTable(); ColumnControlButton columnControl = new ColumnControlButton(table) { @Override protected ColumnVisibilityAction createColumnVisibilityAction(TableColumn column) { if (column.getModelIndex() == 0) return null; return super.createColumnVisibilityAction(column); } }; table.setColumnControl(columnControl); table.setColumnControlVisible(true); table.setModel(sortableTableModel); }