Class ButtonViewElementBuilder

java.lang.Object
com.foreach.across.modules.web.ui.ViewElementBuilderSupport<T,SELF>
com.foreach.across.modules.web.ui.elements.builder.ContainerViewElementBuilderSupport<T,SELF>
com.foreach.across.modules.web.ui.elements.builder.AbstractNodeViewElementBuilder<T,SELF>
All Implemented Interfaces:
com.foreach.across.modules.web.ui.elements.builder.HtmlViewElementBuilder<ButtonViewElement,ButtonViewElementBuilder>, com.foreach.across.modules.web.ui.ViewElementBuilder<ButtonViewElement>

  • Constructor Details

    • ButtonViewElementBuilder

      public ButtonViewElementBuilder()
  • Method Details

    • iconOnly

      public ButtonViewElementBuilder iconOnly(com.foreach.across.modules.web.ui.ViewElement icon)
      Set the icon as a ViewElement to use for the button and sets the button as only an icon.
      Parameters:
      icon - ViewElement
      Returns:
      builder instance
    • iconOnly

      public ButtonViewElementBuilder iconOnly(com.foreach.across.modules.web.ui.ViewElementBuilder icon)
      Set the icon as a ViewElementBuilder to use for the button and sets the button as only an icon.
      Parameters:
      icon - ViewElementBuilder
      Returns:
      builder instance
    • icon

      public ButtonViewElementBuilder icon(com.foreach.across.modules.web.ui.ViewElement icon)
      Set the icon as a ViewElement to use for the button.
      Parameters:
      icon - ViewElement
      Returns:
      builder instance
    • icon

      public ButtonViewElementBuilder icon(com.foreach.across.modules.web.ui.ViewElementBuilder icon)
      Set the icon as a ViewElementBuilder to use for the button.
      Parameters:
      icon - ViewElementBuilder
      Returns:
      builder instance
    • iconOnly

      public ButtonViewElementBuilder iconOnly()
      Converts the button to a button with only an icon. Any text set will be used as title attribute or as aria-label if a title attribute it set explicitly.
      Returns:
      builder instance
    • iconOnly

      public ButtonViewElementBuilder iconOnly(boolean iconOnly)
      Set if the button is only an icon or not.
      Parameters:
      iconOnly - true if button should only display an icon
      Returns:
      builder instance
    • iconRight

      public ButtonViewElementBuilder iconRight()
      Show the icon on the right side of the text (if an icon is used).
      Returns:
      builder instance
    • iconLeft

      public ButtonViewElementBuilder iconLeft()
      Show the icon the left side of the text (if an icon is used).
      Returns:
      builder instance
    • text

      public ButtonViewElementBuilder text(String text)
      Set the button text.
      Parameters:
      text - for the button
      Returns:
      builder instance
    • title

      public ButtonViewElementBuilder title(String title)
      Set the button title attribute.
      Parameters:
      title - attribute
      Returns:
      builder instance
    • url

      public ButtonViewElementBuilder url(String url)
    • submit

      public ButtonViewElementBuilder submit()
      Changes to submit button.
      Returns:
      builder instance
    • link

      public ButtonViewElementBuilder link(String url)
      Changes type and style to link and sets the url.
      Returns:
      builder instance
    • link

      public ButtonViewElementBuilder link()
      Changes type and style to link.
      Returns:
      builder instance
    • type

    • disable

      public ButtonViewElementBuilder disable()
      Changes state to disabled.
      Returns:
      builder instance
    • state

    • style

      public ButtonViewElementBuilder style(Style style)
    • size

      public ButtonViewElementBuilder size(Size size)
    • createElement

      protected ButtonViewElement createElement(com.foreach.across.modules.web.ui.ViewElementBuilderContext builderContext)
      Specified by:
      createElement in class com.foreach.across.modules.web.ui.ViewElementBuilderSupport<ButtonViewElement,ButtonViewElementBuilder>