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

Wrong button order in option panes. #55

Closed
ianp opened this issue Nov 4, 2013 · 4 comments
Closed

Wrong button order in option panes. #55

ianp opened this issue Nov 4, 2013 · 4 comments
Assignees
Projects

Comments

@ianp
Copy link
Contributor

ianp commented Nov 4, 2013

The order of buttons in the OptionPaneUI should be platform dependent. On OS X (and possibly Linux/Gnome, I'm not sure) the rightmost button should be the default button. In other words where on Windows you have [Ok] [Cancel] on the OSX it would be [Cancel] [OK].

@ianp
Copy link
Contributor Author

ianp commented Nov 4, 2013

OK, after a bit of digging it seems that setting the UI default OptionPane.isYesLast to true does enough for my current use case. I'll leave it up to you to close this issue or not, as button order on dialogs is really a fairly complicated subject and a simple yes/no option doesn't cut it.

To give you a taste for the complexity, here is the Windows button order string from MIG Layout, where each character has a different meaning: L_E+U+YNBXOCAH_R crazy huh!

My suggestion would be to look at the MIG Layout implementation, but rather than using layout constraints you could look in either the action values or the component client properties for tags and then order the buttons based on that.

Or just mostly ignore the issue like most other L&Fs ;-)

@ghost ghost assigned mgarin Nov 5, 2013
@mgarin
Copy link
Owner

mgarin commented Nov 5, 2013

I will think of it, but not sure yet.
I might add system-dependant buttons order into WebLaF with some of next updates.

Anyway, i will notify you about the changes made if there will be any.

@ianp
Copy link
Contributor Author

ianp commented Nov 5, 2013

OK, cool. I may have some time to have a go at implementing it myself later this week.

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

I have added proper "OptionPane.isYesLast" value depending on user's platform. This might be enough to solve the issue or might be not. That is your call :)

@mgarin mgarin removed this from the Enhancements milestone Sep 30, 2014
@ianp ianp removed this from the Enhancements milestone Sep 30, 2014
@mgarin mgarin added this to the v1.29 milestone Mar 18, 2015
@mgarin mgarin closed this as completed Mar 20, 2015
@mgarin mgarin added this to Completed in v1.2.9 Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v1.2.9
Completed
Development

No branches or pull requests

2 participants