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

PreferencesTabBar does not look unified in Mac OS X 10.5/6 running with Java 6 or using JDialog #162

Open
GoogleCodeExporter opened this issue May 4, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
final PreferencesTabBar tabBar = new PreferencesTabBar();
tabBar.addTab("General",null,null);
tabBar.addTab("Proofing",null,null);
tabBar.addTab("Saving",null,null);
final JComponent tabBarCom = tabBar.getComponent();

1. For JFrame:
final JFrame mainFrm = new JFrame();
tabBar.installWindowDraggerOnWindow(mainFrm);
MacUtils.makeWindowLeopardStyle(mainFrm.getRootPane());
mainFrm.getContentPane().add(tabBarCom);

2. For JDialog:
final JDialog mainDlg = new JDialog();
tabBar.installWindowDraggerOnWindow(mainDlg);
MacUtils.makeWindowLeopardStyle(mainDlg.getRootPane());
mainDlg.getContentPane().add(tabBarCom);

What is the expected output? What do you see instead?
Expected result:
   The UI should appear like the below image in any environments listed below.
  see: safari_pref_dialog.PNG

Acutally result:
 In 

What version of the product are you using? On what operating system?
Environment 1:
   Leopard (Mac OS X 10.5)
   Java 1.5.0_20

Environment 2:
   Leopard (Mac OS X 10.5)
   Java 1.6.0_15

Environment 3:
   Snow Leopard (Mac OS X 10.6)
   Java 1.5.0_20

Environment 4:
   Snow Leopard (Mac OS X 10.6)
   Java 1.6.0_15

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 27 Apr 2010 at 5:06

Attachments:

@GoogleCodeExporter
Copy link
Author

It seems Google code does not allow to edit the issue after create it. There are
several points I need to make it clear.

Expected result:
see: safari_pref_dialog.PNG

Observed result:
In environment 1: see: leopard_java1.5_jdialog.PNG  and 
leopard_java1.5_jframe.PNG
In environment 2: see: leopard_java1.6_jdialog.PNG  and 
leopard_java1.6_jframe.PNG
In environment 3: see: snow_leopard_java1.5_jdialog.PNG  and
snow_leopard_java1.5_jframe.PNG
In environment 4: see: snow_leopard_java1.6_jdialog.PNG  and
snow_leopard_java1.6_jframe.PNG

Summary:
1. Client property: "apple.awt.brushMetalLook" does not work on JDialog any way.
   -- even the 'MacPainterFactory.createTexturedWindowWorkaroundPainter()' is used as
manual painter.

2. For JFrame, it does not work when Java version is 1.6, both in Leopard and 
Snow
Leopard, I read a little about the source code, it seems the method in MacUtils:

public static boolean shouldManuallyPaintTexturedWindowBackground() {
        boolean shouldManuallyPaintOnMac =
                PlatformUtils.isMac() && PlatformUtils.isLeopard() &&
PlatformUtils.isJava6OnMac();
        return !PlatformUtils.isMac() || shouldManuallyPaintOnMac;
    }

need to be changed to:
public static boolean shouldManuallyPaintTexturedWindowBackground() {
        boolean shouldManuallyPaintOnMac =
                PlatformUtils.isMac() && PlatformUtils.isJava6OnMac();
        return !PlatformUtils.isMac() || shouldManuallyPaintOnMac;
    }

Original comment by [email protected] on 27 Apr 2010 at 5:23

@GoogleCodeExporter
Copy link
Author

The issue is like http://code.google.com/p/macwidgets/issues/detail?id=119 and
http://code.google.com/p/macwidgets/issues/detail?id=126. but they described 
only
part of all situations.

Original comment by [email protected] on 27 Apr 2010 at 5:26

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

1 participant