this.userMessage = new UserMessage();
try {
UIManager.setLookAndFeel(
new javax.swing.plaf.metal.MetalLookAndFeel());
} catch (final UnsupportedLookAndFeelException e) {
throw new FOrayException(e);
}
String language = getCommandLineOptions().getLanguage();
if (language == null) {
try {
language = System.getProperty("user.language");
} catch (final SecurityException se) {
// if this is running in a secure place
}
}
try {
this.resource = getResourceBundle(AWTStarter.TRANSLATION_PATH + "resources." + language);
this.userMessage.setTranslator(getResourceBundle(AWTStarter.TRANSLATION_PATH + "messages." + language));
} catch (final IOException e) {
throw new FOrayException(e);
}
final SessionConfig configuration = getOptions().getSessionConfig();
final FOraySession session = FOraySpecific.makeFOraySession(
configuration);
this.document = new FOrayDocument(session, getInputSource(), null);
final OutputConfig renderOptions =
getCommandLineOptions().getRendererOptions();
this.renderer = new AWTRenderer(this.getLogger(), renderOptions);
try {
this.frame = createPreviewDialog(this.renderer, this.resource);
} catch (final OutputException e) {
throw new FOrayException(e);
}
this.renderer.setComponent(this.frame);
this.frame.progress(this.resource.getString("Init parser") + " ...");
}