/** * Creates the default column control used by this table. This * implementation returns a <code>ColumnControlButton</code> configured with * default <code>ColumnControlIcon</code>. * * @return the default component used as column control. * @see #setColumnControl(JComponent) * @see org.jdesktop.swingx.table.ColumnControlButton * @see org.jdesktop.swingx.icon.ColumnControlIcon */ protected JComponent createDefaultColumnControl() { return new ColumnControlButton(this); }
/** * Creates the default column control used by this table. This * implementation returns a <code>ColumnControlButton</code> configured with * default <code>ColumnControlIcon</code>. * * @return the default component used as column control. * @see #setColumnControl(JComponent) * @see org.jdesktop.swingx.table.ColumnControlButton * @see org.jdesktop.swingx.icon.ColumnControlIcon */ protected JComponent createDefaultColumnControl() { return new ColumnControlButton(this); }
/** * Creates the default column control used by this table. This * implementation returns a <code>ColumnControlButton</code> configured with * default <code>ColumnControlIcon</code>. * * @return the default component used as column control. * @see #setColumnControl(JComponent) * @see org.jdesktop.swingx.table.ColumnControlButton * @see org.jdesktop.swingx.icon.ColumnControlIcon */ protected JComponent createDefaultColumnControl() { return new ColumnControlButton(this); }
/** * Creates the default column control used by this table. This * implementation returns a <code>ColumnControlButton</code> configured with * default <code>ColumnControlIcon</code>. * * @return the default component used as column control. * @see #setColumnControl(JComponent) * @see org.jdesktop.swingx.table.ColumnControlButton * @see org.jdesktop.swingx.icon.ColumnControlIcon */ protected JComponent createDefaultColumnControl() { return new ColumnControlButton(this); }
/** * Creates the default column control used by this table. This * implementation returns a <code>ColumnControlButton</code> configured with * default <code>ColumnControlIcon</code>. * * @return the default component used as column control. * @see #setColumnControl(JComponent) * @see org.jdesktop.swingx.table.ColumnControlButton * @see org.jdesktop.swingx.icon.ColumnControlIcon */ protected JComponent createDefaultColumnControl() { return new ColumnControlButton(this); }
JXTable table = new JXTable(new AncientSwingTeam()); // here the hideable property is configured manually, // in production code you'll probably have a custom ColumnFactory // doing it based on some data state table.getColumnExt(0).setHideable(false); ColumnControlButton columnControl = new ColumnControlButton(table) { @Override protected ColumnVisibilityAction createColumnVisibilityAction( TableColumn column) { if (column instanceof TableColumnExt && !((TableColumnExt) column).isHideable()) return null; return super.createColumnVisibilityAction(column); } }; table.setColumnControl(columnControl); table.setColumnControlVisible(true);
ColumnControlButton controlButton = new ColumnControlButton(this)
this.getActionMap().remove("column.packSelected"); ColumnControlButton controlButton = new ColumnControlButton(this){ @Override protected ColumnControlPopup createColumnControlPopup(){