Class MessageBufferUpdater
java.lang.Object
com.realtime.crossfire.jxclient.gui.log.MessageBufferUpdater
Adds drawinfo, drawextinfo, and query messages to a
Buffer instance.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMessageBufferUpdater(@NotNull CrossfireServerConnection crossfireServerConnection, @NotNull Buffer buffer, @NotNull Color defaultColor, @NotNull Color selectionColor) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Releases resources.static @NotNull StringgetColorName(int index) Returns the name of a color index.voidSets a color mapping.voidsetTypes(@NotNull MessageTypes types) Sets the message types to show.
-
Field Details
-
NUM_COLORS
public static final int NUM_COLORSThe number of supported colors.- See Also:
-
-
Constructor Details
-
MessageBufferUpdater
public MessageBufferUpdater(@NotNull @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull @NotNull Buffer buffer, @NotNull @NotNull Color defaultColor, @NotNull @NotNull Color selectionColor) Creates a new instance.- Parameters:
crossfireServerConnection- the connection instancebuffer- the buffer to updatedefaultColor- the default color to use for undefined colors indicesselectionColor- the color for the selection
-
-
Method Details
-
dispose
public void dispose()Releases resources. -
getColorName
Returns the name of a color index.- Parameters:
index- the color index- Returns:
- the color name
-
setColor
Sets a color mapping.- Parameters:
index- the color index to changecolor- the color to map to
-
setTypes
Sets the message types to show.- Parameters:
types- the types to show
-