 |
NetBeans in dark shining armor
Posted by kirillcool on September 10, 2005 at 01:58 AM | Comments (19)
The latest Q Build of NetBeans provides much better support for third-party look-and-feels than was available in previous releases (although still it has some hard-coded assumptions that LAF should inherit from Metal, leading to quite a few ClassCastExceptions). Recently, a few dark-themed look-and-feels have been made available, and I decided to take them for a ride on the NetBeans.
This FAQ entry describes how to run NetBeans with custom look-and-feel (what's wrong with swing.defaultlaf setting that it should be replaced by laf). The following three LAFs have been tested: Synthetica BlackStar (commercially available only), TinyLAF Nightly and Substance Ebony. Here are the results:
Synthetica BlackStar : H:\netbeans-4.2dev\bin\netbeans.exe -cp:p H:\JavaTools\lnf\synthblackstar\syntheticaBlackStar.jar;H:\JavaTools\lnf\synthblackstar\synthetica.jar -laf de.javasoft.plaf.synthetica.SyntheticaBlackStarLookAndFeel. It needs two jars (standard and theme). Here is how NetBeans looks like under this theme (click to see fullsize):
TinyLAF Nightly : H:\netbeans-4.2dev\bin\netbeans.exe -cp:p H:\JavaTools\lnf\tinylaf-1_3_02\tinylaf.jar -laf de.muntjak.tinylookandfeel.TinyLookAndFeel. In addition, you will have to place the YQ Nightly.theme file under either user.home or user.dir and rename it to Default.theme. Here is how NetBeans looks like under this theme (click to see fullsize):
Substance Ebony : H:\netbeans-4.2dev\bin\netbeans.exe -cp:p h:\jprojects\substance\drop\substance.jar -laf org.jvnet.substance.SubstanceLookAndFeel -J-Dsubstancelaf.theme=org.jvnet.substance.theme.SubstanceEbonyTheme.
The theme is specified as a VM flag. Here is how NetBeans looks like under this theme (click to see fullsize):
So, which one looks better?
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
I like "Synthetica BlackStar ", but what would be nice is if you could change the LAF of the stupid windows bar at the top... I know it can be done, wonder why they haven't done that yet?
Posted by: olsonje on September 10, 2005 at 07:19 AM
-
opinionatedBlogEntryForNetbeans++
Posted by: phlogistic on September 10, 2005 at 09:14 AM
-
phlogistic,
What about almost the same entry on IntelliJ IDEA I made about a month ago? Missed that I guess. I would love to change the LAF of your beloved Eclipse, but sadly it can't be done for SWT. So what is exactly your complaint here?
olsonje,
Unless i run the NetBeans from my own main() function and call setDefaultLookAndFeelDecorated, nothing i can do here (short of making this option default in the tested LAFs. However, due to known bug, you will have serious flicker problems on resize).
Posted by: kirillcool on September 10, 2005 at 11:40 AM
-
Really? The big blue title bar at the top of the app can be changed? Hrm, I'll have to check into that, didn't know you could in java! Would be nice. :o)
Posted by: olsonje on September 10, 2005 at 12:24 PM
-
olsonje,
See JFrame and JDialog's setDefaultLookAndFeelDecorated function. Once you call them (before creating your first top-level frame), the frame decorations will be drawn by the LAF. See BlackStar screenshots or Substance WebStart test application.
Posted by: kirillcool on September 10, 2005 at 12:37 PM
-
Way cool, I definatly have some uses for that coming up soon!
Posted by: olsonje on September 10, 2005 at 01:30 PM
-
> what's wrong with swing.defaultlaf setting?
I think the -ui and -laf line switches predate swing.defaultlaf. But adding it is not a bad idea.
Posted by: timboudreau on September 12, 2005 at 01:57 AM
-
There is no literal "LAF" in Eclipse to change, as Eclipse does not use Swing, and LAF is a component of the window toolkit Swing. There are two ways to change colors / fonts / etc., the equivalent of LAF, in Eclipse: via Eclipse preferences or the host OS's display settings.
Menu bar option Window -> Preferences -> General -> Appearance -> Color and Fonts can be used to individually tweak colors & fonts to each individual's likings. Those options can be ported from installation to installation of Eclipse because preferences can be saved outside the IDE in a serialized file. These individual preferences for color, font, etc. do not need to be used, and can instead default to the OS's requested defaults.
The OS display settings, when changed, apply to Eclipse automatically. This is because Eclipse is based on the native windowing toolkit SWT, and therefore respects / obeys the OS's requests for how it should display the IDE. This is opposed to Netbeans using Swing, a non-native windowing toolkit, that does not honor the requests of the OS how the windowed application (Netbeans) should display. Therefore the proprietary display configuration, LAF, controls Netbeans.
Therefore, it is possible to change as you would love to. I'm sure there's some plug-ins for it to, but I didn't want to explain outside the scope of the immediate IDE + its windowing API.
Posted by: phlogistic on September 12, 2005 at 08:01 AM
-
phlogistic,
Contrarily to what you would like to picture here, the colors & fonts settings are valid only for various views and perspectives, and not for the controls themselves. You can not change the way buttons, tabs or progress bars (or even menu items) are drawn. This is the true meaning of the word "look" in "look and feel". NetBeans, IDEA and any big IDE has had support for colors and fonts for ages.
The age-long debate of native system fidelity verses cross-platform look can go on forever, but in this specific case, there is no way i can cause Eclipse to look black (as in the above screenshots) without making the whole operating systems (with all its applications) look black.
Posted by: kirillcool on September 12, 2005 at 11:00 AM
-
Kirill, I invite you henceforth no longer to make biased, derogatory comments on IDEs, or any software, you are unfamiliar with. Such comments you made about Eclipse are false, and outside of a blog in a professional media outlet, those comments constitute poor journalism, called lies. It doesn't matter how many times you repeat what you think how an application works, or what typeface you put it in – Eclipse allows you to change the colors of its editors.
You can make the Eclipse IDE black as night without your OS display settings black as night. As a favor to uphold the integrity of the other blog authors of this site, and to be honest to readers, before you comment further, go to the Preferences in Eclipse as I clearly described. You will find where you can change the colors and fonts of the IDE. This is what respectable webloggers do... they test how an application works, not make assumptions, as you have done.
Posted by: phlogistic on September 12, 2005 at 11:55 AM
-
phlogistic,
As far as i know it (which I has seen once again) - you can change only stuff that Eclipse actually draws (such as colors of gradient tabs). What about menu bar, menu items, tool bar, regular buttons, table headers, progress bars?
How do i make menu items white on black background? How do I change the shape of a tab (not only its colors), and i'm not talking about "standard / classic" mode? How do i make scroll bars green? How do i make progress bar red on XP from inside Eclipse?
Once again, i am not talking about the editors, i am talking about all the controls in the application, JCheckBoxes, JTables, JScrollBars, JProgressBars, JMenuItems (the respective SWT counterparts).
Posted by: kirillcool on September 12, 2005 at 12:01 PM
-
I am referencing "There is no way i can cause Eclipse to look black without making the whole operating system (sic) look black." I am not saying how to change how a progress bar is viewed.
Posted by: phlogistic on September 12, 2005 at 07:42 PM
-
phlogistic,
I have been using Eclipse for the last three years 10+ hours each working day, amounting to about 8000 hours total. I don't appreciate the comments such as "This is what respectable webloggers do... they test how an application works, not make assumptions, as you have done." I know that you can not change the way the application (not editors) looks like, since it is using native controls (and there is nothing wrong with that). I also don't appreciate people questioning my integrity with little evidence to back up their claims (except an option to change the gradient of tabs and background / foreground of a single Java editor). If you are not able to make Eclipse look like Swing application using dark themes (as in the screenshots), it's not a shortcoming of Eclipse (as you are constantly hearing), it's an advantage of Swing-based applications.
"Eclipse is written mostly by IBM paid employees" - not equal to "Eclipse is worse IDE than others, Eclipse is bad", contrary to what you automatically assume.
"Eclipse is SWT-based" - not equal to "Eclipse is worse IDE than others, Eclipse is bad" contrary to what you automatically assume.
"Here is an example of NetBeans" - not equal to "NetBeans is better than all the rest, Eclipse is bad", contrary to what you automatically assume.
I also don't appreciate hearing about "biased, derogatory comments on IDEs, or any software, you are unfamiliar with" from very biased people that are unfamiliar with me. I haven't written a single derogatory comment on Eclipse in this weblog since its beginning. In fact, this entry describes why i preferred Eclipse compiler over Sun's own.
Posted by: kirillcool on September 12, 2005 at 11:44 PM
-
LOL - I like how you say "I preffered Eclipse". That's hilarious. Because in the article, you mention that "Currently, the only fully-TCK compliant alternative (for Java 5.0 features) is the JDT compiler that comes with Eclipse 3.1M7. " You can't prefer something when you have only one choice! There is no choice, or preference there!
For 'preferring' the Eclipse IDE, and saying you're unbiased, you sure did flame Eclipse. That posting wasn't unbiased at all. Despite what you try to say - you do not like Eclipse. You don't come out & literally say "I hate Eclipse, I am a weblogger for this website therefore I will plug NetBeans spin as much as possible". But looking at your past postings it's pretty evident in what camp you lay (such as your quote here, "NetBeans, IDEA and any big IDE has had support for colors and fonts for ages."). I respect your right to disrespect an IDE. But you must also respect might right to disrespect your opinion.
I can't post screen shots here, so I can't post evidence. Follow this link if you want a plug-in that modifies Eclipse via skins. It really doesn't matter how much evidence I do post - you do not want to admit you are wrong, and this is why I said before - it doesn't matter how many times you post something, or what typeface you post it in, there's a difference between what you think, and what I know.
Posted by: phlogistic on September 14, 2005 at 07:09 AM
-
phlogistic,
OMG, you might want to not use the word LOL, otherwise i may think that my blog was transferred to Slashdot and people will start to take it seriously. You are welcome to see the meaning of the word "alternative" in the dictionary. Then read the linked article once again to see that JDT compiler was an alternative to Sun's compiler that comes bundled with JDK (otherwise it would be a little problematic to compile Java code). By the way, did you know that it took Eclipse almost a year to make fully TCK-compliant compiler since the Tiger was officially released?
The post that you have linked doesn't flame Eclipse. It simply states that IBM (having invested a lot of money into it) wishes to make some money out of it. Obviously you are sure that i hate Eclipse, but to much of your surprise i use it not only at work (where i could have NetBeans for free), but also at home. Much of the work on my java.net projects is done on Eclipse, although I have the following IDEs installed: IDEA (licensed), JBuilder, JDeveloper and NetBeans. Would be strange from my part to hate a tool and continue using it even though i have three other options at work and four other options at home, wouldn't you think?
About the link - I have downloaded two packages, one from the link itself and another one from here. There are four screenshots: 1, 2, 3 and 4, the last one being the perfect example. Did you notice that scrollbars, toolbar, menus and all other SWT controls are the same in all themes? That's because they are OS controls. You can change the stuff that Eclipse paints, but you can't change SWT-based application in a way you can with Java-based one. And I am getting really tired of this conversation, so that i may decide to remove it altogether. There's a site for LOL-styled flamewars, and it's called slashdot.
The last thing about the camp I lay in. You proudly waved at me the "evidence" you had on Eclipse's abilities to change the fonts and colors. This is a very basic ability that every other IDE (not only in Java) has, so what's the big deal?
Posted by: kirillcool on September 14, 2005 at 08:08 AM
-
The "big deal" was you saying that color changes in Eclipse are impossible. This is outlined in your two quotes below:
"I would love to change the LAF of your beloved Eclipse, but sadly it can't be done for SWT."
There is no way i can cause Eclipse to look black (as in the above screenshots) without making the whole operating system (sic) (with all its applications) look black.
The big deal is that it is possible to change the Eclipse IDE's colors, without changing the OS's colors, but you fail to admit that it is possible.
Go ahead and remove this post. It's the only way you can continue to avoid admitting that it is possible in Eclipse to change colors. I am done as well.
Posted by: phlogistic on September 14, 2005 at 01:55 PM
-
And i still say that you can't change how Eclipse as application is looking. You can change the colors / fonts of a very defined (and limited) subset of its internal windows. You still haven't produced an example of how to make Eclipse look totally black (like in screenshots), including menu bars, tool bars and backgrounds of everything in between.
Posted by: kirillcool on September 14, 2005 at 11:09 PM
-
Unless i run the NetBeans from my own main() function and call setDefaultLookAndFeelDecorated, nothing i can do here
<evil hack>Not sure, but I think with a dirty UIManager trick, you actually could do it; your L&F should be instantiated before the first frame peer, so probably just putting the call in a static block (maybe test some system prop?) could work. I'm not absolutely sure, as I don't know offhand what the exact rules are about setDefaultLookAndFeelDecorated() are, but I'm guessing if it's before the first *frame* peer (as opposed to the splash screen's window peer), it might just work.</evil hack>
Posted by: timboudreau on November 22, 2005 at 08:21 PM
-
Tim,
The custom title pane is working now on NetBeans 5.0 beta2 after a bug-fix on report that i have filed.
Posted by: kirillcool on November 22, 2005 at 11:16 PM
|