Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Groovy
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h2><span style="color: rgb(153,51,0);">Update: The GroovyFX Project has moved!</span></h2><p>Please join us at our new <a href="http://groovyfx.org/">site</a>. This page still serves as a source of documentation, but will be taken down once all of the information has been migrated.</p><h2>Module Overview</h2><table class="wysiwyg-macro" data-macro-name="excerpt" data-macro-parameters="atlassian-macro-output-type=BLOCK" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2V4Y2VycHQ6YXRsYXNzaWFuLW1hY3JvLW91dHB1dC10eXBlPUJMT0NLfQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p>GroovyFX provides a Groovy binding for JavaFX 2.0.</p></td></tr></table><p><br /> GroovyFX is an API that makes working with JavaFX in Groovy much simpler and more natural to those well-versed in Groovy. GroovyFX is focused on leveraging the Builder pattern for JavaFX applications, but more than that, it leverages some of the DSL capabilities that Groovy provides and makes the Groovy based JavaFX code easier to write and, just as important, easier to read. For example, JavaFX colors can be set using pseudo variables, like <span style="color: rgb(255,0,0);"><em>red</em></span> or <span style="color: rgb(0,0,255);"><em>blue</em></span>.</p><p>The primary goal of GroovyFX is to make JavaFX development simpler and more concise than what it takes in Java. This is done via numerous built-in features that Groovy provides, including the Tree Structured Language supported through Groovy’s Builder framework that makes declaring a JavaFX SceneGraph more closely resemble the actual SceneGraph itself. This is done through GroovyFX’s SceneGraphBuilder object, that supports all the Controls, Shapes, Effects, and other JavaFX objects, as well as support for using Groovy closures for event handling.</p><p>Features include a SceneGraphBuilder, a TimelineBuilder and Groovy DSL features to handle JavaFX objects, enumerations, binding, and paints/colors.</p><p>The following screenshots show two GroovyFX applications, one demonstrating the visual effect features available with JavaFX and the other demonstrating the JavaFX Charts. The ChartDemo.groovy source is listed below the screen snapshots.</p><p><img class="confluence-embedded-image confluence-content-image-border image-left" width="300" src="/download/attachments/231080024/Screen+shot+2011-07-21+at+7.58.49+PM.png?version=1&modificationDate=1369237837748" data-image-src="/download/attachments/231080024/Screen+shot+2011-07-21+at+7.58.49+PM.png?version=1&modificationDate=1369237837748" data-linked-resource-id="231375252" data-linked-resource-type="attachment" data-linked-resource-default-alias="Screen shot 2011-07-21 at 7.58.49 PM.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231080024" title="null > Screen shot 2011-07-21 at 7.58.49 PM.png" data-element-title="Screen shot 2011-07-21 at 7.58.49 PM.png"> <img class="confluence-embedded-image confluence-content-image-border image-center" width="500" src="/download/attachments/231080024/Screen+shot+2011-07-21+at+8.40.06+PM.png?version=1&modificationDate=1369237837736" data-image-src="/download/attachments/231080024/Screen+shot+2011-07-21+at+8.40.06+PM.png?version=1&modificationDate=1369237837736" data-linked-resource-id="231375251" data-linked-resource-type="attachment" data-linked-resource-default-alias="Screen shot 2011-07-21 at 8.40.06 PM.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231080024" title="null > Screen shot 2011-07-21 at 8.40.06 PM.png" data-element-title="Screen shot 2011-07-21 at 8.40.06 PM.png"></p><p> </p><p> </p><table class="wysiwyg-macro" data-macro-name="code" data-macro-parameters="borderStyle=solid|title=ChartDemo.groovy" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6Ym9yZGVyU3R5bGU9c29saWR8dGl0bGU9Q2hhcnREZW1vLmdyb292eX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>package demo import groovyx.javafx.GroovyFX import groovyx.javafx.SceneGraphBuilder import javafx.collections.FXCollections import javafx.scene.chart.PieChart def pieData = FXCollections.observableArrayList([new PieChart.Data("Yours", 42), new PieChart.Data("Mine", 58)]) GroovyFX.start { new SceneGraphBuilder().stage(title: 'Chart Demo (GroovyFX)', width: 1024, height: 700, visible: true) { scene { tilePane { pieChart(data: [first: 0.25f, second: 0.25f, third: 0.25f]) pieChart(data: pieData) } } } } </pre></td></tr></table><p> </p><h2>Documentation</h2><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2NoaWxkcmVuOmFsbD10cnVlfQ&locale=en_GB&version=2" data-macro-name="children" data-macro-parameters="all=true"></p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced