T - implementing typeE - menu builder typepublic abstract class AbstractButtonBuilder<T,E extends AbstractInlineMenuBuilder> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ButtonCallback |
callback |
protected InlineMenuRowBuilder<E> |
parent |
protected String |
text |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractButtonBuilder(InlineMenuRowBuilder<E> parent) |
protected |
AbstractButtonBuilder(InlineMenuRowBuilder<E> parent,
int index)
Deprecated.
|
protected |
AbstractButtonBuilder(InlineMenuRowBuilder<E> parent,
int index,
String text)
Deprecated.
|
protected |
AbstractButtonBuilder(InlineMenuRowBuilder<E> parent,
String text) |
| Modifier and Type | Method and Description |
|---|---|
abstract InlineMenuRowBuilder<E> |
build()
Build the current builder
|
abstract InlineMenuButton |
buildButton() |
InlineMenu |
buildMenu()
Build the button, build the parent's row, build the menu
|
E |
buildRow()
Build the current button, delegate to parent's build method
|
T |
buttonCallback(ButtonCallback callback)
Set the button callback of this builder.
|
protected abstract T |
instance() |
InlineMenuRowBuilder<E> |
newRow()
Build the current button, delegate to parent's newRow method
|
protected <BT extends InlineMenuButton> |
processButton(BT button) |
T |
text(String text)
Set the text of the current button.
|
protected final InlineMenuRowBuilder<E extends AbstractInlineMenuBuilder> parent
protected String text
protected ButtonCallback callback
protected AbstractButtonBuilder(InlineMenuRowBuilder<E> parent)
protected AbstractButtonBuilder(InlineMenuRowBuilder<E> parent, String text)
@Deprecated protected AbstractButtonBuilder(InlineMenuRowBuilder<E> parent, int index)
@Deprecated protected AbstractButtonBuilder(InlineMenuRowBuilder<E> parent, int index, String text)
protected abstract T instance()
public abstract InlineMenuRowBuilder<E> build()
public abstract InlineMenuButton buildButton()
public T text(String text)
text - Text to be setpublic T buttonCallback(ButtonCallback callback)
callback - Callback to be setpublic InlineMenuRowBuilder<E> newRow()
InlineMenuRowBuilder.newRow()public E buildRow()
InlineMenuRowBuilder.build()public InlineMenu buildMenu()
InlineMenuRowBuilder.build(),
AbstractInlineMenuBuilder.buildMenu()protected <BT extends InlineMenuButton> BT processButton(BT button)
Copyright © 2017. All rights reserved.