Uses of Class java.awt.FontMetrics

Uses in package javax.swing

Methods with parameter type java.awt.FontMetrics

int
Calculates the width of a given string.
String
SwingUtilities.layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Layout a "compound label" consisting of a text string and an icon which is to be placed near the rendered text.
String
SwingUtilities.layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
Layout a "compound label" consisting of a text string and an icon which is to be placed near the rendered text.

Methods with return type java.awt.FontMetrics

FontMetrics
Returns the font metrics of the current font.
FontMetrics
Returns the font metrics for a given font.
FontMetrics
Returns the font metrics for the specified font.
FontMetrics
Returns the font metrics for a specified font.
FontMetrics
Gets the FontMetrics of this object.

Uses in package java.awt

Methods with return type java.awt.FontMetrics

FontMetrics
Returns the font metrics for the current font.
FontMetrics
Returns the font metrics for the specified font in this component.
FontMetrics
Gets the font metrics for a font.
FontMetrics
Returns the font metrics for the specified font.
FontMetrics
Retrieves information on the rendering and metrics of the supplied font.
FontMetrics
Return the font metrics for the specified font

Uses in package java.awt.peer

Methods with return type java.awt.FontMetrics

FontMetrics
Returns the font metrics for the specified font.

Uses in package javax.accessibility

Methods with return type java.awt.FontMetrics

FontMetrics
Get the FontMetrics of the specified font in this component.

Uses in package javax.swing.plaf.basic

Methods with parameter type java.awt.FontMetrics

int
BasicTabbedPaneUI.calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
This method calculates the tab width, including insets, for the given tab index and font metrics.
String
BasicInternalFrameTitlePane.getTitle(String text, FontMetrics fm, int availableWidth)
This method returns the title string based on the available width and the font metrics.
String
BasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
This method is simply calls SwingUtilities's layoutCompoundLabel.
void
BasicTabbedPaneUI.layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
This method lays out the tab and finds the location to paint the icon and text.
void
BasicTabbedPaneUI.paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
This method paints the text for the given tab.

Methods with return type java.awt.FontMetrics

FontMetrics
This method returns the fontmetrics for the font of the JTabbedPane.

Uses in package javax.swing.plaf.synth

Methods with parameter type java.awt.FontMetrics

int
Returns the width of the string text for the specified font and font metrics.
String
SynthGraphicsUtils.layoutText(SynthContext ctx, FontMetrics fm, String text, Icon icon, int hAlign, int vAlign, int hTextPos, int vTextPos, Rectangle viewR, Rectangle iconR, Rectangle textR, int iconTextGap)
Lays out a label and (if non-null) an icon.

Uses in package javax.swing.table

Methods with return type java.awt.FontMetrics

FontMetrics
Get the FontMetrics of the specified font in this component.

Uses in package javax.swing.text

Fields of type java.awt.FontMetrics

FontMetrics

Methods with parameter type java.awt.FontMetrics

int
Utilities.getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset)
Determine where to break the text in the given Segment, attempting to find a word boundary.
int
Utilities.getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0)
Provides a facility to map screen coordinates into a model location.
int
Utilities.getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round)
Provides a facility to map screen coordinates into a model location.
int
Utilities.getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset)
Determines the width, that the given text s would take if it was printed with the given FontMetrics on the specified screen position.

Methods with return type java.awt.FontMetrics

FontMetrics
FontMetrics
Returns the font metrics of the current font.
FontMetrics