public class MessageBufferUpdater
extends java.lang.Object
Buffer
instance.Modifier and Type | Field and Description |
---|---|
static int |
NUM_COLORS
The number of supported colors.
|
Constructor and Description |
---|
MessageBufferUpdater(@NotNull CrossfireServerConnection crossfireServerConnection,
@NotNull Buffer buffer,
@NotNull java.awt.Color defaultColor,
@NotNull java.awt.Color selectionColor)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Releases resources.
|
static @NotNull java.lang.String |
getColorName(int index)
Returns the name of a color index.
|
void |
setColor(int index,
@NotNull java.awt.Color color)
Sets a color mapping.
|
void |
setTypes(@NotNull MessageTypes types)
Sets the message types to show.
|
public static final int NUM_COLORS
public MessageBufferUpdater(@NotNull @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull @NotNull Buffer buffer, @NotNull @NotNull java.awt.Color defaultColor, @NotNull @NotNull java.awt.Color selectionColor)
crossfireServerConnection
- the connection instancebuffer
- the buffer to updatedefaultColor
- the default color to use for undefined colors
indicesselectionColor
- the color for the selectionpublic void dispose()
@NotNull public static @NotNull java.lang.String getColorName(int index)
index
- the color indexpublic void setColor(int index, @NotNull @NotNull java.awt.Color color)
index
- the color index to changecolor
- the color to map topublic void setTypes(@NotNull @NotNull MessageTypes types)
types
- the types to show