Working on GUI

This commit is contained in:
Georgy Litvinov 2021-04-09 13:54:37 +02:00
parent 23f7544948
commit eaa1078cd3
3 changed files with 114 additions and 83 deletions

View file

@ -898,61 +898,89 @@ public class ConfigurationWindow extends JFrame {
GroupLayout gl_panel_configHTML = new GroupLayout(panel_configHTML);
gl_panel_configHTML.setHorizontalGroup(
gl_panel_configHTML.createParallelGroup(Alignment.TRAILING)
gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addGap(32)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addComponent(btn_metadataChoose, Alignment.TRAILING, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)
.addGroup(Alignment.TRAILING, gl_panel_configHTML.createSequentialGroup()
.addGap(32)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.TRAILING)
.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_type, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(cbox_type, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(lb_Scale, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, 98, GroupLayout.PREFERRED_SIZE))
.addComponent(cb_UseMathJax, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(lb_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, 229, 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, 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))
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(btnChooseFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.TRAILING)
.addComponent(lb_TargetFormat_description, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 311, GroupLayout.PREFERRED_SIZE)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addComponent(lb_FilePath, GroupLayout.PREFERRED_SIZE, 141, GroupLayout.PREFERRED_SIZE)
.addComponent(lb_metadataFilePath, GroupLayout.PREFERRED_SIZE, 134, GroupLayout.PREFERRED_SIZE)
.addComponent(lb_OutFilePath, GroupLayout.PREFERRED_SIZE, 153, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addComponent(tf_OutputFile, GroupLayout.DEFAULT_SIZE, 655, Short.MAX_VALUE)
.addComponent(tf_metadataPath, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 655, Short.MAX_VALUE)
.addComponent(tf_inputFile, GroupLayout.DEFAULT_SIZE, 655, Short.MAX_VALUE)
.addComponent(lb_TargetFormat, GroupLayout.PREFERRED_SIZE, 68, GroupLayout.PREFERRED_SIZE))))
.addGap(18)
.addComponent(btn_ChooseOutputFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED))))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addGap(40)
.addComponent(lb_pageBreakInlineStyle, GroupLayout.PREFERRED_SIZE, 202, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(tf_pageBreakInlineStyle, GroupLayout.DEFAULT_SIZE, 729, Short.MAX_VALUE)))
.addGap(21))
.addComponent(cb_Pagination, GroupLayout.PREFERRED_SIZE, 303, GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(cb_convertToPx, GroupLayout.PREFERRED_SIZE, 592, GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(cb_EmbedRaster)
.addContainerGap())
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(cb_EmbedVectorImages)
.addContainerGap())
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(lb_FilterLetterSpacing)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(tf_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addGap(599))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addComponent(cb_InlineStyles)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.TRAILING)
.addComponent(lb_TargetFormat_description, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 311, GroupLayout.PREFERRED_SIZE)
.addGroup(Alignment.LEADING, gl_panel_configHTML.createSequentialGroup()
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addComponent(lb_FilePath, GroupLayout.PREFERRED_SIZE, 176, GroupLayout.PREFERRED_SIZE)
.addComponent(lb_metadataFilePath, GroupLayout.PREFERRED_SIZE, 177, GroupLayout.PREFERRED_SIZE)
.addComponent(lb_OutFilePath, GroupLayout.PREFERRED_SIZE, 187, GroupLayout.PREFERRED_SIZE))
.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, 592, Short.MAX_VALUE)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(tf_metadataPath, GroupLayout.DEFAULT_SIZE, 591, Short.MAX_VALUE)
.addGap(1))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(tf_inputFile, GroupLayout.DEFAULT_SIZE, 589, Short.MAX_VALUE)
.addGap(3)))))
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addGap(11)
.addComponent(btnChooseFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addGap(12)
.addComponent(btn_metadataChoose, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addGap(11)
.addComponent(btn_ChooseOutputFile, GroupLayout.PREFERRED_SIZE, 113, GroupLayout.PREFERRED_SIZE)))
.addGap(149))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(lb_pageBreakInlineStyle, GroupLayout.PREFERRED_SIZE, 210, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(tf_pageBreakInlineStyle, GroupLayout.DEFAULT_SIZE, 660, Short.MAX_VALUE)
.addGap(149))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(lb_type, GroupLayout.PREFERRED_SIZE, 148, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, 98, GroupLayout.PREFERRED_SIZE)
.addComponent(cbox_type, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))))
.addGap(21))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(lb_Scale, GroupLayout.PREFERRED_SIZE, 137, GroupLayout.PREFERRED_SIZE)
.addContainerGap())))))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(cb_IgnoreEmptyParagraphs, GroupLayout.PREFERRED_SIZE, 339, GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(cb_UseMathJax, GroupLayout.PREFERRED_SIZE, 345, GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addComponent(cb_IgnoreHardLineBreaks, GroupLayout.PREFERRED_SIZE, 344, GroupLayout.PREFERRED_SIZE)
.addContainerGap()))))
);
gl_panel_configHTML.setVerticalGroup(
gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
@ -963,30 +991,33 @@ public class ConfigurationWindow extends JFrame {
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
.addComponent(lb_TargetFormat_description)
.addComponent(lb_TargetFormat))
.addGap(22)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addGap(22)
.addComponent(tf_inputFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addGap(24)
.addComponent(lb_FilePath, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(ComponentPlacement.UNRELATED)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addComponent(tf_metadataPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(lb_metadataFilePath, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.UNRELATED)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
.addComponent(tf_inputFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(btnChooseFile)))
.addComponent(lb_OutFilePath, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
.addComponent(tf_OutputFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
.addGroup(gl_panel_configHTML.createSequentialGroup()
.addGap(51)
.addComponent(lb_FilePath, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(ComponentPlacement.UNRELATED)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
.addComponent(tf_metadataPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(btn_metadataChoose))
.addComponent(lb_metadataFilePath))
.addPreferredGap(ComponentPlacement.UNRELATED)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.LEADING)
.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(18)
.addGap(46)
.addComponent(btnChooseFile)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(btn_metadataChoose)
.addGap(7)
.addComponent(btn_ChooseOutputFile)))
.addGap(20)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
.addComponent(lb_pageBreakInlineStyle, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE)
.addComponent(tf_pageBreakInlineStyle, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGap(61)
.addComponent(tf_pageBreakInlineStyle, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
.addGap(18)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
.addComponent(lb_type)
.addComponent(cbox_type, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
@ -994,27 +1025,27 @@ public class ConfigurationWindow extends JFrame {
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
.addComponent(lb_Scale)
.addComponent(tf_Scale, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.RELATED)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addGroup(gl_panel_configHTML.createParallelGroup(Alignment.BASELINE)
.addComponent(lb_FilterLetterSpacing)
.addComponent(tf_FilterLetterSpacing, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGap(4)
.addGap(10)
.addComponent(cb_InlineStyles)
.addGap(7)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(cb_EmbedVectorImages)
.addGap(7)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(cb_EmbedRaster)
.addGap(7)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(cb_convertToPx)
.addPreferredGap(ComponentPlacement.RELATED)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(cb_IgnoreHardLineBreaks)
.addGap(7)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(cb_IgnoreEmptyParagraphs)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(cb_UseMathJax)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(cb_Pagination)
.addContainerGap(172, Short.MAX_VALUE))
.addContainerGap(238, Short.MAX_VALUE))
);
panel_configHTML.setLayout(gl_panel_configHTML);
return panel_configHTML;

View file

@ -13,7 +13,7 @@ public class Localizer {
private String resourceBundle = "pro.litvinovg.w2phtml.gui.localizations.w2phtml";
private ResourceBundle translations;
public Localizer() {
currentLocale = Locale.forLanguageTag("EN");//Locale.getDefault();
currentLocale = Locale.forLanguageTag("RU");//Locale.getDefault();
translations = ResourceBundle.getBundle(resourceBundle, currentLocale);
}

View file

@ -17,7 +17,7 @@ label_min_letter_spacing=Отбросить межсимвольные расс
label_ingnore_empty_pars=Не конвертировать пустые параграфы
label_greenstone_split=Встроить комментарии для содержаний в Greenstone
label_break_style=Стиль разрывов страниц
label_pagination=Требуется ли пагинация
label_pagination=Требуется пагинация
label_split_whole_pages_only=Разрывы только по границам страниц
label_use_mathjax=Встроить библиотеку MathJax для формул
label_fileter_hard_line_breaks=Не конвертировать жесткие разрывы строк