Chris Oliver's Weblog

Tuesday Nov 21, 2006

F3 and Swing

In addition to declarative 2D graphics, F3 also provides a declarative interface to standard Swing components and layout managers. The F3 Canvas is itself a Swing JComponent. So it's possible to both embed Swing components in a Canvas, and to embed a Canvas in other Swing components.

F3 Swing Tutorial

Here is a (non-interactive) tutorial on using Swing components in F3.

Comments:

Hi Chris, this is great stuff. Looking forward to see more of it.
What is your view on using SWT components from Eclipse with F3? I would be happy to discuss, drop me a mail if you are interested... Cheers

Posted by Peter Kovari on November 21, 2006 at 09:29 AM PST #

This is awesome and I wish this was available many years back. However, with the introduction of excellent visual GUI designers is this really relevant any more? Ideally the creation/maintenence of the UI would be done soley using visual designers. Would F3 help the creation of these designers?

Posted by Abraham Tehrani on November 21, 2006 at 12:17 PM PST #

F3 looks interesting, there are other scripting like languages out there. For example Judoscript does a good job in reducing the amount of effort that goes into a small program. Can you describe more about where you see F3 taking over? You had mentioned in your first post that there was an Eclipse plugin, is it available? Thanks!

Posted by Astro on November 21, 2006 at 01:07 PM PST #

Great tutorial that answers a lot of my remaining questions. I didn't see any mention of the renderer/editor Swing interfaces in the table example. Are they just handled in the same way you would normally do this in Swing or does F3 simplify that too?

I think that with a proper GUI builder and NB integration this could be a VB killer ;-) Great Job!

Posted by Shai Almog on November 21, 2006 at 10:09 PM PST #

Almost forgot, if I understand correctly F3 has some "knowledge" of Swing components which it uses to simplify programming the Swing components (e.g. JButton is Button in F3). How would SwingX's JXButton or even my custom JButton implementation be affected by this? Would I still enjoy the benefits of F3?

Posted by Shai Almog on November 21, 2006 at 10:12 PM PST #

Simply amazing! All we need now are some cool multimedia supports. Playing .wav files won't cut it anymore.

Posted by Walter Chang on November 22, 2006 at 01:15 AM PST #

Iam a swing developer. I want get F3, How I can get ??? Its sound like a great, very very... Great job!!!! PS: In other post you talk about Netbeans an Eclipse plugin, I want download, ok ? Thanks.

Posted by Elissandro Aquino Mendes on November 22, 2006 at 04:18 AM PST #

I think F3 is great. One of the best think is what basic shapes are based on SVG. This make it easy to imedetly understand code (also because syntax is much easier when with XML). Also mixing swing with SVG like graphics can be very powerfully. It will be nice to know more about F3, and also to play with it myself. When you are planing to relies it? Interactive tutorial is great however I could not find answer to few questions: 1) How easy it will be to change attributes in Java code. I'm thinking about scenario like this: - application load F3 document; - parse it to some Java Object; - GUI in Java (or F3) manipulate it by changing some of attributes; - changes will be immediately displayed; - new document could be saved to file. By manipulating from Java code I mean call like this: Rect r1 = ... r1.color = Color.red; or something similar, not manipulating source code as String. 2) How to reference Object in F3? I was trying to write something like this: Canvas { content: Group { transform: [] content: [r1:Rect { x: 20 y: 20 height: 80 width: 300 stroke: red }, Ellipse { cx: r1.x + 20 cy: 80 radiusX: 100 radiusY: 50 stroke: blue }] } } This is of course wrong, but I was trying to declare Rect variable in different way and always failed. Also will it be allowed to set 'cx' attribute in Ellipse this way, and will it be dynamic? 3) How model Objects created as standard swing classes could be passed to F3. I was mostly thinking how to pass standard TableModel with some database data to F3 Table? On documentation I found what model for Table is: UIContextImpl$XTableCellModel. Is it default model, or I will need to extend this class? 4) Will it be possible to export F3 documents to some standard format: SVG, PDF, etc. Of course it will be not possible with swing elements, but what about basic shapes, and shapes made from CompositeNode? I know this is a lot of questions and you are probably busy with finishing of implementation, but maybe you will find to answer to some of them in your blog.

Posted by Arek Stryjski on November 22, 2006 at 06:31 AM PST #

Sorry for formating, but your blog did it :(

Posted by Arek Stryjski on November 22, 2006 at 06:32 AM PST #

OK I found answer to question 2 myself. It is possible. Great!

Posted by Arek Stryjski on November 22, 2006 at 09:27 AM PST #

Very exciting language. If the used swing components can be non-default (ie: altered models etc) its very nice.

Posted by 194.117.20.2 on November 22, 2006 at 12:12 PM PST #

Hi Chris - What are you using to lex/parse F3? Do you have a JavaCC grammar for it?

Posted by Tom Copeland on November 22, 2006 at 06:50 PM PST #

This is awesome and I wish this was available many years back. However, with the introduction of excellent visual GUI designers is this really relevant any more? Ideally the creation/maintenence of the UI would be done soley using visual designers. Would F3 help the creation of these designers?

Posted by Warhammer Online Gold on March 11, 2009 at 10:22 PM PDT #

http://www.gizemdolu.net
http://www.askpencerem.net
http://www.asksokagim.net

aşk şiirleri aşk mesajları aşk szöleri

thanks yopuu

Posted by aşk şiirleri on April 10, 2009 at 09:01 AM PDT #

http://www.smsmatbaa.com

Posted by matbaa on June 22, 2009 at 10:15 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Calendar

Feeds

Search

Links

Navigation

Referers