|
|
|
@ -173,7 +173,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
private UICheckBox gcEnableCheckBox; |
|
|
|
|
private UIButton gcButton; |
|
|
|
|
private UILabel remindVcsLabel; |
|
|
|
|
|
|
|
|
|
private UICheckBox startWithEmptyFile; |
|
|
|
|
private JDialog gcDialog; |
|
|
|
|
private UILabel gcMessage = new UILabel(); |
|
|
|
|
private JPanel gcDialogDownPane = new JPanel(); |
|
|
|
@ -336,18 +336,23 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void createFunctionPane(JPanel generalPane) { |
|
|
|
|
JPanel functionPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Preference_Function")); |
|
|
|
|
generalPane.add(functionPane); |
|
|
|
|
JPanel topVerticalTitledBorderPane = FRGUIPaneFactory.createTopVerticalTitledBorderPane(i18nText("Fine-Design_Basic_Preference_Function")); |
|
|
|
|
JPanel upper = new JPanel(FRGUIPaneFactory.createLeftZeroVgapNormalHgapLayout()); |
|
|
|
|
JPanel lower = new JPanel(FRGUIPaneFactory.createLeftZeroVgapNormalHgapLayout()); |
|
|
|
|
topVerticalTitledBorderPane.add(upper); |
|
|
|
|
topVerticalTitledBorderPane.add(lower); |
|
|
|
|
generalPane.add(topVerticalTitledBorderPane); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//添加supportUndo选择项
|
|
|
|
|
supportUndoCheckBox = new UICheckBox(i18nText("Fine-Design_Basic_Preference_Support_Undo")); |
|
|
|
|
functionPane.add(supportUndoCheckBox); |
|
|
|
|
upper.add(supportUndoCheckBox); |
|
|
|
|
//添加maxUndoLimit
|
|
|
|
|
//String[] undoTimes = {"最大撤销次数","5次","10次","15次","20次","50次"};
|
|
|
|
|
String[] undoTimes = {i18nText("Fine-Design_Basic_Max_Undo_Limit"), MAX_UNDO_LIMIT_5 + i18nText("Fine-Design_Basic_Time(s)"), MAX_UNDO_LIMIT_10 + i18nText("Fine-Design_Basic_Time(s)") |
|
|
|
|
, MAX_UNDO_LIMIT_15 + i18nText("Fine-Design_Basic_Time(s)"), MAX_UNDO_LIMIT_20 + i18nText("Fine-Design_Basic_Time(s)"), MAX_UNDO_LIMIT_50 + i18nText("Fine-Design_Basic_Time(s)")}; |
|
|
|
|
maxUndoLimit = new UIComboBox(undoTimes); |
|
|
|
|
functionPane.add(maxUndoLimit); |
|
|
|
|
upper.add(maxUndoLimit); |
|
|
|
|
|
|
|
|
|
//不支持撤销则不能选择撤销可缓存,也不能设置最大撤销次数
|
|
|
|
|
supportUndoCheckBox.addActionListener(new ActionListener() { |
|
|
|
@ -361,12 +366,14 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
//添加supportDefaultParentCalculate选择项
|
|
|
|
|
supportDefaultParentCalculateCheckBox = new UICheckBox( |
|
|
|
|
i18nText("Fine-Design_Basic_Preference_Support_Default_Parent_Calculate")); |
|
|
|
|
functionPane.add(supportDefaultParentCalculateCheckBox); |
|
|
|
|
upper.add(supportDefaultParentCalculateCheckBox); |
|
|
|
|
|
|
|
|
|
//添加是否展示打开模板提示缺少插件选择项
|
|
|
|
|
showTemplateMissingPlugin = new UICheckBox( |
|
|
|
|
i18nText("Fine-Design_Basic_Preference_Show-Template-Missing-Plugin")); |
|
|
|
|
functionPane.add(showTemplateMissingPlugin); |
|
|
|
|
upper.add(showTemplateMissingPlugin); |
|
|
|
|
startWithEmptyFile = new UICheckBox(i18nText("Fine-Design_Basic_Preference_Start_Empty_File")); |
|
|
|
|
lower.add(startWithEmptyFile); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void createEditPane(JPanel generalPane) { |
|
|
|
@ -717,6 +724,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.embedServerLazyStartupCheckBox.setSelected(designerEnvManager.isEmbedServerLazyStartup()); |
|
|
|
|
this.startWithEmptyFile.setSelected(designerEnvManager.isStartWithEmptyFile()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private int chooseCase(int sign) { |
|
|
|
@ -800,7 +808,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
if (maxUndoLimit.getSelectedIndex() == SELECTED_INDEX_5) { |
|
|
|
|
designerEnvManager.setUndoLimit(MAX_UNDO_LIMIT_50); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
designerEnvManager.setStartWithEmptyFile(startWithEmptyFile.isSelected()); |
|
|
|
|
if (WorkContext.getCurrent().isLocal()) { |
|
|
|
|
Configurations.update(new Worker() { |
|
|
|
|
@Override |
|
|
|
|