Example usage for com.vaadin.ui Alignment isCenter

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

Introduction

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

Prototype

public boolean isCenter() 

Source Link

Document

Checks if component is aligned center (horizontally) 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;//from  w  ww  .  ja v  a  2  s . com
    int x = position.isLeft() ? 0 : (position.isCenter() ? 1 : 2);
    int y = position.isTop() ? 0 : 2;
    controlBar = (HorizontalLayout) getComponent(x, y);
    controlBar.addComponent(controls);
}