Directory

← Back

LevelIndicator

Cellphone style level indicator

Author

Rating

Popularity

<100

Scalable cellphone style level indicator that can have customised amount of bars. Well suited for displaying data like battery or signal level.

Uses raphael4gwt for drawing. raphael4gwt is included in the add-on. The bars are filled red when less than third of the bars are set filled, yellow between one and two thirds filled and green when more than two thirds are filled.

Sample code

package test.app;

import org.vaadin.addon.levelindicator.Levelindicator;

import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

/**
 * The Application's "main" class
 */
@SuppressWarnings("serial")
public class MyVaadinUI extends UI {

	@Override
	protected void init(VaadinRequest request) {
		final VerticalLayout layout = new VerticalLayout();
		layout.setMargin(true);
		setContent(layout);

		layout.addComponent(new Levelindicator(10, 5));
	}

}

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

Initial release

Released
2013-01-25
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.0+
Browser
Internet Explorer
Firefox
Opera
Safari
Google Chrome
Internet Explorer
Android Browser

LevelIndicator - Vaadin Add-on Directory

Cellphone style level indicator LevelIndicator - Vaadin Add-on Directory
Scalable cellphone style level indicator that can have customised amount of bars. Well suited for displaying data like battery or signal level. Uses raphael4gwt for drawing. raphael4gwt is included in the add-on. The bars are filled red when less than third of the bars are set filled, yellow between one and two thirds filled and green when more than two thirds are filled.
Online