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

Public Member Functions

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 ()
 

Protected Member Functions

 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 ()
 
void textChanged ()
 
- 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 Color backgroundColor
 
final ImageIcon backgroundImage
 
String text
 
final Color textColor
 
final Font textFont
 
boolean textHighlight
 
final Color textHighlightColor
 

Static Private Attributes

static final long serialVersionUID = 1
 

Detailed Description

Abstract base class for all label classes. It manages the label text, and renders the label's background.

Author
Lauwenmark
Andreas Kirschbaum

Definition at line 43 of file AbstractLabel.java.

Constructor & Destructor Documentation

◆ AbstractLabel()

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 
)
protected

Creates a new instance.

Parameters
tooltipManagerthe tooltip manager to update
elementListenerthe element listener to notify
namethe name of this element
textthe text
textFontthe text font
textColorthe text color when not highlighted
textHighlightColorthe text color when highlighted
backgroundPicturethe optional background picture
backgroundColorthe background color; ignored if background picture is set
guiFactorythe global GUI factory instance

Definition at line 106 of file AbstractLabel.java.

References com.realtime.crossfire.jxclient.gui.label.AbstractLabel.backgroundColor, com.realtime.crossfire.jxclient.gui.label.AbstractLabel.backgroundImage, 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.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

◆ getText()

String com.realtime.crossfire.jxclient.gui.label.AbstractLabel.getText ( )
protected

◆ getTextColor()

Color com.realtime.crossfire.jxclient.gui.label.AbstractLabel.getTextColor ( )
protected

◆ getTextFont()

Font com.realtime.crossfire.jxclient.gui.label.AbstractLabel.getTextFont ( )
protected

◆ paintComponent()

void com.realtime.crossfire.jxclient.gui.label.AbstractLabel.paintComponent ( @NotNull final Graphics  g)

◆ setText()

void com.realtime.crossfire.jxclient.gui.label.AbstractLabel.setText ( @NotNull final String  text)

◆ setTextHighlight()

void com.realtime.crossfire.jxclient.gui.label.AbstractLabel.setTextHighlight ( final boolean  textHighlight)

Sets whether the text should be highlighted.

Parameters
textHighlightwhether the text is highlighted

Definition at line 131 of file AbstractLabel.java.

References com.realtime.crossfire.jxclient.gui.label.AbstractLabel.textChanged(), and com.realtime.crossfire.jxclient.gui.label.AbstractLabel.textHighlight.

Here is the call graph for this function:

◆ textChanged()

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

Member Data Documentation

◆ backgroundColor

final Color com.realtime.crossfire.jxclient.gui.label.AbstractLabel.backgroundColor
private

◆ backgroundImage

final ImageIcon com.realtime.crossfire.jxclient.gui.label.AbstractLabel.backgroundImage
private

◆ serialVersionUID

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

The serial version UID.

Definition at line 48 of file AbstractLabel.java.

◆ text

String com.realtime.crossfire.jxclient.gui.label.AbstractLabel.text
private

◆ textColor

final Color com.realtime.crossfire.jxclient.gui.label.AbstractLabel.textColor
private

◆ textFont

final Font com.realtime.crossfire.jxclient.gui.label.AbstractLabel.textFont
private

◆ textHighlight

boolean com.realtime.crossfire.jxclient.gui.label.AbstractLabel.textHighlight
private

◆ textHighlightColor

final Color com.realtime.crossfire.jxclient.gui.label.AbstractLabel.textHighlightColor
private

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