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,Modifiers.Disabled<HTMLElement,Button>,Modifiers.Inline<HTMLElement,Button>,Modifiers.Plain<HTMLElement,Button>,WithProgress<HTMLElement,Button>
public class Button extends BaseComponent<HTMLElement,Button> implements Modifiers.Disabled<HTMLElement,Button>, Modifiers.Inline<HTMLElement,Button>, Modifiers.Plain<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, addAll, addAll, addAll, addAll, addAll
-
Methods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, css, id, id, innerHtml, on, textContent, toggle, toggle, toggle
-
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, title
-
Methods inherited from interface org.patternfly.core.Modifiers.Disabled
disabled
-
Methods inherited from interface org.patternfly.core.Modifiers.Inline
inline, inline
-
Methods inherited from interface org.patternfly.core.Modifiers.Plain
plain, plain
-
Methods inherited from interface org.patternfly.core.WithProgress
inProgress, inProgress, inProgress, isInProgress, startProgress, stopProgress, toggleProgress
-
-
-
-
Method Detail
-
button
public static Button button()
-
button
public static Button button(PredefinedIcon icon)
-
button
public static Button button(PredefinedIcon icon, String label)
-
button
public static Button button(InlineIcon icon)
-
button
public static Button button(InlineIcon icon, String label)
-
button
public static Button button(String text, String href, String target)
Creates a button with an<a/>tag.
-
button
public static Button button(ButtonElement element)
-
that
public Button that()
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,Button>
-
addIcon
public Button addIcon(PredefinedIcon icon)
-
addIcon
public Button addIcon(InlineIcon icon)
-
addIconAndText
public Button addIconAndText(PredefinedIcon icon, String text)
-
addIconAndText
public Button addIconAndText(InlineIcon icon, String text)
-
addIconAndText
public Button addIconAndText(String iconClass, String text, IconPosition position)
-
addIconAndText
public Button addIconAndText(PredefinedIcon icon, String text, IconPosition position)
-
addIconAndText
public Button addIconAndText(InlineIcon icon, String text, IconPosition position)
-
primary
public Button primary()
-
secondary
public Button secondary()
-
danger
public Button danger()
-
tertiary
public Button tertiary()
-
warning
public Button warning()
-
small
public Button small()
-
link
public Button link()
-
noPadding
public Button noPadding()
-
control
public Button control()
-
block
public Button block()
-
callToAction
public Button callToAction()
-
disabled
public Button disabled(boolean disabled)
Description copied from interface:Modifiers.DisabledAdds/removes modifier(disabled)- Specified by:
disabledin interfaceModifiers.Disabled<HTMLElement,Button>
-
onAction
public Button onAction(ActionHandler<Button> actionHandler)
-
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.
-
inProgress
public Button inProgress(boolean inProgress, String label, Consumer<Spinner> spinnerConsumer)
- Specified by:
inProgressin interfaceWithProgress<HTMLElement,Button>
-
-