This example shows the simplest ProgressBar with the default "Sam" skin. Use the controls below to change various settings.
The ProgressBar itself is created with this code:
Most of the code for this example deals with handling the interface, the sliders and other input controls. When a value is changed, it is simply applied to the corresponding attribute of the ProgressBar. The ProgressBar responds when the slider is released, not while it is moving. Leaving aside all the interface details, these are the statements that deal with those settings:
In all cases, the scaling factors used to convert the slider pixel values to the
values used for the ProgressBar have been omitted. The
attribute, while it receives a boolean, returns either an instance of Animation or null.
value attribute of the radio buttons
for selecting the easing method have been set to the actual names of the methods
so it is easy to locate them in the
The ProgressBar rejects values outside of the range
maxValue so the slider goes
back to the current value read from the ProgressBar itself.
Note: You are viewing this example in debug mode with logging enabled. This can significantly slow performance.