This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.swing.SwingBuilder | |
import griffon.builder.gfx.* | |
import griffon.builder.gfx.swing.GfxPanel | |
import java.awt.Color | |
def gfx = new GfxBuilder() | |
def node = gfx.group() { | |
antialias true | |
background(color('white')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.swing.SwingBuilder | |
import griffon.builder.gfx.* | |
import griffon.builder.gfx.swing.GfxPanel | |
import java.awt.Color | |
class SphereNode extends CustomGfxNode { | |
@GfxAttribute(alias="r") double radius = 90 | |
@GfxAttribute double cx = 100 | |
@GfxAttribute double cy = 100 | |
@GfxAttribute Color base = Colors.get("blue") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.pushingpixels.trident.Timeline.RepeatBehavior | |
application(title:'snake', | |
size:[400,220], | |
locationByPlatform:true, | |
iconImage: imageIcon('/griffon-icon-48x48.png').image, | |
iconImages: [imageIcon('/griffon-icon-48x48.png').image, | |
imageIcon('/griffon-icon-32x32.png').image, | |
imageIcon('/griffon-icon-16x16.png').image]) { | |
delegate.registerFactory("gfxpanel", new GfxPanelFactory()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.swing.SwingBuilder | |
import griffon.builder.trident.* | |
import griffon.builder.gfx.* | |
import griffon.builder.gfx.swing.* | |
import groovy.beans.Bindable | |
@Bindable | |
class Model { | |
float s = 0.5f | |
float ra = 0.0f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.swing.SwingBuilder | |
import griffon.builder.trident.* | |
import griffon.builder.gfx.* | |
import griffon.builder.gfx.swing.* | |
import groovy.beans.Bindable | |
import org.pushingpixels.trident.Timeline.TimelineState | |
@Bindable | |
class Model { | |
float s = 0.5f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns griffon.clojure.Greet | |
(:gen-class | |
:methods [[greet [String] String]])) | |
(defn -greet | |
([this greetee] | |
(str "Hello " greetee "!"))) | |
(defn -main | |
[greetee] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.beans.Bindable | |
import org.pushingpixels.trident.Timeline.TimelineState | |
@Bindable | |
class Model { | |
float s = 0.5f | |
float ra = 0.0f | |
} | |
model = new Model() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application(title:'fx', | |
pack:true, | |
locationByPlatform:true, | |
iconImage: imageIcon('/griffon-icon-48x48.png').image, | |
iconImages: [imageIcon('/griffon-icon-48x48.png').image, | |
imageIcon('/griffon-icon-32x32.png').image, | |
imageIcon('/griffon-icon-16x16.png').image]) { | |
gridLayout(cols: 1, rows: 3) | |
textField(id: "t1", columns: 20) | |
textField(editable: false, text: bind{t1.text}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.swing.SwingBuilder | |
import griffon.builder.trident.* | |
import griffon.builder.gfx.* | |
import griffon.builder.gfx.swing.* | |
import groovy.beans.Bindable | |
import org.pushingpixels.trident.Timeline.TimelineState | |
@Bindable | |
class Model { | |
float s = 0.5f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application(title:'fx', | |
pack:true, | |
locationByPlatform:true, | |
iconImage: imageIcon('/griffon-icon-48x48.png').image, | |
iconImages: [imageIcon('/griffon-icon-48x48.png').image, | |
imageIcon('/griffon-icon-32x32.png').image, | |
imageIcon('/griffon-icon-16x16.png').image]) { | |
gridLayout(cols: 1, rows: 4) | |
textField(id: "t1", columns: 20) | |
textField(editable: false, text: bind{t1.text}) |