Package com.tonic.vellum.widget
Class Spinner
- java.lang.Object
-
- com.tonic.vellum.Section
-
- com.tonic.vellum.widget.SingleRowSection
-
- com.tonic.vellum.widget.Spinner
-
public final class Spinner extends SingleRowSection
An indeterminate progress indicator that cycles frames; advance with tick() or animate on a timer with start(App).
-
-
Constructor Summary
Constructors Constructor Description Spinner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Spinnerlabel(java.lang.String label)Sets the label shown next to the spinner.Cancellablestart(App app)Animates the spinner on the app timer until the returned handle is cancelled.Spinnerstyle(Style style)Sets the style used to draw the spinner and label.voidtick()Advances to the next animation frame.
-
-
-
Method Detail
-
label
public Spinner label(java.lang.String label)
Sets the label shown next to the spinner.- Parameters:
label- the label text; treated as empty if null- Returns:
- this Spinner for chaining
-
style
public Spinner style(Style style)
Sets the style used to draw the spinner and label.- Parameters:
style- the style- Returns:
- this Spinner for chaining
-
tick
public void tick()
Advances to the next animation frame.
-
start
public Cancellable start(App app)
Animates the spinner on the app timer until the returned handle is cancelled.- Parameters:
app- the application providing the timer- Returns:
- a handle that stops the animation when cancelled
-
-