Refine search
/** * Create the content for the login form with the supplied user name field, * password field and the login button. You cannot use any other text fields * or buttons for this purpose. To replace these components with your own * implementations, override {@link #createUsernameField()}, * {@link #createPasswordField()} and {@link #createLoginButton()}. If you * only want to change the default captions, override * {@link #getUsernameCaption()}, {@link #getPasswordCaption()} and * {@link #getLoginButtonCaption()}. You do not have to use the login button * in your layout. * * @param userNameField * the user name text field * @param passwordField * the password field * @param loginButton * the login button * @return content component * @since 7.7 */ protected Component createContent(TextField userNameField, PasswordField passwordField, Button loginButton) { VerticalLayout layout = new VerticalLayout(); layout.setSpacing(true); layout.setMargin(true); layout.addComponent(userNameField); layout.addComponent(passwordField); layout.addComponent(loginButton); return layout; }
/** * Creates the select tab. * * @return the component */ private Component createSelectTab() { VerticalLayout selLayout = new VerticalLayout(); selLayout.setMargin(new MarginInfo(false, false, true, false)); selLayout.addComponent(selPreview); selLayout.addStyleName("seltab"); colorSelect = new ColorPickerSelect(); colorSelect.addValueChangeListener(this::colorChanged); selLayout.addComponent(colorSelect); return selLayout; }
@Override protected Component initContent() { VerticalLayout layout = new VerticalLayout(); setStyleName("colorselect"); setWidth("100%"); range = new ComboBox<>(null, EnumSet.allOf(ColorRange.class)); range.setEmptySelectionAllowed(false); range.setWidth("100%"); range.addValueChangeListener(this::valueChange); range.setValue(ColorRange.ALL); layout.addComponent(range); grid = new ColorPickerGrid(createAllColors(14, 10)); grid.setWidth("100%"); grid.addValueChangeListener(this::fireEvent); layout.addComponent(grid); return layout; }
VerticalLayout hsvLayout = new VerticalLayout(); hsvLayout.setMargin(new MarginInfo(false, false, true, false)); hsvLayout.addComponent(hsvPreview); hsvLayout.setStyleName("hsvtab"); hsvGradient.setValue(color); hsvGradient.addValueChangeListener(this::colorChanged); hsvLayout.addComponent(hsvGradient); selectors.add(hsvGradient); VerticalLayout sliders = new VerticalLayout(); sliders.setStyleName("hsv-sliders"); sliders.addComponent(hueSlider);
VerticalLayout rgbLayout = new VerticalLayout(); rgbLayout.setMargin(new MarginInfo(false, false, true, false)); rgbLayout.addComponent(rgbPreview); rgbLayout.setStyleName("rgbtab"); rgbGradient.setValue(color); rgbGradient.addValueChangeListener(this::colorChanged); rgbLayout.addComponent(rgbGradient); selectors.add(rgbGradient); VerticalLayout sliders = new VerticalLayout(); sliders.setStyleName("rgb-sliders"); sliders.addComponent(redSlider);
layout.addComponent(tabs); VerticalLayout innerContainer = new VerticalLayout(); innerContainer.setWidth("100%"); innerContainer.setHeight(null); innerContainer.addComponent(history); VerticalLayout outerContainer = new VerticalLayout(); outerContainer.setWidth("99%"); outerContainer.setHeight("27px"); outerContainer.addComponent(innerContainer); historyContainer = outerContainer;
public static VerticalLayout VERTICAL(final Component...components) { VerticalLayout layout = new VerticalLayout(); //layout.addStyleName(Style.Rating.FIELDS); for (Component component : components) { if (component != null) { layout.addComponent(component); } } return layout; }
import com.vaadin.server.VaadinRequest; import com.vaadin.ui.*; @Theme("mytheme") public class MyApplicationUI extends UI { @Override protected void init(VaadinRequest request) { VerticalLayout view = new VerticalLayout(); view.addComponent(new Label("Hello Vaadin!")); setContent(view); } }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
public static Layout FORM(final Component...components) { VerticalLayout layout = new VerticalLayout(); //layout.addStyleName(Style.Rating.FIELDS); for (Component component : components) { if (component != null) { component.setWidth(100.0f, Unit.PERCENTAGE); layout.addComponent(component); } } return layout; }
@Override public Component initContent() { final VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
public static VerticalLayout VERTICAL(final String style, final Component...components) { VerticalLayout layout = new VerticalLayout(); if (style != null) { layout.addStyleName(style); } for (Component component : components) { if (component != null) { layout.addComponent(component); } } return layout; }
@Override public Component initContent() { VerticalLayout layout = new VerticalLayout(); layout.addComponent(table); layout.addComponent(toolbar); layout.setComponentAlignment(toolbar, Alignment.MIDDLE_RIGHT); return layout; }
public static VerticalLayout wrapPagedTable(I18NSource messageSource, LocalizedPagedTable table) { VerticalLayout tableCarrier = new VerticalLayout(); tableCarrier.setWidth(100, Sizeable.UNITS_PERCENTAGE); tableCarrier.addComponent(table); tableCarrier.addComponent(tableControls(messageSource, table)); return tableCarrier; }
@Override public Component getComponent() { VerticalLayout verticalLayout = new VerticalLayout(); Label label = new Label("The specified dashlet could not be found!"); verticalLayout.addComponent(label); verticalLayout.setComponentAlignment(label, Alignment.MIDDLE_CENTER); return verticalLayout; } };
final TabSheet tabSheet = new TabSheet(); Button button = new Button("Add the tab"); button.addListener(new Button.ClickListener(){ public void buttonClick(ClickEvent event) { VerticalLayout content = new VerticalLayout(); content.addComponent(new Label("This is the tab content.")); Tab tab = tabSheet.addTab(content, "The new Tab", null); } }
Grid myGrid = new Grid(); VerticalLayout test = new VerticalLayout(); Bill testBill = new Bill(23, "Test", "Products", 3, new Date(), new Date()); BeanItemContainer<Bill> testItemContainer = new BeanItemContainer<Bill>(Bill.class); testItemContainer.addItem(testBill); myGrid.setContainerDataSource(testItemContainer); test.addComponent(myGrid); myGrid.setHeightMode(HeightMode.ROW); myGrid.setHeightByRows(testItemContainer.size());
public static VerticalLayout VERTICAL(final boolean margin, final Component...components) { VerticalLayout layout = new VerticalLayout(); layout.setSpacing(margin); layout.setWidth(100.0f, Unit.PERCENTAGE); for (Component component : components) { if (component != null) { component.setWidth(100.0f, Unit.PERCENTAGE); layout.addComponent(component); } } return layout; }
private void addContentLayout() { m_layout = new VerticalLayout(); m_layout.setSizeFull(); m_rootLayout.addComponent(m_layout); m_rootLayout.setExpandRatio(m_layout, 1); updateWidgetView(); }
private void refreshWindow(ComponentContainer header, ComponentContainer windowContainer) { mainWindow.removeAllComponents(); VerticalLayout main = new VerticalLayout(); main.setMargin(true); main.setSpacing(true); main.addComponent(header); main.addComponent(windowContainer); mainWindow.setContent(main); }