diff --git a/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java b/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java index 940bc35..23ba780 100644 --- a/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java +++ b/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java @@ -53,16 +53,6 @@ public class ConfigurationWindow extends JFrame { * Create the application. */ public ConfigurationWindow() { - initializeConfigurationWindow(); - } - - public ConfigurationWindow(XComponentContext context, ODTDocument doc) { - this.context = context; - initializeConfigurationWindow(); - storage.setSourceFileName(doc.getFileName()); - } - - private void initializeConfigurationWindow() { this.localizer = new Localizer(); initializePreferences(); setTitle(localizer.getTranslation(CONVERTER_TITLE_LABEL)); @@ -71,7 +61,19 @@ public class ConfigurationWindow extends JFrame { initComponents(); createEvents(); } - + + public ConfigurationWindow(XComponentContext context, ODTDocument doc) { + this.context = context; + this.localizer = new Localizer(); + initializePreferences(); + storage.setSourceFileName(doc.getFileName()); + setTitle(localizer.getTranslation(CONVERTER_TITLE_LABEL)); + setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + setIconImage(Toolkit.getDefaultToolkit().getImage(ConfigurationWindow.class.getResource("/pro/litvinovg/w2phtml/gui/resources/w2phtml.png"))); + initComponents(); + createEvents(); + } + private void initializePreferences() { storage = new PreferencesStorage(); }