Directory

← Back

TemporaryLabel

A Label that removes itself after a delay

Author

Rating

Popularity

<100

TemporaryLabel removes itself when eihter a) the user clicks the label, or b) the next repaint occurs after a specified delay.

Think of it as a inline Notification: you add it to the layout at a specific place. This is often better from a usability standpoint.

It comes with three build-in styles (default, "warning", "error").

If the delay is (for example) 3000msec, the label will stay on screen at least 3sec (if the user does not manually remove it by clicking), and the disappear when the user interacts with the application.

This version of TemporaryLabel uses a Thread to remove itself, and can thus not be used with GAE.

Sample code

                        layout.addComponent(new TemporaryLabel(
                                "This one was added at " + new Date(),
                                TemporaryLabel.STYLE_WARNING, 3000));

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2010-02-17
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.0+
Browser
N/A

TemporaryLabel - Vaadin Add-on Directory

A Label that removes itself after a delay TemporaryLabel - Vaadin Add-on Directory
TemporaryLabel removes itself when eihter a) the user clicks the label, or b) the next repaint occurs after a specified delay. Think of it as a inline Notification: you add it to the layout at a specific place. This is often better from a usability standpoint. It comes with three build-in styles (default, "warning", "error"). If the delay is (for example) 3000msec, the label will stay on screen at least 3sec (if the user does not manually remove it by clicking), and the disappear when the user interacts with the application. This version of TemporaryLabel uses a Thread to remove itself, and can thus not be used with GAE.
Online