Package io.keikai.ui
Class DropdownToolbarButton.Builder
- java.lang.Object
-
- io.keikai.ui.DropdownToolbarButton.Builder
-
- Enclosing class:
- DropdownToolbarButton
public static class DropdownToolbarButton.Builder extends Object
A builder to create aDropdownToolbarButton
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder(String key)
protected
Builder(String key, ToolbarButton... items)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DropdownToolbarButton
build()
Builds the toolbar button instance.static DropdownToolbarButton.Builder
create(AuxAction key)
Creates the builder with the given AuxAction.static DropdownToolbarButton.Builder
create(String key)
Creates the builder with the given key.static DropdownToolbarButton.Builder
create(String key, ToolbarButton... items)
Creates the builder with the given key with a list ofToolbarButton
.DropdownToolbarButton.Builder
items(ToolbarButton... items)
Sets the items to the dropdown button.DropdownToolbarButton.Builder
withIconClass(String iconClass)
Sets the icon class to the button.DropdownToolbarButton.Builder
withIconURI(String iconURI)
Sets the icon URI to the button.DropdownToolbarButton.Builder
withLabel(String label)
Sets the label to the button.DropdownToolbarButton.Builder
withTemplateURI(String templateURI)
Sets the template URI to the button.DropdownToolbarButton.Builder
withTooltip(String tooltip)
Sets the tooltip to the button.
-
-
-
Constructor Detail
-
Builder
protected Builder(String key, ToolbarButton... items)
-
Builder
protected Builder(String key)
-
-
Method Detail
-
create
public static DropdownToolbarButton.Builder create(AuxAction key)
Creates the builder with the given AuxAction.- Parameters:
key
- the action of AuxAction.- Returns:
-
create
public static DropdownToolbarButton.Builder create(String key)
Creates the builder with the given key.- Parameters:
key
- the button key.- Returns:
-
create
public static DropdownToolbarButton.Builder create(String key, ToolbarButton... items)
Creates the builder with the given key with a list ofToolbarButton
.- Parameters:
key
- the button key.items
- the list ofToolbarButton
.- Returns:
-
withIconURI
public DropdownToolbarButton.Builder withIconURI(String iconURI)
Sets the icon URI to the button.- Parameters:
iconURI
-- Returns:
-
withIconClass
public DropdownToolbarButton.Builder withIconClass(String iconClass)
Sets the icon class to the button. Note that, if no template specified, yet iconClass and iconURI is specified at the same time, iconURI would be ignored.- Parameters:
iconClass
-- Returns:
-
withTooltip
public DropdownToolbarButton.Builder withTooltip(String tooltip)
Sets the tooltip to the button.- Parameters:
tooltip
-- Returns:
-
withLabel
public DropdownToolbarButton.Builder withLabel(String label)
Sets the label to the button.- Parameters:
label
-- Returns:
-
withTemplateURI
public DropdownToolbarButton.Builder withTemplateURI(String templateURI)
Sets the template URI to the button.- Parameters:
templateURI
-- Returns:
-
items
public DropdownToolbarButton.Builder items(ToolbarButton... items)
Sets the items to the dropdown button.- Parameters:
items
-- Returns:
-
build
public DropdownToolbarButton build()
Builds the toolbar button instance.- Returns:
-
-