mthomason12 / macwidgets

Automatically exported from code.google.com/p/macwidgets
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 aoi...@gmail.com on 27 Apr 2010 at 5:06

Attachments:

GoogleCodeExporter commented 9 years ago
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 aoi...@gmail.com on 27 Apr 2010 at 5:23

GoogleCodeExporter commented 9 years ago
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 aoi...@gmail.com on 27 Apr 2010 at 5:26