Java Code Examples for com.vaadin.flow.component.orderedlayout.HorizontalLayout#setPadding()

The following examples show how to use com.vaadin.flow.component.orderedlayout.HorizontalLayout#setPadding() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GridTest.java    From vaadin-app-layout with Apache License 2.0 6 votes vote down vote up
public GridTest() {
    Random random = new Random();
    for (int i = 0; i < 300; i++) {
        people.add(new Person(UUID.randomUUID().toString(), random.nextInt(), i));
    }

    Grid<Person> grid = getGrid();
    grid.setSelectionMode(Grid.SelectionMode.MULTI);
    grid.setSizeFull();

    HorizontalLayout gridWrapper = new HorizontalLayout(grid);
    gridWrapper.setMargin(false);
    gridWrapper.setPadding(false);
    gridWrapper.setSpacing(false);
    gridWrapper.setFlexGrow(1, grid);
    gridWrapper.setSizeFull();


    add(gridWrapper);
    setMargin(false);
    setPadding(false);
    setSpacing(false);
    setAlignItems(Alignment.STRETCH);
    setFlexGrow(1, gridWrapper);
    setSizeFull();
}
 
Example 2
Source File: GridTest.java    From vaadin-app-layout with Apache License 2.0 6 votes vote down vote up
public GridTest() {
    Random random = new Random();
    for (int i = 0; i < 300; i++) {
        people.add(new Person(UUID.randomUUID().toString(), random.nextInt(), i));
    }

    Grid<Person> grid = getGrid();
    grid.setSelectionMode(Grid.SelectionMode.MULTI);
    grid.setSizeFull();

    HorizontalLayout gridWrapper = new HorizontalLayout(grid);
    gridWrapper.setMargin(false);
    gridWrapper.setPadding(false);
    gridWrapper.setSpacing(false);
    gridWrapper.setFlexGrow(1, grid);
    gridWrapper.setSizeFull();


    add(gridWrapper);
    setMargin(false);
    setPadding(false);
    setSpacing(false);
    setAlignItems(Alignment.STRETCH);
    setFlexGrow(1, gridWrapper);
    setSizeFull();
}
 
Example 3
Source File: GridTest.java    From vaadin-app-layout with Apache License 2.0 6 votes vote down vote up
public GridTest() {
    Random random = new Random();
    for (int i = 0; i < 300; i++) {
        people.add(new Person(UUID.randomUUID().toString(), random.nextInt(), i));
    }

    Grid<Person> grid = getGrid();
    grid.setSelectionMode(Grid.SelectionMode.MULTI);
    grid.setSizeFull();

    HorizontalLayout gridWrapper = new HorizontalLayout(grid);
    gridWrapper.setMargin(false);
    gridWrapper.setPadding(false);
    gridWrapper.setSpacing(false);
    gridWrapper.setFlexGrow(1, grid);
    gridWrapper.setSizeFull();


    add(gridWrapper);
    setMargin(false);
    setPadding(false);
    setSpacing(false);
    setAlignItems(Alignment.STRETCH);
    setFlexGrow(1, gridWrapper);
    setSizeFull();
}
 
Example 4
Source File: GridTest.java    From vaadin-app-layout with Apache License 2.0 6 votes vote down vote up
public GridTest() {
    Random random = new Random();
    for (int i = 0; i < 300; i++) {
        people.add(new Person(UUID.randomUUID().toString(), random.nextInt(), i));
    }

    Grid<Person> grid = getGrid();
    grid.setSelectionMode(Grid.SelectionMode.MULTI);
    grid.setSizeFull();

    HorizontalLayout gridWrapper = new HorizontalLayout(grid);
    gridWrapper.setMargin(false);
    gridWrapper.setPadding(false);
    gridWrapper.setSpacing(false);
    gridWrapper.setFlexGrow(1, grid);
    gridWrapper.setSizeFull();


    add(gridWrapper);
    setMargin(false);
    setPadding(false);
    setSpacing(false);
    setAlignItems(Alignment.STRETCH);
    setFlexGrow(1, gridWrapper);
    setSizeFull();
}
 
Example 5
Source File: AbstractAutoGeneratedCrudFormFactory.java    From crudui with Apache License 2.0 6 votes vote down vote up
protected Component buildFooter(CrudOperation operation, T domainObject, ComponentEventListener<ClickEvent<Button>> cancelButtonClickListener, ComponentEventListener<ClickEvent<Button>> operationButtonClickListener) {
    Button operationButton = buildOperationButton(operation, domainObject, operationButtonClickListener);
    Button cancelButton = buildCancelButton(cancelButtonClickListener);

    HorizontalLayout footerLayout = new HorizontalLayout();
    footerLayout.setSizeUndefined();
    footerLayout.setSpacing(true);
    footerLayout.setPadding(false);

    if (cancelButton != null) {
        footerLayout.add(cancelButton);
    }

    if (operationButton != null) {
        footerLayout.add(operationButton);
    }

    return footerLayout;
}
 
Example 6
Source File: GridTest.java    From vaadin-app-layout with Apache License 2.0 5 votes vote down vote up
public GridTest() {
    Random random = new Random();
    for (int i = 0; i < 300; i++) {
        people.add(new Person(UUID.randomUUID().toString(), random.nextInt(), i));
    }

    Grid<Person> grid = getGrid();
    grid.setSelectionMode(Grid.SelectionMode.MULTI);
    grid.setSizeFull();

    HorizontalLayout gridWrapper = new HorizontalLayout(grid);
    gridWrapper.setMargin(false);
    gridWrapper.setPadding(false);
    gridWrapper.setSpacing(false);
    gridWrapper.setFlexGrow(1, grid);
    gridWrapper.setSizeFull();


    add(gridWrapper);
    setMargin(false);
    setPadding(false);
    setSpacing(false);
    setAlignItems(Alignment.STRETCH);
    setFlexGrow(1, gridWrapper);
    setSizeFull();

}