Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebCollapsiblePane expand doesn't work #527

Closed
husker-dev opened this issue Sep 3, 2019 · 2 comments
Closed

WebCollapsiblePane expand doesn't work #527

husker-dev opened this issue Sep 3, 2019 · 2 comments
Assignees

Comments

@husker-dev
Copy link

Hello,
After updating from 1.28 to 1.2.9 I got issue: WebCollapsiblePane doesn't hide but it looks like it needs to be updated or something else because head loses line under title.

image

Here is example:

add(new WebCollapsiblePane("group example", new WebPanel() {{
    setLayout(new VerticalFlowLayout());
    setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));

    add(new WebToolBar() {{
        setFloatable(false);
        setPreferredHeight(40);

        add(new WebButton(getIcon("add")));
        add(new WebButton(getIcon("edit")));

        addToEnd(WebSeparator.createVertical());
        addToEnd(new WebButton(getIcon("delete")));
    }});
}}) {{
        setExpanded(need_expand);
}});
@mgarin mgarin self-assigned this Sep 3, 2019
@mgarin mgarin added this to the v1.2.10 milestone Sep 3, 2019
@mgarin
Copy link
Owner

mgarin commented Sep 3, 2019

Thanks for reporting this! There is indeed an issue when collapsible pane is changed to collapsed state like shown in the example. I'll fix it tomorrow and push a v1.2.10 snapshot build with it.

A simplified example that reproduces the issue:

import com.alee.extended.collapsible.WebCollapsiblePane;
import com.alee.extended.window.TestFrame;
import com.alee.laf.WebLookAndFeel;

import javax.swing.*;

public class CollapsibleTest
{
    public static void main ( final String[] args )
    {
        SwingUtilities.invokeLater ( new Runnable ()
        {
            @Override
            public void run ()
            {
                WebLookAndFeel.install ();

                TestFrame.show (
                        50, false, 50,
                        createCollapsible ( true ),
                        createCollapsible ( false ),
                        createCollapsible ( true )
                );
            }

            protected WebCollapsiblePane createCollapsible ( final boolean exp )
            {
                final WebCollapsiblePane sample = new WebCollapsiblePane ( "group example", new JLabel ( "Sample" ) );
                sample.setExpanded ( exp );
                return sample;
            }
        } );
    }
}

mgarin added a commit that referenced this issue Sep 4, 2019
- CollapsiblePaneLayout.java - Fixed issue with displaying initial collapsed state
- WebCollapsiblePane.java - Added more constructors to allow changing initial expansion state
@mgarin
Copy link
Owner

mgarin commented Sep 4, 2019

I've fixed this issue, new snapshot artifacts will soon be available.

Final v1.2.10 update release is planned for the end of this week and it's coming along well so most probably it will be out on Friday or Saturday.

@mgarin mgarin closed this as completed Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants