O'Reilly logo

Vaadin 7 UI Design By Example Beginner's Guide by Alejandro Duarte

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating a widget

We are going to develop a custom widget to show a marquee. Follow these steps to create your first widget:

  1. Create a new Vaadin project with the name myfistwidget using your IDE.
  2. Create a new class for the client side widget myfirstwidget.client.MarqueeLabelWidget:
    package myfirstwidget.client; import com.google.gwt.dom.client.Style.Position; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.ui.Label; public class MarqueeLabelWidget extends Label { // ... public MarqueeLabelWidget() { final Element element = getElement(); element.getStyle().setPosition(Position.RELATIVE); Timer timer = new Timer() { private ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required