JBR-5946 Allow to disable painting of composed text in Swing text components using TextLayout.draw

This commit is contained in:
Dmitry Batrak
2023-08-16 12:28:25 +03:00
committed by jbrbot
parent aaa949a1f2
commit fc72b2bbc5

View File

@@ -1010,7 +1010,11 @@ public class SwingUtilities2 {
} else {
layout = new TextLayout(iterator, frc);
}
layout.draw(g2d, x, y);
if (Boolean.TRUE.equals(Toolkit.getDefaultToolkit().getDesktopProperty("jb.swing.avoid.text.layout"))) {
g2d.drawString(iterator, x, y);
} else {
layout.draw(g2d, x, y);
}
retVal = layout.getAdvance();
}