Class ButtonPmoBuilder


  • public class ButtonPmoBuilder
    extends Object
    Builder to create a ButtonPmo with a fluent API. icon(Icon) must be called before get() as buttons are not created without an icon
    • Constructor Detail

      • ButtonPmoBuilder

        public ButtonPmoBuilder​(org.linkki.util.handler.Handler onClickAction)
    • Method Detail

      • newDeleteButton

        public static ButtonPmo newDeleteButton​(org.linkki.util.handler.Handler onClickAction)
        Creates a new ButtonPmo for 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 by BindingContext.removeBindingsForPmo(Object). This can be avoided by always returning the same instance of ButtonPmo.
      • 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)