1 28 package net.sf.jasperreports.engine.util; 29 30 import java.awt.GraphicsEnvironment ; 31 32 import net.sf.jasperreports.engine.JRException; 33 34 35 39 public class JRGraphEnvInitializer 40 { 41 42 43 46 private static boolean isGraphicsEnvironmentInitiliazed = false; 47 48 49 52 public static void initializeGraphEnv() throws JRException 53 { 54 if (!isGraphicsEnvironmentInitiliazed) 55 { 56 try 57 { 58 GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); 59 } 60 catch(Exception e) 61 { 62 throw new JRException("Error initializing graphic environment.", e); 63 } 64 65 isGraphicsEnvironmentInitiliazed = true; 66 } 67 } 68 69 70 } 71 | Popular Tags |