io.github.parubok.text.multiline.MultilineUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multiline-label Show documentation
Show all versions of multiline-label Show documentation
Java Swing component to display multiline text
package io.github.parubok.text.multiline;
import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Insets;
class MultilineUtils {
private MultilineUtils() {
}
static Dimension toDimension(int width, int height, Insets insets) {
return new Dimension(width + insets.right + insets.left, height + insets.top + insets.bottom);
}
static int getHeightIncrement(FontMetrics fm, float lineSpacing) {
return Math.round(fm.getHeight() * lineSpacing);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy