public class FontMetricsCache extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
FontMetricsCache.Info |
Constructor and Description |
---|
FontMetricsCache() |
Modifier and Type | Method and Description |
---|---|
static void |
clear()
Clear all the metrics from the cache.
|
static FontMetrics |
getFontMetrics(Font f,
Component c)
Get the font-metrics for the given font.
|
static FontMetrics |
getFontMetrics(Font f,
Graphics g)
Get the font-metrics for the given font.
|
static FontMetricsCache.Info |
getInfo(Font f)
Get the info about the space-width and strike-through and underline
constants.
|
public static FontMetrics getFontMetrics(Font f, Component c)
font
- font for which the metrics is being retrieved.c
- component that is used to retrieve the metrics in case it's
not yet in the cache.public static FontMetrics getFontMetrics(Font f, Graphics g)
font
- font for which the metrics is being retrieved.g
- graphics that is used to retrieve the metrics in case it's
not yet in the cache.public static FontMetricsCache.Info getInfo(Font f)
font
- font for which the info is being retrieved.public static void clear()
Built on October 25 2023. | Copyright © 2017-2023 Apache Software Foundation. All Rights Reserved.