Skip to Main Content
Vaadin 7 UI Design By Example: Beginner's Guide
book

Vaadin 7 UI Design By Example: Beginner's Guide

by Alejandro Duarte
July 2013
Beginner content levelBeginner
246 pages
5h 3m
English
Packt Publishing
Content preview from Vaadin 7 UI Design By Example: Beginner's Guide

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Vaadin

Vaadin

Joachim Baumann, Daniel Arndt, Frank Engelen, Frank Hardy

Publisher Resources

ISBN: 9781782162261Other