Java Reference
In-Depth Information
width: w - 100
}
prog.layoutX = (w - prog.layoutBounds.width)/2;
prog.layoutY = (h - prog.layoutBounds.height)/2;
def timer:Timeline = Timeline {
repeatCount : Timeline. INDEFINITE
interpolate:false
keyFrames:[
KeyFrame{
time:100ms
action:function():Void {
if(counter <= total){
counter++;
}else{
//counter = 0;
timer.stop();
}
}
}
]
}
timer.play();
def progTxt :Text = Text {
layoutX:(prog.width)/2
layoutY:prog.layoutY - 30
content: bind "Progress: {%.0f prog.progress*100}%"
font:Font.font("Arial", FontWeight.BOLD, 22)
fill:Color.BLUE
opacity:0.25
}
When the code is executed, it shows a ProgressBar control on the screen being updated as
shown in the next screenshot.
 
Search WWH ::




Custom Search