Change color for DockableFrame

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Change color for DockableFrame

Postby gaeworker » Wed May 09, 2012 8:18 am

Hello,

As shown in the attached screenshot, I would like to change the color for the active title background (one with golden color), and the skyblue background of the underlying pane.

jide_color.jpg
jide_color.jpg (38.16 KiB) Viewed 32850 times


I've tried the following but it doesn't seem to work:
Code: Select all
UIManager.getDefaults().put("DockableFrame.activeTitleBackground", Color.blue);
UIManager.getDefaults().put("JFrame.background", Color.gray);


I suspect I didn't use the correct key in the put() method and therefore not able to target the correct component. Could someone please help me on this one?

Any help would be appreciated, thank you.
gaeworker
 
Posts: 1
Joined: Wed May 09, 2012 7:56 am

Re: Change color for DockableFrame

Postby JIDE Support » Wed May 09, 2012 10:30 am

Please give the following code a try to change the active colors. For the side title, it is light gray already when I run the demo with Windows default L&F under 3.4.0. Can you please let us know your configurations so that we can see why it's painted light blue?

Thanks,
Attachments
ExtendedJideTabbedPaneUI.java
(4.62 KiB) Downloaded 3180 times
DockingFrameworkDemo.java
(46.51 KiB) Downloaded 4646 times
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Change color for DockableFrame

Postby scardenasg » Thu Apr 11, 2019 9:25 am

Hello.

I have the exact same problem described in this Post. I have searched the forum and I can't find an answer for this problem.

I am using

Code: Select all
UIManager.getDefaults().put("DockableFrame.activeTitleBackground", Color.black);


but nothing changes.

I have looked at the two source code files attached in the last comment but I can't find a solution there.
scardenasg
 
Posts: 32
Joined: Fri Nov 21, 2014 10:22 am

Re: Change color for DockableFrame

Postby scardenasg » Mon Apr 22, 2019 3:03 am

Support has showed me how to resolve the color change for the title bar background.

- First, you have to overwrite the paintDockableFrameTitlePane method for the Office2007Painter, you can see how to do it looking at the file DockingFrameworkDemo.java provided by support in the previous comment.

The line
Code: Select all
g2d.setColor(active ? Color.GREEN : Color.BLUE);

is the one you have to change to use your preferred color, for either active or inactive.

This will change the background of the tile bar but you still have to change the color around the DockableFrame.

- Second, you have to change the color around the DockableFrame.
To do it, you have to implement your own JideTabbedPaneUI, the line
Code: Select all
UIManager.getDefaults().put("JideTabbedPaneUI", ExtendedJideTabbedPaneUI.class.getName());

in the DockingFrameworkDemo.java replaces the JideTabbedPaneUI by your own class ExtendedJideTabbedPaneUI, this class is provided in the previous comment by support.

To change the color around the DockableFrame, in the line
Code: Select all
 backgroundEnd = Color.GREEN; // note: change the color here

use your preferred color
scardenasg
 
Posts: 32
Joined: Fri Nov 21, 2014 10:22 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 10 guests