NiftyControlChatControlpublic interface Chat extends NiftyControl
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPlayer(java.lang.String playerName,
NiftyImage playerIcon) |
This method is called when a new player enters the room.
|
void |
addPlayer(java.lang.String playerName,
NiftyImage playerIcon,
java.lang.String style) |
This method is called when a new player enters the room.
|
java.util.List<ChatEntryModelClass> |
getLines() |
This method returns all the chatlines in the chat.
|
java.util.List<ChatEntryModelClass> |
getPlayers() |
This method returns the current list of players in the chat.
|
void |
receivedChatLine(java.lang.String text,
NiftyImage icon) |
This method is called when a chat line is received which should be displayed in
the chat control.
|
void |
receivedChatLine(java.lang.String text,
NiftyImage icon,
java.lang.String style) |
This method is called when a chat line is received which should be displayed in
the chat control.
|
void |
removePlayer(java.lang.String playerName) |
This method is called when a player leaves the rome and needs to be
removed from the list.
|
void |
update() |
Updates the lists to reflect any changes made to them,
outside of the addPlayer, removePlayer and
|
disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, layoutCallback, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidthvoid receivedChatLine(@Nonnull
java.lang.String text,
@Nullable
NiftyImage icon)
text - The text to display.icon - Optionally, an icon can be supplied which is then displayed at
the start of the chat line.void receivedChatLine(@Nonnull
java.lang.String text,
@Nullable
NiftyImage icon,
@Nullable
java.lang.String style)
text - The text to display.icon - Optionally, an icon can be supplied which is then displayed at
the start of the chat line.style - The custom style for this particular chatline.void addPlayer(@Nonnull
java.lang.String playerName,
@Nullable
NiftyImage playerIcon)
playerName - The player to add.playerIcon - Optionally, an icon can be supplied which is then displayed in
front of the player name.void addPlayer(@Nonnull
java.lang.String playerName,
@Nullable
NiftyImage playerIcon,
@Nullable
java.lang.String style)
playerName - The player to add.playerIcon - Optionally, an icon can be supplied which is then displayed in
front of the player name.style - The custom style for this player. This style is depicted in the
player list.void removePlayer(@Nonnull
java.lang.String playerName)
playerName - The player name to remove.@Nonnull java.util.List<ChatEntryModelClass> getPlayers()
@Nonnull java.util.List<ChatEntryModelClass> getLines()
void update()
Copyright © 2018. All rights reserved.