Package io.github.parubok.text.multiline
Interface TextLayout
-
- All Known Implementing Classes:
AbstractTextLayout
public interface TextLayoutInstances provide implementation of preferred size calculation and text painting.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DimensioncalculatePreferredSize()voidpaintText(Graphics g)Called fromMultilineLabelUI.paint(Graphics, JComponent)to paint label's text.voidpreSetBounds(int x, int y, int width, int height)Called fromMultilineLabel.setBounds(int, int, int, int)before applying the new bounds.
-
-
-
Method Detail
-
paintText
void paintText(Graphics g)
Called fromMultilineLabelUI.paint(Graphics, JComponent)to paint label's text. TheGraphicsobject is preconfigured with the label's font and foreground color.
-
calculatePreferredSize
Dimension calculatePreferredSize()
- Returns:
- Calculated preferred size of the label (incl. insets).
-
preSetBounds
void preSetBounds(int x, int y, int width, int height)Called fromMultilineLabel.setBounds(int, int, int, int)before applying the new bounds.
-
-