this class provides commons functionality and methods used in different implementations of a button
B
The button subclass being wrapped
this class provide a set of factory methods to create simple buttons with different styles and a combination of a text and icon.
By default this Button component will open a dropdown menu when clicked
See also :
This class is used to group buttons in a set of sub-groups to form a toolbar
See also :
See also :
public B setTextContent(String text)
an instance of B implementation extending from BaseButton
public B setText(String text)
an instance of B implementation extending from BaseButton
public HTMLElement getClickableElement()
the element that will receive click events when click listeners ar added to this component
public B circle()
dui_circle css style
same Button instance.
public B setIcon(Icon<?> icon)
public SpanElement getTextElement()
a SpanElement that holds the button text.
public B withTextElement(ChildHandler<B, SpanElement> handler)
handler
a ChildHandler to apply the customization
same button instance
public B withTextElement()
same button instance
public B withIconElement(ChildHandler<B, Icon<?>> handler)
handler
a ChildHandler to apply the customization
same button instance
public B withIconElement()
same button instance
public B withBodyElement(ChildHandler<B, DivElement> handler)
handler
a ChildHandler to apply the customization
same button instance
public B setReversed(boolean reversed)
reversed
true to order text to the left and icon to the right, false icon to the right and text to the left
same button instance
public void Button()
public void Button(String text)
text
String, the button text
public void Button(Icon<?> icon)
icon
The button icon
public void Button(String text, Icon<?> icon)
text
The button text
icon
The button icon
public static Button create()
new Button instance
public static Button create(String text)
text
The button text
new Button instance
public static Button create(Icon<?> icon)
icon
the button icon
new Button instance
public static Button create(String text, Icon<?> icon)
text
a String object
icon
the button icon
new Button instance
public static Button create(Icon<?> icon, String text)
icon
the button icon
text
a String object
new Button instance
public void LinkButton()
public void LinkButton(String text)
text
String, the button text
public void LinkButton(Icon<?> icon)
icon
The button icon
public void LinkButton(Icon<?> icon, String text)
icon
The button icon
text
the button text
public static LinkButton create()
new Button instance
public static LinkButton create(String text)
text
String button text
new Button instance
public static LinkButton create(Icon<?> icon)
icon
Icon , the button icon
new Button instance
public LinkButton withAnchorElement(ChildHandler<LinkButton, AnchorElement> handler)
handler
a ChildHandler that applies the customization.
same LinkButton instance
public LinkButton setHref(String href)
href
the href attribute value
same LinkButton instance
public LinkButton removeHref()
same LinkButton instance
public void DropdownButton(T button, Menu<V> menu)
button
The button to be used as dropdown menu target
menu
The Menu to be used as a dropdown menu
public static DropdownButton<T, V> create(T button, Menu<V> menu)
button
The button to be used as dropdown menu target
menu
The Menu to be used as a dropdown menu
T
a T class
V
a V class
new DropdownButton instance
public T getButton()
The button component of this DropdownButton instance.
public Menu<V> getMenu()
The menu component of this DropdownButton instance
public DropdownButton<T, V> withButton(ChildHandler<DropdownButton<T, V>, T> handler)
handler
a ChildHandler that applies the customization.
same DropdownButton instance
public DropdownButton<T, V> withMenu(ChildHandler<DropdownButton<T, V>, Menu<V>> handler)
handler
a ChildHandler that applies the customization.
same DropdownButton instance
public void ButtonsToolbar()
public static ButtonsToolbar create()
a new ButtonsToolbar instance
public ButtonsToolbar appendChild(ButtonsGroup group)
public ButtonsToolbar appendChild(ButtonsGroup[] groups)
groups
same ButtonsToolbar instance
public ButtonsToolbar appendChild(IsButton[] buttons)
public void ButtonsGroup()
public void ButtonsGroup(IsButton[] buttons)
buttons
The set of IsButton components to be appended to the ButtonsGroup
public static ButtonsGroup create()
public static ButtonsGroup create(IsButton[] buttons)
buttons
The set of IsButton components to be appended to the ButtonsGroup