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>
com.foreach.across.modules.bootstrapui.elements.builder.AbstractHtmlSupportingNodeViewElementBuilder<T,SELF>
com.foreach.across.modules.bootstrapui.elements.builder.AbstractLinkSupportingNodeViewElementBuilder<ButtonViewElement,ButtonViewElementBuilder>
com.foreach.across.modules.bootstrapui.elements.builder.ButtonViewElementBuilder
- All Implemented Interfaces:
com.foreach.across.modules.web.ui.elements.builder.HtmlViewElementBuilder<ButtonViewElement,
,ButtonViewElementBuilder> com.foreach.across.modules.web.ui.ViewElementBuilder<ButtonViewElement>
public class ButtonViewElementBuilder
extends AbstractLinkSupportingNodeViewElementBuilder<ButtonViewElement,ButtonViewElementBuilder>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.foreach.across.modules.web.ui.ViewElementBuilderSupport
com.foreach.across.modules.web.ui.ViewElementBuilderSupport.ElementOrBuilder
Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.ViewElementBuilder
com.foreach.across.modules.web.ui.ViewElementBuilder.Wither<T extends com.foreach.across.modules.web.ui.ViewElementBuilder>
-
Field Summary
Fields inherited from class com.foreach.across.modules.web.ui.ViewElementBuilderSupport
customTemplate, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ButtonViewElement
createElement
(com.foreach.across.modules.web.ui.ViewElementBuilderContext builderContext) disable()
Changes state to disabled.icon
(com.foreach.across.modules.web.ui.ViewElement icon) Set the icon as aViewElement
to use for the button.icon
(com.foreach.across.modules.web.ui.ViewElementBuilder icon) Set the icon as aViewElementBuilder
to use for the button.iconLeft()
Show the icon the left side of the text (if an icon is used).iconOnly()
Converts the button to a button with only an icon.iconOnly
(boolean iconOnly) Set if the button is only an icon or not.iconOnly
(com.foreach.across.modules.web.ui.ViewElement icon) Set the icon as aViewElement
to use for the button and sets the button as only an icon.iconOnly
(com.foreach.across.modules.web.ui.ViewElementBuilder icon) Set the icon as aViewElementBuilder
to use for the button and sets the button as only an icon.Show the icon on the right side of the text (if an icon is used).link()
Changes type and style to link.Changes type and style to link and sets the url.state
(ButtonViewElement.State state) submit()
Changes to submit button.Set the button text.Set the button title attribute.type
(ButtonViewElement.Type type) Methods inherited from class com.foreach.across.modules.bootstrapui.elements.builder.AbstractLinkSupportingNodeViewElementBuilder
buildLink, linkBuilder
Methods inherited from class com.foreach.across.modules.bootstrapui.elements.builder.AbstractHtmlSupportingNodeViewElementBuilder
escapeHtml, isEscapeHtml, resolveTextElement, toTextElement
Methods inherited from class com.foreach.across.modules.web.ui.elements.builder.AbstractNodeViewElementBuilder
apply, attribute, attributes, clearAttributes, css, htmlId, removeAttribute, removeCss
Methods inherited from class com.foreach.across.modules.web.ui.elements.builder.ContainerViewElementBuilderSupport
add, add, addAll, addFirst, addFirst, sort
Methods inherited from class com.foreach.across.modules.web.ui.ViewElementBuilderSupport
build, configure, customTemplate, elementSupplier, elementSupplier, name, postProcess, postProcessor, registerWebResources, with
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.foreach.across.modules.web.ui.elements.builder.HtmlViewElementBuilder
data, removeData
Methods inherited from interface com.foreach.across.modules.web.ui.ViewElementBuilder
andThen, build, doWith, map, map, postProcess, postProcess
-
Constructor Details
-
ButtonViewElementBuilder
public ButtonViewElementBuilder()
-
-
Method Details
-
iconOnly
Set the icon as aViewElement
to use for the button and sets the button as only an icon.- Parameters:
icon
- ViewElement- Returns:
- builder instance
-
iconOnly
Set the icon as aViewElementBuilder
to use for the button and sets the button as only an icon.- Parameters:
icon
- ViewElementBuilder- Returns:
- builder instance
-
icon
Set the icon as aViewElement
to use for the button.- Parameters:
icon
- ViewElement- Returns:
- builder instance
-
icon
Set the icon as aViewElementBuilder
to use for the button.- Parameters:
icon
- ViewElementBuilder- Returns:
- builder instance
-
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
Set if the button is only an icon or not.- Parameters:
iconOnly
- true if button should only display an icon- Returns:
- builder instance
-
iconRight
Show the icon on the right side of the text (if an icon is used).- Returns:
- builder instance
-
iconLeft
Show the icon the left side of the text (if an icon is used).- Returns:
- builder instance
-
text
Set the button text.- Parameters:
text
- for the button- Returns:
- builder instance
-
title
Set the button title attribute.- Parameters:
title
- attribute- Returns:
- builder instance
-
url
-
submit
Changes to submit button.- Returns:
- builder instance
-
link
Changes type and style to link and sets the url.- Returns:
- builder instance
-
link
Changes type and style to link.- Returns:
- builder instance
-
type
-
disable
Changes state to disabled.- Returns:
- builder instance
-
state
-
style
-
size
-
createElement
protected ButtonViewElement createElement(com.foreach.across.modules.web.ui.ViewElementBuilderContext builderContext) - Specified by:
createElement
in classcom.foreach.across.modules.web.ui.ViewElementBuilderSupport<ButtonViewElement,
ButtonViewElementBuilder>
-