@API(since="5.5", status=INTERNAL) public class KerningOptimizer extends Object
Modifier and Type | Field and Description |
---|---|
static KerningOptimizer |
INSTANCE |
Constructor and Description |
---|
KerningOptimizer() |
Modifier and Type | Method and Description |
---|---|
void |
configureKerning(JComponent component,
int documentLength)
Configures text kerning according to the expected document length.
|
int |
getMaxTextLengthWithKerning() |
void |
installKerningListener(JTextComponent textComponent)
Adds a listener that disables kerning if text length reaches a certain threshold.
|
void |
setMaxTextLengthWithKerning(int length)
Configures the maximum document length for rendering with kerning enabled.
|
void |
uninstallKerningListener(JTextComponent textComponent)
Removes the listener that disables kerning if text length reaches a certain threshold.
|
public static final KerningOptimizer INSTANCE
public void setMaxTextLengthWithKerning(int length)
length
- maximum document length for rendering with kerning enabledpublic int getMaxTextLengthWithKerning()
public void configureKerning(JComponent component, int documentLength)
component
- text component for kerning configurationdocumentLength
- expected document lengthpublic void installKerningListener(JTextComponent textComponent)
textComponent
- text component for kerning configurationpublic void uninstallKerningListener(JTextComponent textComponent)
textComponent
- text component for kerning configurationCopyright © 1998-2022 Apache Software Foundation. All Rights Reserved.