Created
June 18, 2009 18:59
-
-
Save aalmiray/132126 to your computer and use it in GitHub Desktop.
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 javafx.stage.*; | |
import javafx.scene.*; | |
import javafx.scene.text.*; | |
class HelloWorldNode extends CustomNode { | |
public var str:String; | |
override function create():Node { | |
Text { | |
content: bind str | |
x: 10 | |
y: 25 | |
font: Font { | |
name: "Sans Serif" | |
size: 24 | |
} | |
} | |
} | |
} | |
var helloWorld = HelloWorldNode{} | |
helloWorld.str = "Hello World!"; | |
var stage = Stage { | |
var str:String; | |
visible: false | |
title: "HelloWorld" | |
width: 170 | |
height: 50 | |
scene: Scene { | |
content: { | |
helloWorld | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment