|
|
|
@ -44,6 +44,7 @@ import com.fr.design.utils.gui.GUICoreUtils;
|
|
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.general.FRFont; |
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
|
import com.fr.general.IOUtils; |
|
|
|
|
import com.fr.general.Inter; |
|
|
|
|
import com.fr.general.log.Log4jConfig; |
|
|
|
@ -75,6 +76,7 @@ import javax.swing.ButtonGroup;
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JDialog; |
|
|
|
|
import javax.swing.JFileChooser; |
|
|
|
|
import javax.swing.JLabel; |
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.JProgressBar; |
|
|
|
@ -639,17 +641,24 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
private void createEditPane(JPanel generalPane) { |
|
|
|
|
//samuel:编辑器设置
|
|
|
|
|
JPanel editPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Editor_Preference")); |
|
|
|
|
JPanel editPane; |
|
|
|
|
if(Locale.US.equals(GeneralContext.getLocale())) { |
|
|
|
|
//英文文本较长,需要换行展示
|
|
|
|
|
editPane = FRGUIPaneFactory.createTopVerticalTitledBorderPane(i18nText("Fine-Design_Basic_Editor_Preference")); |
|
|
|
|
} else { |
|
|
|
|
editPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Editor_Preference")); |
|
|
|
|
} |
|
|
|
|
generalPane.add(editPane); |
|
|
|
|
|
|
|
|
|
JPanel formulaPane = new JPanel(); |
|
|
|
|
//设置是否支持将字符串编辑为公式
|
|
|
|
|
supportStringToFormulaBox = new UICheckBox(i18nText("Fine-Design_Report_Support_String_To_Formula")); |
|
|
|
|
editPane.add(supportStringToFormulaBox); |
|
|
|
|
formulaPane.add(supportStringToFormulaBox); |
|
|
|
|
editPane.add(formulaPane); |
|
|
|
|
|
|
|
|
|
//是否默认转化
|
|
|
|
|
defaultStringToFormulaBox = new UICheckBox(i18nText("Fine-Design_Basic_Always")); |
|
|
|
|
|
|
|
|
|
editPane.add(defaultStringToFormulaBox); |
|
|
|
|
//不支持转化则不能默认执行
|
|
|
|
|
supportStringToFormulaBox.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
@ -661,7 +670,12 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
keyStrokePane.add(new UILabel(i18nText("Fine-Design_Basic_Support_Auto_Complete_Shortcut") + ":"), BorderLayout.WEST); |
|
|
|
|
shortCutLabel = new UILabel(); |
|
|
|
|
keyStrokePane.add(shortCutLabel, BorderLayout.CENTER); |
|
|
|
|
editPane.add(keyStrokePane); |
|
|
|
|
keyStrokePane.setBorder(new EmptyBorder(0, 10,0,0)); |
|
|
|
|
|
|
|
|
|
JPanel DefaultExecutePane = new JPanel(); |
|
|
|
|
DefaultExecutePane.add(defaultStringToFormulaBox); |
|
|
|
|
DefaultExecutePane.add(keyStrokePane); |
|
|
|
|
editPane.add(DefaultExecutePane); |
|
|
|
|
shortCutLabel.addMouseListener(new MouseAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
|