Skip to main content

Should JXTaskPane setCollapsed be firing a property change?

1 reply [Last post]
Joined: 2004-06-14

This is from SwingX 1.6.4, just downloaded yesterday. Is there a line missing where I have indicated below?

     * Expands or collapses this group.
     * <p>
     * As of SwingX 1.6.3, the property change event only fires when the
     * state is accurate.  As such, animated task pane fire once the
     * animation is complete.
     * @param collapsed
     *                true to collapse the group, false to expand it
     *          bound="true"
     *          preferred="false"
    public void setCollapsed(boolean collapsed) {
        boolean oldValue = isCollapsed();
        this.collapsed = collapsed;
    //ADD?>> firePropertyChange(COLLAPSE_OR_EXPAND?, oldValue, isCollapsed());<< Missing event?   

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-11

+1 for code reading :-)

But no, nothing missing: the event is fired (as you can verify by running the TaskPaneTest) - just not directly by the taskPane itself. It's a bean property, as such must be fired when the internal state is complete. If animated that translates to at the end of the animation. That happens in the collapsiblePane, taskPane is listning to it and re-fires.