Java Reference
In-Depth Information
Listing 8-14. Progress Bar
function progressBar():Void{
delete group.content;
var t = 0.0;
var w = 1.0;
var rect = Rectangle{
width: 350
height: 50
arcHeight: 15
arcWidth: 15
fill: bind createLinearGradient(30,[
Stop{color: createColor(w,w, 1,1), offset: 0.0},
createStop(Color.WHITE, t),
createStop(Color.BLUE, t+.5),
Stop{color: createColor(w,w, 1,1), offset: 1.0},
]);
stroke: Color.LIGHTGRAY
strokeWidth: 2
}
var anim = Timeline{
repeatCount: Timeline.INDEFINITE;
keyFrames: [
KeyFrame{
time: 1s
values: [
w => 0.0
]
},
KeyFrame{
time: 2s
values: [
t => 1.0,
w => 1.0
]
}
]
}
anim.play();
var hgloss = Rectangle{
width: 350
height: 50
arcHeight: 15
arcWidth: 15
fill: LinearGradient{
startX: 0
endX: 0
stops: [
Stop{
color: Color.TRANSPARENT
offset: 0.0
Search WWH ::




Custom Search