Class HudWrappingTextLabel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class HudWrappingTextLabel extends JLabel
A label for plain text that wraps to the width its layout gives it and grows tall enough for every line, like HudWrappingLabel, but keeps the font's own attributes. HTML text drops attributes such as letter spacing (TextAttribute.TRACKING), which the HUD's eyebrows and titles use, so those wrap with this instead. Text stays on one line while it fits, breaks between words when it does not, and breaks inside a word only when the word alone is too wide. A leading icon sits beside the first line, and the lines wrap beside it.

Its preferred width never exceeds the width it was last given, and it can shrink to nothing, so it never widens the row it sits in. In a vertical BoxLayout it stretches to the column's width, so it grows again when the window widens.

Give it plain text; HTML is drawn as written.

Since:
0.51.01
See Also: