[SWINGX-803] TableColumnExt missing isHideable/setHideable Created: 04/Mar/08  Updated: 16/Sep/13  Resolved: 05/Nov/10

Status: Resolved
Project: swingx
Component/s: Table
Affects Version/s: 0.9.0
Fix Version/s: 1.6.3

Type: Improvement Priority: Major
Reporter: Karl Schaefer Assignee: kleopatra
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: All
Platform: All

Issue Links:
is related to SWINGX-1573 ColumnControlButton: allows de/select... Resolved
Issuezilla Id: 803


There is no way to set a column to be not hideable. If I'm using the default
column control, all columns appear in the list and can be made hidden. We
should add is/setHideable (and respect it) to determine if a column can be

Following from that would be a change to the column control to not include
unhideable columns.

Comment by kleopatra [ 03/Apr/08 ]

postpone ...

Comment by kleopatra [ 16/Dec/08 ]

needs further thinking (IMO) f.i. (unweighted, from the top of my head to not

  • really not show in the columnControl or disable the action?
  • symmetric/orthogonal showable property? That is include in the columnModel but
    never show up and don't include in the column control
  • what's expected to happen on setHideable if the column is visible/hidden
  • how about starting a discussion in the forum and/or throwing some code into
    the incubator (could use a client property on the column and a custom column
    control respecting it)

Postponing to after final, no time to do it in the near future anyway

Comment by kleopatra [ 02/Nov/10 ]


  • to stick to hideable (couldn't think up a use-case for the symmetrical showable)
  • not remove the action by default but disable it only (think that's less confusing if
    more than one isn't hideable), it's easy to do in client code if they want to remove entirely


  • added hideable property to TableColumnExt
  • fixed ColumnVisibilityAction to cope
  • added tests to define behaviour
  • changed visual test to show how-to remove notHideable columns entirely

Karl, anything I overlooked? Will close as fixed if you don't bark soon


Comment by Karl Schaefer [ 02/Nov/10 ]

Hmm, you actually sold me the other way, sort of. I was thinking more of an
enum: VISIBLE, DEFAULT, HIDDEN. Only DEFAULT would appear in the column
control. VISIBLE could never be hidden and HIDDEN could never be made visible.

Your list seems fine. I haven't looked at the test cases yet, but did you
check for the dynamic updating the property, so that the column control
reflects post-construction changes?

Comment by kleopatra [ 02/Nov/10 ]

so we convinced each other, kind of <g> Couldn't think of a use-case for "always hidden"

  • basically, columns are for showing. If they for some reason aren't, then developers
    are doing something fishy in the first place. Then they should cope themselves with it
    in their unusual ways ...

The current implementation has two boolean properties: visible and hideable - the latter
forces the former into true if false. And yeah, the default column control dis/enables
the action in synch with the hideable thus supporting dynamic changes. If a developer
chooses to not add a visibility action, its her task to cope with dynamic changes. Don't
expect that to be too frequent, though.

Think we should leave it like this and wait for feedback.


Comment by Karl Schaefer [ 02/Nov/10 ]

Sounds good. Agreed we should leave it for feedback. Do you want to post
something to the forum?

Comment by kleopatra [ 03/Nov/10 ]

could do - but not overly enthusiastic right now. Forums still are a mess (though improving
Will wait a while and then announce the new feature.

Generated at Sat Dec 10 14:44:51 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.