diff --git a/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java b/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java index d063bc1..db46714 100644 --- a/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java +++ b/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java @@ -183,18 +183,6 @@ public class ConfigurationWindow extends JFrame { cb_UseMathJax.setSelected(true); configuration.put("use_mathjax", cb_UseMathJax); - JCheckBox cb_SplitWholePagesOnly = new JCheckBox("Split on whole pages only"); - configuration.put("align_splits_to_pages", cb_SplitWholePagesOnly); - - JLabel lb_SplitByLevel = new JLabel("Split into multiple files by heading level"); - JTextField tf_SplitByLevel = new JTextField(); - configuration.put("split_level", tf_SplitByLevel); - - tf_SplitByLevel.setColumns(10); - - JCheckBox cb_Greenstone = new JCheckBox("Split document into subsections for Greenstone digital library"); - configuration.put("greenstone", cb_Greenstone); - JCheckBox cb_IgnoreEmptyParagraphs = new JCheckBox("Filter empty paragraphs"); cb_IgnoreEmptyParagraphs.setSelected(true); configuration.put("ignore_empty_paragraphs", cb_IgnoreEmptyParagraphs); @@ -230,13 +218,6 @@ public class ConfigurationWindow extends JFrame { tf_Scale.setColumns(10); - JLabel lb_MaxWidth = new JLabel("Max body width"); - - JTextField tf_MaxWidth = new JTextField(); - configuration.put("max_width", tf_MaxWidth); - - tf_MaxWidth.setColumns(10); - JCheckBox cb_convertToPx = new JCheckBox("Convert dimensions to pixels instead of REM (root em)"); configuration.put("convert_to_px", cb_convertToPx); @@ -247,7 +228,7 @@ public class ConfigurationWindow extends JFrame { configuration.put("inputFile", tf_inputFile); - JLabel lb_TargetFormat = new JLabel("html5"); + JLabel lb_TargetFormat = new JLabel("epub3"); configuration.put("targetFormat", lb_TargetFormat); @@ -259,42 +240,35 @@ public class ConfigurationWindow extends JFrame { .addGap(32) .addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING) .addGroup(gl_panel_configHTML.createSequentialGroup() - .addComponent(lb_TargetFormat_description, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE) - .addPreferredGap(ComponentPlacement.UNRELATED) - .addComponent(lb_TargetFormat, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE) + .addComponent(cb_UseMathJax, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE) .addContainerGap()) - .addGroup(gl_panel_configHTML.createSequentialGroup() - .addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING) - .addGroup(gl_panel_configHTML.createSequentialGroup() - .addComponent(lb_FilePath, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE) - .addGap(18) - .addComponent(tf_inputFile, GroupLayout.DEFAULT_SIZE, 755, Short.MAX_VALUE)) - .addComponent(cb_UseMathJax, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE) - .addGroup(gl_panel_configHTML.createSequentialGroup() - .addComponent(lb_Scale, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE) - .addGap(18) - .addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, 175, GroupLayout.PREFERRED_SIZE)) - .addGroup(gl_panel_configHTML.createSequentialGroup() - .addComponent(lb_MaxWidth) - .addGap(18) - .addComponent(tf_MaxWidth, GroupLayout.PREFERRED_SIZE, 175, GroupLayout.PREFERRED_SIZE)) - .addGroup(gl_panel_configHTML.createSequentialGroup() - .addComponent(lb_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, 253, GroupLayout.PREFERRED_SIZE) - .addGap(18) - .addComponent(tf_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE)) - .addComponent(cb_convertToPx, GroupLayout.PREFERRED_SIZE, 592, GroupLayout.PREFERRED_SIZE) - .addComponent(cb_IgnoreHardLineBreaks, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE) - .addComponent(cb_IgnoreEmptyParagraphs, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE) - .addComponent(cb_Greenstone, GroupLayout.PREFERRED_SIZE, 482, GroupLayout.PREFERRED_SIZE) - .addGroup(gl_panel_configHTML.createSequentialGroup() - .addComponent(lb_SplitByLevel, GroupLayout.PREFERRED_SIZE, 295, GroupLayout.PREFERRED_SIZE) - .addGap(42) - .addComponent(tf_SplitByLevel, GroupLayout.PREFERRED_SIZE, 175, GroupLayout.PREFERRED_SIZE)) - .addComponent(cb_SplitWholePagesOnly, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE) - .addComponent(cb_EmbedRaster, GroupLayout.PREFERRED_SIZE, 194, GroupLayout.PREFERRED_SIZE) - .addComponent(cb_EmbedVectorImages, GroupLayout.PREFERRED_SIZE, 214, GroupLayout.PREFERRED_SIZE) - .addComponent(cb_InlineStyles, GroupLayout.PREFERRED_SIZE, 156, GroupLayout.PREFERRED_SIZE)) - .addGap(48)))) + .addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING) + .addGroup(gl_panel_configHTML.createSequentialGroup() + .addComponent(lb_TargetFormat_description, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(ComponentPlacement.UNRELATED) + .addComponent(lb_TargetFormat, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + .addGroup(gl_panel_configHTML.createSequentialGroup() + .addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING) + .addGroup(gl_panel_configHTML.createSequentialGroup() + .addComponent(lb_FilePath, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE) + .addGap(18) + .addComponent(tf_inputFile, GroupLayout.DEFAULT_SIZE, 755, Short.MAX_VALUE)) + .addGroup(gl_panel_configHTML.createSequentialGroup() + .addComponent(lb_Scale, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE) + .addGap(18) + .addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, 175, GroupLayout.PREFERRED_SIZE)) + .addGroup(gl_panel_configHTML.createSequentialGroup() + .addComponent(lb_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, 253, GroupLayout.PREFERRED_SIZE) + .addGap(18) + .addComponent(tf_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE)) + .addComponent(cb_convertToPx, GroupLayout.PREFERRED_SIZE, 592, GroupLayout.PREFERRED_SIZE) + .addComponent(cb_IgnoreHardLineBreaks, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE) + .addComponent(cb_IgnoreEmptyParagraphs, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE) + .addComponent(cb_EmbedRaster, GroupLayout.PREFERRED_SIZE, 194, GroupLayout.PREFERRED_SIZE) + .addComponent(cb_EmbedVectorImages, GroupLayout.PREFERRED_SIZE, 214, GroupLayout.PREFERRED_SIZE) + .addComponent(cb_InlineStyles, GroupLayout.PREFERRED_SIZE, 156, GroupLayout.PREFERRED_SIZE)) + .addGap(48))))) ); gl_panel_configHTML.setVerticalGroup( gl_panel_configHTML.createParallelGroup(Alignment.LEADING) @@ -315,12 +289,7 @@ public class ConfigurationWindow extends JFrame { .addGap(2) .addComponent(lb_Scale)) .addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) - .addGap(6) - .addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING) - .addGroup(gl_panel_configHTML.createSequentialGroup() - .addGap(2) - .addComponent(lb_MaxWidth)) - .addComponent(tf_MaxWidth, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addGap(25) .addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING) .addGroup(gl_panel_configHTML.createSequentialGroup() .addGap(8) @@ -340,19 +309,9 @@ public class ConfigurationWindow extends JFrame { .addComponent(cb_IgnoreHardLineBreaks) .addGap(7) .addComponent(cb_IgnoreEmptyParagraphs) - .addGap(4) - .addComponent(cb_Greenstone) - .addGap(8) - .addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING) - .addComponent(tf_SplitByLevel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) - .addGroup(gl_panel_configHTML.createSequentialGroup() - .addGap(2) - .addComponent(lb_SplitByLevel))) - .addPreferredGap(ComponentPlacement.RELATED) - .addComponent(cb_SplitWholePagesOnly) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(cb_UseMathJax) - .addContainerGap(274, Short.MAX_VALUE)) + .addContainerGap(353, Short.MAX_VALUE)) ); panel_configHTML.setLayout(gl_panel_configHTML); return panel_configHTML;