« Return to Thread: Can your GUI framework do this?
Yes you can define a new Swing layout manager with 100% Ruby code, just as you can do most anything doable in Java from JRuby. I would say though, that is is highly unlikely that you would need to do so. There are a great variety of layout managers and most are pretty sophisticated, I surely wouldn't take on writing a non-trivial one myself. If you are looking for a very flexible layout manager designed for people doing layouts by hand I'd suggest the MiG layout manager (http://www.miglayout.com/). You can see the author's presentation at this year's Java One here: http://developers.sun.com/learning/javaoneonline/2008/pdf/TS-4928.pdfMartin DeMello wrote:Yes, but my point was, can you define your own Layout in ruby?
Netbeans generates straight Java code, which you normally would never need to touch. As for building a widget from the "bottom up" do you have any examples? I've built several "widgets" using the graphical deisgner. In Swing they tend to be JPanel + some components + logic (the logic of course would all be in Ruby) which makes the visual designer even more useful. If you're doing a super custom component involving doing your own drawing, that is accomplished easily enough in straight Ruby code. In either of these situations I fail to see how having a visual designer in any way slows you down.Martin DeMello wrote:> You _could_ write Java if you wanted, but we haven't run into occurrences
> where Java (the language) is needed. You could write all of your designs by
> hand in Ruby, which is fine. My preferred approach is to use a designer
> tool, such as Netbeans.
> Do you really want to lay something like this out by hand?
> http://www.happycamperstudios.com/monkeybars/charlotte%20interface.png
Actually, I do :) My preferred approach is to build widgets from the
bottom up, so that if I want to experiment with the layout later I can
do it easily in the code. Does netbeans use the "interface definition
file" approach or does it generate actual code from your UI?
« Return to Thread: Can your GUI framework do this?
| Free embeddable forum powered by Nabble | Forum Help |