|
|
|
@ -38,12 +38,14 @@ import javax.swing.JSplitPane;
|
|
|
|
|
import java.awt.BorderLayout;
|
|
|
|
|
import javax.swing.JDesktopPane;
|
|
|
|
|
import javax.swing.BoxLayout;
|
|
|
|
|
import javax.swing.ComboBoxModel;
|
|
|
|
|
import javax.swing.SpringLayout;
|
|
|
|
|
import java.awt.FlowLayout;
|
|
|
|
|
import java.awt.CardLayout;
|
|
|
|
|
import java.awt.Component;
|
|
|
|
|
import javax.swing.SwingConstants;
|
|
|
|
|
import javax.swing.JComboBox;
|
|
|
|
|
import java.awt.Choice;
|
|
|
|
|
|
|
|
|
|
public class ConfigurationWindow extends JFrame {
|
|
|
|
|
|
|
|
|
@ -54,6 +56,7 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
private static final String BUTTON_SAVE_LABEL = "button_save_label";
|
|
|
|
|
private static final String BUTTON_SAVEAS_LABEL = "button_saveas_label";
|
|
|
|
|
private static final String ARG_PAGINATION = "pagination";
|
|
|
|
|
private static final String ARG_IMAGE_RESOLUTION = "image_resolution";
|
|
|
|
|
private static final String ARG_CSV_METADATA = "csv_metadata";
|
|
|
|
|
private static final String ARG_RDF_TYPE = "rdf_type";
|
|
|
|
|
private static final String CSV_FILE_EXTENSION = "csv";
|
|
|
|
@ -88,6 +91,7 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
private static final String ARG_CSS_INLINE = "css_inline";
|
|
|
|
|
private static final String ARG_MIN_LETTER_SPACING = "min_letter_spacing";
|
|
|
|
|
private static final String LABEL_PAGINATION = "label_pagination";
|
|
|
|
|
private static final String LABEL_IMAGE_RESOLUTION = "label_image_resolution";
|
|
|
|
|
private static final String ARG_PAGE_BREAK_STYLE = "page_break_style";
|
|
|
|
|
private static final String LABEL_BREAK_STYLE = "label_break_style";
|
|
|
|
|
private static final String LETTER_SPACING_DEFAULT_VALUE = "0.15";
|
|
|
|
@ -122,6 +126,7 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
private XComponentContext context;
|
|
|
|
|
private String fileName = "";
|
|
|
|
|
private Localizer localizer;
|
|
|
|
|
private String[] resolutions = {"0","72","150","300","600","1200","2400"};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create the application.
|
|
|
|
@ -244,11 +249,11 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
configuration.put(ARG_USE_MATHJAX, cb_UseMathJax);
|
|
|
|
|
|
|
|
|
|
JCheckBox cb_IgnoreEmptyParagraphs = new JCheckBox(localizer.getTranslation(LABEL_INGNORE_EMPTY_PARS));
|
|
|
|
|
cb_IgnoreEmptyParagraphs.setSelected(true);
|
|
|
|
|
cb_IgnoreEmptyParagraphs.setSelected(false);
|
|
|
|
|
configuration.put(ARG_IGNORE_EMPTY_PARAGRAPHS, cb_IgnoreEmptyParagraphs);
|
|
|
|
|
|
|
|
|
|
JCheckBox cb_IgnoreHardLineBreaks = new JCheckBox(localizer.getTranslation(LABEL_FILETER_HARD_LINE_BREAKS));
|
|
|
|
|
cb_IgnoreHardLineBreaks.setSelected(true);
|
|
|
|
|
cb_IgnoreHardLineBreaks.setSelected(false);
|
|
|
|
|
configuration.put(ARG_IGNORE_HARD_LINE_BREAKS, cb_IgnoreHardLineBreaks);
|
|
|
|
|
|
|
|
|
|
JLabel lb_FilterLetterSpacing = new JLabel(localizer.getTranslation(LABEL_MIN_LETTER_SPACING));
|
|
|
|
@ -337,63 +342,74 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
cb_Pagination.setSelected(true);
|
|
|
|
|
configuration.put(ARG_PAGINATION, cb_Pagination);
|
|
|
|
|
|
|
|
|
|
JLabel lb_ImageResolution = new JLabel(localizer.getTranslation(LABEL_IMAGE_RESOLUTION));
|
|
|
|
|
|
|
|
|
|
JComboBox cbox_image_resolution = new JComboBox(resolutions);
|
|
|
|
|
configuration.put(ARG_IMAGE_RESOLUTION, cbox_image_resolution);
|
|
|
|
|
cbox_image_resolution.setSelectedIndex(2);
|
|
|
|
|
|
|
|
|
|
GroupLayout gl_panel_configHTML = new GroupLayout(panel_configHTML);
|
|
|
|
|
gl_panel_configHTML.setHorizontalGroup(
|
|
|
|
|
gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(32)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(cb_Pagination, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addContainerGap())
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_Scale, GroupLayout.PREFERRED_SIZE, 175, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, 175, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, 297, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.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, 389, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_IgnoreEmptyParagraphs, GroupLayout.PREFERRED_SIZE, 405, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_UseMathJax, GroupLayout.PREFERRED_SIZE, 409, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_EmbedVectorImages, GroupLayout.PREFERRED_SIZE, 313, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_InlineStyles, GroupLayout.PREFERRED_SIZE, 349, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_EmbedRaster, GroupLayout.PREFERRED_SIZE, 416, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addContainerGap())
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(1)
|
|
|
|
|
.addComponent(lb_OutFilePath, GroupLayout.PREFERRED_SIZE, 184, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(10)
|
|
|
|
|
.addComponent(tf_OutputFile, GroupLayout.DEFAULT_SIZE, 665, Short.MAX_VALUE)
|
|
|
|
|
.addGap(21)
|
|
|
|
|
.addComponent(btn_ChooseOutputFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(10))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_TargetFormat_description)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(lb_TargetFormat, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(3)
|
|
|
|
|
.addComponent(lb_FilePath, GroupLayout.PREFERRED_SIZE, 178, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(14)
|
|
|
|
|
.addComponent(tf_inputFile, GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE)
|
|
|
|
|
.addGap(22)
|
|
|
|
|
.addComponent(btnChooseFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(10)))
|
|
|
|
|
.addGap(48)))))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(34)
|
|
|
|
|
.addComponent(lb_pageBreakInlineStyle, GroupLayout.PREFERRED_SIZE, 184, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(7)
|
|
|
|
|
.addComponent(tf_pageBreakInlineStyle, GroupLayout.DEFAULT_SIZE, 799, Short.MAX_VALUE)
|
|
|
|
|
.addComponent(tf_pageBreakInlineStyle, GroupLayout.DEFAULT_SIZE, 802, Short.MAX_VALUE)
|
|
|
|
|
.addGap(60))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(32)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_ImageResolution, GroupLayout.PREFERRED_SIZE, 336, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addComponent(cbox_image_resolution, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addContainerGap())
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addComponent(cb_Pagination, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_Scale, GroupLayout.PREFERRED_SIZE, 175, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, 175, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_FilterLetterSpacing, GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addComponent(tf_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(215))
|
|
|
|
|
.addComponent(cb_convertToPx, GroupLayout.PREFERRED_SIZE, 592, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_IgnoreHardLineBreaks, GroupLayout.PREFERRED_SIZE, 389, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_IgnoreEmptyParagraphs, GroupLayout.PREFERRED_SIZE, 405, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_UseMathJax, GroupLayout.PREFERRED_SIZE, 409, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_EmbedVectorImages, GroupLayout.PREFERRED_SIZE, 313, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_InlineStyles, GroupLayout.PREFERRED_SIZE, 349, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_EmbedRaster, GroupLayout.PREFERRED_SIZE, 416, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGap(463))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(1)
|
|
|
|
|
.addComponent(lb_OutFilePath, GroupLayout.PREFERRED_SIZE, 184, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(10)
|
|
|
|
|
.addComponent(tf_OutputFile, GroupLayout.DEFAULT_SIZE, 668, Short.MAX_VALUE)
|
|
|
|
|
.addGap(21)
|
|
|
|
|
.addComponent(btn_ChooseOutputFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(10))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_TargetFormat_description)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(lb_TargetFormat, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(3)
|
|
|
|
|
.addComponent(lb_FilePath, GroupLayout.PREFERRED_SIZE, 178, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(14)
|
|
|
|
|
.addComponent(tf_inputFile, GroupLayout.DEFAULT_SIZE, 667, Short.MAX_VALUE)
|
|
|
|
|
.addGap(22)
|
|
|
|
|
.addComponent(btnChooseFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(10)))
|
|
|
|
|
.addGap(48))))))
|
|
|
|
|
);
|
|
|
|
|
gl_panel_configHTML.setVerticalGroup(
|
|
|
|
|
gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
@ -438,13 +454,10 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
.addGap(2)
|
|
|
|
|
.addComponent(lb_Scale))
|
|
|
|
|
.addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(6)
|
|
|
|
|
.addComponent(tf_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(8)
|
|
|
|
|
.addComponent(lb_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)))
|
|
|
|
|
.addGap(8)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(tf_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addComponent(cb_InlineStyles)
|
|
|
|
|
.addGap(7)
|
|
|
|
@ -459,9 +472,13 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
.addComponent(cb_IgnoreEmptyParagraphs)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_UseMathJax)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addComponent(cb_Pagination)
|
|
|
|
|
.addContainerGap(277, Short.MAX_VALUE))
|
|
|
|
|
.addGap(7)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_ImageResolution)
|
|
|
|
|
.addComponent(cbox_image_resolution, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addContainerGap(118, Short.MAX_VALUE))
|
|
|
|
|
);
|
|
|
|
|
panel_configHTML.setLayout(gl_panel_configHTML);
|
|
|
|
|
return panel_configHTML;
|
|
|
|
@ -488,11 +505,11 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
configuration.put(ARG_GREENSTONE, cb_Greenstone);
|
|
|
|
|
|
|
|
|
|
JCheckBox cb_IgnoreEmptyParagraphs = new JCheckBox(localizer.getTranslation(LABEL_INGNORE_EMPTY_PARS));
|
|
|
|
|
cb_IgnoreEmptyParagraphs.setSelected(true);
|
|
|
|
|
cb_IgnoreEmptyParagraphs.setSelected(false);
|
|
|
|
|
configuration.put(ARG_IGNORE_EMPTY_PARAGRAPHS, cb_IgnoreEmptyParagraphs);
|
|
|
|
|
|
|
|
|
|
JCheckBox cb_IgnoreHardLineBreaks = new JCheckBox(localizer.getTranslation(LABEL_FILETER_HARD_LINE_BREAKS));
|
|
|
|
|
cb_IgnoreHardLineBreaks.setSelected(true);
|
|
|
|
|
cb_IgnoreHardLineBreaks.setSelected(false);
|
|
|
|
|
configuration.put(ARG_IGNORE_HARD_LINE_BREAKS, cb_IgnoreHardLineBreaks);
|
|
|
|
|
|
|
|
|
|
JLabel lb_FilterLetterSpacing = new JLabel(localizer.getTranslation(LABEL_MIN_LETTER_SPACING));
|
|
|
|
@ -584,15 +601,20 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
cb_Pagination.setSelected(true);
|
|
|
|
|
configuration.put(ARG_PAGINATION, cb_Pagination);
|
|
|
|
|
|
|
|
|
|
JLabel lb_ImageResolution = new JLabel(localizer.getTranslation(LABEL_IMAGE_RESOLUTION));
|
|
|
|
|
|
|
|
|
|
JComboBox cbox_image_resolution = new JComboBox(resolutions);
|
|
|
|
|
cbox_image_resolution.setSelectedIndex(2);
|
|
|
|
|
|
|
|
|
|
configuration.put(ARG_IMAGE_RESOLUTION, cbox_image_resolution);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GroupLayout gl_panel_configHTML = new GroupLayout(panel_configHTML);
|
|
|
|
|
gl_panel_configHTML.setHorizontalGroup(
|
|
|
|
|
gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(32)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(cb_Pagination, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addContainerGap())
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_SplitByLevel, GroupLayout.PREFERRED_SIZE, 454, GroupLayout.PREFERRED_SIZE)
|
|
|
|
@ -651,12 +673,12 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
.addComponent(lb_OutFilePath, GroupLayout.PREFERRED_SIZE, 191, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addComponent(tf_OutputFile, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 579, Short.MAX_VALUE)
|
|
|
|
|
.addComponent(tf_inputFile, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 579, Short.MAX_VALUE))
|
|
|
|
|
.addGap(13)
|
|
|
|
|
.addComponent(tf_OutputFile, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 586, Short.MAX_VALUE)
|
|
|
|
|
.addComponent(tf_inputFile, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 586, Short.MAX_VALUE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addComponent(btn_ChooseInputFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(btn_ChooseOutputFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)))
|
|
|
|
|
.addComponent(btn_ChooseOutputFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(btn_ChooseInputFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)))
|
|
|
|
|
.addComponent(cb_UseMathJax, GroupLayout.PREFERRED_SIZE, 352, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(cb_SplitWholePagesOnly, GroupLayout.PREFERRED_SIZE, 323, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
@ -666,75 +688,81 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
.addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, 175, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(tf_pageBreakInlineStyle, GroupLayout.DEFAULT_SIZE, 707, Short.MAX_VALUE)
|
|
|
|
|
.addComponent(tf_MaxWidth, GroupLayout.PREFERRED_SIZE, 175, GroupLayout.PREFERRED_SIZE))))
|
|
|
|
|
.addGap(145)))))))))))))))
|
|
|
|
|
.addGap(145)))))))))))))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addComponent(cb_Pagination, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_ImageResolution, GroupLayout.PREFERRED_SIZE, 366, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(4)
|
|
|
|
|
.addComponent(cbox_image_resolution, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE)))
|
|
|
|
|
.addGap(615))))
|
|
|
|
|
);
|
|
|
|
|
gl_panel_configHTML.setVerticalGroup(
|
|
|
|
|
gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(12)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_TargetFormat_description)
|
|
|
|
|
.addComponent(lb_TargetFormat))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(tf_inputFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(btn_ChooseInputFile))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addContainerGap()
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_TargetFormat_description)
|
|
|
|
|
.addComponent(lb_TargetFormat))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addComponent(tf_inputFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(2)
|
|
|
|
|
.addComponent(lb_FilePath)))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_OutFilePath)
|
|
|
|
|
.addComponent(tf_OutputFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGap(12)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_pageBreakInlineStyle)
|
|
|
|
|
.addComponent(tf_pageBreakInlineStyle, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGap(18)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_Scale)
|
|
|
|
|
.addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_MaxWidth)
|
|
|
|
|
.addComponent(tf_MaxWidth, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_FilterLetterSpacing)
|
|
|
|
|
.addComponent(tf_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_InlineStyles)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_EmbedVectorImages)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_EmbedRaster)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_convertToPx)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_IgnoreHardLineBreaks)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_IgnoreEmptyParagraphs)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_Greenstone)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_SplitByLevel, GroupLayout.PREFERRED_SIZE, 16, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(tf_SplitByLevel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addComponent(cb_SplitWholePagesOnly)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_UseMathJax)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_Pagination)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED, 128, Short.MAX_VALUE))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addGap(34)
|
|
|
|
|
.addComponent(btn_ChooseInputFile)
|
|
|
|
|
.addGap(10)
|
|
|
|
|
.addComponent(btn_ChooseOutputFile)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED, 414, Short.MAX_VALUE)))
|
|
|
|
|
.addGap(118))
|
|
|
|
|
.addGap(2)
|
|
|
|
|
.addComponent(lb_FilePath)))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_OutFilePath)
|
|
|
|
|
.addComponent(tf_OutputFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(btn_ChooseOutputFile))
|
|
|
|
|
.addGap(12)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_pageBreakInlineStyle)
|
|
|
|
|
.addComponent(tf_pageBreakInlineStyle, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGap(18)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_Scale)
|
|
|
|
|
.addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_MaxWidth)
|
|
|
|
|
.addComponent(tf_MaxWidth, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_FilterLetterSpacing)
|
|
|
|
|
.addComponent(tf_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_InlineStyles)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_EmbedVectorImages)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_EmbedRaster)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_convertToPx)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_IgnoreHardLineBreaks)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_IgnoreEmptyParagraphs)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_Greenstone)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_SplitByLevel, GroupLayout.PREFERRED_SIZE, 16, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(tf_SplitByLevel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addComponent(cb_SplitWholePagesOnly)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_UseMathJax)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.UNRELATED)
|
|
|
|
|
.addComponent(cb_Pagination)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_ImageResolution)
|
|
|
|
|
.addComponent(cbox_image_resolution, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addGap(101))
|
|
|
|
|
);
|
|
|
|
|
panel_configHTML.setLayout(gl_panel_configHTML);
|
|
|
|
|
return panel_configHTML;
|
|
|
|
@ -808,11 +836,11 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
configuration.put(ARG_USE_MATHJAX, cb_UseMathJax);
|
|
|
|
|
|
|
|
|
|
JCheckBox cb_IgnoreEmptyParagraphs = new JCheckBox(localizer.getTranslation(LABEL_INGNORE_EMPTY_PARS));
|
|
|
|
|
cb_IgnoreEmptyParagraphs.setSelected(true);
|
|
|
|
|
cb_IgnoreEmptyParagraphs.setSelected(false);
|
|
|
|
|
configuration.put(ARG_IGNORE_EMPTY_PARAGRAPHS, cb_IgnoreEmptyParagraphs);
|
|
|
|
|
|
|
|
|
|
JCheckBox cb_IgnoreHardLineBreaks = new JCheckBox(localizer.getTranslation(LABEL_FILETER_HARD_LINE_BREAKS));
|
|
|
|
|
cb_IgnoreHardLineBreaks.setSelected(true);
|
|
|
|
|
cb_IgnoreHardLineBreaks.setSelected(false);
|
|
|
|
|
configuration.put(ARG_IGNORE_HARD_LINE_BREAKS, cb_IgnoreHardLineBreaks);
|
|
|
|
|
|
|
|
|
|
JLabel lb_FilterLetterSpacing = new JLabel(localizer.getTranslation(LABEL_MIN_LETTER_SPACING));
|
|
|
|
@ -928,6 +956,12 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
JCheckBox cb_Pagination = new JCheckBox(localizer.getTranslation(LABEL_PAGINATION));
|
|
|
|
|
configuration.put(ARG_PAGINATION, cb_Pagination);
|
|
|
|
|
|
|
|
|
|
JLabel lb_ImageResolution = new JLabel(localizer.getTranslation(LABEL_IMAGE_RESOLUTION));
|
|
|
|
|
|
|
|
|
|
JComboBox cbox_image_resolution = new JComboBox(resolutions);
|
|
|
|
|
configuration.put(ARG_IMAGE_RESOLUTION, cbox_image_resolution);
|
|
|
|
|
cbox_image_resolution.setSelectedIndex(2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GroupLayout gl_panel_configHTML = new GroupLayout(panel_configHTML);
|
|
|
|
|
gl_panel_configHTML.setHorizontalGroup(
|
|
|
|
@ -936,9 +970,14 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
.addGap(32)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(cb_Pagination, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(lb_ImageResolution, GroupLayout.PREFERRED_SIZE, 369, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addGap(4)
|
|
|
|
|
.addComponent(cbox_image_resolution, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addContainerGap())
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(cb_Pagination, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addContainerGap())
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(cb_convertToPx, GroupLayout.PREFERRED_SIZE, 592, GroupLayout.PREFERRED_SIZE)
|
|
|
|
@ -972,12 +1011,12 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addComponent(lb_TargetFormat, GroupLayout.PREFERRED_SIZE, 68, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addComponent(tf_OutputFile, GroupLayout.DEFAULT_SIZE, 572, Short.MAX_VALUE)
|
|
|
|
|
.addComponent(tf_OutputFile, GroupLayout.DEFAULT_SIZE, 561, Short.MAX_VALUE)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(tf_metadataPath, GroupLayout.DEFAULT_SIZE, 571, Short.MAX_VALUE)
|
|
|
|
|
.addComponent(tf_metadataPath, GroupLayout.DEFAULT_SIZE, 560, Short.MAX_VALUE)
|
|
|
|
|
.addGap(1))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(tf_inputFile, GroupLayout.DEFAULT_SIZE, 569, Short.MAX_VALUE)
|
|
|
|
|
.addComponent(tf_inputFile, GroupLayout.DEFAULT_SIZE, 558, Short.MAX_VALUE)
|
|
|
|
|
.addGap(3)))))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
@ -993,7 +1032,7 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_pageBreakInlineStyle, GroupLayout.PREFERRED_SIZE, 196, GroupLayout.PREFERRED_SIZE)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addComponent(tf_pageBreakInlineStyle, GroupLayout.DEFAULT_SIZE, 692, Short.MAX_VALUE)
|
|
|
|
|
.addComponent(tf_pageBreakInlineStyle, GroupLayout.DEFAULT_SIZE, 681, Short.MAX_VALUE)
|
|
|
|
|
.addGap(145))
|
|
|
|
|
.addGroup(gl_panel_configHTML.createSequentialGroup()
|
|
|
|
|
.addComponent(lb_type, GroupLayout.PREFERRED_SIZE, 148, GroupLayout.PREFERRED_SIZE)
|
|
|
|
@ -1078,7 +1117,11 @@ public class ConfigurationWindow extends JFrame {
|
|
|
|
|
.addComponent(cb_UseMathJax)
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addComponent(cb_Pagination)
|
|
|
|
|
.addContainerGap(113, Short.MAX_VALUE))
|
|
|
|
|
.addPreferredGap(ComponentPlacement.RELATED)
|
|
|
|
|
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
|
|
|
|
|
.addComponent(lb_ImageResolution)
|
|
|
|
|
.addComponent(cbox_image_resolution, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
|
|
|
|
|
.addContainerGap(87, Short.MAX_VALUE))
|
|
|
|
|
);
|
|
|
|
|
panel_configHTML.setLayout(gl_panel_configHTML);
|
|
|
|
|
return panel_configHTML;
|
|
|
|
|