io.imunity.vaadin.auth.services.layout.ui.PaletteButton Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unity-server-vaadin-authentication Show documentation
Show all versions of unity-server-vaadin-authentication Show documentation
Vaadin login view and components
/*
* Copyright (c) 2021 Bixbit - Krzysztof Benedyczak. All rights reserved.
* See LICENCE.txt file for licensing information.
*/
package io.imunity.vaadin.auth.services.layout.ui;
import java.util.function.Supplier;
import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.dnd.DragSource;
import com.vaadin.flow.component.dnd.EffectAllowed;
import com.vaadin.flow.component.icon.Icon;
import com.vaadin.flow.component.icon.VaadinIcon;
/**
* Button which can be drag and drop on column component
*
* @author P.Piernik
*
*/
public class PaletteButton extends Button
{
public PaletteButton(String title, VaadinIcon icon, Runnable dragStart, Runnable dragStop,
Supplier layoutElementSupplier)
{
setText(title);
setIcon(new Icon(icon));
// DragSourceExtension