Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Vaadin 7 Cookbook

You're reading from   Vaadin 7 Cookbook Take the shortcut to developing rich internet applications in pure Java. Vaadin makes it easy and this cookbook makes it easier still with its practical recipes and straightforward approach.

Arrow left icon
Product type Paperback
Published in Apr 2013
Publisher
ISBN-13 9781849518802
Length 404 pages
Edition Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (19) Chapters Close

Vaadin 7 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Creating a Project in Vaadin 2. Layouts FREE CHAPTER 3. UI Components 4. Custom Widgets 5. Events 6. Messages 7. Working with Forms 8. Spring and Grails Integration 9. Data Management 10. Architecture and Performance 11. Facilitating Development 12. Fun Index

Building any layout with AbsoluteLayout


If the basic layouts offered by Vaadin limit us, and we want to create some other special crazy layout, we can use AbsoluteLayout. There are no limits in this layout. We can insert components into any place we want. In this recipe, we will create a demo of a custom layout, Circle layout. There are also some reasons not to use AbsoluteLayout. They are described in the There's more... section at the end of this recipe.

How to do it...

Carry out the following steps to create a custom layout using the AbsoluteLayout class:

  1. We create a project with the main UI class called Demo.

    public class Demo extends UI {…}
  2. We will create a class called CircleLayoutDemo that extends AbsoluteLayout.

    public class CircleLayoutDemo extends AbsoluteLayout {...}
  3. Let's use icons from the Runo theme. So we create an array of icon names.

      private String[] icons = {
      "cancel.png", "calendar.png", "document.png",
      "email.png", "globe.png", "help.png",
      "note.png", "ok.png", "trash...
You have been reading a chapter from
Vaadin 7 Cookbook
Published in: Apr 2013
Publisher:
ISBN-13: 9781849518802
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime