This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.vaadin.tatu; | |
| // Add Popup to pom.xml | |
| // <dependency> | |
| // <groupId>com.vaadin.componentfactory</groupId> | |
| // <artifactId>popup</artifactId> | |
| // <version>4.0.0</version> | |
| // </dependency> | |
| import java.util.Arrays; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vaadin-grid-tree-toggle[expanded]::part(toggle)::before { | |
| content: var(--lumo-icons-minus); | |
| transform: unset; | |
| } | |
| vaadin-grid-tree-toggle::part(toggle)::before { | |
| content: var(--lumo-icons-plus); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Route("") | |
| public class ConfirmDialogView extends VerticalLayout | |
| implements AfterNavigationObserver { | |
| public ConfirmDialogView() { | |
| add("Hello"); | |
| } | |
| @Override | |
| public void afterNavigation(AfterNavigationEvent event) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class UploadField extends CustomField<InputStream> { | |
| InputStream is; | |
| FileBuffer buffer = new FileBuffer(); | |
| public UploadField() { | |
| Upload upload = new Upload(buffer); | |
| upload.setAcceptedFileTypes("image/jpeg"); | |
| upload.setMaxFiles(1); | |
| upload.addSucceededListener(event -> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vaadin-connection-indicator { | |
| position: fixed; | |
| z-index: 251; | |
| top: 50%; | |
| width: 20%; | |
| left: 40%; | |
| } | |
| .v-loading-indicator { | |
| position: unset !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.application.views; | |
| import com.vaadin.flow.component.Component; | |
| public class TooltipUtils { | |
| public static void setTooltipClassName(Component comp, String className) { | |
| comp.getElement().executeJs( | |
| """ | |
| if ($0.getElementsByTagName('vaadin-tooltip').length == 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| html { | |
| --lumo-border-radius-l: 20px; | |
| } | |
| vaadin-combo-box::part(input-field) { | |
| box-shadow: inset var(--lumo-box-shadow-xs); | |
| border-top-right-radius: var(--lumo-border-radius-l); | |
| border-bottom-right-radius: var(--lumo-border-radius-l); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [theme~="dense"] { | |
| --lumo-border-radius-s: 0.1em; | |
| --lumo-border-radius-m: 0.2em; | |
| --lumo-border-radius: 0.2em; | |
| --lumo-border-radius-l: 0.3em; | |
| --lumo-space-xs: 0.25rem; | |
| --lumo-space-s: 0.5rem; | |
| --lumo-space-m: 1.5rem; | |
| --lumo-space-l: 1.75rem; | |
| --lumo-space-xl: 2rem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.application.views; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import java.util.stream.Collectors; | |
| import java.util.stream.IntStream; | |
| import com.vaadin.flow.component.Key; | |
| import com.vaadin.flow.component.Shortcuts; | |
| import com.vaadin.flow.component.UI; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.vaadin.tatu; | |
| import java.util.ArrayList; | |
| import java.util.Collection; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Objects; | |
| import java.util.Random; |