Crossfire JXClient, Trunk
|
Public Member Functions | |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
TooltipText | getTooltip () |
GUIMultiLineLabel (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @Nullable final BufferedImage picture, @NotNull final Font textFont, @NotNull final Color textColor, @Nullable final Color backgroundColor, @NotNull final Alignment alignment, @NotNull final String text, @NotNull final GuiFactory guiFactory) | |
void | notifyOpen () |
void | paintComponent (@NotNull final Graphics g) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.label.AbstractLabel | |
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 () |
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 () |
Protected Member Functions | |
void | textChanged () |
Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.label.GUILabel | |
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) | |
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 Member Functions | |
Dimension | getTextSize () |
Private Attributes | |
String[] | lines |
Static Private Attributes | |
static final Pattern | LINE_SEPARATOR_PATTERN = Pattern.compile(" *\n") |
static final long | serialVersionUID = 1 |
A AbstractLabel that renders the text as a list of plain strings. The lines are separated by newline characters.
Definition at line 46 of file GUIMultiLineLabel.java.
com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.GUIMultiLineLabel | ( | @NotNull final TooltipManager | tooltipManager, |
@NotNull final GUIElementListener | elementListener, | ||
@NotNull final String | name, | ||
@Nullable final BufferedImage | picture, | ||
@NotNull final Font | textFont, | ||
@NotNull final Color | textColor, | ||
@Nullable final Color | backgroundColor, | ||
@NotNull final Alignment | alignment, | ||
@NotNull final String | text, | ||
@NotNull final GuiFactory | guiFactory | ||
) |
Creates a new instance.
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the name of this element |
picture | the background image; null
|
textFont | the font for rendering the label text |
textColor | the font color |
backgroundColor | the background color |
alignment | the text alignment |
text | the label text |
guiFactory | the global GUI factory instance |
Definition at line 78 of file GUIMultiLineLabel.java.
References com.realtime.crossfire.jxclient.gui.label.AbstractLabel.backgroundColor, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.label.AbstractLabel.getText(), com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.LINE_SEPARATOR_PATTERN, com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.lines, 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, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager.
Dimension com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.getMinimumSize | ( | ) |
Definition at line 118 of file GUIMultiLineLabel.java.
References com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.getTextSize().
Dimension com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.getPreferredSize | ( | ) |
Definition at line 111 of file GUIMultiLineLabel.java.
References com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.getTextSize().
|
private |
Returns the minimal size of this component to display all of lines.
Definition at line 128 of file GUIMultiLineLabel.java.
References com.realtime.crossfire.jxclient.gui.gui.GuiUtils.getTextDimension(), com.realtime.crossfire.jxclient.gui.label.AbstractLabel.getTextFont(), and com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.lines.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.getMinimumSize(), and com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.getPreferredSize().
TooltipText com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.getTooltip | ( | ) |
Returns the current tooltip text.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 151 of file GUIMultiLineLabel.java.
void com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.notifyOpen | ( | ) |
Called each time the enclosing dialog is opened (or raised).
Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.
Definition at line 146 of file GUIMultiLineLabel.java.
void com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.paintComponent | ( | @NotNull final Graphics | g | ) |
Reimplemented from com.realtime.crossfire.jxclient.gui.label.AbstractLabel.
Definition at line 90 of file GUIMultiLineLabel.java.
References com.realtime.crossfire.jxclient.gui.label.GUILabel.drawLine(), com.realtime.crossfire.jxclient.gui.gui.GuiUtils.getTextDimension(), com.realtime.crossfire.jxclient.gui.label.AbstractLabel.getTextFont(), and com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.lines.
|
protected |
Will be called whenever text or getTextColor() has changed.
Reimplemented from com.realtime.crossfire.jxclient.gui.label.GUILabel.
Definition at line 84 of file GUIMultiLineLabel.java.
References com.realtime.crossfire.jxclient.gui.label.AbstractLabel.getText(), com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.LINE_SEPARATOR_PATTERN, and com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.lines.
|
staticprivate |
The pattern to split the text into lines.
Definition at line 57 of file GUIMultiLineLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.GUIMultiLineLabel(), and com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.textChanged().
|
private |
The text lines to draw.
Definition at line 63 of file GUIMultiLineLabel.java.
Referenced by com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.getTextSize(), com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.GUIMultiLineLabel(), com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.paintComponent(), and com.realtime.crossfire.jxclient.gui.label.GUIMultiLineLabel.textChanged().
|
staticprivate |
The serial version UID.
Definition at line 51 of file GUIMultiLineLabel.java.