Example usage for com.vaadin.ui Alignment getBitMask

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

Introduction

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

Prototype

public int getBitMask() 

Source Link

Document

Returns a bitmask representation of the alignment value.

Usage

From source file:com.haulmont.cuba.web.widgets.addons.popupbutton.PopupButton.java

License:Apache License

/**
 * Sets opening direction for the popup. At the moment only support values are
 * {@link Alignment#BOTTOM_LEFT}, {@link Alignment#BOTTOM_CENTER} and
 * {@link Alignment#BOTTOM_RIGHT}.//from   www. j av a2s .  c o  m
 *
 * Default is {@link Alignment#BOTTOM_RIGHT}.
 */
public void setDirection(final Alignment direction) {
    if (direction == null) {
        throw new IllegalArgumentException("direction cannot be null");
    }

    this.direction = direction;
    getState().direction = direction.getBitMask();
}