Search in sources :

Example 16 with CssLayout

use of com.vaadin.ui.CssLayout in project Activiti by Activiti.

the class TaskListHeader method initInputField.

protected void initInputField() {
    // Csslayout is used to style inputtext as rounded
    CssLayout csslayout = new CssLayout();
    csslayout.setHeight(24, UNITS_PIXELS);
    csslayout.setWidth(100, UNITS_PERCENTAGE);
    layout.addComponent(csslayout);
    inputField = new TextField();
    inputField.setWidth(100, UNITS_PERCENTAGE);
    inputField.addStyleName(ExplorerLayout.STYLE_SEARCHBOX);
    inputField.setInputPrompt(i18nManager.getMessage(Messages.TASK_CREATE_NEW));
    inputField.focus();
    csslayout.addComponent(inputField);
    layout.setComponentAlignment(csslayout, Alignment.MIDDLE_LEFT);
    layout.setExpandRatio(csslayout, 1.0f);
}
Also used : CssLayout(com.vaadin.ui.CssLayout) TextField(com.vaadin.ui.TextField)

Example 17 with CssLayout

use of com.vaadin.ui.CssLayout in project cuba by cuba-platform.

the class CubaCurrencyField method initLayout.

protected void initLayout() {
    container = new CssLayout();
    container.setSizeFull();
    container.setPrimaryStyleName(CURRENCYFIELD_LAYOUT_STYLENAME);
    container.addComponent(currencyLabel);
    if (useWrapper()) {
        ie9InputWrapper = new CssLayout(textField);
        ie9InputWrapper.setSizeFull();
        ie9InputWrapper.setPrimaryStyleName(IE9_INPUT_WRAP_STYLENAME);
        container.addComponent(ie9InputWrapper);
    } else {
        container.addComponent(textField);
    }
    setFocusDelegate(textField);
}
Also used : CssLayout(com.vaadin.ui.CssLayout)

Example 18 with CssLayout

use of com.vaadin.ui.CssLayout in project cuba by cuba-platform.

the class WebAbstractTree method initComponent.

public void initComponent(CubaTree component) {
    componentComposition = new CssLayout();
    componentComposition.setPrimaryStyleName("c-tree-composition");
    componentComposition.setWidthUndefined();
    componentComposition.addComponent(component);
    component.setSizeFull();
    component.addShortcutListener(new ShortcutListener("tableEnter", com.vaadin.event.ShortcutAction.KeyCode.ENTER, null) {

        @Override
        public void handleAction(Object sender, Object target) {
            if (target == WebAbstractTree.this.component) {
                if (enterPressAction != null) {
                    enterPressAction.actionPerform(WebAbstractTree.this);
                } else {
                    handleClickAction();
                }
            }
        }
    });
}
Also used : CssLayout(com.vaadin.ui.CssLayout) ShortcutListener(com.vaadin.event.ShortcutListener)

Example 19 with CssLayout

use of com.vaadin.ui.CssLayout in project vaadin-app-layout by appreciated.

the class PaperElementsDemo method getDemoView.

@Override
protected Component getDemoView() {
    PaperButton basicButton = PaperButton.create("Basic button");
    basicButton.setRaised(true);
    basicButton.addEventListener("click", args -> {
        Notification.show("Clicked");
    });
    PaperButton notRaisedButton = PaperButton.create("Not raised");
    notRaisedButton.setRaised(false);
    PaperButton noInkButton = PaperButton.create("No ink");
    noInkButton.setRaised(true);
    noInkButton.setNoink(true);
    PaperButton disabledButton = PaperButton.create("Disabled");
    disabledButton.setDisabled(true);
    Layout horizontal = Layout.horizontal();
    horizontal.setJustified(true);
    horizontal.setAttribute("style", "width: 600px");
    horizontal.appendChild(basicButton);
    horizontal.appendChild(notRaisedButton);
    horizontal.appendChild(noInkButton);
    horizontal.appendChild(disabledButton);
    PaperSlider slider = PaperSlider.create();
    slider.setValue(50);
    slider.addEventListener("change", arguments -> {
        Notification.show("Value changed to " + slider.getValue());
    });
    Layout vertical = Layout.vertical();
    vertical.appendHtml("<h2>Slider</h2>");
    vertical.appendChild(slider);
    vertical.appendHtml("<h2>Buttons</h2>");
    vertical.appendChild(horizontal);
    CssLayout wrapper = new CssLayout();
    Root root = ElementIntegration.getRoot(wrapper);
    root.appendChild(vertical);
    return wrapper;
}
Also used : CssLayout(com.vaadin.ui.CssLayout) Root(org.vaadin.elements.Root) CssLayout(com.vaadin.ui.CssLayout)

Example 20 with CssLayout

use of com.vaadin.ui.CssLayout in project cuba by cuba-platform.

the class CubaCurrencyField method initLayout.

protected void initLayout() {
    container = new CssLayout();
    container.setSizeFull();
    container.setPrimaryStyleName(CURRENCYFIELD_LAYOUT_STYLENAME);
    container.addComponent(currencyLabel);
    if (useWrapper()) {
        ie9InputWrapper = new CssLayout(textField);
        ie9InputWrapper.setSizeFull();
        ie9InputWrapper.setPrimaryStyleName(IE9_INPUT_WRAP_STYLENAME);
        container.addComponent(ie9InputWrapper);
    } else {
        container.addComponent(textField);
    }
    setFocusDelegate(textField);
}
Also used : CssLayout(com.vaadin.ui.CssLayout)

Aggregations

CssLayout (com.vaadin.ui.CssLayout)28 Label (com.vaadin.ui.Label)10 Button (com.vaadin.ui.Button)8 ClickEvent (com.vaadin.ui.Button.ClickEvent)4 ClickListener (com.vaadin.ui.Button.ClickListener)4 Component (com.vaadin.ui.Component)4 VerticalLayout (com.vaadin.ui.VerticalLayout)4 HorizontalLayout (com.vaadin.ui.HorizontalLayout)3 TextField (com.vaadin.ui.TextField)3 LayoutClickEvent (com.vaadin.event.LayoutEvents.LayoutClickEvent)2 LayoutClickListener (com.vaadin.event.LayoutEvents.LayoutClickListener)2 ValoTheme (com.vaadin.ui.themes.ValoTheme)2 PrettyTimeLabel (org.activiti.explorer.ui.custom.PrettyTimeLabel)2 ClaimTaskClickListener (org.activiti.explorer.ui.task.listener.ClaimTaskClickListener)2 Subscription (com.haulmont.bali.events.Subscription)1 Instance (com.haulmont.chile.core.model.Instance)1 Entity (com.haulmont.cuba.core.entity.Entity)1 TokenList (com.haulmont.cuba.gui.components.TokenList)1 ValueSource (com.haulmont.cuba.gui.components.data.ValueSource)1 WebAbstractComponent (com.haulmont.cuba.web.gui.components.WebAbstractComponent)1