Thread: How can I Add new LookAndFel to IDE


Permlink Replies: 4 - Pages: 1 - Last Post: Aug 20, 2004 9:58 PM Last Post By: gsarwate
matheszabi@yaho...

Posts: 1
Registered: 06/22/04
How can I Add new LookAndFel to IDE
Posted: Aug 5, 2004 1:02 PM
Click to report abuse...   Click to reply to this thread Reply
How can I Add new LookAndFel to IDE "JDeveloper 10g" ?
(to the combo box in the Tool->Preferences->LookAndFeel ).
brian.duff@orac...

Posts: 1,385
Registered: 01/10/01
Re: How can I Add new LookAndFel to IDE
Posted: Aug 14, 2004 8:59 PM   in response to: matheszabi@yaho... in response to: matheszabi@yaho...
Click to report abuse...   Click to reply to this thread Reply
Hi Mathe,

It's not possible to add another look and feel to the drop down in the current version. However, you can change the look and feel of the IDE if you don't mind messing about with properties files a little. Here's how:

1) In jdev, set the look and feel to be Oracle.
2) Quit JDev
3) Edit the file ${jdev.home}\jdev\system***\settings.xml in notepad
4) Search for the string "OracleLookAndFeel". Replace the string oracle.bali.ewt.olaf.OracleLookAndFeel with the class name of the look and feel you want to use.
5) Drop any .jar file required by the look and feel you want to use into ${jdev.home}\jdev\lib\patches

For future reference, you'll get a quicker response on JDeveloper questions in the JDeveloper forum.

Thanks,

Brian
JDev Team
gsarwate

Posts: 20
Registered: 02/21/99
Re: How can I Add new LookAndFel to IDE
Posted: Aug 15, 2004 9:13 PM   in response to: brian.duff@orac... in response to: brian.duff@orac...
Click to report abuse...   Click to reply to this thread Reply
Here is how you can add new L&Fs to the drop down list. (Instructions are for Linux , as I use Linux, but they will work for Windows too)

Add the L&F jar to <path to JRE>/lib/ext (or <path to JDK>/jre/lib/ext). Then create swing.properties (if it does not already exist) in <path to JRE>/lib (or in jdk...) with following lines:

swing.installedlafs = motif,windows,metal,mac,plastic
swing.installedlaf.motif.name = CDE/Motif
swing.installedlaf.motif.class = com.sun.java.swing.plaf.motif.MotifLookAndFeel
swing.installedlaf.windows.name = Windows
swing.installedlaf.windows.class = com.sun.java.swing.plaf.windows.WindowsLookAndFeel
swing.installedlaf.metal.name = Metal
swing.installedlaf.metal.class = javax.swing.plaf.metal.MetalLookAndFeel
swing.installedlaf.mac.name = Mac
swing.installedlaf.mac.class = com.sun.java.swing.plaf.mac.MacLookAndFeel
swing.installedlaf.plastic.name = Plastic
swing.installedlaf.plastic.class = com.jgoodies.plaf.plastic.PlasticLookAndFeel
swing.defaultlaf=com.jgoodies.plaf.plastic.PlasticLookAndFeel

Note that I retained default example L&Fs that normally come with the JDK/JRE (depending on the platfom) and added PlasticLookAndFeel as additional PLAF (Pluggable Look And Feel).

Now it should be possible to choose Plastic L&F in not only JDeveloper but also other Swing apps that you want to use.

Please let me know if this works and also if you have any questions.

- Ganesh
brian.duff@orac...

Posts: 1,385
Registered: 01/10/01
Re: How can I Add new LookAndFel to IDE
Posted: Aug 20, 2004 4:48 PM   in response to: gsarwate in response to: gsarwate
Click to report abuse...   Click to reply to this thread Reply
Hi Ganesh,

No, I believe this doesn't work, hence the nasty workaround above ;)

We know about this issue (the lack of support for these properties)... it's a bug in JDeveloper (bug 3136942).

Thanks,

Brian
gsarwate

Posts: 20
Registered: 02/21/99
Re: How can I Add new LookAndFel to IDE
Posted: Aug 20, 2004 9:58 PM   in response to: brian.duff@orac... in response to: brian.duff@orac...
Click to report abuse...   Click to reply to this thread Reply
Hi Brian,

This is how I made it to work on Linux (Debian GNU/Linux sid).

I copied the LAF jar file to <jdk>/jre/lib/ext. Then created swing.properties by hand (as mentioned in the previous post).

I backed up my ~/jdevhome and let JDeveloper create the new ~/jdevhome. The JDeveloper started in default L&F (Metal for me). I looked in the preferences and it showed all the L&Fs I had set up in my jre. At this point there was no settings.xml created. I selected the Plastic3D L&F and exited. Now it created settings.xml with following entry.

<lafClass>com.jgoodies.plaf.plastic.Plastic3DLookAndFeel</lafClass>

When I restarted the JDeveloper. It had a selected (Plastic3D) L&F.

I also tried without changing the L&F (and fresh ~/jdevhome). After first exit from JDeveloper settings.xml had following entry.

<lafClass class="java.lang.String"/>

But when I selected Plastic3D L&F it changed the entry and worked just fine as above.

I use Sun J2SDK1.4.2_05 though. Does it make difference?

Thank you,

Ganesh
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums