Package org.patternfly.component.button
Class Button
- All Implemented Interfaces:
Container<HTMLElement,,Button> Finder<HTMLElement>,HasElement<HTMLElement,,Button> HasHTMLElement<HTMLElement,,Button> IsElement<HTMLElement>,TypedBuilder<HTMLElement,,Button> Component,WithIcon<HTMLElement,,Button> WithIconAndText<HTMLElement,,Button> WithProgress<HTMLElement,,Button> WithText<HTMLElement,,Button> Modifiers.Disabled<HTMLElement,,Button> Modifiers.Inline<HTMLElement,,Button> Modifiers.NoPadding<HTMLElement,,Button> Modifiers.Plain<HTMLElement,,Button> Modifiers.Secondary<HTMLElement,Button>
public class Button
extends BaseComponent<HTMLElement,Button>
implements Modifiers.Disabled<HTMLElement,Button>, Modifiers.Inline<HTMLElement,Button>, Modifiers.Plain<HTMLElement,Button>, Modifiers.NoPadding<HTMLElement,Button>, Modifiers.Secondary<HTMLElement,Button>, WithIcon<HTMLElement,Button>, WithText<HTMLElement,Button>, WithIconAndText<HTMLElement,Button>, WithProgress<HTMLElement,Button>
A button is a box area or text that communicates and triggers user actions when clicked or selected. Buttons can be used to
communicate and immediately trigger actions a user can take in an application, like submitting a form, canceling a process,
or creating a new object. Buttons can also be used to take a user to a new location, like another page inside a web
application, or an external site such as help or documentation.
-
Method Summary
Modifier and TypeMethodDescriptionblock()static Buttonbutton()static Buttonstatic ButtonCreates a button with an<a/>tag.static ButtonCreates a button with an<a/>tag.static <E extends HTMLElement>
Buttonbutton(HTMLContainerBuilder<E> builder) control()danger()disabled(boolean disabled) iconAndText(Element icon, String text, IconPosition position) link()onClick(ComponentHandler<Button> actionHandler) primary()small()tertiary()Changes the text of this button.that()warning()Methods inherited from class org.patternfly.component.BaseComponent
componentType, elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, innerHtml, on, on, on, run, textContent, textNode, toggle, toggle, toggle, uniqueIdMethods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, titleMethods inherited from interface org.patternfly.style.Modifiers.Disabled
disabled, isDisabledMethods inherited from interface org.patternfly.style.Modifiers.Inline
inline, inlineMethods inherited from interface org.patternfly.style.Modifiers.NoPadding
noPadding, noPaddingMethods inherited from interface org.patternfly.style.Modifiers.Plain
plain, plainMethods inherited from interface org.patternfly.style.Modifiers.Secondary
secondary, secondaryMethods inherited from interface org.patternfly.component.WithIconAndText
iconAndText, iconAndTextMethods inherited from interface org.patternfly.component.WithProgress
inProgress, progress, progress, progress, startProgress, stopProgress, toggleProgress
-
Method Details
-
button
-
button
-
button
Creates a button with an<a/>tag. -
button
Creates a button with an<a/>tag. -
button
-
addBadge
-
add
-
icon
- Specified by:
iconin interfaceWithIcon<HTMLElement,Button>
-
removeIcon
- Specified by:
removeIconin interfaceWithIcon<HTMLElement,Button>
-
iconAndText
- Specified by:
iconAndTextin interfaceWithIconAndText<HTMLElement,Button>
-
text
Changes the text of this button. Prefer this method overHasElement.textContent(String), since this method doesn't remove a possible progress spinner.- Specified by:
textin interfaceWithText<HTMLElement,Button>
-
href
-
target
-
-
danger
-
tertiary
-
warning
-
small
-
link
-
control
-
block
-
callToAction
-
disabled
- Specified by:
disabledin interfaceModifiers.Disabled<HTMLElement,Button>
-
progress
- Specified by:
progressin interfaceWithProgress<HTMLElement,Button>
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,Button>
-
onClick
-