Crossfire JXClient, Trunk
Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
com.realtime.crossfire.jxclient.gui.label.GUILabel Class Referenceabstract
Inheritance diagram for com.realtime.crossfire.jxclient.gui.label.GUILabel:
Inheritance graph
Collaboration diagram for com.realtime.crossfire.jxclient.gui.label.GUILabel:
Collaboration graph

Protected Member Functions

void drawLine (@NotNull final Graphics2D g, final int y0, final int h0, @NotNull final String text)
 
 GUILabel (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @Nullable final BufferedImage picture, @NotNull final String text, @NotNull final Font textFont, @NotNull final Color textColor, @NotNull final Color textHighlightColor, @Nullable final Color backgroundColor, @NotNull final Alignment textAlignment, @NotNull final GuiFactory guiFactory)
 
void textChanged ()
 
- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.label.AbstractLabel
 AbstractLabel (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final String text, @NotNull final Font textFont, @NotNull final Color textColor, @NotNull final Color textHighlightColor, @Nullable final BufferedImage backgroundPicture, @Nullable final Color backgroundColor, @NotNull final GuiFactory guiFactory)
 
String getText ()
 
Color getTextColor ()
 
Font getTextFont ()
 
- 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)
 
TooltipText newTooltipText (@Nullable final String tooltipText)
 
void tooltipChanged ()
 

Private Attributes

final Alignment textAlignment
 

Static Private Attributes

static final long serialVersionUID = 1
 

Additional Inherited Members

- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.label.AbstractLabel
void paintComponent (@NotNull final Graphics g)
 
void setText (@NotNull final String text)
 
void setTextHighlight (final boolean textHighlight)
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
void dispose ()
 
int getDialogBorderBottom ()
 
int getDialogBorderLeft ()
 
int getDialogBorderRight ()
 
int getDialogBorderTop ()
 
String getName ()
 
abstract TooltipText getTooltip ()
 
void inhibitListeners ()
 
boolean isDefault ()
 
boolean isIgnore ()
 
void mouseClicked (@NotNull final MouseEvent e)
 
void mouseDragged (@NotNull final MouseEvent e)
 
void mouseEntered (@NotNull final MouseEvent e)
 
void mouseExited (@NotNull final MouseEvent e)
 
void mouseMoved (@NotNull final MouseEvent e)
 
void mousePressed (@NotNull final MouseEvent e)
 
void mouseReleased (@NotNull final MouseEvent e)
 
void mouseWheelMoved (final int wheelRotation)
 
void setChanged ()
 
void setChangedListener (@Nullable final GUIElementChangedListener changedListener)
 
void setDefault (final boolean isDefault)
 
void setIgnore ()
 
String toString ()
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.GUIElement
void notifyOpen ()
 

Detailed Description

Abstract base class for labels that render text.

Author
Andreas Kirschbaum

Definition at line 40 of file GUILabel.java.

Constructor & Destructor Documentation

◆ GUILabel()

com.realtime.crossfire.jxclient.gui.label.GUILabel.GUILabel ( @NotNull final TooltipManager  tooltipManager,
@NotNull final GUIElementListener  elementListener,
@NotNull final String  name,
@Nullable final BufferedImage  picture,
@NotNull final String  text,
@NotNull final Font  textFont,
@NotNull final Color  textColor,
@NotNull final Color  textHighlightColor,
@Nullable final Color  backgroundColor,
@NotNull final Alignment  textAlignment,
@NotNull final GuiFactory  guiFactory 
)
protected

Creates a new instance.

Parameters
tooltipManagerthe tooltip manager to update
elementListenerthe element listener to notify
namethe name of this element
picturethe background image;
null
for no background
textthe text
textFontthe font for rendering the label text
textColorthe text color when not highlighted
textHighlightColorthe text color when highlighted
backgroundColorthe background color
textAlignmentthe text alignment
guiFactorythe global GUI factory instance

Definition at line 67 of file GUILabel.java.

References com.realtime.crossfire.jxclient.gui.label.AbstractLabel.backgroundColor, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.label.AbstractLabel.text, com.realtime.crossfire.jxclient.gui.label.GUILabel.textAlignment, com.realtime.crossfire.jxclient.gui.label.AbstractLabel.textColor, com.realtime.crossfire.jxclient.gui.label.AbstractLabel.textFont, com.realtime.crossfire.jxclient.gui.label.AbstractLabel.textHighlightColor, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager.

Member Function Documentation

◆ drawLine()

void com.realtime.crossfire.jxclient.gui.label.GUILabel.drawLine ( @NotNull final Graphics2D  g,
final int  y0,
final int  h0,
@NotNull final String  text 
)
protected

Draws one line of text.

Parameters
gthe graphics to paint to
y0the y-coordinate to draw to
h0the line height
textthe text to draw

Definition at line 85 of file GUILabel.java.

References com.realtime.crossfire.jxclient.gui.label.AbstractLabel.getTextColor(), com.realtime.crossfire.jxclient.gui.label.AbstractLabel.getTextFont(), com.realtime.crossfire.jxclient.gui.label.AbstractLabel.text, and com.realtime.crossfire.jxclient.gui.label.GUILabel.textAlignment.

Referenced by com.realtime.crossfire.jxclient.gui.label.GUIOneLineLabel.paintComponent(), and com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.paintComponent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ textChanged()

void com.realtime.crossfire.jxclient.gui.label.GUILabel.textChanged ( )
protected

Will be called whenever text or getTextColor() has changed.

Reimplemented from com.realtime.crossfire.jxclient.gui.label.AbstractLabel.

Reimplemented in com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.

Definition at line 73 of file GUILabel.java.

References com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged().

Here is the call graph for this function:

Member Data Documentation

◆ serialVersionUID

final long com.realtime.crossfire.jxclient.gui.label.GUILabel.serialVersionUID = 1
staticprivate

The serial version UID.

Definition at line 45 of file GUILabel.java.

◆ textAlignment

final Alignment com.realtime.crossfire.jxclient.gui.label.GUILabel.textAlignment
private

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