Example usage for com.vaadin.ui ColorPicker setPopupStyle

List of usage examples for com.vaadin.ui ColorPicker setPopupStyle

Introduction

In this page you can find the example usage for com.vaadin.ui ColorPicker setPopupStyle.

Prototype

public void setPopupStyle(PopupStyle style) 

Source Link

Document

Sets the style of the popup window.

Usage

From source file:com.cavisson.gui.dashboard.components.controls.ColorPickers.java

License:Apache License

public ColorPickers() {
    setMargin(true);/*from w  ww  .j a va2s  .c  o m*/

    Label h1 = new Label("Color Pickers");
    h1.addStyleName("h1");
    addComponent(h1);

    HorizontalLayout row = new HorizontalLayout();
    row.addStyleName("wrapping");
    row.setSpacing(true);
    addComponent(row);

    TestIcon testIcon = new TestIcon(40);

    ColorPicker cp = new ColorPicker();
    cp.setDefaultCaptionEnabled(true);
    cp.setIcon(testIcon.get());
    cp.setColor(new Color(138, 73, 115));
    row.addComponent(cp);

    cp = new ColorPicker();
    cp.setPopupStyle(PopupStyle.POPUP_SIMPLE);
    cp.setTextfieldVisibility(true);
    row.addComponent(cp);
}