Search in sources :

Example 1 with ClickEvent

use of com.vaadin.flow.component.ClickEvent in project karnak by OsiriX-Foundation.

the class WarningConfirmDialog method createButtonCancel.

@SuppressWarnings("serial")
private void createButtonCancel() {
    buttonCancel = new Button();
    buttonCancel.setText(valueCancel);
    buttonCancel.setWidth("90px");
    buttonCancel.addClickListener((ComponentEventListener<ClickEvent<Button>>) event -> dialog.close());
}
Also used : ComponentEventListener(com.vaadin.flow.component.ComponentEventListener) Composite(com.vaadin.flow.component.Composite) ButtonVariant(com.vaadin.flow.component.button.ButtonVariant) Registration(com.vaadin.flow.shared.Registration) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout) VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) Div(com.vaadin.flow.component.html.Div) ClickEvent(com.vaadin.flow.component.ClickEvent) ComponentEvent(com.vaadin.flow.component.ComponentEvent) FlexComponent(com.vaadin.flow.component.orderedlayout.FlexComponent) Button(com.vaadin.flow.component.button.Button) Key(com.vaadin.flow.component.Key) Dialog(com.vaadin.flow.component.dialog.Dialog) Span(com.vaadin.flow.component.html.Span) Button(com.vaadin.flow.component.button.Button) ClickEvent(com.vaadin.flow.component.ClickEvent)

Example 2 with ClickEvent

use of com.vaadin.flow.component.ClickEvent in project karnak by OsiriX-Foundation.

the class ConfirmDialog method createNoBtn.

@SuppressWarnings("serial")
private void createNoBtn() {
    noBtn = new Button();
    noBtn.addClassName("primary");
    noBtn.setText("Non");
    noBtn.setWidth("90px");
    noBtn.addClickListener(new ComponentEventListener<ClickEvent<Button>>() {

        @Override
        public void onComponentEvent(ClickEvent<Button> event) {
            dialog.close();
        }
    });
}
Also used : Button(com.vaadin.flow.component.button.Button) ClickEvent(com.vaadin.flow.component.ClickEvent)

Example 3 with ClickEvent

use of com.vaadin.flow.component.ClickEvent in project karnak by OsiriX-Foundation.

the class DicomWorkListView method buildClearBtn.

@SuppressWarnings("serial")
private void buildClearBtn() {
    clearBtn = new Button("Clear");
    clearBtn.getStyle().set("cursor", "pointer");
    clearBtn.addClickListener(new ComponentEventListener<ClickEvent<Button>>() {

        @Override
        public void onComponentEvent(ClickEvent<Button> event) {
            binderForWorkListQuery.readBean(workListQueryData);
        }
    });
}
Also used : Button(com.vaadin.flow.component.button.Button) ItemClickEvent(com.vaadin.flow.component.grid.ItemClickEvent) ClickEvent(com.vaadin.flow.component.ClickEvent)

Example 4 with ClickEvent

use of com.vaadin.flow.component.ClickEvent in project karnak by OsiriX-Foundation.

the class DicomWorkListView method buildQueryBtn.

@SuppressWarnings("serial")
private void buildQueryBtn() {
    queryBtn = new Button("Query");
    queryBtn.getStyle().set("cursor", "pointer");
    queryBtn.setEnabled(false);
    queryBtn.addClassName("stroked-button");
    queryBtn.addClickListener(new ComponentEventListener<ClickEvent<Button>>() {

        @Override
        public void onComponentEvent(ClickEvent<Button> event) {
            executeQuery();
        }
    });
}
Also used : Button(com.vaadin.flow.component.button.Button) ItemClickEvent(com.vaadin.flow.component.grid.ItemClickEvent) ClickEvent(com.vaadin.flow.component.ClickEvent)

Example 5 with ClickEvent

use of com.vaadin.flow.component.ClickEvent in project aire-components by aire-ux.

the class TopologyView method createRestartButtonMenu.

private Button createRestartButtonMenu() {
    val button = new Button("Restart", VaadinIcon.REFRESH.create());
    button.addThemeVariants(ButtonVariant.LUMO_TERTIARY);
    registerLifecycleItem(button, Lifecycle.State.Active);
    button.addClickListener((ComponentEventListener<ClickEvent<Button>>) event -> {
        Overlays.open(this, ModuleScheduleOverlay.class, Mode.Scheduling, getZephyr().getKernel(), getSelectedModule(), Actions.Stop);
    });
    return button;
}
Also used : lombok.val(lombok.val) ComponentEventListener(com.vaadin.flow.component.ComponentEventListener) Mode(io.sunshower.zephyr.management.ModuleScheduleOverlay.Mode) MenuBar(com.vaadin.flow.component.menubar.MenuBar) Getter(lombok.Getter) MenuBarVariant(com.vaadin.flow.component.menubar.MenuBarVariant) CanvasEvent(io.sunshower.zephyr.ui.canvas.listeners.CanvasEvent) Registration(com.vaadin.flow.shared.Registration) CondensationUtilities(io.sunshower.zephyr.condensation.CondensationUtilities) SetAllCellAttributesAction(io.sunshower.zephyr.ui.canvas.actions.SetAllCellAttributesAction) HashMap(java.util.HashMap) ContextMenu(io.sunshower.zephyr.ui.components.ContextMenu) Route(com.vaadin.flow.router.Route) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) EventType(io.sunshower.zephyr.ui.canvas.listeners.VertexEvent.EventType) Coordinate(io.zephyr.kernel.Coordinate) Vertex(io.sunshower.zephyr.ui.canvas.Vertex) Overlays(io.sunshower.zephyr.ui.components.Overlays) Map(java.util.Map) Canvas(io.sunshower.zephyr.ui.canvas.Canvas) CellAttributes(io.sunshower.zephyr.ui.canvas.CellAttributes) Zephyr(io.zephyr.cli.Zephyr) ButtonVariant(com.vaadin.flow.component.button.ButtonVariant) AddVerticesAction(io.sunshower.zephyr.ui.canvas.actions.AddVerticesAction) EnumMap(java.util.EnumMap) lombok.val(lombok.val) VaadinIcon(com.vaadin.flow.component.icon.VaadinIcon) Breadcrumb(io.sunshower.zephyr.ui.controls.Breadcrumb) ClickEvent(com.vaadin.flow.component.ClickEvent) VertexTemplate(io.sunshower.zephyr.ui.canvas.VertexTemplate) Actions(io.zephyr.kernel.module.ModuleLifecycle.Actions) CanvasReadyEvent(io.sunshower.zephyr.ui.canvas.CanvasReadyEvent) Edge(io.sunshower.zephyr.ui.canvas.Edge) Serializable(java.io.Serializable) Model(io.sunshower.zephyr.ui.canvas.Model) Objects(java.util.Objects) Button(com.vaadin.flow.component.button.Button) List(java.util.List) ConnectVerticesAction(io.sunshower.zephyr.ui.canvas.actions.ConnectVerticesAction) Lifecycle(io.zephyr.kernel.Lifecycle) ModuleCoordinate(io.zephyr.kernel.core.ModuleCoordinate) MainView(io.sunshower.zephyr.MainView) AddVertexTemplateAction(io.sunshower.zephyr.ui.canvas.actions.AddVertexTemplateAction) EdgeTemplate(io.sunshower.zephyr.ui.canvas.EdgeTemplate) Module(io.zephyr.kernel.Module) Button(com.vaadin.flow.component.button.Button) ClickEvent(com.vaadin.flow.component.ClickEvent)

Aggregations

ClickEvent (com.vaadin.flow.component.ClickEvent)13 Button (com.vaadin.flow.component.button.Button)12 ComponentEventListener (com.vaadin.flow.component.ComponentEventListener)5 ButtonVariant (com.vaadin.flow.component.button.ButtonVariant)5 Registration (com.vaadin.flow.shared.Registration)5 ItemClickEvent (com.vaadin.flow.component.grid.ItemClickEvent)3 VaadinIcon (com.vaadin.flow.component.icon.VaadinIcon)3 MenuBar (com.vaadin.flow.component.menubar.MenuBar)3 MenuBarVariant (com.vaadin.flow.component.menubar.MenuBarVariant)3 Route (com.vaadin.flow.router.Route)3 MainView (io.sunshower.zephyr.MainView)3 CondensationUtilities (io.sunshower.zephyr.condensation.CondensationUtilities)3 Mode (io.sunshower.zephyr.management.ModuleScheduleOverlay.Mode)3 Canvas (io.sunshower.zephyr.ui.canvas.Canvas)3 CanvasReadyEvent (io.sunshower.zephyr.ui.canvas.CanvasReadyEvent)3 CellAttributes (io.sunshower.zephyr.ui.canvas.CellAttributes)3 Edge (io.sunshower.zephyr.ui.canvas.Edge)3 EdgeTemplate (io.sunshower.zephyr.ui.canvas.EdgeTemplate)3 Model (io.sunshower.zephyr.ui.canvas.Model)3 Vertex (io.sunshower.zephyr.ui.canvas.Vertex)3