Search in sources :

Example 1 with SplitLayout

use of com.vaadin.flow.component.splitlayout.SplitLayout in project flow-components by vaadin.

the class SplitLayoutView method addLayoutCombination.

private void addLayoutCombination() {
    Label firstLabel = new Label("First content component");
    Label secondLabel = new Label("Second content component");
    Label thirdLabel = new Label("Third content component");
    SplitLayout innerLayout = new SplitLayout();
    innerLayout.setOrientation(Orientation.VERTICAL);
    innerLayout.addToPrimary(secondLabel);
    innerLayout.addToSecondary(thirdLabel);
    SplitLayout layout = new SplitLayout();
    layout.addToPrimary(firstLabel);
    layout.addToSecondary(innerLayout);
    layout.setId("split-layout-combination");
    layout.getPrimaryComponent().setId("first-component");
    layout.getSecondaryComponent().setId("nested-layout");
    innerLayout.getPrimaryComponent().setId("second-component");
    innerLayout.getSecondaryComponent().setId("third-component");
    setMinHeightForLayout(layout);
    addCard("Layout Combination", layout);
}
Also used : SplitLayout(com.vaadin.flow.component.splitlayout.SplitLayout) Label(com.vaadin.flow.component.html.Label)

Example 2 with SplitLayout

use of com.vaadin.flow.component.splitlayout.SplitLayout in project flow-components by vaadin.

the class SplitLayoutView method addComponentWithThemeVariant.

private void addComponentWithThemeVariant() {
    SplitLayout layout = new SplitLayout(new Label("First content component"), new Label("Second content component"));
    layout.addThemeVariants(SplitLayoutVariant.LUMO_SMALL);
    layout.setId("split-layout-theme-variant");
    NativeButton removeVariantButton = new NativeButton("Remove theme variant", e -> layout.removeThemeVariants(SplitLayoutVariant.LUMO_SMALL));
    removeVariantButton.setId("remove-variant-button");
    addCard("Split Layout theme variant", layout, removeVariantButton);
}
Also used : SplitLayout(com.vaadin.flow.component.splitlayout.SplitLayout) NativeButton(com.vaadin.flow.component.html.NativeButton) Label(com.vaadin.flow.component.html.Label)

Example 3 with SplitLayout

use of com.vaadin.flow.component.splitlayout.SplitLayout in project flow-components by vaadin.

the class SplitLayoutView method addInitialSplitterPositionLayout.

private void addInitialSplitterPositionLayout() {
    Label firstLabel = new Label("First content component");
    Label secondLabel = new Label("Second content component");
    SplitLayout layout = new SplitLayout(firstLabel, secondLabel);
    layout.setSplitterPosition(80);
    layout.getPrimaryComponent().setId("initial-sp-first-component");
    layout.getSecondaryComponent().setId("initial-sp-second-component");
    setMinHeightForLayout(layout);
    addCard("Split Layout with Initial Splitter Position", layout);
}
Also used : SplitLayout(com.vaadin.flow.component.splitlayout.SplitLayout) Label(com.vaadin.flow.component.html.Label)

Example 4 with SplitLayout

use of com.vaadin.flow.component.splitlayout.SplitLayout in project flow-components by vaadin.

the class SplitterPositionView method createLayoutJavaApi.

private void createLayoutJavaApi() {
    Span primary = new Span("Primary");
    primary.setId("primaryJavaApi");
    Span secondary = new Span("Secondary");
    secondary.setId("secondaryJavaApi");
    SplitLayout layout = new SplitLayout(primary, secondary);
    layout.setSplitterPosition(INITIAL_POSITION);
    layout.setId("splitLayoutJavaApi");
    NativeButton setSplitterPosition = new NativeButton("set splitter position", event -> layout.setSplitterPosition(FINAL_POSITION));
    setSplitterPosition.setId("setSplitPositionJavaApi");
    add(setSplitterPosition, layout);
}
Also used : SplitLayout(com.vaadin.flow.component.splitlayout.SplitLayout) NativeButton(com.vaadin.flow.component.html.NativeButton) Span(com.vaadin.flow.component.html.Span)

Example 5 with SplitLayout

use of com.vaadin.flow.component.splitlayout.SplitLayout in project flow-components by vaadin.

the class SplitterPositionView method createLayoutElementApi.

private void createLayoutElementApi() {
    Span primary = new Span("Primary");
    primary.setId("primaryElementApi");
    Span secondary = new Span("Secondary");
    secondary.setId("secondaryElementApi");
    SplitLayout layout = new SplitLayout();
    layout.setSplitterPosition(INITIAL_POSITION);
    layout.setId("splitLayoutElementApi");
    layout.getElement().appendChild(primary.getElement(), secondary.getElement());
    NativeButton setSplitterPosition = new NativeButton("set splitter position", event -> layout.setSplitterPosition(FINAL_POSITION));
    setSplitterPosition.setId("setSplitPositionElementApi");
    add(setSplitterPosition, layout);
}
Also used : SplitLayout(com.vaadin.flow.component.splitlayout.SplitLayout) NativeButton(com.vaadin.flow.component.html.NativeButton) Span(com.vaadin.flow.component.html.Span)

Aggregations

SplitLayout (com.vaadin.flow.component.splitlayout.SplitLayout)13 Label (com.vaadin.flow.component.html.Label)6 NativeButton (com.vaadin.flow.component.html.NativeButton)3 Span (com.vaadin.flow.component.html.Span)3 Component (com.vaadin.flow.component.Component)2 Test (org.junit.Test)2 HasSize (com.vaadin.flow.component.HasSize)1 Div (com.vaadin.flow.component.html.Div)1 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)1 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 BindingContext (org.linkki.core.binding.BindingContext)1 PropertyBehaviorProvider (org.linkki.core.binding.dispatcher.behavior.PropertyBehaviorProvider)1 BindingManager (org.linkki.core.binding.manager.BindingManager)1 DefaultBindingManager (org.linkki.core.binding.manager.DefaultBindingManager)1 ContactComponent (org.linkki.samples.playground.binding.components.ContactComponent)1 ContactsTableComponent (org.linkki.samples.playground.binding.components.ContactsTableComponent)1