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);
}
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);
}
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();
}
}
}
});
}
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;
}
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);
}
Aggregations