public class UIMessages extends Object
| Modifier and Type | Class and Description |
|---|---|
static class | UIMessages.MessageRepresents a single UI message with a unique identifier. |
| Constructor and Description |
|---|
UIMessages(int maxSize) |
| Modifier and Type | Method and Description |
|---|---|
int | addMessage(String message)Will remove an old message if over the max size. |
int | addMessageNoEscape(String message)Use if it includes a link. |
void | clear()Remove all messages from the queue. |
void | clearThrough(int id)Remove all messages up to and including the given id. |
int | getLastMessageID()The ID of the last message added, or -1 if never. |
List<UIMessages.Message> | getMessages()Newest last, or empty list. |
List<String> | getMessageStrings()Newest last, or empty list. |
boolean | isEmpty()Check if there are any messages. |
public UIMessages(int maxSize)
maxSize - the maximum number of messages to keeppublic int addMessage(String message)
public int addMessageNoEscape(String message)
public void clear()
public void clearThrough(int id)
id - message id to clear throughpublic int getLastMessageID()
public List<UIMessages.Message> getMessages()
public List<String> getMessageStrings()
public boolean isEmpty()