|
|
|
@ -119,6 +119,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
private static final int CACHING_DEFAULT = 5; |
|
|
|
|
private static final int CACHING_GAP = 5; |
|
|
|
|
private static final int MEMORY_TIP_LABEL_MAX_WIDTH = 230; |
|
|
|
|
private static final int PREFERENCE_LABEL_MAX_WIDTH = 460; |
|
|
|
|
private static final int OFFSET_HEIGHT = 60; |
|
|
|
|
|
|
|
|
|
private static final String TYPE = "pressed"; |
|
|
|
@ -423,22 +424,20 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
private void createFunctionPane(JPanel generalPane) { |
|
|
|
|
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); |
|
|
|
|
JPanel supportUndoPanel = new JPanel(FRGUIPaneFactory.createLeftZeroVgapNormalHgapLayout()); |
|
|
|
|
topVerticalTitledBorderPane.add(supportUndoPanel); |
|
|
|
|
generalPane.add(topVerticalTitledBorderPane); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//添加supportUndo选择项
|
|
|
|
|
supportUndoCheckBox = new UICheckBox(i18nText("Fine-Design_Basic_Preference_Support_Undo")); |
|
|
|
|
upper.add(supportUndoCheckBox); |
|
|
|
|
supportUndoPanel.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); |
|
|
|
|
upper.add(maxUndoLimit); |
|
|
|
|
supportUndoPanel.add(maxUndoLimit); |
|
|
|
|
|
|
|
|
|
//不支持撤销则不能选择撤销可缓存,也不能设置最大撤销次数
|
|
|
|
|
supportUndoCheckBox.addActionListener(new ActionListener() { |
|
|
|
@ -452,14 +451,14 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
//添加supportDefaultParentCalculate选择项
|
|
|
|
|
supportDefaultParentCalculateCheckBox = new UICheckBox( |
|
|
|
|
i18nText("Fine-Design_Basic_Preference_Support_Default_Parent_Calculate")); |
|
|
|
|
upper.add(supportDefaultParentCalculateCheckBox); |
|
|
|
|
topVerticalTitledBorderPane.add(supportDefaultParentCalculateCheckBox); |
|
|
|
|
|
|
|
|
|
//添加是否展示打开模板提示缺少插件选择项
|
|
|
|
|
showTemplateMissingPlugin = new UICheckBox( |
|
|
|
|
i18nText("Fine-Design_Basic_Preference_Show-Template-Missing-Plugin")); |
|
|
|
|
upper.add(showTemplateMissingPlugin); |
|
|
|
|
topVerticalTitledBorderPane.add(showTemplateMissingPlugin); |
|
|
|
|
startWithEmptyFile = new UICheckBox(i18nText("Fine-Design_Basic_Preference_Start_Empty_File")); |
|
|
|
|
lower.add(startWithEmptyFile); |
|
|
|
|
topVerticalTitledBorderPane.add(startWithEmptyFile); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void createEditPane(JPanel generalPane) { |
|
|
|
@ -661,7 +660,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
startupPageEnabledCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Startup_Page_Config_Check_Text")); |
|
|
|
|
startupPane.add(startupPageEnabledCheckBox); |
|
|
|
|
UILabel descLabel = new UILabel(Toolkit.i18nText("Fine-Design_Startup_Page_Config_Desc")); |
|
|
|
|
UILabel descLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Startup_Page_Config_Desc"), PREFERENCE_LABEL_MAX_WIDTH); |
|
|
|
|
descLabel.setForeground(new Color(51, 51, 52, (int)Math.round(0.5 * 255))); |
|
|
|
|
startupPane.add(descLabel); |
|
|
|
|
} |
|
|
|
|