Logo Search packages:      
Sourcecode: wims version File versions  Download package

static int fr::ove::utils::FontInfo::getStringWidth ( Component  component,
Font  font,
String  str 
) [inline, static]

Returns the width of the specified string, with the specified font.

font the specified font
str the specified string.

Definition at line 91 of file FontInfo.java.

        Graphics g = component.getGraphics();
        FontMetrics fontMetrics = g.getFontMetrics(font);
        return fontMetrics.stringWidth(str);

Generated by  Doxygen 1.6.0   Back to index