swingx
  1. swingx
  2. SWINGX-152

JXTable column control dissapears in RIGHT_TO_LEFT orientation

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.9.0
    • Component/s: Authentication
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      152

      Description

      This is both a bug in SwingX but first and foremost a Swing bug. I think there
      is work on this for Mustang in which case a more elegant solution can be rolled
      back into SwingX.
      The actual bug is this (from JXTable.java):
      scrollPane.setCorner(JScrollPane.UPPER_RIGHT_CORNER,
      getColumnControl());
      You should never use RIGHT/LEFT or EAST/WEST always use the LEADING/TRAILING
      equivalents (for us poor bastards with stone age old languages to support).

      Anyway the problem is that the LEADING/TRAILING equivalents in the JDK DON'T
      work (they seem to work but don't have any effect such as swapping as they
      should and do cause some bugs). So for Tiger RIGHT/LEFT should still be used
      ONLY FOR THESE METHODS (the rest of the code should use leading/trailing).

      My patch which is really ugly and shouldn't be incorporated (unless someone high
      up insists that this is a critical feature) is to create two instances of the
      column control and place one on LEFT and one on RIGHT. Only one of them will be
      visible (at least on the Windows XP LF I didn't check other enviroments).

      Its ugly, I will use it because I have to but most of you should probably not,
      please keep this bug open as a meta bug so if someone else runs into these
      problems they can come across this post.

        Activity

        Hide
        vprise added a comment -

        Created an attachment (id=24)
        Ugly hack workaround to the column control problem with bidi layout

        Show
        vprise added a comment - Created an attachment (id=24) Ugly hack workaround to the column control problem with bidi layout
        Hide
        kleopatra added a comment -


        taken

        Show
        kleopatra added a comment - taken
        Hide
        kleopatra added a comment -

        Hmm ... actually the JXTable does use UPPER_TRAILING_CORNER since fixing #89
        (which is about initial positioning):
        https://swingx.dev.java.net/issues/show_bug.cgi?id=89

        Will keep this open and add a link in the #89 for anybody looking for a hack
        (agreed, it's ugly - but creative

        Thanks
        Jeanette

        Show
        kleopatra added a comment - Hmm ... actually the JXTable does use UPPER_TRAILING_CORNER since fixing #89 (which is about initial positioning): https://swingx.dev.java.net/issues/show_bug.cgi?id=89 Will keep this open and add a link in the #89 for anybody looking for a hack (agreed, it's ugly - but creative Thanks Jeanette
        Hide
        kleopatra added a comment -

        another catch is that a initially RToL column control (that is correctly showing
        up in the left corner) is not removed when the control visibility property is
        set to false.

        changed the RToL visual test method to play with toggling both CO and column
        control. Additionally, seems like the logic for conserving vertical scrollbar
        policy (#155-swingx) still isn't totally correct - when playing with the RtoL
        there are combinations where the ALWAYS is incorrectly (because not set by a
        client) kept when the column control is invisible.

        Show
        kleopatra added a comment - another catch is that a initially RToL column control (that is correctly showing up in the left corner) is not removed when the control visibility property is set to false. changed the RToL visual test method to play with toggling both CO and column control. Additionally, seems like the logic for conserving vertical scrollbar policy (#155-swingx) still isn't totally correct - when playing with the RtoL there are combinations where the ALWAYS is incorrectly (because not set by a client) kept when the column control is invisible.
        Hide
        kleopatra added a comment -

        started to fix (actually it's a hack as well, because interfering with
        JScrollBar's responsibility but as long as the core bug is not addressed...)

        • use trailing when hiding the the columnControl
        • explicitly call configureControl on setComponentOrientation

        need feedback from the real world

        Jeanette

        Show
        kleopatra added a comment - started to fix (actually it's a hack as well, because interfering with JScrollBar's responsibility but as long as the core bug is not addressed...) use trailing when hiding the the columnControl explicitly call configureControl on setComponentOrientation need feedback from the real world Jeanette
        Hide
        kleopatra added a comment -


        changed priority to p2 - bidi/localization issues should be fixed for final 1.0

        Show
        kleopatra added a comment - changed priority to p2 - bidi/localization issues should be fixed for final 1.0
        Hide
        kleopatra added a comment -

        close as fixed after confirmation that it's working.

        Jeanette

        Show
        kleopatra added a comment - close as fixed after confirmation that it's working. Jeanette

          People

          • Assignee:
            kleopatra
            Reporter:
            vprise
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: