Java Reference
In-Depth Information
translateY: 400
soundPlayer:soundPlayer
visible: bind barsButton.selected
}
var barsButton = CheckBox{
graphic: Label{text: "Show Bars", textFill: Color.WHITESMOKE}
}
var disco = DiscoStar{
translateX: 320
translateY: 240
soundPlayer:soundPlayer
visible: bind discoButton.selected
}
var discoButton = CheckBox{
graphic: Label{text: "Show Disco", textFill: Color.WHITESMOKE}
}
var wave = Wave{
translateX: 620
translateY: 380
soundPlayer:soundPlayer
visible: bind waveButton.selected
}
var waveButton = CheckBox{
graphic: Label{text: "Show Wave", textFill: Color.WHITESMOKE}
}
var scene = Scene {
fill: Color.BLACK
content: [
SoundControl{
translateX: 30
translateY: 30
soundPlayer:soundPlayer
}, wave, disco, bars
]
}
function run():Void{
var vbox = VBox{
translateX: 500
translateY: 50
content: [barsButton, discoButton, waveButton]
}
insert vbox into scene.content;
Stage {
title: "Chapter 9"
width: 640
height: 480
scene: scene
} barsButton.selected = true;
}
Search WWH ::




Custom Search