001/* 002 * To change this template, choose Tools | Templates 003 * and open the template in the editor. 004 */ 005package armyc2.c5isr.graphics2d; 006/** 007 * 008* 009 */ 010public class FontMetrics { 011 FontRenderContext _fontRenderContext=null; 012 Font _font=null; 013 public FontMetrics(Font font) 014 { 015 //_fontRenderContext=new FontRenderContext(); 016 _font=font; 017 } 018 public int stringWidth(String str) 019 { 020 return _font._size/2*str.length(); 021 } 022 public FontRenderContext getFontRenderContext() 023 { 024 return _fontRenderContext; 025 } 026}