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 – visualizing borders

Follow these steps to visualize borders around components:

  1. Add the following method to your MainLayout class:
    private void showBorders() {
      String style = "v-ddwrapper-over";
      setStyleName(style);
      upperSection.setStyleName(style);
      lowerSection.setStyleName(style);
      menuLayout.setStyleName(style);
      contentLayout.setStyleName(style);
    }
  2. Call the method at the end of the constructor:
    public MainLayout() {
    
      ...
    
      showBorders();
    }
  3. Run the application and say oh!

What just happened?

We have added a built-in CSS class to the layouts (v-ddwrapper-over). The application now looks like this:

What just happened?

Note

The setStyleName method allows adding ...

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