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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionblock()
static Button
button()
static Button
static Button
Creates a button with an<a/>
tag.static Button
Creates 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, element
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAll
Methods 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, uniqueId
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, title
Methods inherited from interface org.patternfly.style.Modifiers.Disabled
disabled, isDisabled
Methods inherited from interface org.patternfly.style.Modifiers.Inline
inline, inline
Methods inherited from interface org.patternfly.style.Modifiers.NoPadding
noPadding, noPadding
Methods inherited from interface org.patternfly.style.Modifiers.Plain
plain, plain
Methods inherited from interface org.patternfly.style.Modifiers.Secondary
secondary, secondary
Methods inherited from interface org.patternfly.component.WithIconAndText
iconAndText, iconAndText
Methods 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:
icon
in interfaceWithIcon<HTMLElement,
Button>
-
removeIcon
- Specified by:
removeIcon
in interfaceWithIcon<HTMLElement,
Button>
-
iconAndText
- Specified by:
iconAndText
in 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:
text
in interfaceWithText<HTMLElement,
Button>
-
href
-
target
-
-
danger
-
tertiary
-
warning
-
small
-
link
-
control
-
block
-
callToAction
-
disabled
- Specified by:
disabled
in interfaceModifiers.Disabled<HTMLElement,
Button>
-
progress
- Specified by:
progress
in interfaceWithProgress<HTMLElement,
Button>
-
that
- Specified by:
that
in interfaceTypedBuilder<HTMLElement,
Button>
-
onClick
-