latexIncludes = new MTextArea(true, false);
latexIncludes.setToolTipText("<html>"+ //$NON-NLS-1$
LangTool.INSTANCE.getStringActions("PreferencesSetter.1")+ //$NON-NLS-1$
"<br>\\usepackage[frenchb]{babel}<br>\\usepackage[utf8]{inputenc}</html>"); //$NON-NLS-1$
checkNewVersion = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.newVers"));//$NON-NLS-1$
if(VersionChecker.WITH_UPDATE)
checkNewVersion.setSelected(true);
langList = new MComboBox<>();
for(final LangTool.Lang lang : LangTool.Lang.values())
langList.addItem(lang.getName());
langList.setMaximumSize(new Dimension(250, height));
langList.setSelectedItemSafely(LangTool.getCurrentLanguage().getName());
nbRecentFilesField = new MSpinner(new MSpinner.MSpinnerNumberModel(5, 0, 20, 1), new JLabel(LangTool.INSTANCE.getString19("PreferencesFrame.0")));//$NON-NLS-1$
nbRecentFilesField.setEditor(new JSpinner.NumberEditor(nbRecentFilesField, "0"));//$NON-NLS-1$
nbRecentFilesField.setMaximumSize(new Dimension(60, height));
final UIManager.LookAndFeelInfo[] info = UIManager.getInstalledLookAndFeels();
final String[] nameThemes = new String[info.length];
final String lnf = Theme.lookAndFeel();
String nameLnf = null;
for(int i=0; i<info.length;i++) {
nameThemes[i] = info[i].getName();
if(info[i].getClassName().equals(lnf))
nameLnf = nameThemes[i];
}
themeList = new MComboBox<>(nameThemes, new JLabel(LangTool.INSTANCE.getString19("PreferencesFrame.1"))); //$NON-NLS-1$
themeList.setMaximumSize(new Dimension(160, height));
if(nameLnf!=null)
themeList.setSelectedItem(nameLnf);
classicGridRB = new MRadioButton(LangTool.INSTANCE.getString18("PreferencesFrame.4")); //$NON-NLS-1$
classicGridRB.setSelected(false);
persoGridRB = new MRadioButton(LangTool.INSTANCE.getString18("PreferencesFrame.5")); //$NON-NLS-1$
persoGridRB.setSelected(true);
final ButtonGroup group = new ButtonGroup();
group.add(classicGridRB);
group.add(persoGridRB);
displayGridCB = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.grid"));//$NON-NLS-1$
displayGridCB.setSelected(true);
magneticGridCB = new MCheckBox(LangTool.INSTANCE.getString18("PreferencesFrame.6")); //$NON-NLS-1$
magneticGridCB.setSelected(true);
persoGridGapField = new MSpinner(new MSpinner.MSpinnerNumberModel(20, 2, 10000, 1), new JLabel(LangTool.INSTANCE.getString18("PreferencesFrame.7")));//$NON-NLS-1$
persoGridGapField.setEditor(new JSpinner.NumberEditor(persoGridGapField, "0"));//$NON-NLS-1$
persoGridGapField.setMaximumSize(new Dimension(60, height));
displayXScaleCB = new MCheckBox(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.38"));//$NON-NLS-1$
displayXScaleCB.setSelected(true);
displayYScaleCB = new MCheckBox(LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.39"));//$NON-NLS-1$
displayYScaleCB.setSelected(true);
unitChoice = new MComboBox<>();
unitChoice.addItem(Unit.CM.getLabel());
unitChoice.addItem(Unit.INCH.getLabel());
unitChoice.setMaximumSize(new Dimension(160, height));
unitChoice.setSelectedItem(Unit.CM.getLabel());
pathExportField = new MTextField();
pathOpenField = new MTextField();
antialiasingCheckBox = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.antiAl"));//$NON-NLS-1$
renderingCheckBox = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.rendQ"));//$NON-NLS-1$
colorRenderCheckBox = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.colRendQ"));//$NON-NLS-1$
alpaInterCheckBox = new MCheckBox(LangTool.INSTANCE.getStringDialogFrame("PreferencesFrame.AlphaQ"));//$NON-NLS-1$
antialiasingCheckBox.setSelected(true);
renderingCheckBox.setSelected(true);
colorRenderCheckBox.setSelected(true);
alpaInterCheckBox.setSelected(true);
}