Search in sources :

Example 1 with TripletViewDeleteButtonPressedEvent

use of org.archcnl.ui.common.andtriplets.triplet.events.TripletViewDeleteButtonPressedEvent in project ArchCNL by Mari-Wie.

the class TripletView method addCreateRemoveButtons.

private void addCreateRemoveButtons() {
    HorizontalLayout buttons = new HorizontalLayout();
    buttons.add(new Button(new Icon(VaadinIcon.TRASH), click -> fireEvent(new TripletViewDeleteButtonPressedEvent(this))));
    buttons.add(new Button(new Icon(VaadinIcon.PLUS), click -> fireEvent(new AddTripletViewAfterButtonPressedEvent(this))));
    add(buttons);
    setVerticalComponentAlignment(Alignment.END, buttons);
}
Also used : ComponentEventListener(com.vaadin.flow.component.ComponentEventListener) ConceptListUpdateRequestedEvent(org.archcnl.ui.common.andtriplets.triplet.events.ConceptListUpdateRequestedEvent) VariableCreationRequestedEvent(org.archcnl.ui.common.andtriplets.triplet.events.VariableCreationRequestedEvent) Registration(com.vaadin.flow.shared.Registration) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout) AddTripletViewAfterButtonPressedEvent(org.archcnl.ui.common.andtriplets.triplet.events.AddTripletViewAfterButtonPressedEvent) VaadinIcon(com.vaadin.flow.component.icon.VaadinIcon) ComponentEvent(com.vaadin.flow.component.ComponentEvent) PredicateSelectedEvent(org.archcnl.ui.common.andtriplets.triplet.events.PredicateSelectedEvent) RelationListUpdateRequestedEvent(org.archcnl.ui.common.andtriplets.triplet.events.RelationListUpdateRequestedEvent) TripletViewDeleteButtonPressedEvent(org.archcnl.ui.common.andtriplets.triplet.events.TripletViewDeleteButtonPressedEvent) Button(com.vaadin.flow.component.button.Button) Icon(com.vaadin.flow.component.icon.Icon) ConceptSelectedEvent(org.archcnl.ui.common.andtriplets.triplet.events.ConceptSelectedEvent) VariableListUpdateRequestedEvent(org.archcnl.ui.common.andtriplets.triplet.events.VariableListUpdateRequestedEvent) VariableSelectedEvent(org.archcnl.ui.common.andtriplets.triplet.events.VariableSelectedEvent) AddTripletViewAfterButtonPressedEvent(org.archcnl.ui.common.andtriplets.triplet.events.AddTripletViewAfterButtonPressedEvent) Button(com.vaadin.flow.component.button.Button) VaadinIcon(com.vaadin.flow.component.icon.VaadinIcon) Icon(com.vaadin.flow.component.icon.Icon) TripletViewDeleteButtonPressedEvent(org.archcnl.ui.common.andtriplets.triplet.events.TripletViewDeleteButtonPressedEvent) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout)

Aggregations

ComponentEvent (com.vaadin.flow.component.ComponentEvent)1 ComponentEventListener (com.vaadin.flow.component.ComponentEventListener)1 Button (com.vaadin.flow.component.button.Button)1 Icon (com.vaadin.flow.component.icon.Icon)1 VaadinIcon (com.vaadin.flow.component.icon.VaadinIcon)1 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)1 Registration (com.vaadin.flow.shared.Registration)1 AddTripletViewAfterButtonPressedEvent (org.archcnl.ui.common.andtriplets.triplet.events.AddTripletViewAfterButtonPressedEvent)1 ConceptListUpdateRequestedEvent (org.archcnl.ui.common.andtriplets.triplet.events.ConceptListUpdateRequestedEvent)1 ConceptSelectedEvent (org.archcnl.ui.common.andtriplets.triplet.events.ConceptSelectedEvent)1 PredicateSelectedEvent (org.archcnl.ui.common.andtriplets.triplet.events.PredicateSelectedEvent)1 RelationListUpdateRequestedEvent (org.archcnl.ui.common.andtriplets.triplet.events.RelationListUpdateRequestedEvent)1 TripletViewDeleteButtonPressedEvent (org.archcnl.ui.common.andtriplets.triplet.events.TripletViewDeleteButtonPressedEvent)1 VariableCreationRequestedEvent (org.archcnl.ui.common.andtriplets.triplet.events.VariableCreationRequestedEvent)1 VariableListUpdateRequestedEvent (org.archcnl.ui.common.andtriplets.triplet.events.VariableListUpdateRequestedEvent)1 VariableSelectedEvent (org.archcnl.ui.common.andtriplets.triplet.events.VariableSelectedEvent)1