Class GUIMessageLog

All Implemented Interfaces:
GUIElement, GUIScrollable, GUIScrollable2, ImageObserver, MenuContainer, Serializable

public class GUIMessageLog extends GUILog
A gui element implementing the message window.
See Also:
  • Constructor Details

    • GUIMessageLog

      public GUIMessageLog(@NotNull @NotNull TooltipManager tooltipManager, @NotNull @NotNull GUIElementListener elementListener, @NotNull @NotNull String name, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection, @Nullable @Nullable Image backgroundImage, @NotNull @NotNull Fonts fonts, @NotNull @NotNull Color defaultColor, @NotNull @NotNull Color selectionColor, @NotNull @NotNull GuiFactory guiFactory)
      Creates a new instance.
      Parameters:
      tooltipManager - the tooltip manager to update
      elementListener - the element listener to notify
      name - the name of this element
      crossfireServerConnection - the connection instance
      backgroundImage - the background image; may be null if unused
      fonts - the Fonts instance for looking up fonts
      defaultColor - the default color to use for text message not specifying a color
      selectionColor - the selection color
      guiFactory - the global GUI factory instance
  • Method Details

    • dispose

      public void dispose()
      Description copied from interface: GUIElement
      Releases all allocated resources.
      Specified by:
      dispose in interface GUIElement
      Overrides:
      dispose in class GUILog
    • getTooltip

      @Nullable public @Nullable TooltipText getTooltip()
      Description copied from class: AbstractGUIElement
      Returns the current tooltip text.
      Specified by:
      getTooltip in class AbstractGUIElement
      Returns:
      the tooltip text or null to not show a tooltip
    • notifyOpen

      public void notifyOpen()
      Description copied from interface: GUIElement
      Called each time the enclosing dialog is opened (or raised).
    • 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