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

WebButtonGroup doesn't group buttons if added with 'add()' #96

Closed
Endogen opened this issue Mar 3, 2014 · 5 comments
Closed

WebButtonGroup doesn't group buttons if added with 'add()' #96

Endogen opened this issue Mar 3, 2014 · 5 comments
Assignees

Comments

@Endogen
Copy link

Endogen commented Mar 3, 2014

This will group the buttons:

WebButtonGroup group = new WebButtonGroup(WebButtonGroup.VERTICAL, true, button1, button2, button3);

This won't group them:

WebButtonGroup group = new WebButtonGroup(WebButtonGroup.VERTICAL, true);
group.add(button1);
group.add(button2);
group.add(button3);
@mgarin mgarin added bug labels Mar 5, 2014
@mgarin mgarin added this to the Small issues milestone Mar 5, 2014
@mgarin mgarin self-assigned this Mar 5, 2014
@mgarin
Copy link
Owner

mgarin commented Mar 5, 2014

Thanks for reporting!
I will include fix for this issue in v1.27 update.

@mgarin
Copy link
Owner

mgarin commented Mar 5, 2014

I have also made some improvements to WebButtonGroup - it will now properly style inner WebButtonGroup with an opposite orientation. Here is an example:

public class WebButtonGroupExample
{
    public static void main ( final String[] args )
    {
        WebLookAndFeel.install ();

        final WebButtonGroup buttonGroup = new WebButtonGroup ( HORIZONTAL, new WebButton ( "ABC" ) );
        buttonGroup.add ( new WebButtonGroup ( VERTICAL, new WebButton ( "1" ), new WebButton ( "2" ), new WebButton ( "3" ) ) );
        buttonGroup.add ( new WebButton ( WebLookAndFeel.getIcon ( 32 ) ).setLeftRightSpacing ( 10 ) );
        buttonGroup.add ( new WebButtonGroup ( VERTICAL, new WebButton ( "1" ), new WebButton ( "2" ), new WebButton ( "3" ) ) );
        buttonGroup.add ( new WebButton ( "DEF" ) );
        TestFrame.show ( buttonGroup, 50 );
    }
}

And how it will look like:
image

@mgarin
Copy link
Owner

mgarin commented Mar 5, 2014

One more thing about WebButtonGroup you might want to know - in next few updates (not in v1.27 yet) it will be renamed to something like WebComponentGroup and will be able to group any kind of components which support side-hiding, not only buttons like it does right now. It will be able to group comboboxes, decorated panels, scrollpanes and whatever else that has similar decoration with buttons.

@Endogen
Copy link
Author

Endogen commented Mar 5, 2014

Interesting. Good to know :) And thanks for the fix.

mgarin added a commit that referenced this issue Apr 1, 2014
…ange options

#105 - WebButton decoration is now handled a bit differently when it is inside WebButtonGroup
#72 #79 #104 - Fixed window transparency update method for later versions of JDK 7
#96 - WebButtonGroup "add" methods fix and proper style updates for various cases
#95 - WebScrollPane method to hide scroll bar buttons added
#93 - WebPopupPainter bottom side corner fix
#91 - Small code refactoring
#90 - WebInternalFrame buttons made non-focusable
#55 - "OptionPane.isYesLast" is now set to true for Mac OS X
StyleManager initialization is not required anymore for Web-styled components creation
StyleManager now supports custom component painters
StyleManager now has a better support for custom settings
StyleManager skin file parsing improvements
9-patch-based painters added for JLabel and JPanel components
JLabel painter support added
WebVerticalLabel painter support added
WebBreadcrumbLabel painter support added
WebBreadcrumbPanel painter support added
WebAsyncTree root sorting/filtering do not cause an exception anymore
NinePatchEditor image rotation features added
WebButtonUI margin fix for hidden sides case
NinePatchIcon cache initialization fix
Improved text representation for UniqueNode
WebListUI rollover cell highlight fix
Default SettingsProcessors small bugfixes
Demo application heavy animation switch fix
Version files updated
@mgarin
Copy link
Owner

mgarin commented Apr 3, 2014

Should be fixed now with v1.27 update.
I also strongly recommend reading notes about StyleManager before updating.

@mgarin mgarin closed this as completed Apr 3, 2014
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