Example usage for com.vaadin.ui Alignment isTop

List of usage examples for com.vaadin.ui Alignment isTop

Introduction

In this page you can find the example usage for com.vaadin.ui Alignment isTop.

Prototype

public boolean isTop() 

Source Link

Document

Checks if component is aligned to the top of the available space.

Usage

From source file:pt.ist.vaadinframework.ui.PaginatedSorterViewer.java

License:Open Source License

private void addControls(Component controls, Alignment position) {
    HorizontalLayout controlBar;// w  w w .  j a  v  a2 s .  c  o m
    int x = position.isLeft() ? 0 : (position.isCenter() ? 1 : 2);
    int y = position.isTop() ? 0 : 2;
    controlBar = (HorizontalLayout) getComponent(x, y);
    controlBar.addComponent(controls);
}