Uses of Class
java.awt.FontMetrics
Package
Description
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Defines a contract between user-interface components and an assistive
technology that provides access to those components.
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Provides user interface objects built according to the Basic look and feel.
Synth is a skinnable look and feel in which all painting is delegated.
Provides classes and interfaces for dealing with
javax.swing.JTable
.Provides classes and interfaces that deal with editable and noneditable text
components.
-
Uses of FontMetrics in java.awt
Modifier and TypeMethodDescriptionComponent.AccessibleAWTComponent.getFontMetrics
(Font f) Gets theFontMetrics
of this object.Component.getFontMetrics
(Font font) Gets the font metrics for the specified font.Graphics.getFontMetrics()
Gets the font metrics of the current font.abstract FontMetrics
Graphics.getFontMetrics
(Font f) Gets the font metrics for the specified font.List.AccessibleAWTList.AccessibleAWTListChild.getFontMetrics
(Font f) Get the FontMetrics of this object.MenuComponent.AccessibleAWTMenuComponent.getFontMetrics
(Font f) Gets theFontMetrics
of this object.abstract FontMetrics
Toolkit.getFontMetrics
(Font font) Deprecated. -
Uses of FontMetrics in javax.accessibility
Modifier and TypeMethodDescriptionAccessibleComponent.getFontMetrics
(Font f) Gets theFontMetrics
of this object. -
Uses of FontMetrics in javax.swing
Modifier and TypeMethodDescriptionDebugGraphics.getFontMetrics()
OverridesGraphics.getFontMetrics
.DebugGraphics.getFontMetrics
(Font f) OverridesGraphics.getFontMetrics
.JComponent.getFontMetrics
(Font font) Gets theFontMetrics
for the specifiedFont
.JList.AccessibleJList.AccessibleJListChild.getFontMetrics
(Font f) JTable.AccessibleJTable.AccessibleJTableCell.getFontMetrics
(Font f) Gets theFontMetrics
of this object.JTree.AccessibleJTree.AccessibleJTreeNode.getFontMetrics
(Font f) Modifier and TypeMethodDescriptionstatic int
SwingUtilities.computeStringWidth
(FontMetrics fm, String str) Compute the width of the string using a font with the specified "metrics" (sizes).static 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) Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.static 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) Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string. -
Uses of FontMetrics in javax.swing.plaf.basic
Modifier and TypeMethodDescriptionprotected FontMetrics
BasicTabbedPaneUI.getFontMetrics()
Returns the font metrics.Modifier and TypeMethodDescriptionprotected int
BasicTabbedPaneUI.calculateTabWidth
(int tabPlacement, int tabIndex, FontMetrics metrics) Calculates the tab width.static String
BasicGraphicsUtils.getClippedString
(JComponent c, FontMetrics fm, String string, int availTextWidth) Clips the passed in string to the space provided.static float
BasicGraphicsUtils.getStringWidth
(JComponent c, FontMetrics fm, String string) Returns the width of the passed in string using text properties and anti-aliasing hints from the provided component.protected String
BasicInternalFrameTitlePane.getTitle
(String text, FontMetrics fm, int availTextWidth) Returns the title.protected String
BasicLabelUI.layoutCL
(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR) Forwards the call to SwingUtilities.layoutCompoundLabel().protected void
BasicTabbedPaneUI.layoutLabel
(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected) Lays out a label.protected void
BasicTabbedPaneUI.paintText
(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) Paints text. -
Uses of FontMetrics in javax.swing.plaf.synth
Modifier and TypeMethodDescriptionint
SynthGraphicsUtils.computeStringWidth
(SynthContext ss, Font font, FontMetrics metrics, String text) Returns the size of the passed in string.SynthGraphicsUtils.layoutText
(SynthContext ss, FontMetrics fm, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int iconTextGap) Lays out text and an icon returning, by reference, the location to place the icon and text. -
Uses of FontMetrics in javax.swing.table
Modifier and TypeMethodDescriptionJTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getFontMetrics
(Font f) -
Uses of FontMetrics in javax.swing.text
Modifier and TypeFieldDescriptionprotected FontMetrics
PlainView.metrics
Font metrics for the current font.Modifier and TypeMethodDescriptionprotected FontMetrics
FieldView.getFontMetrics()
Fetches the font metrics associated with the component hosting this view.protected FontMetrics
LabelView.getFontMetrics()
Deprecated.FontMetrics are not used for glyph rendering when running in the JDK.StyleContext.getFontMetrics
(Font f) Returns font metrics for a font.Modifier and TypeMethodDescriptionstatic final int
Utilities.getBreakLocation
(Segment s, FontMetrics metrics, float x0, float x, TabExpander e, int startOffset) Determine where to break the given text to fit within the given span.static final int
Utilities.getBreakLocation
(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) Deprecated.static final int
Utilities.getTabbedTextOffset
(Segment s, FontMetrics metrics, float x0, float x, TabExpander e, int startOffset, boolean round) Determines the relative offset into the given text that best represents the given span in the view coordinate system.static final int
Utilities.getTabbedTextOffset
(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset) Deprecated.static final int
Utilities.getTabbedTextOffset
(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset, boolean round) Deprecated.static final float
Utilities.getTabbedTextWidth
(Segment s, FontMetrics metrics, float x, TabExpander e, int startOffset) Determines the width of the given segment of text taking tabs into consideration.static final int
Utilities.getTabbedTextWidth
(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset) Deprecated.
Font
methodgetLineMetrics
.