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

public class Parser extends Object
Parser for parsing drawextinfo messages received from a Crossfire server to update a Buffer instance.
  • Constructor Details

    • Parser

      public Parser(@NotNull @NotNull Color selectionColor)
      Creates a new instance.
      Parameters:
      selectionColor - the selection color
  • Method Details

    • parse

      public void parse(@NotNull @NotNull CharSequence text, int type, int subtype, @NotNull @NotNull Color defaultColor, @NotNull @NotNull Buffer buffer)
      Parses a text message.
      Parameters:
      text - the text message to parse
      type - the message type
      subtype - the message subtype
      defaultColor - the default color to use
      buffer - the buffer to update
    • parseWithoutMediaTags

      public void parseWithoutMediaTags(@NotNull @NotNull CharSequence text, int type, int subtype, @NotNull @NotNull Color color, @NotNull @NotNull Buffer buffer)
      Parses a plain text message without media tags.
      Parameters:
      text - the text message to parse
      type - the message type
      subtype - the message subtype
      color - the color to use
      buffer - the buffer to update
    • toString

      @NotNull public static @NotNull String toString(@NotNull @NotNull Color color)
      Returns the string representation for a color.
      Parameters:
      color - the color to convert
      Returns:
      the string representation