swingx
  1. swingx
  2. SWINGX-803

TableColumnExt missing isHideable/setHideable

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 1.6.3
    • Component/s: Table
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      803

      Description

      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
      hidden.

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

        Issue Links

          Activity

          Hide
          kleopatra added a comment -


          postpone ...

          Show
          kleopatra added a comment - postpone ...
          Hide
          kleopatra added a comment -

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

          • 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
          Jeanette

          Show
          kleopatra added a comment - needs further thinking (IMO) f.i. (unweighted, from the top of my head to not forget) 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 Jeanette
          Hide
          kleopatra added a comment -

          decided

          • 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

          done:

          • 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

          Cheers
          Jeanette

          Show
          kleopatra added a comment - decided 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 done: 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 Cheers Jeanette
          Hide
          Karl Schaefer added a comment -

          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?

          Show
          Karl Schaefer added a comment - 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?
          Hide
          kleopatra added a comment -

          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.

          CU
          Jeanette

          Show
          kleopatra added a comment - 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. CU Jeanette
          Hide
          Karl Schaefer added a comment -

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

          Show
          Karl Schaefer added a comment - Sounds good. Agreed we should leave it for feedback. Do you want to post something to the forum?
          Hide
          kleopatra added a comment -

          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.

          Show
          kleopatra added a comment - 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.

            People

            • Assignee:
              kleopatra
              Reporter:
              Karl Schaefer
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: