|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.zion.jbuddy.bots.BotTarget com.zion.jbuddy.bots.BotMenu
public class BotMenu
Organizes targets (and other menus) into a hierarchy.
When a user opens a menu (usually via a command), its available targets and sub-menus, along with short descriptions of each (their titles), are presented to the user.
Constructor Summary | |
---|---|
BotMenu()
Creates a menu. |
Method Summary | |
---|---|
Object |
clone()
Returns an exact copy of this menu. |
BotCallSet |
getCalls()
Throws an UnsupportedOperationException , as menus may not
execute calls. |
RichContent |
getDescription()
Returns this menu's description. |
BotEventHandlerSet |
getEventHandlers()
Returns this menu's local event handlers. |
BotTargetSet |
getTargets()
Returns this menu's targets. |
boolean |
isShowBack()
Returns whether the back command is shown as a selection in this menu when a previously viewed menu exists in the user's menu history. |
boolean |
isShowCommands()
Returns whether this menu's available commands are presented to the user. |
boolean |
isShowTitle()
Returns whether this menu's title is shown when a user views this menu. |
void |
setDescription(RichContent description)
Sets this menu's description. |
void |
setShowBack(boolean showBack)
Sets whether the back command is shown as a selection in this menu when a previously viewed menu exists in the user's menu history. |
void |
setShowCommands(boolean isShowCommands)
Sets whether this menu's available commands are presented to the user. |
void |
setShowTitle(boolean isShowTitle)
Sets whether this menu's title is shown when a user views this menu. |
Methods inherited from class com.zion.jbuddy.bots.BotTarget |
---|
getCommand, getFilters, getID, getRoutes, getTitle, isDefault, setCommand, setDefault, setID, setTitle |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BotMenu()
Method Detail |
---|
public RichContent getDescription()
public void setDescription(RichContent description)
The description is displayed before the menu's contents when the menu is opened.
public boolean isShowBack()
public void setShowBack(boolean showBack)
The default value is true
.
public boolean isShowCommands()
public void setShowCommands(boolean isShowCommands)
false
to hide the commands/titles and
show only the menu description (which could be used to display the
available options in another manner).
The default value is true
.
public boolean isShowTitle()
public void setShowTitle(boolean isShowTitle)
The default value is true
.
public BotTargetSet getTargets()
These targets may only be triggered if the user is viewing this menu.
public BotEventHandlerSet getEventHandlers()
These event handlers can only be triggered if the user is viewing this menu.
public BotCallSet getCalls() throws UnsupportedOperationException
UnsupportedOperationException
, as menus may not
execute calls.
getCalls
in class BotTarget
UnsupportedOperationException
public Object clone()
clone
in class BotTarget
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |