Package org.patternfly.component.button
Class Button
- java.lang.Object
-
- org.patternfly.component.BaseComponent<HTMLElement,Button>
-
- org.patternfly.component.button.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
-
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, id, innerHtml, 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 Detail
-
button
public static Button button()
-
button
public static Button button(String text, String href, String target)
Creates a button with an<a/>tag.
-
button
public static <E extends HTMLElement> Button button(HTMLContainerBuilder<E> builder)
-
icon
public Button icon(Element icon)
- Specified by:
iconin interfaceWithIcon<HTMLElement,Button>
-
removeIcon
public Button removeIcon()
- Specified by:
removeIconin interfaceWithIcon<HTMLElement,Button>
-
iconAndText
public Button iconAndText(Element icon, String text, IconPosition position)
- Specified by:
iconAndTextin interfaceWithIconAndText<HTMLElement,Button>
-
text
public Button text(String 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>
-
primary
public Button primary()
-
danger
public Button danger()
-
tertiary
public Button tertiary()
-
warning
public Button warning()
-
small
public Button small()
-
link
public Button link()
-
control
public Button control()
-
block
public Button block()
-
callToAction
public Button callToAction()
-
disabled
public Button disabled(boolean disabled)
- Specified by:
disabledin interfaceModifiers.Disabled<HTMLElement,Button>
-
progress
public Button progress(boolean inProgress, String label, Consumer<Spinner> spinnerConsumer)
- Specified by:
progressin interfaceWithProgress<HTMLElement,Button>
-
that
public Button that()
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,Button>
-
onClick
public Button onClick(ComponentHandler<Button> actionHandler)
-
-