|
|
|
@ -128,7 +128,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
UITabbedPane jtabPane = new UITabbedPane(); |
|
|
|
|
JPanel generalPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); |
|
|
|
|
jtabPane.addTab(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_General"), generalPane); |
|
|
|
|
jtabPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_General"), generalPane); |
|
|
|
|
JPanel advancePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); |
|
|
|
|
jtabPane.addTab(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Advanced"), advancePane); |
|
|
|
|
contentPane.add(jtabPane, BorderLayout.NORTH); |
|
|
|
@ -153,12 +153,12 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
createJdkHomePane(advancePane); |
|
|
|
|
|
|
|
|
|
JPanel oraclePane = FRGUIPaneFactory.createTitledBorderPane("Oracle" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Oracle_All_Tables")); |
|
|
|
|
oracleSpace = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Show_All_Oracle_Tables")); |
|
|
|
|
JPanel oraclePane = FRGUIPaneFactory.createTitledBorderPane("Oracle" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Oracle_All_Tables")); |
|
|
|
|
oracleSpace = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Show_All_Oracle_Tables")); |
|
|
|
|
oraclePane.add(oracleSpace); |
|
|
|
|
|
|
|
|
|
JPanel improvePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Product_improve")); |
|
|
|
|
joinProductImprove = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Join_Product_improve")); |
|
|
|
|
JPanel improvePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Product_Improve")); |
|
|
|
|
joinProductImprove = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Join_Product_Improve")); |
|
|
|
|
improvePane.add(joinProductImprove); |
|
|
|
|
|
|
|
|
|
JPanel spaceUpPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
@ -169,7 +169,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void createFunctionPane(JPanel generalPane) { |
|
|
|
|
JPanel functionPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference-Function")); |
|
|
|
|
JPanel functionPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Function")); |
|
|
|
|
generalPane.add(functionPane); |
|
|
|
|
|
|
|
|
|
//添加supportUndo选择项
|
|
|
|
@ -177,7 +177,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
functionPane.add(supportUndoCheckBox); |
|
|
|
|
//添加maxUndoLimit
|
|
|
|
|
//String[] undoTimes = {"最大撤销次数","5次","10次","15次","20次","50次"};
|
|
|
|
|
String[] undoTimes = {com.fr.design.i18n.Toolkit.i18nText("FR-Designer_max_undo_limit"), MAX_UNDO_LIMIT_5 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)"), MAX_UNDO_LIMIT_10 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)") |
|
|
|
|
String[] undoTimes = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Max_Undo_Limit"), MAX_UNDO_LIMIT_5 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)"), MAX_UNDO_LIMIT_10 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)") |
|
|
|
|
, MAX_UNDO_LIMIT_15 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)"), MAX_UNDO_LIMIT_20 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)"), MAX_UNDO_LIMIT_50 + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_time(s)")}; |
|
|
|
|
maxUndoLimit = new UIComboBox(undoTimes); |
|
|
|
|
functionPane.add(maxUndoLimit); |
|
|
|
@ -198,15 +198,15 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
private void createEditPane(JPanel generalPane) { |
|
|
|
|
//samuel:编辑器设置
|
|
|
|
|
JPanel editPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Editor_Preference")); |
|
|
|
|
JPanel editPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Editor_Preference")); |
|
|
|
|
generalPane.add(editPane); |
|
|
|
|
|
|
|
|
|
//设置是否支持将字符串编辑为公式
|
|
|
|
|
supportStringToFormulaBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Support_String_To_Formula")); |
|
|
|
|
supportStringToFormulaBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Support_String_To_Formula")); |
|
|
|
|
editPane.add(supportStringToFormulaBox); |
|
|
|
|
|
|
|
|
|
//是否默认转化
|
|
|
|
|
defaultStringToFormulaBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Always")); |
|
|
|
|
defaultStringToFormulaBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Always")); |
|
|
|
|
|
|
|
|
|
editPane.add(defaultStringToFormulaBox); |
|
|
|
|
//不支持转化则不能默认执行
|
|
|
|
@ -319,9 +319,9 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
//richer:选择导出log文件的目录.
|
|
|
|
|
JPanel logPane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane(); |
|
|
|
|
advancePane.add(logPane); |
|
|
|
|
JPanel logExportPane = FRGUIPaneFactory.createTitledBorderPane("log" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Export_Setting")); |
|
|
|
|
JPanel logExportPane = FRGUIPaneFactory.createTitledBorderPane("log" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Export_Setting")); |
|
|
|
|
logPane.add(logExportPane); |
|
|
|
|
UILabel logLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Select_Export_Log_Directory") + ":"); |
|
|
|
|
UILabel logLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select_Export_Log_Directory") + ":"); |
|
|
|
|
logExportPane.add(logLabel, BorderLayout.WEST); |
|
|
|
|
logExportDirectoryField = new UITextField(24); |
|
|
|
|
logExportPane.add(logExportDirectoryField, BorderLayout.CENTER); |
|
|
|
@ -340,7 +340,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
JPanel logLevelPane = FRGUIPaneFactory.createTitledBorderPane("log" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Level_Setting")); |
|
|
|
|
JPanel logLevelPane = FRGUIPaneFactory.createTitledBorderPane("log" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Level_Setting")); |
|
|
|
|
logPane.add(logLevelPane); |
|
|
|
|
logLevelComboBox = new UIComboBox(LOG); |
|
|
|
|
logLevelPane.add(logLevelComboBox); |
|
|
|
@ -355,13 +355,13 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
private void createLanPane(JPanel generalPane) { |
|
|
|
|
// ben:选择版本语言;
|
|
|
|
|
JPanel languageAndDashBoard_pane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane(); |
|
|
|
|
JPanel LanguagePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Choose_Language")); |
|
|
|
|
JPanel LanguagePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Choose_Language")); |
|
|
|
|
generalPane.add(languageAndDashBoard_pane); |
|
|
|
|
languageAndDashBoard_pane.add(LanguagePane); |
|
|
|
|
|
|
|
|
|
languageComboBox = createLanguageComboBox(); |
|
|
|
|
|
|
|
|
|
ActionLabel languageLabel = new ActionLabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Designer_Language")); |
|
|
|
|
ActionLabel languageLabel = new ActionLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Language")); |
|
|
|
|
languageLabel.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
@ -420,16 +420,16 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
double rowSize[] = {p}; |
|
|
|
|
|
|
|
|
|
// 长度单位选择
|
|
|
|
|
JPanel lengthPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Setting-Ruler-Units")); |
|
|
|
|
JPanel lengthPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Setting_Ruler_Units")); |
|
|
|
|
advancePane.add(lengthPane); |
|
|
|
|
pageLengthComboBox = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("FR-Designer_PageSetup-mm"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_CM"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_INCH")}); |
|
|
|
|
pageLengthComboBox = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Page_Setup_MM"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_CM"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_INCH")}); |
|
|
|
|
pageLengthComboBox.setPreferredSize(new Dimension(80, 20)); |
|
|
|
|
pageLengthComboBox.setMinimumSize(new Dimension(80, 20)); |
|
|
|
|
reportLengthComboBox = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("FR-Designer_PageSetup-mm"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_CM"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_INCH"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_PT")}); |
|
|
|
|
reportLengthComboBox = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Page_Setup_MM"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_CM"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_INCH"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Unit_PT")}); |
|
|
|
|
reportLengthComboBox.setPreferredSize(new Dimension(80, 20)); |
|
|
|
|
reportLengthComboBox.setMinimumSize(new Dimension(80, 20)); |
|
|
|
|
UILabel pagelengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Page-Setup-Scale-Units") + ":"); |
|
|
|
|
UILabel reportLengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Report-Design-Ruler-Units") + ":"); |
|
|
|
|
UILabel pagelengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Page_Setup_Scale_Units") + ":"); |
|
|
|
|
UILabel reportLengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Report_Design_Ruler_Units") + ":"); |
|
|
|
|
Component[][] lengthComponents = { |
|
|
|
|
{pagelengthLabel, pageLengthComboBox, reportLengthLabel, reportLengthComboBox}, |
|
|
|
|
}; |
|
|
|
@ -442,13 +442,13 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
double rowSize[] = {p}; |
|
|
|
|
double columnSize[] = {p, p, p}; |
|
|
|
|
|
|
|
|
|
JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Web_Preview_Port_Setting")); |
|
|
|
|
JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Port_Setting")); |
|
|
|
|
advancePane.add(serverPortPane); |
|
|
|
|
portEditor = new IntegerEditor(); |
|
|
|
|
portEditor.setPreferredSize(new Dimension(80, 20)); |
|
|
|
|
portEditor.setMinimumSize(new Dimension(80, 20)); |
|
|
|
|
UILabel notiJlabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Work_After_Restart_Designer")); |
|
|
|
|
UILabel serverPortLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Web_Preview_Port") + ":"); |
|
|
|
|
UILabel serverPortLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Port") + ":"); |
|
|
|
|
Component[][] portComponents = { |
|
|
|
|
{serverPortLabel, portEditor, notiJlabel}, |
|
|
|
|
}; |
|
|
|
@ -493,9 +493,9 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createMemoryPane() { |
|
|
|
|
JPanel memoryPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference_CachingTemplate")); |
|
|
|
|
UILabel memoryLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference_MaxCachingTemplate")); |
|
|
|
|
UILabel memoryTipLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preference_CachingTemplateTip")); |
|
|
|
|
JPanel memoryPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Caching_Template")); |
|
|
|
|
UILabel memoryLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Max_Caching_Template")); |
|
|
|
|
UILabel memoryTipLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Caching_Template_Tip")); |
|
|
|
|
memoryTipLabel.setBorder(BorderFactory.createEmptyBorder(0, CACHING_GAP, 0, 0)); |
|
|
|
|
cachingTemplateSpinner = new UISpinner(0, CACHING_MAX, 1, CACHING_DEFAULT); |
|
|
|
|
JPanel memorySpace = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
@ -645,12 +645,12 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
int rv = JOptionPane.showOptionDialog( |
|
|
|
|
null, |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Language_Change_Successful"), |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Language_Change_Successful"), |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"), |
|
|
|
|
JOptionPane.YES_NO_OPTION, |
|
|
|
|
JOptionPane.INFORMATION_MESSAGE, |
|
|
|
|
null, |
|
|
|
|
new String[]{com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Restart_Designer"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Basic_Restart_Designer_Later")}, |
|
|
|
|
new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Restart_Designer"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Restart_Designer_Later")}, |
|
|
|
|
null |
|
|
|
|
); |
|
|
|
|
if (rv == JOptionPane.OK_OPTION) { |
|
|
|
|