Crossfire JXClient, Trunk
com.realtime.crossfire.jxclient.gui.log.GUIMessageLog Class Reference

A gui element implementing the message window. More...

+ Inheritance diagram for com.realtime.crossfire.jxclient.gui.log.GUIMessageLog:
+ Collaboration diagram for com.realtime.crossfire.jxclient.gui.log.GUIMessageLog:

Public Member Functions

void dispose ()
 Releases all allocated resources. More...
 
TooltipText getTooltip ()
 Returns the current tooltip text. More...
 
 GUIMessageLog (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final CrossfireServerConnection crossfireServerConnection, @Nullable final Image backgroundImage, @NotNull final Fonts fonts, @NotNull final Color defaultColor, @NotNull final Color selectionColor, @NotNull final GuiFactory guiFactory)
 Creates a new instance. More...
 
void notifyOpen ()
 Called each time the enclosing dialog is opened (or raised). More...
 
void setColor (final int index, @NotNull final Color color)
 Sets a color mapping. More...
 
void setTypes (@NotNull final MessageTypes types)
 Sets the message types to show. More...
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.log.GUILog
void addScrollableListener (@NotNull final ScrollableListener listener)
 Adds a scrollable listener to be informed about changes. More...
 
boolean canScroll (final int distance)
 Returns whether scrolling is possible. More...
 
Buffer getBuffer ()
 Returns the Buffer instance containing the text messages. More...
 
void mouseDragged (@NotNull final MouseEvent e)
 Will be called when the mouse moves within this component while the button is pressed. More...
 
void mousePressed (@NotNull final MouseEvent e)
 Will be called when the user has pressed the mouse inside this element. More...
 
void mouseReleased (@NotNull final MouseEvent e)
 Will be called when the user has released the mouse. More...
 
void mouseWheelMoved (final int wheelRotation)
 Will be called when the mouse wheel has been moved. More...
 
void paintComponent (@NotNull final Graphics g)
 
void removeScrollableListener (@NotNull final ScrollableListener listener)
 Removes a scrollable listener. More...
 
void resetScroll ()
 Resets the scroll index to the default value. More...
 
void scroll (final int distance)
 Scrolls the element. More...
 
void scrollTo (final int pos)
 Scrolls to the given location. More...
 
void setBounds (final int x, final int y, final int width, final int height)
 
void setShowSentCommands (final boolean showSentCommands)
 Sets whether the commands sent to the server should be shown. More...
 
void setShowTimestamps (final boolean showTimestamps)
 Sets whether the timestamps are shown. More...
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
int getDialogBorderBottom ()
 Returns the size of the dialog's bottom border. More...
 
int getDialogBorderLeft ()
 Returns the size of the dialog's left border. More...
 
int getDialogBorderRight ()
 Returns the size of the dialog's right border. More...
 
int getDialogBorderTop ()
 Returns the size of the dialog's top border. More...
 
String getName ()
 Returns the internal name of this gui element. More...
 
void inhibitListeners ()
 Prevents change listeners to be notified. More...
 
boolean isDefault ()
 Returns whether this element is the default element. More...
 
boolean isIgnore ()
 Returns whether this gui element is to be ignored for user interaction. More...
 
void mouseClicked (@NotNull final MouseEvent e)
 Will be called when the user has clicked (pressed+released) this element. More...
 
void mouseEntered (@NotNull final MouseEvent e)
 Will be called when the mouse has entered the bounding box of this element. More...
 
void mouseExited (@NotNull final MouseEvent e)
 Will be called when the mouse has left the bounding box of this element. More...
 
void mouseMoved (@NotNull final MouseEvent e)
 Will be called when the mouse moves within this component. More...
 
void setChanged ()
 Records that the contents have changed and must be repainted. More...
 
void setChangedListener (@Nullable final GUIElementChangedListener changedListener)
 Sets the GUIElementChangedListener to be notified. More...
 
void setDefault (final boolean isDefault)
 Sets whether this element is the default element. More...
 
void setIgnore ()
 Marks this gui element to be ignored for user interaction. More...
 
String toString ()
 

Private Attributes

final MessageBufferUpdater messageBufferUpdater
 The message buffer updater for updating getBuffer(). More...
 

Static Private Attributes

static final long serialVersionUID = 1
 The serial version UID. More...
 

Additional Inherited Members

- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.log.GUILog
 GUILog (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @Nullable final Image backgroundImage, @NotNull final Fonts fonts, @NotNull final GuiFactory guiFactory)
 Creates a new instance. More...
 
- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
 AbstractGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, @NotNull final GuiFactory guiFactory)
 Creates a new instance. More...
 
TooltipText newTooltipText (@Nullable final String tooltipText)
 Creates a TooltipText instance relative to this instance. More...
 
void tooltipChanged ()
 Must be called whenever the tooltip may have changed. More...
 

Detailed Description

A gui element implementing the message window.

Author
Andreas Kirschbaum

Definition at line 40 of file GUIMessageLog.java.

Constructor & Destructor Documentation

◆ GUIMessageLog()

com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.GUIMessageLog ( @NotNull final TooltipManager  tooltipManager,
@NotNull final GUIElementListener  elementListener,
@NotNull final String  name,
@NotNull final CrossfireServerConnection  crossfireServerConnection,
@Nullable final Image  backgroundImage,
@NotNull final Fonts  fonts,
@NotNull final Color  defaultColor,
@NotNull final Color  selectionColor,
@NotNull final GuiFactory  guiFactory 
)

Creates a new instance.

Parameters
tooltipManagerthe tooltip manager to update
elementListenerthe element listener to notify
namethe name of this element
crossfireServerConnectionthe connection instance
backgroundImagethe background image; may be
null
if unused
fontsthe
Fonts
instance for looking up fonts
defaultColorthe default color to use for text message not specifying a color
selectionColorthe selection color
guiFactorythe global GUI factory instance

Definition at line 67 of file GUIMessageLog.java.

References com.realtime.crossfire.jxclient.gui.log.GUILog.backgroundImage, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.log.GUILog.getBuffer(), com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.messageBufferUpdater, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager.

+ Here is the call graph for this function:

Member Function Documentation

◆ dispose()

void com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.dispose ( )

Releases all allocated resources.

Reimplemented from com.realtime.crossfire.jxclient.gui.log.GUILog.

Definition at line 73 of file GUIMessageLog.java.

References com.realtime.crossfire.jxclient.gui.log.MessageBufferUpdater.dispose(), and com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.messageBufferUpdater.

+ Here is the call graph for this function:

◆ getTooltip()

TooltipText com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.getTooltip ( )

Returns the current tooltip text.

Returns
the tooltip text or
null
to not show a tooltip

Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.

Definition at line 80 of file GUIMessageLog.java.

◆ notifyOpen()

void com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.notifyOpen ( )

Called each time the enclosing dialog is opened (or raised).

Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.

Definition at line 85 of file GUIMessageLog.java.

◆ setColor()

void com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.setColor ( final int  index,
@NotNull final Color  color 
)

Sets a color mapping.

Parameters
indexthe color index to change
colorthe color to map to

Definition at line 93 of file GUIMessageLog.java.

References com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.messageBufferUpdater, and com.realtime.crossfire.jxclient.gui.log.MessageBufferUpdater.setColor().

+ Here is the call graph for this function:

◆ setTypes()

void com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.setTypes ( @NotNull final MessageTypes  types)

Sets the message types to show.

Parameters
typesthe types to show

Definition at line 101 of file GUIMessageLog.java.

References com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.messageBufferUpdater, and com.realtime.crossfire.jxclient.gui.log.MessageBufferUpdater.setTypes().

+ Here is the call graph for this function:

Member Data Documentation

◆ messageBufferUpdater

◆ serialVersionUID

final long com.realtime.crossfire.jxclient.gui.log.GUIMessageLog.serialVersionUID = 1
staticprivate

The serial version UID.

Definition at line 45 of file GUIMessageLog.java.


The documentation for this class was generated from the following file: