Class MessageBufferUpdater

java.lang.Object
com.realtime.crossfire.jxclient.gui.log.MessageBufferUpdater

public class MessageBufferUpdater extends Object
Adds drawinfo, drawextinfo, and query messages to a Buffer instance.
  • Field Details

    • NUM_COLORS

      public static final int NUM_COLORS
      The 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 instance
      buffer - the buffer to update
      defaultColor - the default color to use for undefined colors indices
      selectionColor - the color for the selection
  • Method Details

    • dispose

      public void dispose()
      Releases resources.
    • getColorName

      @NotNull public static @NotNull String getColorName(int index)
      Returns the name of a color index.
      Parameters:
      index - the color index
      Returns:
      the color name
    • setColor

      public void setColor(int index, @NotNull @NotNull Color color)
      Sets a color mapping.
      Parameters:
      index - the color index to change
      color - the color to map to
    • setTypes

      public void setTypes(@NotNull @NotNull MessageTypes types)
      Sets the message types to show.
      Parameters:
      types - the types to show