'Java' Category
-
Nov072010
Accessing the Eclipse source code
Sometimes I really want to know how Eclipse implements one feature or another, because Eclipse sometimes feels like magic. Usually it turns out they are also just cooking with water. Most open source code is easily available by checking out a project from some SCM. For eclipse it is not as easy. But there is [...]
-
Jan252010
Eclipse 3.5.1 mouse event problems with gtk >= 2.18
Recently, Eclipse started ignoring clicks on dialog buttons for me. This seems to be due to some changes in gtk 2.18. It does not use native windows for all widgets anymore, and SWT seems to rely on it. Thanks to this blog post, I have this fix in my bashrc: alias eclipse=”GDK_NATIVE_WINDOWS=true eclipse” The Debian [...]
-
Mar172009
Enforcing the aspect ratio of a Swing widget
Sometimes, a widget only looks good at a given aspect ratio (movies, pictures, etc.). I wrote a small Swing container for this task today, which you can find at my trac installation. There is also a small example program. Usage boils down to using parent.add(new AspectRatioContainer(4.0/3.0, widget)). instead of just parent.add(widget); Perhaps this is of [...]