first commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package net.sf.jasperreports.engine.util;
|
||||
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import net.sf.jasperreports.engine.JRException;
|
||||
|
||||
public class JRGraphEnvInitializer {
|
||||
private static boolean isGraphicsEnvironmentInitiliazed = false;
|
||||
|
||||
public static void initializeGraphEnv() throws JRException {
|
||||
if (!isGraphicsEnvironmentInitiliazed) {
|
||||
try {
|
||||
GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
|
||||
} catch (Exception e) {
|
||||
throw new JRException("Error initializing graphic environment.", e);
|
||||
}
|
||||
isGraphicsEnvironmentInitiliazed = true;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user