looking for ColumnCollapsListener


I am looking for a way to hide / unhide columns of the user to respond. How could I do that?

enhancement request #6914

Thanks for the tip. Is there already a plan, when and in which version it is this feature?


If you can’t or wan’t wait for version 6.6… we did it by extending the Table-Class.

public class MyTable extends Table {

  public void setColumnCollapsed(Object propertyId, boolean collapsed) 
	            throws IllegalStateException {
	super.setColumnCollapsed(propertyId, collapsed);
      if (propertyId.equals("foo") && collapsed)
         column "foo" is collapsed

Thanks. :slight_smile:
And now my own listener, ready. :slight_smile:

In the beginning to set all columns visible before then is not visible are hidden again. I’m waiting for the simplicity on the appropriate update.

                    final Object[] ids = (Object[]
) variables
                    for (final Iterator<Object> it = visibleColumns.iterator(); it
                            .hasNext();) {
                        setColumnCollapsed(it.next(), false);
                    for (int i = 0; i < ids.length; i++) {

For changes in the GUI by the user is setColumnCollapsed the wrong point. The right point is

	public void changeVariables(Object source, Map<String, Object> variables) {
		super.changeVariables(source, variables);

Yes, with “changeVariables(Object source, Map<String, Object> variables)” is working out perfectly. My program is now informed by listeners via each show or hide a column by the user. :slight_smile: