22 package com.realtime.crossfire.jxclient.gui.label;
27 import java.awt.Color;
28 import java.awt.Dimension;
30 import java.awt.Graphics;
31 import java.awt.Graphics2D;
32 import java.awt.image.BufferedImage;
33 import org.jetbrains.annotations.NotNull;
34 import org.jetbrains.annotations.Nullable;
60 super(tooltipManager, elementListener, name, picture, text, font, color, backgroundColor, alignment);
68 super.paintComponent(g);
Listener for GUIElement related events.
GUIOneLineLabel(@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @Nullable final BufferedImage picture, @NotNull final Font font, @NotNull final Color color, @Nullable final Color backgroundColor, @NotNull final Alignment alignment, @NotNull final String text)
Creates a new instance.
A AbstractLabel that renders the text as a plain string.
final TooltipManager tooltipManager
The TooltipManager to update.
Dimension getMinimumSizeInt()
Returns the minimal size needed to display this component.
static Dimension getTextDimension(@NotNull final String text, @NotNull final FontMetrics fontMetrics)
Returns the extents of a string when rendered in a given Font on this component.
void drawLine(@NotNull final Graphics2D g, final int y0, final int h0, @NotNull final String text)
Draws one line of text.
void paintComponent(@NotNull final Graphics g)
final GUIElementListener elementListener
The GUIElementListener to notify.
Abstract base class for labels that render text.
final Color backgroundColor
If set, the opaque background color.
final String name
The name of this element.
Dimension getMinimumSize()
Dimension getPreferredSize()
Font getTextFont()
Returns the font.
Utility class for Gui related functions.
String getText()
Returns the label text.
String text
The label text.
static final long serialVersionUID
The serial version UID.