List of usage examples for com.vaadin.ui CustomLayout setHeight
@Override public void setHeight(float height, Unit unit)
From source file:com.klwork.explorer.project.ProjectSearchPanel.java
License:Apache License
protected void initInputField() { // Csslayout is used to style inputtext as rounded //CssLayout csslayout2 = new CssLayout(); CustomLayout csslayout = new CustomLayout("circularButton"); csslayout.setHeight(24, Unit.PIXELS); csslayout.setWidth(100, Unit.PERCENTAGE); layout.addComponent(csslayout);//from ww w. j a va 2 s . c o m inputField = new TextField(); inputField.setWidth(50, Unit.PERCENTAGE); inputField.addStyleName(ExplorerLayout.STYLE_SEARCHBOX); inputField.setInputPrompt("??"); inputField.focus(); csslayout.addComponent(inputField, "searchInput"); layout.setComponentAlignment(csslayout, Alignment.MIDDLE_LEFT); layout.setExpandRatio(csslayout, 1.0f); }
From source file:com.klwork.explorer.ui.custom.TaskListHeader.java
License:Apache License
protected void initInputField() { // Csslayout is used to style inputtext as rounded //CssLayout csslayout2 = new CssLayout(); CustomLayout csslayout = new CustomLayout("circularButton"); csslayout.setHeight(24, Unit.PIXELS); csslayout.setWidth(100, Unit.PERCENTAGE); layout.addComponent(csslayout);// w w w .ja va2s .c om inputField = new TextField(); inputField.setWidth(100, Unit.PERCENTAGE); inputField.addStyleName(ExplorerLayout.STYLE_SEARCHBOX); inputField.setInputPrompt(i18nManager.getMessage(Messages.TASK_CREATE_NEW)); inputField.focus(); csslayout.addComponent(inputField, "searchInput"); layout.setComponentAlignment(csslayout, Alignment.MIDDLE_LEFT); layout.setExpandRatio(csslayout, 1.0f); }