mbien commented on code in PR #8316:
URL: https://github.com/apache/netbeans/pull/8316#discussion_r1990366911
##########
platform/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java:
##########
@@ -634,9 +635,18 @@ protected final void initializeButtons() {
currentPrimaryButtons = null;
currentSecondaryButtons = null;
- boolean isAqua = "Aqua".equals (UIManager.getLookAndFeel().getID()) ||
//NOI18N
- "true".equalsIgnoreCase (System.getProperty
("xtest.looks_as_mac"));
- if (isAqua) {
+ final boolean useMacButtonOrder;
+ String testLooksAsMacProp = System.getProperty("xtest.looks_as_mac");
+ if (testLooksAsMacProp != null) {
+ // For NbPresenterTest.
+ useMacButtonOrder =
+ "Aqua".equals (UIManager.getLookAndFeel().getID()) ||
+ testLooksAsMacProp.equalsIgnoreCase("true");
+ } else {
+ useMacButtonOrder = UIManager.getBoolean("OptionPane.isYesLast");
+ }
Review Comment:
this could be a utility method?
##########
platform/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java:
##########
@@ -1278,8 +1288,9 @@ public void actionPerformed(ActionEvent e) {
private class ButtonListener implements ActionListener, ComponentListener,
PropertyChangeListener {
ButtonListener() {}
public void actionPerformed(ActionEvent evt) {
- boolean isAqua = "Aqua".equals
(UIManager.getLookAndFeel().getID()) || //NOI18N
- "true".equalsIgnoreCase (System.getProperty
("xtest.looks_as_mac"));
+ boolean useMacButtonOrder = "Aqua".equals
(UIManager.getLookAndFeel().getID()) || //NOI18N
+ UIManager.getLookAndFeel().getID().startsWith("FlatLaf")
&& Utilities.isMac() ||
+ "true".equalsIgnoreCase (System.getProperty
("xtest.looks_as_mac"));
Review Comment:
/you forgot this usage i think. Could call the new utility method mentioned
above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists