Package org.linkki.core.ui.pmo
Class ButtonPmoBuilder
- java.lang.Object
-
- org.linkki.core.ui.pmo.ButtonPmoBuilder
-
public class ButtonPmoBuilder extends Object
Builder to create aButtonPmowith a fluent API.icon(Icon)must be called beforeget()as buttons are not created without an icon
-
-
Constructor Summary
Constructors Constructor Description ButtonPmoBuilder(org.linkki.util.handler.Handler onClickAction)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ButtonPmoBuilderaction(org.linkki.util.handler.Handler onClickAction)ButtonPmoget()ButtonPmoBuildericon(com.vaadin.flow.component.icon.Icon buttonIcon)ButtonPmoBuildericon(com.vaadin.flow.component.icon.IconFactory buttonIconFactory)static ButtonPmonewAddButton(org.linkki.util.handler.Handler onClickAction)Creates a newButtonPmofor an add button and returns it.static ButtonPmonewDeleteButton(org.linkki.util.handler.Handler onClickAction)Creates a newButtonPmofor a delete button and returns it.static ButtonPmonewEditButton(org.linkki.util.handler.Handler onClickAction)Creates a newButtonPmofor an edit button and returns it.
-
-
-
Method Detail
-
newEditButton
public static ButtonPmo newEditButton(org.linkki.util.handler.Handler onClickAction)
Creates a newButtonPmofor an edit button and returns it.- Parameters:
onClickAction- the action that is applied when the button is clicked- Implementation Requirements:
- If used directly in getter methods, like in
ContainerPmo.getAddItemButtonPmo(), this component's context can't be removed byBindingContext.removeBindingsForPmo(Object). This can be avoided by always returning the same instance ofButtonPmo.
-
newAddButton
public static ButtonPmo newAddButton(org.linkki.util.handler.Handler onClickAction)
Creates a newButtonPmofor an add button and returns it.- Parameters:
onClickAction- the action that is applied when the button is clicked- Implementation Requirements:
- If used directly in getter methods, like in
ContainerPmo.getAddItemButtonPmo(), this component's context can't be removed byBindingContext.removeBindingsForPmo(Object). This can be avoided by always returning the same instance ofButtonPmo.
-
newDeleteButton
public static ButtonPmo newDeleteButton(org.linkki.util.handler.Handler onClickAction)
Creates a newButtonPmofor a delete button and returns it.- Parameters:
onClickAction- the action that is applied when the button is clicked- Implementation Requirements:
- If used directly in getter methods, like in
ContainerPmo.getAddItemButtonPmo(), this component's context can't be removed byBindingContext.removeBindingsForPmo(Object). This can be avoided by always returning the same instance ofButtonPmo.
-
action
public static ButtonPmoBuilder action(org.linkki.util.handler.Handler onClickAction)
-
icon
public ButtonPmoBuilder icon(com.vaadin.flow.component.icon.Icon buttonIcon)
-
icon
public ButtonPmoBuilder icon(com.vaadin.flow.component.icon.IconFactory buttonIconFactory)
-
get
public ButtonPmo get()
-
-