Closed GoogleCodeExporter closed 9 years ago
"Neither in Leopard nor in Snow Leopard I calibrated my monitor (the notebook's
built-in LCD-
Display)" - that means, I use the default settings for color and brightness
display.
Original comment by m...@danielluedecke.de
on 9 Sep 2009 at 12:44
Can you tell me what the value of this is:
System.out.println(MacUtils.shouldManuallyPaintTexturedWindowBackground());
Original comment by kenneth....@gmail.com
on 9 Sep 2009 at 10:01
After initialization of all components (end of constructor), when the frame
loses or gains focus (window(de-
)activated event), it always says "false"...
Original comment by m...@danielluedecke.de
on 10 Sep 2009 at 6:53
Can you try creating a plain JWindow and then directly install the brushed
metal client property on it to verify
that that works:
rootPane.putClientProperty("apple.awt.brushMetalLook", Boolean.TRUE);
Original comment by kenneth....@gmail.com
on 10 Sep 2009 at 9:32
I've update the latest dev build -- not sure if it will fix this, but it should
ensure that the Unified Toolbar is
always synced up with the window state:
http://www.macwidgetsforjava.com/downloads/latest/mac_widgets.jar
Original comment by kenneth....@gmail.com
on 10 Sep 2009 at 10:13
Hi Ken,
I saw no difference according to the unified toolbar. The bottom bar renders
well, but the unified toolbar
behaviour is the same: it does not exactly match the title bar's colour when in
focus, and when the frame loses
the focus, the toolbar doesn't change the colour.
I tested both rootPane.putClientProperty("apple.awt.brushMetalLook",
Boolean.TRUE); and
System.setProperty("apple.awt.brushMetalLook", "true"); on a JDialog and
JWindow, but that doesn't seem to
make any difference...
This is what I use when initiating my application:
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("com.apple.mrj.application.apple.menu.about.name",
"Zettelkasten");
System.setProperty("apple.awt.brushMetalLook", "true");
MacUtils.makeWindowLeopardStyle(ZettelkastenView.super.getFrame().getRootPane())
;
//
WindowUtils.createAndInstallRepaintWindowFocusListener(ZettelkastenView.super.ge
tFrame());
WindowUtils.installJComponentRepainterOnWindowFocusChanged(ZettelkastenView.supe
r.getFrame().getRootPan
e());
Though I formerly used createAndInstallRepaint..., which is now deprecated.
This is the way I create the UnifiedToolbar (which worked on Leopard):
UnifiedToolBar mactoolbar = new UnifiedToolBar();
mactoolbar.addComponentToLeft(MacButtonFactory.makeUnifiedToolBarButton(tb_newEn
try));
// ... and more buttons ...
mactoolbar.installWindowDraggerOnWindow(ZettelkastenView.super.getFrame());
mainPanel.add(mactoolbar.getComponent(),BorderLayout.PAGE_START);
Original comment by m...@danielluedecke.de
on 11 Sep 2009 at 7:33
Hi Daniel,
Try taking Mac Widgets for Java out of the picture -- try the following on a
simple JFrame:
System.setProperty("apple.awt.brushMetalLook", "true");
By the way, theres no need to install the brushMetalLook client property when
using
MacUtils.makeWindowLeopardStyle (that's what it's doing for you).
-Ken
Original comment by kenneth....@gmail.com
on 11 Sep 2009 at 9:36
Hi Ken,
sorry, I didn't mention: I was trying both
rootPane.putClientProperty("apple.awt.brushMetalLook", Boolean.TRUE);
System.setProperty("apple.awt.brushMetalLook", "true");
on a new JDialog and JWindow, which does not use Mac Widget (i.e. I created a
new, "empty" project)
And I tried both in my application that uses the Mac Widgets... No difference...
Original comment by m...@danielluedecke.de
on 11 Sep 2009 at 9:46
Hi Ken,
two screenshots of my application that uses Mac WIdgets:
One without
"MacUtils.makeWindowLeopardStyle(ZettelkastenView.super.getFrame().getRootPane()
);" command,
the other one with that code-line enabled.
Original comment by m...@danielluedecke.de
on 11 Sep 2009 at 10:00
Attachments:
What were the results of taking Mac Widgets for Java out of the picture? Did
you still observe the issue? If so, this
sounds like an Apple bug. I'm not sure why this would only happen on your
MacBook Air though. I can try it on
my MacBook.
Original comment by kenneth....@gmail.com
on 11 Sep 2009 at 10:39
In you screen shot labeled without_macwidget.png, it doesn't appear that you've
installed the brushedMetal
client property on the root pane.
Original comment by kenneth....@gmail.com
on 11 Sep 2009 at 10:40
When I replace
MacUtils.makeWindowLeopardStyle(ZettelkastenView.super.getFrame().getRootPane())
;
with
System.setProperty("apple.awt.brushMetalLook", "true");
it looks like on the screenshot "without". When I replace
MacUtils.makeWindowLeopardStyle(ZettelkastenView.super.getFrame().getRootPane())
;
with
ZettelkastenView.super.getFrame().getRootPane().putClientProperty("apple.awt.bru
shMetalLook",
Boolean.TRUE);
it looks like the screenshot "with", thus no visible difference to the
makeWindowsLeopardStyle-method.
What do you mean by "taking Mac Widgets for Java out of the picture"?
Original comment by m...@danielluedecke.de
on 11 Sep 2009 at 11:05
By taking Mac Widgets for Java out of the picture, I mean create a simple test
app that doesn't use any of Mac
Widgets for Java, including the Unified Toolbar. Something like the following
would work:
JFrame frame = new JFrame();
frame.getRootPane().putClientProperty("apple.awt.brushMetalLook", Boolean.TRUE);
frame.setSize(500, 350);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setVisible(true);
I want to see if this properly renders -- if it does, then that means I'm doing
something wrong.
Original comment by kenneth....@gmail.com
on 11 Sep 2009 at 11:14
Ah, ok. See attached screenshot...
Original comment by m...@danielluedecke.de
on 11 Sep 2009 at 4:01
Attachments:
Thanks. I'll compare this to running the same code snippet on my machine.
Original comment by kenneth....@gmail.com
on 11 Sep 2009 at 4:42
Ok, please delete this issue respectively set it to "solved"... I use many
split panes, and since the brushed background
color was too dark in my opinion, I changed their background colors manually to
a lighter grey. In Leopard, I also had
to change the background color of my main panel. This, however, did not work on
Snow Leopard and caused the
troubles I had...
mainPanel.setBackground(CConstants.cnormalgray);
jPanelMainRight.setBackground(CConstants.cnormalgray);
jSplitPaneMain1.setBackground(CConstants.cnormalgray);
jSplitPaneMain2.setBackground(CConstants.cnormalgray);
jSplitPaneMain3.setBackground(CConstants.cnormalgray);
jSplitPaneMain4.setBackground(CConstants.cnormalgray);
jSplitPaneLinks.setBackground(CConstants.cnormalgray);
jSplitPaneAuthors.setBackground(CConstants.cnormalgray);
When I remove the first line:
mainPanel.setBackground(CConstants.cnormalgray);
my app renders well on Snow Leopard 10.6!
Original comment by m...@danielluedecke.de
on 11 Sep 2009 at 7:56
Original comment by kenneth....@gmail.com
on 12 Sep 2009 at 10:43
Original issue reported on code.google.com by
m...@danielluedecke.de
on 9 Sep 2009 at 12:42Attachments: