swingx
  1. swingx
  2. SWINGX-1185

JXCollapsiblePane: inconsitent "animationState" notification

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.3
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,185

      Description

      the property change is fired only if the animated property is true. This forces client
      code to add different logic for both if they need to do stuff (like re-sizing the containing
      top level window) when the collapse is really done.

      Thinking about it: isn't "collapsed" fired incorrectly? Arguable of course - but one (my
      pov might be that a property change must be fired only after all internal state
      is updated, that is at the end of the animation period.

      added test method to JXTaskPaneIssues (too lazy to re-formulate for a bare JXCollapsiblePane)

      Jeanette

        Activity

        kleopatra created issue -
        Hide
        kleopatra added a comment -

        fixed the title (property name)

        Show
        kleopatra added a comment - fixed the title (property name)
        Hide
        kleopatra added a comment -

        and the test method is in JXCollapsiblePaneVisualCheck <g> Not my morning...

        Jeanette

        Show
        kleopatra added a comment - and the test method is in JXCollapsiblePaneVisualCheck <g> Not my morning... Jeanette
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 1185 85445
        Karl Schaefer made changes -
        Affects Version/s 1.6 [ 13358 ]
        Affects Version/s 1.0++ [ 13357 ]
        Hide
        Karl Schaefer added a comment -

        Looking at this again, I believe that the correct thing to do is to remove the ANIMATION_STATE_KEY. There really is no "property" for that. Instead, when animating, we should not fire the "collpsed" property until animation is complete. We would also need to fire that change when we don't finish the animation, but reverse direction while the animation is active.

        This simplifies the properties that client code must listen to and makes collapsed change only after it has truly changed.

        Show
        Karl Schaefer added a comment - Looking at this again, I believe that the correct thing to do is to remove the ANIMATION_STATE_KEY. There really is no "property" for that. Instead, when animating, we should not fire the "collpsed" property until animation is complete. We would also need to fire that change when we don't finish the animation, but reverse direction while the animation is active. This simplifies the properties that client code must listen to and makes collapsed change only after it has truly changed.
        Karl Schaefer made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Karl Schaefer added a comment -

        SWINGX-1185: Deprecated the ANIMATION_STATE_KEY (will be removed after next release). Replace animation state change notifications with collapsed notifications. This means that the collapsed notification only occurs once the component is in the correct state. For non-animated collapsible panes, the notification is immediate; for animated collapsible panes the notification occurs once the animation is complete. After some thought we only fire a notification once the component's state is accurate; this means that reversing the direction of the animation prior to the previous animation completing results in a no-op with respect to notification.

        swingx-core/src/main/java/org/jdesktop/swingx/JXCollapsiblePane.java
        swingx-core/src/main/java/org/jdesktop/swingx/JXTaskPane.java
        swingx-core/src/test/java/org/jdesktop/swingx/JXCollapsiblePaneVisualCheck.java

        Committed revision 3946.

        Show
        Karl Schaefer added a comment - SWINGX-1185 : Deprecated the ANIMATION_STATE_KEY (will be removed after next release). Replace animation state change notifications with collapsed notifications. This means that the collapsed notification only occurs once the component is in the correct state. For non-animated collapsible panes, the notification is immediate; for animated collapsible panes the notification occurs once the animation is complete. After some thought we only fire a notification once the component's state is accurate; this means that reversing the direction of the animation prior to the previous animation completing results in a no-op with respect to notification. swingx-core/src/main/java/org/jdesktop/swingx/JXCollapsiblePane.java swingx-core/src/main/java/org/jdesktop/swingx/JXTaskPane.java swingx-core/src/test/java/org/jdesktop/swingx/JXCollapsiblePaneVisualCheck.java Committed revision 3946.
        Karl Schaefer made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: