diff --git a/designer-base/pom.xml b/designer-base/pom.xml
index d97a420933..25e3c1ec51 100644
--- a/designer-base/pom.xml
+++ b/designer-base/pom.xml
@@ -6,8 +6,11 @@
com.fr.report
design
- 10.0-RELEASE-SNAPSHOT
+ 10.0
+ com.fr.report
+ designer-base
+ ${branch}-SNAPSHOT
io.socket
@@ -15,7 +18,5 @@
0.7.0
- com.fr.report
- designer-base
- 10.0-RELEASE-SNAPSHOT
+
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
index e2335c111f..4222144ae3 100644
--- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
+++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
@@ -208,7 +208,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
String installHome = StableUtils.getInstallHome();
if (installHome != null && !".".equals(installHome)) {
- String name = com.fr.design.i18n.Toolkit.i18nText("FR-Engine_DEFAULT");
+ String name = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_DEFAULT");
String envPath = designerEnvManager.getDefaultenvPath(installHome);
designerEnvManager.putEnv(name, LocalDesignerWorkspaceInfo.create(name, envPath));
designerEnvManager.setCurEnvName(name);
@@ -1519,7 +1519,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
if ((tmpVal = reader.getAttrAsString("webinfLocation", null)) != null) {
// marks:兼容6.1的
// marks:设置默认的目录.
- String curReportServerName = com.fr.design.i18n.Toolkit.i18nText("Server-Embedded_Server");
+ String curReportServerName = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Embedded_Server");
LocalDesignerWorkspaceInfo reportServer = LocalDesignerWorkspaceInfo.create(curReportServerName, tmpVal);
this.putEnv(curReportServerName, reportServer);
diff --git a/designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java b/designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java
index 1cd5f115b9..9b689bc97f 100644
--- a/designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java
@@ -44,7 +44,7 @@ public class BBSAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@@ -61,7 +61,7 @@ public class BBSAction extends UpdateAction
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_BBS");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community_Bbs");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/community/BugAction.java b/designer-base/src/main/java/com/fr/design/actions/community/BugAction.java
index c446caa6de..b22093060d 100644
--- a/designer-base/src/main/java/com/fr/design/actions/community/BugAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/community/BugAction.java
@@ -38,7 +38,7 @@ public void actionPerformed(ActionEvent arg0)
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@@ -52,7 +52,7 @@ public void actionPerformed(ActionEvent arg0)
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_BUG");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community_Bug");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java b/designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java
index 552923b5f7..c49a484f72 100644
--- a/designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java
@@ -39,7 +39,7 @@ public class NeedAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@@ -57,7 +57,7 @@ public class NeedAction extends UpdateAction
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_NEED");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Commuinity_Need");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java b/designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java
index 0b6d33ee15..390827f160 100644
--- a/designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java
@@ -38,7 +38,7 @@ public void actionPerformed(ActionEvent arg0)
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@@ -56,7 +56,7 @@ public void actionPerformed(ActionEvent arg0)
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_QUESTIONS");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community_Questions");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/community/SignAction.java b/designer-base/src/main/java/com/fr/design/actions/community/SignAction.java
index 2e4c5142f4..fe59c01f53 100644
--- a/designer-base/src/main/java/com/fr/design/actions/community/SignAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/community/SignAction.java
@@ -39,7 +39,7 @@ public class SignAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@@ -57,7 +57,7 @@ public class SignAction extends UpdateAction
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_SIGN");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community_sign");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/community/UpAction.java b/designer-base/src/main/java/com/fr/design/actions/community/UpAction.java
index 024039ee52..d1baef84f0 100644
--- a/designer-base/src/main/java/com/fr/design/actions/community/UpAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/community/UpAction.java
@@ -39,7 +39,7 @@ public class UpAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@@ -57,7 +57,7 @@ public class UpAction extends UpdateAction
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_UPDATE");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community_Update");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java b/designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java
index f28ee3b722..662fe689bb 100644
--- a/designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java
@@ -45,7 +45,7 @@ public class VideoAction extends UpdateAction
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Set_default_browser"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser_Duplicate"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@@ -63,7 +63,7 @@ public class VideoAction extends UpdateAction
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_VIDEO");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community_Video");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/edit/CopyAction.java b/designer-base/src/main/java/com/fr/design/actions/edit/CopyAction.java
index 2b02d75eb8..568b439f03 100644
--- a/designer-base/src/main/java/com/fr/design/actions/edit/CopyAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/edit/CopyAction.java
@@ -20,7 +20,7 @@ public class CopyAction extends TemplateComponentAction {
public CopyAction(TargetComponent t) {
super(t);
- this.setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Copy"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Copy"));
this.setMnemonic('C');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER));
diff --git a/designer-base/src/main/java/com/fr/design/actions/edit/CutAction.java b/designer-base/src/main/java/com/fr/design/actions/edit/CutAction.java
index 0c668c8c6a..67ffae2377 100644
--- a/designer-base/src/main/java/com/fr/design/actions/edit/CutAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/edit/CutAction.java
@@ -24,7 +24,7 @@ public class CutAction extends TemplateComponentAction {
public CutAction(TargetComponent t) {
super(t);
- this.setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Cut"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Cut"));
this.setMnemonic('T');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER));
diff --git a/designer-base/src/main/java/com/fr/design/actions/edit/PasteAction.java b/designer-base/src/main/java/com/fr/design/actions/edit/PasteAction.java
index 5f88504b69..476516a79c 100644
--- a/designer-base/src/main/java/com/fr/design/actions/edit/PasteAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/edit/PasteAction.java
@@ -24,7 +24,7 @@ public class PasteAction extends TemplateComponentAction {
public PasteAction(TargetComponent t) {
super(t);
- this.setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Paste"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Edit_Paste"));
this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER));
diff --git a/designer-base/src/main/java/com/fr/design/actions/file/CloseTemplateAction.java b/designer-base/src/main/java/com/fr/design/actions/file/CloseTemplateAction.java
index d483df5a78..d920721193 100644
--- a/designer-base/src/main/java/com/fr/design/actions/file/CloseTemplateAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/file/CloseTemplateAction.java
@@ -19,7 +19,7 @@ public class CloseTemplateAction extends JTemplateAction> {
public CloseTemplateAction(JTemplate, ?> jt) {
super(jt);
- this.setName(com.fr.design.i18n.Toolkit.i18nText("M-Close_Template"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Close_Template"));
this.setMnemonic('C');
}
diff --git a/designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java b/designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java
index a4bf798f20..f8b185a09d 100644
--- a/designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java
@@ -1,17 +1,17 @@
package com.fr.design.actions.file;
-import java.awt.event.ActionEvent;
-
import com.fr.design.actions.UpdateAction;
import com.fr.design.mainframe.TemplatePane;
+import java.awt.event.ActionEvent;
+
public class EditEnvAction extends UpdateAction {
public EditEnvAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("M-Others") + "...");
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Others") + "...");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java b/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java
index 2c914bd479..634af28b9e 100644
--- a/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java
+++ b/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java
@@ -95,8 +95,8 @@ public class LocalePane extends BasicPane {
});
- tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Preference-Predefined"), new UIScrollPane(predefinedTable));
- tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Preference-Custom"), new UIScrollPane(customTable));
+ tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Predefined"), new UIScrollPane(predefinedTable));
+ tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Custom"), new UIScrollPane(customTable));
loadData();
}
@@ -146,7 +146,7 @@ public class LocalePane extends BasicPane {
keyVector.addAll(sortKeys);
- predefineTableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Key"), keyVector);
+ predefineTableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Key"), keyVector);
for (Map.Entry> entry : data.entrySet()) {
predefineTableModel.addColumn(entry.getKey().getDisplayName(), entry.getValue());
}
@@ -161,7 +161,7 @@ public class LocalePane extends BasicPane {
List list = new ArrayList();
Set keys = new HashSet();
- customTableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Key"));
+ customTableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Key"));
for (FileNode fileNode : fileNodes) {
String fileName = fileNode.getName();
if (fileName.endsWith(".properties")) {
@@ -218,6 +218,6 @@ public class LocalePane extends BasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Preference-Locale");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Locale");
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
index 30a9528b7a..aec3f42f3e 100644
--- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
+++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
@@ -24,6 +24,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
+import com.fr.general.Inter;
import com.fr.general.log.Log4jConfig;
import com.fr.locale.InterProviderFactory;
import com.fr.third.apache.log4j.Level;
@@ -128,9 +129,9 @@ 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);
+ jtabPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Advanced"), advancePane);
contentPane.add(jtabPane, BorderLayout.NORTH);
@@ -153,12 +154,12 @@ public class PreferencePane extends BasicPane {
createJdkHomePane(advancePane);
- JPanel oraclePane = FRGUIPaneFactory.createTitledBorderPane("Oracle" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Oracle_All_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,16 +170,16 @@ 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选择项
- supportUndoCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Preference-Support_Undo"));
+ supportUndoCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Support_Undo"));
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)")
- , 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)")};
+ String[] undoTimes = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Max_Undo_Limit"), MAX_UNDO_LIMIT_5 + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Time(s)"), MAX_UNDO_LIMIT_10 + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Time(s)")
+ , MAX_UNDO_LIMIT_15 + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Time(s)"), MAX_UNDO_LIMIT_20 + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Time(s)"), MAX_UNDO_LIMIT_50 + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Time(s)")};
maxUndoLimit = new UIComboBox(undoTimes);
functionPane.add(maxUndoLimit);
@@ -192,7 +193,7 @@ public class PreferencePane extends BasicPane {
//添加supportDefaultParentCalculate选择项
supportDefaultParentCalculateCheckBox = new UICheckBox(
- com.fr.design.i18n.Toolkit.i18nText("Preference-Support_Default_Parent_Calculate"));
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Support_Default_Parent_Calculate"));
functionPane.add(supportDefaultParentCalculateCheckBox);
}
@@ -216,7 +217,7 @@ public class PreferencePane extends BasicPane {
}
});
JPanel keyStrokePane = new JPanel(new BorderLayout());
- keyStrokePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Support-Auto_Complete_Shortcut") + ":"), BorderLayout.WEST);
+ keyStrokePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Support_Auto_Complete_Shortcut") + ":"), BorderLayout.WEST);
shortCutLabel = new UILabel();
keyStrokePane.add(shortCutLabel, BorderLayout.CENTER);
editPane.add(keyStrokePane);
@@ -246,7 +247,7 @@ public class PreferencePane extends BasicPane {
requestFocusInWindow();
label = new UILabel(text);
add(GUICoreUtils.createBorderLayoutPane(
- new UILabel(com.fr.design.i18n.Toolkit.i18nText("Support-Current_Auto_Complete_Shortcut") + ":"),
+ new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Support_Current_Auto_Complete_Shortcut") + ":"),
BorderLayout.WEST,
label,
BorderLayout.CENTER),
@@ -280,24 +281,24 @@ public class PreferencePane extends BasicPane {
private void createGuiOfGridPane(JPanel generalPane) {
// GridPane
- JPanel guiOfGridPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Preference-Setting_Grid"));
+ JPanel guiOfGridPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Setting_Grid"));
generalPane.add(guiOfGridPane);
- supportCellEditorDefCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Preference-Support_Cell_Editor_Definition"));
+ supportCellEditorDefCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Support_Cell_Editor_Definition"));
guiOfGridPane.add(supportCellEditorDefCheckBox);
- isDragPermitedCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Preference-Is_Drag_Permited"));
+ isDragPermitedCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Is_Drag_Permited"));
guiOfGridPane.add(isDragPermitedCheckBox);
}
private void createColorSettingPane(JPanel generalPane) {
// Color Setting Pane
- JPanel colorSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Preference-Setting_Colors"));
+ JPanel colorSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Setting_Colors"));
generalPane.add(colorSettingPane);
- new UILabel(com.fr.design.i18n.Toolkit.i18nText("Preference-Grid_Line_Color"));
+ new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Grid_Line_Color"));
- new UILabel(com.fr.design.i18n.Toolkit.i18nText("Preference-Pagination_Line_Color"));
+ new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Pagination_Line_Color"));
gridLineColorTBButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/foreground.png"));
gridLineColorTBButton.setEnabled(this.isEnabled());
@@ -306,10 +307,10 @@ public class PreferencePane extends BasicPane {
paginationLineColorTBButton.setEnabled(this.isEnabled());
JPanel leftPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
- leftPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Preference-Grid_Line_Color") + ":"));
+ leftPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Grid_Line_Color") + ":"));
leftPane.add(gridLineColorTBButton);
JPanel rightPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
- rightPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Preference-Pagination_Line_Color") + ":"));
+ rightPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Pagination_Line_Color") + ":"));
rightPane.add(paginationLineColorTBButton);
colorSettingPane.add(leftPane);
colorSettingPane.add(rightPane);
@@ -319,9 +320,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 +341,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 +356,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) {
@@ -375,7 +376,7 @@ public class PreferencePane extends BasicPane {
dlg.setVisible(true);
}
});
- UILabel noticeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Work_After_Restart_Designer"));//sail:提示重启后生效
+ UILabel noticeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Work_After_Restart_Designer"));//sail:提示重启后生效
double p = TableLayout.PREFERRED;
double rowSize[] = {p};
double columnSize[] = {p, p, p};
@@ -394,7 +395,8 @@ public class PreferencePane extends BasicPane {
int i = 0;
for (Map.Entry entry : map.entrySet()) {
keys[i] = entry.getKey();
- values[i] = com.fr.design.i18n.Toolkit.i18nText(entry.getValue());
+ // 想要读取到,必需在这里 使用 Inter 才行。
+ values[i] = Inter.getLocText(entry.getValue());
i++;
}
UIDictionaryComboBox languageComboBox = new UIDictionaryComboBox<>(keys, values);
@@ -420,16 +422,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("Fine-Design_Report_Unit_CM"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_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("Fine-Design_Report_Unit_CM"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Unit_INCH"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Unit_PT_Duplicate")});
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 +444,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 notiJlabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Work_After_Restart_Designer"));
+ UILabel serverPortLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Port") + ":");
Component[][] portComponents = {
{serverPortLabel, portEditor, notiJlabel},
};
@@ -461,7 +463,7 @@ public class PreferencePane extends BasicPane {
double rowSize[] = {p};
double columnSize[] = {p, p, p};
- JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Preference-JDK_Home"));
+ JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_JDK_Home"));
advancePane.add(serverPortPane);
jdkHomeTextField = new UITextField();
UIButton chooseBtn = new UIButton("...");
@@ -483,8 +485,8 @@ public class PreferencePane extends BasicPane {
}
});
panel.setPreferredSize(new Dimension(300, 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("Preference-JDK_Home") + ":");
+ UILabel notiJlabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Work_After_Restart_Designer"));
+ UILabel serverPortLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_JDK_Home") + ":");
Component[][] portComponents = {
{serverPortLabel, panel, notiJlabel},
};
@@ -493,9 +495,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());
@@ -508,7 +510,7 @@ public class PreferencePane extends BasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("M_Window-Preference");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Window_Preference");
}
/**
@@ -645,8 +647,8 @@ 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("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Language_Change_Successful"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
diff --git a/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java b/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java
index 915c06981e..d79df8d2c3 100644
--- a/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java
+++ b/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java
@@ -116,7 +116,7 @@ public class SwitchExistEnv extends MenuDef {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remote_Connect_Auth_Failed"),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
} catch (RegistEditionException exception) {
- JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Lic_does_not_Support_Remote"),
+ JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Lic_Does_Not_Support_Remote"),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
} catch (Exception exception) {
FineLoggerFactory.getLogger().error(exception.getMessage(), exception);
diff --git a/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java b/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java
index 3307ad02e1..2a73de7a40 100644
--- a/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java
+++ b/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java
@@ -59,8 +59,8 @@ public final class WebPreviewUtils {
browseUrl(currentTemplate, baseRoute, map, actionType, jt);
} else {
// 说明模板没有保存在报表运行环境下面,提示用户
- int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Web_Preview_Message"),
- com.fr.design.i18n.Toolkit.i18nText("Preview_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
+ int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Message"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview_Tool_Tips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
if (JOptionPane.OK_OPTION == selVal) {
if (!jt.saveAsTemplate2Env()) {
@@ -103,8 +103,8 @@ public final class WebPreviewUtils {
}
DesignUtils.visitEnvServerByParameters(baseRoute, parameterNameList.toArray(new String[parameterNameList.size()]), parameterValueList.toArray(new String[parameterValueList.size()]));
} else {
- int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Web_Preview_Message"),
- com.fr.design.i18n.Toolkit.i18nText("Preview_ToolTips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
+ int selVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Message"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview_Tool_Tips"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
if (JOptionPane.OK_OPTION == selVal) {
if (!jt.saveAsTemplate()) {
return;
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutAction.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutAction.java
index 00a4cf9913..4dcc53a13c 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/AboutAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutAction.java
@@ -39,7 +39,7 @@ public class AboutAction extends UpdateAction {
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("M_Help-About_Software");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Help_About_Software");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutDialog.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutDialog.java
index af62e25fca..b4b6d53c6f 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/AboutDialog.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutDialog.java
@@ -47,7 +47,7 @@ public class AboutDialog extends JDialog implements ActionListener {
sysPane = new SystemInfoPane();
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_About"), aboutPanel);
- tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("System"), sysPane);
+ tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("FIne-Design_Basic_System"), sysPane);
buttonPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
buttonPanel.add(okButton);
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
index 52dfa42931..b8acba9fe2 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
@@ -72,11 +72,11 @@ public class AboutPane extends JPanel {
addPhoneAndQQPane(contentPane);
// 官网
- JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Official_Website"), CloudCenter.getInstance().acquireUrlByKind("website." + GeneralContext.getLocale(), ProductConstants.WEBSITE_URL));
+ JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Official_Website"), CloudCenter.getInstance().acquireUrlByKind("website." + GeneralContext.getLocale(), ProductConstants.WEBSITE_URL));
// 支持邮箱
String defaultEmail = CloudCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL);
- JPanel emailPane = getEmailActionPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Support_Email"), CloudCenter.getInstance().acquireUrlByKind("support.email." + GeneralContext.getLocale(), defaultEmail));
+ JPanel emailPane = getEmailActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Support_Email"), CloudCenter.getInstance().acquireUrlByKind("support.email." + GeneralContext.getLocale(), defaultEmail));
contentPane.add(urlActionPane);
contentPane.add(emailPane);
@@ -96,7 +96,7 @@ public class AboutPane extends JPanel {
if (GeneralContext.getLocale().equals(Locale.US)) {
return;
}
- boxCenterAlignmentPane = new BoxCenterAligmentPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Service_Phone") + CloudCenter.getInstance().acquireUrlByKind("service.phone." + FRContext.getLocale(), COMPANY_TELEPHONE));
+ boxCenterAlignmentPane = new BoxCenterAligmentPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Service_Phone") + CloudCenter.getInstance().acquireUrlByKind("service.phone." + FRContext.getLocale(), COMPANY_TELEPHONE));
contentPane.add(boxCenterAlignmentPane);
// 繁体版不显示QQ
if (GeneralContext.getLocale().equals(Locale.TAIWAN)) {
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/FeedBackAction.java b/designer-base/src/main/java/com/fr/design/actions/help/FeedBackAction.java
index ee9a18453d..348d71dd23 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/FeedBackAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/FeedBackAction.java
@@ -46,7 +46,7 @@ public class FeedBackAction extends UpdateAction {
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("product_feedback");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Product_Feedback");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java b/designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java
index fb1bcf6db0..3047f64703 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java
@@ -67,9 +67,9 @@ public class FeedBackPane extends BasicPane {
private static final int TEL_MAX_LENGTH = 11;
private static final String ALLOWED_INTEGER_TYPE = "0123456789";
private SwingWorker worker;
- private JDialog dlg = new JDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Send"), true);
+ private JDialog dlg = new JDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Send"), true);
private UIButton ok = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OK"));
- private UIButton cancle = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Cancel"));
+ private UIButton cancle = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cancel"));
private int ifHasBeenWriten = 0;
private UITextArea detailField;
private boolean isSendSuccessful = false;
@@ -206,8 +206,8 @@ public class FeedBackPane extends BasicPane {
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel("QQ:", SwingConstants.RIGHT), qq},
- new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("email") + ":", SwingConstants.RIGHT), email},
- new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("mobile_number") + ":", SwingConstants.RIGHT), phone}
+ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email") + ":", SwingConstants.RIGHT), email},
+ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Mobile_Number") + ":", SwingConstants.RIGHT), phone}
};
double[] rowSize = {p, p, p};
double[] columnSize = {p, p};
@@ -219,7 +219,7 @@ public class FeedBackPane extends BasicPane {
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEFT, GAP, 0));
controlPane.add(buttonsPane, BorderLayout.EAST);
- sendButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Send"));
+ sendButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Send"));
buttonsPane.add(sendButton);
buttonsPane.setBorder(SEND_BORDER);
sendButton.addActionListener(new ActionListener() {
@@ -235,7 +235,7 @@ public class FeedBackPane extends BasicPane {
private void doWithSendPane() {
Object[] options = new Object[]{ok, cancle};
- send = new JOptionPane(com.fr.design.i18n.Toolkit.i18nText("sending"),
+ send = new JOptionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sending"),
JOptionPane.INFORMATION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]);
ok.setEnabled(false);
ok.addActionListener(new ActionListener() {
@@ -246,7 +246,7 @@ public class FeedBackPane extends BasicPane {
feedbackDialog.dispose();
} else {
ok.setEnabled(false);
- send.setMessage(com.fr.design.i18n.Toolkit.i18nText("sending"));
+ send.setMessage(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sending"));
setWorker(send);
worker.execute();
}
@@ -292,7 +292,7 @@ public class FeedBackPane extends BasicPane {
if (model) {
//发送成功
isSendSuccessful = true;
- send.setMessage(com.fr.design.i18n.Toolkit.i18nText("HJS-Send_Successfully") + "!");
+ send.setMessage(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_Send_Successfully") + "!");
} else {
isSendSuccessful = false;
}
@@ -309,7 +309,7 @@ public class FeedBackPane extends BasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("product_feedback");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Product_Feedback");
}
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java b/designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java
index ebfb100836..65ce1924c0 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java
@@ -48,7 +48,7 @@ public class ForumAction extends UpdateAction {
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@@ -66,7 +66,7 @@ public class ForumAction extends UpdateAction {
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("Forum");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Forum");
}
@Override
@@ -74,4 +74,4 @@ public class ForumAction extends UpdateAction {
return null;
}
};
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/SupportQQAction.java b/designer-base/src/main/java/com/fr/design/actions/help/SupportQQAction.java
index 6e08a7258f..a118f9d878 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/SupportQQAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/SupportQQAction.java
@@ -37,7 +37,7 @@ public class SupportQQAction extends UpdateAction {
try {
Desktop.getDesktop().browse(new URI(ProductConstants.SUPPORT_QQ));
} catch (IOException exp) {
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Set_default_browser"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
@@ -52,7 +52,7 @@ public class SupportQQAction extends UpdateAction {
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("Support_QQ");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Support_QQ");
}
@Override
@@ -60,4 +60,4 @@ public class SupportQQAction extends UpdateAction {
return null;
}
};
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/SystemInfoPane.java b/designer-base/src/main/java/com/fr/design/actions/help/SystemInfoPane.java
index f33a0473aa..7fe26054f6 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/SystemInfoPane.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/SystemInfoPane.java
@@ -25,8 +25,8 @@ public class SystemInfoPane extends JPanel {
return false;
}
};
- tableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Property"));
- tableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Value"));
+ tableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"));
+ tableModel.addColumn(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Value"));
Properties properties = System.getProperties();
Object[] keys = new Object[properties.size()];
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
index c0e255af7b..91cfb57120 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
@@ -107,7 +107,7 @@ public class TutorialAction extends UpdateAction {
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_HELP");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/WebDemoAction.java b/designer-base/src/main/java/com/fr/design/actions/help/WebDemoAction.java
index 8596d5e44c..613982abdf 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/WebDemoAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/WebDemoAction.java
@@ -36,7 +36,7 @@ public class WebDemoAction extends UpdateAction {
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Product_Demo");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Product_Demo");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java
index f6c16c0f03..ddb8e425c8 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java
@@ -88,12 +88,12 @@ public class AlphaFineConfigPane extends BasicPane {
double[] columnSize = {COLUMN_GAP, COLUMN_GAP, COLUMN_GAP};
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Search_Range"));
- isContainRecommendCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_Recommend"));
- isContainActionCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Set"));
- isContainPluginCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Addon"));
- isContainDocumentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_COMMUNITY_HELP"));
- isContainTemplateCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Templates"));
- isContainFileContentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Templates_Content"));
+ isContainRecommendCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Recommend"));
+ isContainActionCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set"));
+ isContainPluginCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Plugin_Addon"));
+ isContainDocumentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help"));
+ isContainTemplateCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Templates"));
+ isContainFileContentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Templates_Content"));
JPanel searchConfigPane = TableLayoutHelper.createTableLayoutPane(initSearchRangeComponents(), rowSize, columnSize);
northPane.add(searchConfigPane);
contentPane.add(northPane);
@@ -106,7 +106,7 @@ public class AlphaFineConfigPane extends BasicPane {
shortcutsField.selectAll();
shortcutsField.setPreferredSize(new Dimension(100, 20));
initFieldListener();
- northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Open") + ":"));
+ northPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Open") + ":"));
northPane.add(shortcutsField);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_SetShortcuts"));
label.setForeground(Color.RED);
@@ -162,7 +162,7 @@ public class AlphaFineConfigPane extends BasicPane {
}
private void createOpenPane(JPanel contentPane) {
- JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_AlphaFine_Enable"));
+ JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Enable"));
isEnabledCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Enable_AlphaFine"));
northPane.add(isEnabledCheckbox);
contentPane.add(northPane);
diff --git a/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java b/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java
index 5eeea95d17..89f2ac3c3f 100644
--- a/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java
@@ -43,7 +43,7 @@ public class ConnectionListAction extends UpdateAction {
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("Server-Define_Data_Connection");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Define_Data_Connection");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/server/FunctionManagerAction.java b/designer-base/src/main/java/com/fr/design/actions/server/FunctionManagerAction.java
index bd5f44d73b..bbc324ffda 100644
--- a/designer-base/src/main/java/com/fr/design/actions/server/FunctionManagerAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/server/FunctionManagerAction.java
@@ -76,7 +76,7 @@ public class FunctionManagerAction extends UpdateAction {
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("M_Server-Function_Manager");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Server_Function_Manager");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/server/GlobalParameterAction.java b/designer-base/src/main/java/com/fr/design/actions/server/GlobalParameterAction.java
index b206df6df9..c546129e95 100644
--- a/designer-base/src/main/java/com/fr/design/actions/server/GlobalParameterAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/server/GlobalParameterAction.java
@@ -83,7 +83,7 @@ public class GlobalParameterAction extends UpdateAction {
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("M_Server-Global_Parameters");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Server_Global_Parameters");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/server/PlatformManagerAction.java b/designer-base/src/main/java/com/fr/design/actions/server/PlatformManagerAction.java
index f0fef3eade..5f364303a7 100644
--- a/designer-base/src/main/java/com/fr/design/actions/server/PlatformManagerAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/server/PlatformManagerAction.java
@@ -33,7 +33,7 @@ public class PlatformManagerAction extends UpdateAction {
@Override
public String getMenuName() {
- return com.fr.design.i18n.Toolkit.i18nText("M_Server-Platform_Manager");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Server_Platform_Manager");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/server/ProcedureListAction.java b/designer-base/src/main/java/com/fr/design/actions/server/ProcedureListAction.java
index 0761568846..9989182d48 100644
--- a/designer-base/src/main/java/com/fr/design/actions/server/ProcedureListAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/server/ProcedureListAction.java
@@ -20,7 +20,7 @@ import java.awt.event.ActionEvent;
public class ProcedureListAction extends UpdateAction {
public ProcedureListAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure") + "(P)" + "...");
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Stored_Procedure") + "(P)" + "...");
this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png"));
}
diff --git a/designer-base/src/main/java/com/fr/design/border/UITitledBorder.java b/designer-base/src/main/java/com/fr/design/border/UITitledBorder.java
index 0c5adcc483..3987844cf8 100644
--- a/designer-base/src/main/java/com/fr/design/border/UITitledBorder.java
+++ b/designer-base/src/main/java/com/fr/design/border/UITitledBorder.java
@@ -17,6 +17,10 @@ public class UITitledBorder extends TitledBorder {
return new UITitledBorder(title);
}
+ public static UITitledBorder createBorderWithTitle(String title, int roundedCorner) {
+ return new UITitledBorder(title, roundedCorner);
+ }
+
private UITitledBorder(String title) {
super(
BorderFactory.createCompoundBorder(
@@ -37,4 +41,29 @@ public class UITitledBorder extends TitledBorder {
new Color(1, 159, 222)
);
}
+
+ /**
+ * @param title title
+ * @param roundedCorner corner width 圆弧宽度,即圆角直径
+ */
+ private UITitledBorder(String title, int roundedCorner) {
+ super(
+ BorderFactory.createCompoundBorder(
+ BorderFactory.createEmptyBorder(
+ 0,
+ 0,
+ 5,
+ 0),
+ new UIRoundedBorder(
+ UIConstants.TITLED_BORDER_COLOR,
+ 1,
+ roundedCorner)
+ ),
+ title,
+ TitledBorder.LEADING,
+ TitledBorder.TOP,
+ null,
+ new Color(1, 159, 222)
+ );
+ }
}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java b/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
index f7b237ca01..188c330538 100644
--- a/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
+++ b/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
@@ -35,14 +35,14 @@ public abstract class ConditionAttributesPane extends BasicBeanPane {
JPanel propertyChangePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(propertyChangePane);
- propertyChangePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Property") + ":", null));
+ propertyChangePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property") + ":", null));
// 选择要改变的属性.
JPanel addItemPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
ToolBarDef toolbarDef = new ToolBarDef();
menuDef = new CellHighlightAddMenuDef();
- menuDef.setName(com.fr.design.i18n.Toolkit.i18nText("Highlight-Click_to_Choose_Property_To_Modify"));
+ menuDef.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Highlight_Click_to_Choose_Property_To_Modify"));
menuDef.setIconPath("com/fr/design/images/control/addPopup.png");
toolbarDef.addShortCut(menuDef);
diff --git a/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java b/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java
index e5b291bd09..9a6cd609e6 100644
--- a/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java
+++ b/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java
@@ -54,16 +54,16 @@ public abstract class LiteConditionPane extends BasicBeanPa
private static final long serialVersionUID = 1L;
// peter:这两个变量在弹出公式编辑器的时候,需要用.
- private UIRadioButton commonRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Common"));
- private UIRadioButton formulaRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Formula"));
+ private UIRadioButton commonRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Lite_Condition_Common"));
+ private UIRadioButton formulaRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Lite_Condition_Formula"));
private JPanel conditionCardPane;
protected BasicBeanPane defaultConditionPane;
// card2
private UITextArea formulaTextArea;
private UIButton modifyButton;
private UIButton addButton;
- private UIRadioButton andRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_ConditionB-AND") + " ");
- private UIRadioButton orRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_ConditionB-OR"));
+ private UIRadioButton andRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Lite_Condition_ConditionB_AND") + " ");
+ private UIRadioButton orRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Lite_Condition_ConditionB_OR"));
protected JTree conditionsTree;// Conditions
private UIButton removeButton;
private UIButton moveUpButton;
@@ -223,7 +223,7 @@ public abstract class LiteConditionPane extends BasicBeanPa
}
int returnVal = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(LiteConditionPane.this),
- com.fr.design.i18n.Toolkit.i18nText("Utils-Are_you_sure_to_remove_the_selected_item") + "?", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"),
JOptionPane.OK_CANCEL_OPTION);
if (returnVal == JOptionPane.OK_OPTION) {
DefaultTreeModel treeModel = (DefaultTreeModel) conditionsTree.getModel();
@@ -447,18 +447,18 @@ public abstract class LiteConditionPane extends BasicBeanPa
private void initButtonPane(JPanel buttonPane) {
- removeButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"));
+ removeButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
buttonPane.add(removeButton);
removeButton.setIcon(BaseUtils.readIcon("com/fr/base/images/cell/control/remove.png"));
removeButton.setEnabled(false);
removeButton.addActionListener(actionListener3);
- moveUpButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Up"));
+ moveUpButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Move_Up"));
buttonPane.add(moveUpButton);
moveUpButton.setIcon(BaseUtils.readIcon("com/fr/design/images/control/up.png"));
moveUpButton.addActionListener(actionListener4);
- moveDownButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Down"));
+ moveDownButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Move_Down"));
buttonPane.add(moveDownButton);
moveDownButton.setIcon(BaseUtils.readIcon("com/fr/design/images/control/down.png"));
moveDownButton.addActionListener(actionListener5);
@@ -492,7 +492,7 @@ public abstract class LiteConditionPane extends BasicBeanPa
this.add(conditonTypePane, BorderLayout.NORTH);
conditonTypePane.setBorder(new ModLineBorder(ModLineBorder.BOTTOM));
- UILabel conditionTypeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Type") + ":");
+ UILabel conditionTypeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Type") + ":");
conditonTypePane.add(conditionTypeLabel, BorderLayout.WEST);
conditionTypeLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, DOWN_PADDING, 0));
@@ -530,10 +530,10 @@ public abstract class LiteConditionPane extends BasicBeanPa
formulaPane.setPreferredSize(new Dimension(450, 40));
formulaConditionPane.add(formulaPane, BorderLayout.CENTER);
formulaPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 2));
- formulaPane.add(GUICoreUtils.createBorderPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Formula") + "="), BorderLayout.NORTH), BorderLayout.WEST);
+ formulaPane.add(GUICoreUtils.createBorderPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Lite_Condition_Formula") + "="), BorderLayout.NORTH), BorderLayout.WEST);
formulaTextArea = new UITextArea();
formulaPane.add(new JScrollPane(formulaTextArea), BorderLayout.CENTER);
- UIButton editFormulaButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Define"));
+ UIButton editFormulaButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Lite_Condition_Define"));
formulaPane.add(GUICoreUtils.createBorderPane(editFormulaButton, BorderLayout.NORTH), BorderLayout.EAST);
editFormulaButton.addActionListener(actionListener1);
applyCardsPane();
@@ -564,14 +564,14 @@ public abstract class LiteConditionPane extends BasicBeanPa
addControlPane.add(Box.createHorizontalStrut(STRUT_ONE));
- addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Add"), BaseUtils.readIcon("com/fr/base/images/cell/control/add.png"));
+ addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"), BaseUtils.readIcon("com/fr/base/images/cell/control/add.png"));
addButton.setMnemonic('A');
addControlPane.add(addButton);
addButton.addActionListener(actionListener2);
addControlPane.add(Box.createHorizontalStrut(STRUT_TWO));
- modifyButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Modify"), BaseUtils.readIcon("com/fr/base/images/cell/control/rename.png"));
+ modifyButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Modify"), BaseUtils.readIcon("com/fr/base/images/cell/control/rename.png"));
modifyButton.setMnemonic('M');
addControlPane.add(modifyButton);
modifyButton.addActionListener(actionListener8);
@@ -583,7 +583,7 @@ public abstract class LiteConditionPane extends BasicBeanPa
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Submit_Condition");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition");
}
// samuel:移出来,方便调用
@@ -654,10 +654,10 @@ public abstract class LiteConditionPane extends BasicBeanPa
private void applyCardsPane() {
CardLayout cl = (CardLayout) (conditionCardPane.getLayout());
if (this.commonRadioButton.isSelected()) {
- this.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Common_Condition"), null));
+ this.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Lite_Condition_Common_Condition"), null));
cl.show(conditionCardPane, "DEFAULT");
} else {
- this.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_LiteCondition_Formula_Condition"), null));
+ this.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Lite_Condition_Formula_Condition"), null));
cl.show(conditionCardPane, "FORMULA");
}
}
@@ -971,4 +971,4 @@ public abstract class LiteConditionPane extends BasicBeanPa
return newCondition;
}
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java b/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java
index 1d8c82618c..b863717f60 100644
--- a/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java
+++ b/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java
@@ -79,7 +79,7 @@ public class ObjectLiteConditionPane extends LiteConditionPane
conditionValuePane = ValueEditorPaneFactory.createAllValueEditorPane();
- Component[][] components = { { new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_ConditionB-Operator") + ":"), new UILabel() },
+ Component[][] components = { { new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ConditionB_Operator") + ":"), new UILabel() },
{ conditionOPComboBox, conditionValuePane } };
double p = TableLayout.PREFERRED;
diff --git a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
index 0bd400eb2a..6dac67b1fc 100644
--- a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
+++ b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
@@ -79,7 +79,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
*/
@Override
public String getViewTitle() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_TableData");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_TableData");
}
/**
@@ -138,7 +138,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
}
private boolean isProcedureName(String oldName) {
- return oldName.length() >= PROCEDURE_NAME_INDEX && ComparatorUtils.equals(type, com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure"));
+ return oldName.length() >= PROCEDURE_NAME_INDEX && ComparatorUtils.equals(type, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Stored_Procedure"));
}
@@ -383,7 +383,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
private TableDataTree dataTree;
public PreviewTableDataAction(TableDataTree dataTree) {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"));
this.setMnemonic('p');
this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.PREVIEW_ICON_PATH));
this.dataTree = dataTree;
@@ -422,7 +422,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
protected class ConnectionTableAction extends com.fr.design.actions.server.ConnectionListAction {
public ConnectionTableAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Server-Define_Data_Connection"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Define_Data_Connection"));
this.setMnemonic('D');
this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_CONNECTION_ICON_PATH));
}
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
index 7f51d8f16d..dc891c1c63 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
@@ -208,9 +208,9 @@ public class ChoosePane extends BasicBeanPane implements Refresha
}
protected void initComponentsLayout(PreviewLabel previewLabel, int labelSize) {
- UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Database") + ":");
- UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Model") + ":");
- UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Table") + ":");
+ UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database") + ":");
+ UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model") + ":");
+ UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table") + ":");
if (labelSize > 0) {
Dimension pSize = new Dimension(labelSize, 25);
@@ -248,7 +248,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha
@Override
protected com.fr.data.impl.Connection doInBackground() {
schemaBox.setRefreshingModel(true);
- schemaBox.addItem(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Loading") + "...");
+ schemaBox.addItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Loading") + "...");
schemaBox.setSelectedItem(null);
schemaBox.setRefreshingModel(false);
return getConnection();
@@ -327,7 +327,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha
DBUtils.refreshDatabase();
String schema = StringUtils.isEmpty(schemaBox.getSelectedItem()) ? null : schemaBox.getSelectedItem();
DataCoreUtils.refreshTables(getConnection(), TableProcedure.TABLE, schema);
- JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh_Successfully") + "!", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh_Database"),
+ JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh_Successfully") + "!", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh_Database"),
JOptionPane.INFORMATION_MESSAGE);
}
@@ -405,7 +405,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha
String schema = StringUtils.isEmpty(this.schemaBox.getSelectedItem()) ? null : this.schemaBox.getSelectedItem();
TableProcedure[] sqlTableArray = DataCoreUtils.getTables(selectedDatabase, TableProcedure.TABLE, schema, DesignerEnvManager.getEnvManager().isOracleSystemSpace());
if (sqlTableArray.length > 0) {
- ExpandMutableTreeNode tableTreeNode = new ExpandMutableTreeNode(selectedDSName + "-" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-Table"));
+ ExpandMutableTreeNode tableTreeNode = new ExpandMutableTreeNode(selectedDSName + "-" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_SQL_Table"));
rootTreeNode.add(tableTreeNode);
for (int i = 0; i < sqlTableArray.length; i++) {
ExpandMutableTreeNode tableChildTreeNode = new ExpandMutableTreeNode(sqlTableArray[i]);
@@ -414,7 +414,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha
}
TableProcedure[] sqlViewArray = DataCoreUtils.getTables(selectedDatabase, TableProcedure.VIEW, schema, DesignerEnvManager.getEnvManager().isOracleSystemSpace());
if (sqlViewArray.length > 0) {
- ExpandMutableTreeNode viewTreeNode = new ExpandMutableTreeNode(selectedDSName + "-" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-View"));
+ ExpandMutableTreeNode viewTreeNode = new ExpandMutableTreeNode(selectedDSName + "-" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_SQL_View"));
rootTreeNode.add(viewTreeNode);
for (int i = 0; i < sqlViewArray.length; i++) {
ExpandMutableTreeNode viewChildTreeNode = new ExpandMutableTreeNode(sqlViewArray[i]);
@@ -456,7 +456,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha
if (!connect) {
DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
JOptionPane.showMessageDialog(designerFrame, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Failed"), JOptionPane.INFORMATION_MESSAGE);
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Failed"), JOptionPane.INFORMATION_MESSAGE);
failedToFindTable();
return null;
}
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/RefreshLabel.java b/designer-base/src/main/java/com/fr/design/data/datapane/RefreshLabel.java
index 18d8bdcb06..1971c77809 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/RefreshLabel.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/RefreshLabel.java
@@ -19,7 +19,7 @@ public class RefreshLabel extends UIButton {
this.refreshable = refreshable;
- this.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Refresh_Database"));
+ this.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh_Database"));
this.setCursor(new Cursor(Cursor.HAND_CURSOR));
this.addActionListener(new ActionListener() {
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java
index a24169b094..0107bd0b78 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java
@@ -56,7 +56,7 @@ public class TableDataCreatorProducer {
return true;
}
};
- TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure"),
+ TableDataNameObjectCreator storeProcedure = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Stored_Procedure"),
"Proc",
"/com/fr/design/images/data/store_procedure.png",
StoreProcedure.class, ProcedureDataPane.class) {
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java
index 2b18c3e789..1ec28a97c5 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java
@@ -113,7 +113,7 @@ public class TableDataNameObjectCreator extends NameObjectCreator {
* @return 提示
*/
public String createTooltip() {
- return b ? com.fr.design.i18n.Toolkit.i18nText("Connect_SQL_Cannot_Null") : null;
+ return b ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connect_SQL_Cannot_Null") : null;
}
public String getPrefix() {
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java
index f6dcbaa526..9c19013901 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataSourceOP.java
@@ -100,7 +100,7 @@ public class TableDataSourceOP implements UserObjectOP {
}
private ExpandMutableTreeNode initTemplateDataNode(Map templateDataMap) {
- ExpandMutableTreeNode templateNode = new ExpandMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("DS-TableData"), TEMPLATE_TABLE_DATA), true);
+ ExpandMutableTreeNode templateNode = new ExpandMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_DS_TableData"), TEMPLATE_TABLE_DATA), true);
templateNode.addChildTreeNodes(getNodeArrayFromMap(templateDataMap));
return templateNode;
}
@@ -112,7 +112,7 @@ public class TableDataSourceOP implements UserObjectOP {
}
private ExpandMutableTreeNode initStoreProcedureNode(Map storeProcedureMap) {
- ExpandMutableTreeNode templateNode = new ExpandMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure"), STORE_PRECEDURE_DATA), false);
+ ExpandMutableTreeNode templateNode = new ExpandMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Stored_Procedure"), STORE_PRECEDURE_DATA), false);
templateNode.addChildTreeNodes(getNodeArrayFromMap(storeProcedureMap));
return templateNode;
}
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
index 607510aebd..37aa4ef123 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
@@ -233,7 +233,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
private class EditAction extends UpdateAction {
public EditAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Edit"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
this.setMnemonic('E');
this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_EDIT_ICON_PATH));
}
@@ -250,7 +250,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
private class RemoveAction extends UpdateAction {
public RemoveAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
this.setMnemonic('R');
this.setSmallIcon(BaseUtils.readIcon(IconPathConstants.TD_REMOVE_ICON_PATH));
}
@@ -263,8 +263,8 @@ public class TableDataTreePane extends BasicTableDataTreePane {
return;
}
- int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Utils-Are_you_sure_to_remove_the_selected_item") + ":" + selectedNO.getName() + "?",
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
+ int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + ":" + selectedNO.getName() + "?",
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.OK_OPTION) {
// richer:这个地方为什么要在DataSourceTree里面去remove呢?多此一举吧
op.removeAction(selectedNO.getName());
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java
index 32f89ac25d..81c7912825 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataDictPane.java
@@ -68,8 +68,8 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
this.add(tableFlowPane, BorderLayout.NORTH);
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(centerPane, BorderLayout.CENTER);
- parentMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Build_Tree_Accord_Parent_Marked_Filed"), true);
- lengthMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Build_Tree_Accord_Marked_Filed_Length"));
+ parentMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Build_Tree_Accord_Parent_Marked_Filed"), true);
+ lengthMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Build_Tree_Accord_Marked_Filed_Length"));
parentMarkRadio.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (isBuildByParentFiled()) {
@@ -90,11 +90,11 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
markButtonGroup.add(parentMarkRadio);
markButtonGroup.add(lengthMarkRadio);
- originFieldDependsOnParentLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
- parentFieldLabel = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parent_Marked_Field") + " :", SwingConstants.RIGHT);
- treeDataFieldLabel1 = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tree_Data_Field") + " :", SwingConstants.RIGHT);
- originFieldDependsOnLengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
- treeDataFieldLabel2 = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tree_Data_Field") + " :", SwingConstants.RIGHT);
+ originFieldDependsOnParentLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
+ parentFieldLabel = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parent_Marked_Field") + " :", SwingConstants.RIGHT);
+ treeDataFieldLabel1 = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Data_Field") + " :", SwingConstants.RIGHT);
+ originFieldDependsOnLengthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Original_Marked_Filed") + " :", SwingConstants.RIGHT);
+ treeDataFieldLabel2 = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Data_Field") + " :", SwingConstants.RIGHT);
// originFieldDependsOnParentPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(com.fr.design.i18n.Toolkit.i18nText("Columns"))});
// parentFieldPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[] {new OldColumnIndexEditor(com.fr.design.i18n.Toolkit.i18nText("Columns"))});
@@ -127,7 +127,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
buildTreePanel.add(xxx, BorderLayout.CENTER);
centerPane.add(buildTreePanel, BorderLayout.NORTH);
JPanel previewPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
- UIButton treeDataPreviewButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview"));
+ UIButton treeDataPreviewButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"));
previewPanel.add(treeDataPreviewButton);
treeDataPreviewButton.addActionListener(new ActionListener() {
@Override
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java
index ae577234dd..bd5f8ed51f 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java
@@ -38,8 +38,8 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean {
rs.add(tableNameComboBox, BorderLayout.CENTER);
rs.add(GUICoreUtils.createFlowPane(new Component[]{new RefreshLabel(this), previewLabel}, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST);
rs.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, -RIGHTBORDER));
- UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Database"), UILabel.LEFT);
- UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Model"), UILabel.LEFT);
+ UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database"), UILabel.LEFT);
+ UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model"), UILabel.LEFT);
UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Select_Table"), UILabel.LEFT);
if (labelSize > 0) {
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
index 484a9c1161..a14944d5e6 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
@@ -29,7 +29,7 @@ import java.util.Set;
* Connection List Pane.
*/
public class ConnectionListPane extends JListControlPane implements ConnectionShowPane {
- public static final String TITLE_NAME = Toolkit.i18nText("Server-Define_Data_Connection");
+ public static final String TITLE_NAME = Toolkit.i18nText("Fine-Design_Basic_Server_Define_Data_Connection");
private boolean isNamePermitted = true;
private HashMap renameMap = new HashMap();
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java
index 75127e5ee4..6c768145f3 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java
@@ -1,8 +1,6 @@
package com.fr.design.data.datapane.connect;
import com.fr.design.gui.frpane.LoadingBasicPane;
-import com.fr.design.gui.ilable.UILabel;
-import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.file.ConnectionConfig;
@@ -28,7 +26,7 @@ public class ConnectionManagerPane extends LoadingBasicPane implements Connectio
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Server-Define_Data_Connection");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Define_Data_Connection");
}
public HashMap getRenameMap() {
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
index 810f6adccc..ed09c87a88 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
@@ -112,15 +112,15 @@ public class ConnectionTableProcedurePane extends BasicPane {
// 根据环境是否为中文设置不同的显示
if (GeneralContext.isChineseEnv()) {
- first.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-Table"),
+ first.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_SQL_Table"),
BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING));
- second.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-View"),
+ second.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_SQL_View"),
BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING));
} else {
UILabel ui1 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING);
UILabel ui2 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING);
- ui1.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-Table"));
- ui2.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_SQL-View"));
+ ui1.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_SQL_Table"));
+ ui2.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_SQL_View"));
first.add(ui1);
second.add(ui2);
}
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
index 5cf887bdde..74cebeb5a1 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
@@ -49,7 +49,7 @@ public abstract class DatabaseConnectionPane 0 && ((String) value).charAt(0) == '=')
- type = com.fr.design.i18n.Toolkit.i18nText("Formula");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula");
else
- type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_String");
}else if(value instanceof Integer)
- type = com.fr.design.i18n.Toolkit.i18nText("Integer");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Integer");
else if(value instanceof Double)
- type = com.fr.design.i18n.Toolkit.i18nText("Double");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Double");
else if(value instanceof Date)
- type = com.fr.design.i18n.Toolkit.i18nText("Date");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date");
else if(value instanceof Boolean)
- type = com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Boolean");
else if(value instanceof BaseFormula)
- type = com.fr.design.i18n.Toolkit.i18nText("Formula");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula");
else
- type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_String");
return StoreProcedureParameterPane.getInfo4Value(type);
}
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassNameSelectPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassNameSelectPane.java
index cc1b79187a..08f0c1f154 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassNameSelectPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassNameSelectPane.java
@@ -20,7 +20,7 @@ public class ClassNameSelectPane extends BasicPane {
this.add(webDirectoryPane, BorderLayout.NORTH);
webDirectoryPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0));
webDirectoryPane.add(new UILabel(
- com.fr.design.i18n.Toolkit.i18nText("Function-Choose_Function_Class") + ":"));
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function_Choose_Function_Class") + ":"));
classFileTree = new ClassFileTree();
classFileTree.refreshEnv();
@@ -31,7 +31,7 @@ public class ClassNameSelectPane extends BasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Function-Function_Class_Name");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function_Function_Class_Name");
}
/*
@@ -53,7 +53,7 @@ public class ClassNameSelectPane extends BasicPane {
public void checkValid() throws Exception {
String classPath = classFileTree.getSelectedClassPath();
if (classPath == null) {
- throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Function-The_selected_file_cannot_be_null"));
+ throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function_The_Selected_File_Cannot_Be_Null"));
}
}
}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
index ca98bb34c3..7cd8dec3e8 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
@@ -44,7 +44,7 @@ public class ClassTableDataPane extends AbstractTableDataPane {
classNameTextField = new UITextField(36);
reportletNamePane.add(classNameTextField);
- UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Select"));
+ UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(
browserButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
@@ -90,8 +90,8 @@ public class ClassTableDataPane extends AbstractTableDataPane {
Component[][] components = {
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name") + ":"), reportletNamePane},
- {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Function-The_class_must_implement_the_interface") + "\"com.fr.data.Tabledata\"")},
- {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Example") + ":\"com.fr.data.impl.ArrayTableData\"")},
+ {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function_The_Class_Must_Implement_The_Interface") + "\"com.fr.data.Tabledata\"")},
+ {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Example") + ":\"com.fr.data.impl.ArrayTableData\"")},
{null,new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Location_Description", StableUtils.pathJoin(ProjectConstants.WEBINF_NAME, ProjectConstants.CLASSES_NAME)))}
};
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@@ -111,7 +111,7 @@ public class ClassTableDataPane extends AbstractTableDataPane {
new RemoveParaAction()
};
}
- }, " " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_TableData-Default-Para"));
+ }, " " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_TableData_Default_Para"));
jpanel.add(editorPane, BorderLayout.CENTER);
@@ -120,7 +120,7 @@ public class ClassTableDataPane extends AbstractTableDataPane {
public class AddParaAction extends UITableEditAction {
public AddParaAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Add"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"));
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
}
@@ -136,7 +136,7 @@ public class ClassTableDataPane extends AbstractTableDataPane {
}
private class RemoveParaAction extends UITableEditAction {
public RemoveParaAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/control/remove.png"));
}
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
index a5f3f3df62..37ba914661 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
@@ -54,8 +54,8 @@ import java.util.List;
public class DBTableDataPane extends AbstractTableDataPane {
private static final int BOTTOM = 6;
- private static final String PREVIEW_BUTTON = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview");
- private static final String REFRESH_BUTTON = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh");
+ private static final String PREVIEW_BUTTON = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview");
+ private static final String REFRESH_BUTTON = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh");
private ConnectionTableProcedurePane connectionTableProcedurePane;
private UITableEditorPane editorPane;
@@ -195,7 +195,7 @@ public class DBTableDataPane extends AbstractTableDataPane {
toolBarDef.addShortCut(SeparatorDef.DEFAULT);
toolBarDef.addShortCut(dbTableDataMenuHandler.createQueryAction());
}
- isShareCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Is_Share_DBTableData"));
+ isShareCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Is_Share_DBTableData"));
isShareCheckBox.setBackground(Color.WHITE);
maxPanel = new MaxMemRowCountPanel();
maxPanel.setBorder(null);
@@ -271,10 +271,10 @@ public class DBTableDataPane extends AbstractTableDataPane {
String dbName = this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName();
if (StringUtils.isBlank(dbName) || StringUtils.isBlank(this.sqlTextPane.getText())) {
try {
- throw new Exception(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Connect_SQL_Cannot_Null") + ".");
+ throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connect_SQL_Cannot_Null") + ".");
} catch (Exception e) {
// JOptionPane.showMessageDialog(DBTableDataPane.this,
- // com.fr.design.i18n.Toolkit.i18nText("Connect_SQL_Cannot_Null") + ".");
+ // com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connect_SQL_Cannot_Null") + ".");
}
}
@@ -383,4 +383,4 @@ public class DBTableDataPane extends AbstractTableDataPane {
return title;
}
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DecoratedTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DecoratedTableDataPane.java
index 2ab3fee597..42332f1cf2 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DecoratedTableDataPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DecoratedTableDataPane.java
@@ -27,7 +27,7 @@ public class DecoratedTableDataPane extends AbstractTableDataPane {
this.setLayout(new BorderLayout(gap,0));
JPanel northPanel = new JPanel(new BorderLayout());
JPanel type = new JPanel();
- type.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Utils-File_type") + ":"));
+ type.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_File_Type") + ":"));
String[] item = {"TXT", "Excel", "XML"};
fileTypeComboBox = new UIComboBox(item);
fileTypeComboBox.setPreferredSize(new Dimension(100, 20));
@@ -151,7 +151,7 @@ public class FileTableDataPane extends AbstractTableDataPane {
JPanel setPanel = new JPanel();
southPanel.add(setPanel, BorderLayout.CENTER);
setPanel.setPreferredSize(new Dimension(setPanelWidth, 460));
- setPanel.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Set")));
+ setPanel.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set")));
JPanel controlPane = textSetPanel(width,height);
setPanel.add(controlPane, BorderLayout.NORTH);
fileTypeComboBox.addActionListener(getFileTypeListener(setPanel,width,height));
@@ -176,10 +176,10 @@ public class FileTableDataPane extends AbstractTableDataPane {
urlText = new UITextField();
urlText.setPreferredSize(new Dimension(195, 20));
urlText.setEditable(false);
- chooseFile = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Selection"));
+ chooseFile = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Selection"));
chooseFile.addActionListener(chooseFileListener);
- testConnection = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Datasource-Test_Connection"));
+ testConnection = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Test_Connection"));
testConnection.setEnabled(false);
testConnection.addActionListener(testConnectionListener);// 测试连接按钮
@@ -236,7 +236,7 @@ public class FileTableDataPane extends AbstractTableDataPane {
private void previewPanel(JPanel jPanel){
JPanel previewPanel = new JPanel(new BorderLayout());
- UIButton preview = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview"));
+ UIButton preview = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"));
preview.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
preview();
@@ -348,15 +348,15 @@ public class FileTableDataPane extends AbstractTableDataPane {
double columnSize[] = {f, p, p};
double rowSize[] = {B, B, B, B, B, B, B};
needColumnNameCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FirstRow_IS_Column_Name"), true);
- dismenberLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Dismenber") + ":");
- tableDismemberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_TableDismember"), false);
- tableDismemberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_TableDismember"));
- spaceDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Space"), true);
- spaceDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Space"));
- commaDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_CommaDismenber"), false);
- commaDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_CommaDismenber"));
- otherDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Other") + ":", false);
- otherDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Other"));
+ dismenberLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dismenber") + ":");
+ tableDismemberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table_Dismember"), false);
+ tableDismemberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table_Dismember"));
+ spaceDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Space"), true);
+ spaceDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Space"));
+ commaDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Comma_Dismenber"), false);
+ commaDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Comma_Dismenber"));
+ otherDismenberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Other") + ":", false);
+ otherDismenberRadioButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Other"));
otherDismenberTextField = new UITextField(8);
otherDismenberTextField.setEditable(false);
otherDismenberRadioButton.addChangeListener(new ChangeListener() {
@@ -487,7 +487,7 @@ public class FileTableDataPane extends AbstractTableDataPane {
private class RefreshAction extends UITableEditAction {
public RefreshAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
}
@@ -782,7 +782,7 @@ public class FileTableDataPane extends AbstractTableDataPane {
xmlNodeTree = new XMLNodeTree();
this.add(new JScrollPane(xmlNodeTree));
- keyPointLaber = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_KeyPoint") + ":");
+ keyPointLaber = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Key_Point") + ":");
refreshAction = new RefreshParameterAction();
ToolBarDef toolbarDef = new ToolBarDef();
toolbarDef.addShortCut(refreshAction);
@@ -800,7 +800,7 @@ public class FileTableDataPane extends AbstractTableDataPane {
private class RefreshParameterAction extends UpdateAction {
public RefreshParameterAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh"));
this.setMnemonic('r');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
}
@@ -939,7 +939,7 @@ public class FileTableDataPane extends AbstractTableDataPane {
}
private void loadedTreeModel(){
- ExpandMutableTreeNode rootTreeNode = new ExpandMutableTreeNode(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_loadedTreeModel"));
+ ExpandMutableTreeNode rootTreeNode = new ExpandMutableTreeNode(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Loaded_Tree_Model"));
rootTreeNode.setExpanded(false);
rootTreeNode.setAllowsChildren(false);
DefaultTreeModel loadedTreeModel = new DefaultTreeModel(rootTreeNode);
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java
index bd06b39e3d..4863a27960 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java
@@ -51,7 +51,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
this.setFloatable(false);
this.setRollover(true);
this.setBackground(UIConstants.NORMAL_BACKGROUND);
- String[] cacheList = { com.fr.design.i18n.Toolkit.i18nText("Save_All_Records_In_Memory"), com.fr.design.i18n.Toolkit.i18nText("Max-Mem-Row-Count") };
+ String[] cacheList = { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save_All_Records_In_Memory"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Max_Mem_Row_Count") };
switchCache = new UIComboBox(cacheList);
switchCache.addActionListener(switchStateL);
numberSpinner = new UISpinner(0, Integer.MAX_VALUE, 1);
@@ -73,7 +73,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
switchCache.setSelectedIndex(MAX_IN_MEMORY);
this.add(new UILabel(" "));
this.add(numberSpinner);
- this.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Row")));
+ this.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row")));
this.validate();
this.repaint();
}
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java
index b13bd258c5..4a5b33033a 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java
@@ -88,7 +88,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane imp
"com.mysql.jdbc.Driver",
"org.gjt.mm.mysql.Driver"
}; // 需要隐藏面板的数据库的驱动
- private static final String PREVIEW_BUTTON = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Preview");
+ private static final String PREVIEW_BUTTON = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview");
private ConnectionTableProcedurePane connectionTableProcedurePane;
private JPanel cardpane;
private CardLayout cardLayout;
@@ -88,7 +88,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp
storeProcedureContextPane.setPreferredSize(new Dimension(680, 600));
JPanel namePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
- namePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Datasource-Stored_Procedure") + ":"));
+ namePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Stored_Procedure") + ":"));
namePane.add(queryText);
inAutoeditorPane = new UITableEditorPane(new StoreProcedureTableModel());
autoEditorPane = new UITableEditorPane(new AutoStoreProcedureTableModel());
@@ -153,7 +153,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp
toolBarDef.addShortCut(new PreviewAction());
toolBarDef.addShortCut(new RefreshAction());
toolBarDef.addShortCut(SeparatorDef.DEFAULT);
- isShareCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Is_Share_DBTableData"));
+ isShareCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Is_Share_DBTableData"));
maxPanel = new MaxMemRowCountPanel();
maxPanel.setBorder(null);
UIToolbar toolbar = ToolBarDef.createJToolBar();
@@ -170,7 +170,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Datasource-Stored_Procedure");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Stored_Procedure");
}
@Override
@@ -237,9 +237,9 @@ public class ProcedureDataPane extends AbstractTableDataPane imp
if (StringUtils.isBlank(dbName)) {
try {
- throw new Exception(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Connect_SQL_Cannot_Null") + ".");
+ throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connect_SQL_Cannot_Null") + ".");
} catch (Exception e) {
- JOptionPane.showMessageDialog(ProcedureDataPane.this, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Connect_SQL_Cannot_Null") + ".");
+ JOptionPane.showMessageDialog(ProcedureDataPane.this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connect_SQL_Cannot_Null") + ".");
}
}
@@ -357,7 +357,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp
protected class RefreshAction extends UITableEditAction {
public RefreshAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Refresh"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
}
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureManagerPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureManagerPane.java
index 3c306e8df5..ff905a3fd4 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureManagerPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureManagerPane.java
@@ -22,7 +22,7 @@ public class ProcedureManagerPane extends LoadingBasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Stored_Procedure");
}
public void populate(ProcedureConfig procedureConfig) {
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureParameterPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureParameterPane.java
index 31307cee90..e7b7e7026b 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureParameterPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureParameterPane.java
@@ -29,13 +29,13 @@ public class StoreProcedureParameterPane extends BasicPane {
};
private static NameObject[] nameAndValue = new NameObject[]{
- new NameObject(com.fr.design.i18n.Toolkit.i18nText("Cursor"), StoreProcedureConstants.CURSOR),
- new NameObject(com.fr.design.i18n.Toolkit.i18nText("Parameter-String"), StoreProcedureConstants.VARCHAR),
- new NameObject(com.fr.design.i18n.Toolkit.i18nText("Integer"), StoreProcedureConstants.INTEGER),
- new NameObject(com.fr.design.i18n.Toolkit.i18nText("Double"), StoreProcedureConstants.DECIMAL),
- new NameObject(com.fr.design.i18n.Toolkit.i18nText("Date"), StoreProcedureConstants.DATE),
- new NameObject(com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean"), StoreProcedureConstants.BOOLEAN),
- new NameObject(com.fr.design.i18n.Toolkit.i18nText("Formula"), StoreProcedureConstants.FORMULA),
+ new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cursor"), StoreProcedureConstants.CURSOR),
+ new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_String"), StoreProcedureConstants.VARCHAR),
+ new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Integer"), StoreProcedureConstants.INTEGER),
+ new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Double"), StoreProcedureConstants.DECIMAL),
+ new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date"), StoreProcedureConstants.DATE),
+ new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Boolean"), StoreProcedureConstants.BOOLEAN),
+ new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula"), StoreProcedureConstants.FORMULA),
new NameObject("IN",StoreProcedureConstants.IN),
new NameObject("OUT",StoreProcedureConstants.OUT),
new NameObject("INOUT",StoreProcedureConstants.INOUT)
@@ -61,7 +61,7 @@ public class StoreProcedureParameterPane extends BasicPane {
public void checkValid() throws Exception{
StoreProcedureParameter spp=this.update();
if(spp.getSchema()!= StoreProcedureConstants.OUT && spp.getType() == StoreProcedureConstants.CURSOR){
- throw new Exception(com.fr.design.i18n.Toolkit.i18nText("IN_and_INOUT_type_not_as_cursor"));
+ throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_In_And_Inout_Type_Not_As_Cursor"));
}
}
@@ -71,7 +71,7 @@ public class StoreProcedureParameterPane extends BasicPane {
schemaCombo = new UIComboBox();
initUIComboBox(schemaCombo, schemaName);
JPanel namePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
- namePane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Name") + ":"), BorderLayout.WEST);
+ namePane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), BorderLayout.WEST);
nameField = new UITextField(10);
namePane.add(nameField, BorderLayout.CENTER);
namePane.add(new UILabel(" "), BorderLayout.EAST);
@@ -80,7 +80,7 @@ public class StoreProcedureParameterPane extends BasicPane {
valuePane.add(new UILabel(" "), BorderLayout.EAST);
Component[][] components = {{null},
{namePane},
- {addPane("Model", 1, schemaCombo)},
+ {addPane("Fine-Design_Basic_Model", 1, schemaCombo)},
{valuePane},
{null}
};
@@ -105,7 +105,7 @@ public class StoreProcedureParameterPane extends BasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Parameter");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter");
}
public void populate(StoreProcedureParameter stpParameter) {
@@ -124,24 +124,24 @@ public class StoreProcedureParameterPane extends BasicPane {
Object value = valueEditPane.update();
String type = "";
if(value instanceof CursorEditor)
- type=com.fr.design.i18n.Toolkit.i18nText("Cursor");
+ type=com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cursor");
else if(value instanceof String ){
if(((String) value).length() > 0 && ((String) value).charAt(0) == '=')
- type = com.fr.design.i18n.Toolkit.i18nText("Formula");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula");
else
- type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_String");
}else if(value instanceof Integer)
- type = com.fr.design.i18n.Toolkit.i18nText("Integer");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Integer");
else if(value instanceof Double)
- type = com.fr.design.i18n.Toolkit.i18nText("Double");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Double");
else if(value instanceof Date)
- type = com.fr.design.i18n.Toolkit.i18nText("Date");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date");
else if(value instanceof Boolean)
- type = com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Boolean");
else if(value instanceof BaseFormula)
- type = com.fr.design.i18n.Toolkit.i18nText("Formula");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula");
else
- type = com.fr.design.i18n.Toolkit.i18nText("Parameter-String");
+ type = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_String");
int typeVl = getInfo4Value(type);
p.setType(typeVl);
String schema = (String)schemaCombo.getSelectedItem();
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureTableModel.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureTableModel.java
index b9276310fb..845010cd55 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureTableModel.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureTableModel.java
@@ -1,24 +1,23 @@
package com.fr.design.data.tabledata.tabledatapane;
-import java.awt.event.ActionEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.List;
-
-import javax.swing.BorderFactory;
-
import com.fr.base.StoreProcedureParameter;
+import com.fr.design.dialog.BasicDialog;
+import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itableeditorpane.UITableModelAdapter;
import com.fr.design.mainframe.DesignerContext;
-import com.fr.design.dialog.BasicDialog;
-import com.fr.design.dialog.DialogActionAdapter;
+
+import javax.swing.BorderFactory;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.List;
public class StoreProcedureTableModel extends UITableModelAdapter {
public StoreProcedureTableModel() {
- super(new String[] { com.fr.design.i18n.Toolkit.i18nText("Parameter"), com.fr.design.i18n.Toolkit.i18nText("Type"), com.fr.design.i18n.Toolkit.i18nText("Model"), com.fr.design.i18n.Toolkit.i18nText("Value") });
+ super(new String[] { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Type"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Value") });
if (shouldResponseDoubleClickAction()) {
table.addMouseListener(new MouseAdapter() {
@@ -36,7 +35,7 @@ public class StoreProcedureTableModel extends UITableModelAdapter();
}
columnNameList = Arrays.asList(procedureDataModel.getColumnName());
@@ -176,7 +176,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
return null;
}
}.execute();
- connectionBar = new AutoProgressBar(dialog, com.fr.design.i18n.Toolkit.i18nText("Utils-Now_create_connection"), "", 0, 100) {
+ connectionBar = new AutoProgressBar(dialog, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Now_Create_Connection"), "", 0, 100) {
public void doMonitorCanceled() {
connectionBar.close();
worker.cancel(true);
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java
index 622f88204c..28c6628a6c 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java
@@ -3,17 +3,37 @@ package com.fr.design.data.tabledata.wrapper;
import com.fr.base.FRContext;
import com.fr.base.TableData;
import com.fr.data.TableDataSource;
-import com.fr.data.impl.*;
+import com.fr.data.impl.ClassTableData;
+import com.fr.data.impl.DBTableData;
+import com.fr.data.impl.DecoratedTableData;
+import com.fr.data.impl.EmbeddedTableData;
+import com.fr.data.impl.FileTableData;
+import com.fr.data.impl.MultiFieldTableData;
+import com.fr.data.impl.MultiTDTableData;
+import com.fr.data.impl.RecursionTableData;
import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.design.data.datapane.TableDataNameObjectCreator;
-import com.fr.design.data.tabledata.tabledatapane.*;
+import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane;
+import com.fr.design.data.tabledata.tabledatapane.ClassTableDataPane;
+import com.fr.design.data.tabledata.tabledatapane.DBTableDataPane;
+import com.fr.design.data.tabledata.tabledatapane.DecoratedTableDataPane;
+import com.fr.design.data.tabledata.tabledatapane.EmbeddedTableDataPane;
+import com.fr.design.data.tabledata.tabledatapane.FileTableDataPane;
+import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane;
+import com.fr.design.data.tabledata.tabledatapane.ProcedureDataPane;
+import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane;
import com.fr.file.TableDataConfig;
import com.fr.general.ComparatorUtils;
+import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import java.lang.reflect.Constructor;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
/**
@@ -155,12 +175,17 @@ public abstract class TableDataFactory {
@SuppressWarnings("unchecked")
public static String[] getSortOfChineseNameOfServerData(TableDataConfig tableDataConfig) {
clearAll();
- java.util.Iterator nameIt = tableDataConfig.getTableDatas().keySet().iterator();
- while (nameIt.hasNext()) {
- String name = nameIt.next();
- TableData td = TableDataConfig.getInstance().getTableData(name);
- addName(name, td);
+ try {
+ java.util.Iterator nameIt = tableDataConfig.getTableDatas().keySet().iterator();
+ while (nameIt.hasNext()) {
+ String name = nameIt.next();
+ addName(name, tableDataConfig.getTableData(name));
+ }
+ } catch (Exception e) {
+ FineLoggerFactory.getLogger().error(e.getMessage(), e);
+ return ArrayUtils.EMPTY_STRING_ARRAY;
}
+
return getSortedNameArray();
}
diff --git a/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java b/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java
index 2fc2f53e06..aac7461c33 100644
--- a/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java
+++ b/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java
@@ -80,7 +80,7 @@ public class InformationWarnPane extends JPanel{
});
arrow.setBounds(90,100,30,30);
- UILabel more = new UILabel(""+com.fr.design.i18n.Toolkit.i18nText("More-information")+"");
+ UILabel more = new UILabel(""+com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_More_Information")+"");
more.setBounds(125,102,55,25);
moreText = new UITextArea(moreInfo);
diff --git a/designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java b/designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java
index 0326540abc..95894bd014 100644
--- a/designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java
+++ b/designer-base/src/main/java/com/fr/design/dialog/JWizardDialog.java
@@ -1,5 +1,14 @@
package com.fr.design.dialog;
+import com.fr.design.gui.ibutton.UIButton;
+import com.fr.design.gui.ilable.UILabel;
+import com.fr.design.layout.FRGUIPaneFactory;
+
+import javax.swing.BorderFactory;
+import javax.swing.Icon;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.JSeparator;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Dialog;
@@ -10,16 +19,6 @@ import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import javax.swing.BorderFactory;
-import javax.swing.Icon;
-import javax.swing.JDialog;
-import com.fr.design.gui.ilable.UILabel;
-import javax.swing.JPanel;
-import javax.swing.JSeparator;
-
-import com.fr.design.gui.ibutton.UIButton;
-import com.fr.design.layout.FRGUIPaneFactory;
-
/**
* Wizard dialog.
@@ -104,25 +103,25 @@ public class JWizardDialog extends BasicDialog {
workArea.setLayout(cardLayout);
// Buttons
- buttonBack = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Previous"));
+ buttonBack = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Previous"));
buttonBack.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
back();
}
});
- buttonNext = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Next"));
+ buttonNext = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Next"));
buttonNext.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
next();
}
});
- buttonFinish = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Finish"));
+ buttonFinish = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Finish"));
buttonFinish.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
finish();
}
});
- buttonCancel = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Cancel"));
+ buttonCancel = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cancel"));
buttonCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
cancel();
@@ -365,4 +364,4 @@ public class JWizardDialog extends BasicDialog {
@Override
public void checkValid() throws Exception {
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
index c704705885..bfba65b942 100644
--- a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
+++ b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
@@ -100,7 +100,7 @@ public abstract class UIDialog extends JDialog {
}
private void addCancelButton(JPanel buttonsPane) {
- cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Cancel"));
+ cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cancel"));
cancelButton.setName(CANCEL_BUTTON);
cancelButton.setMnemonic('C');
buttonsPane.add(cancelButton);
diff --git a/designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java b/designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java
index e8db1d86d1..de8df9a718 100644
--- a/designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java
+++ b/designer-base/src/main/java/com/fr/design/editor/DoubleDeckValueEditorPane.java
@@ -67,7 +67,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout());
- content.add(new DoubleDeckValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor(), new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"))}), BorderLayout.NORTH);
+ content.add(new DoubleDeckValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor(), new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"))}), BorderLayout.NORTH);
GUICoreUtils.centerWindow(jf);
jf.setSize(290, 400);
jf.setVisible(true);
@@ -116,7 +116,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Values-Editor");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Values_Editor");
}
public Editor getCurrentEditor() {
@@ -222,7 +222,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
String name = currentEditor.getName();
Object columnIndex = currentEditor.getValue();
//bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了?
- if (columnIndex == null && ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("Formula"))) {
+ if (columnIndex == null && ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula"))) {
columnIndex = ((FormulaEditor) currentEditor).getFormula();
}
@@ -238,7 +238,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
Object columnIndex = currentEditor.getValue();
Object columnName = StringUtils.EMPTY;
- if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Formula"))) {
+ if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula"))) {
columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString());
}
@@ -254,7 +254,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
Object columnIndex = currentEditor.getValue();
Object columnName = StringUtils.EMPTY;
- if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Formula"))) {
+ if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula"))) {
columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString());
}
@@ -283,7 +283,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
int i;
boolean containFormulaType = false;
for (i = 0; i < cards.length; i++) {
- if (ComparatorUtils.equals(cards[i].getName(), com.fr.design.i18n.Toolkit.i18nText("FR-Engine_Parameter-Formula"))) {
+ if (ComparatorUtils.equals(cards[i].getName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Formula"))) {
containFormulaType = true;
break;
}
@@ -302,8 +302,8 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager();
if (designerEnvManager.isSupportStringToFormula()) {
if (!designerEnvManager.isDefaultStringToFormula()) {
- int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Edit_String_To_Formula")
- + "?", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tooltips"), JOptionPane.YES_NO_OPTION);
+ int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit_String_To_Formula")
+ + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.YES_NO_OPTION);
if (returnValue == JOptionPane.OK_OPTION) {
setCurrentEditor(j);
@@ -426,4 +426,4 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
public boolean shouldResponseChangeListener() {
return true;
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java
index 3f4d55c6bf..4ebe3c83fa 100644
--- a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java
+++ b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java
@@ -101,7 +101,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Values-Editor");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Values_Editor");
}
public Editor getCurrentEditor() {
@@ -207,7 +207,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
Object columnIndex = currentEditor.getValue();
//bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了?
//MoMeak:我也想注释了,但是有bug啊。。。
- if (columnIndex == null && ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("Formula"))) {
+ if (columnIndex == null && ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula"))) {
columnIndex = ((FormulaEditor) currentEditor).getFormula();
}
@@ -219,7 +219,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
Object columnIndex = currentEditor.getValue();
Object columnName = StringUtils.EMPTY;
- if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Formula"))) {
+ if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula"))) {
columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString());
}
@@ -235,7 +235,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
Object columnIndex = currentEditor.getValue();
Object columnName = StringUtils.EMPTY;
- if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Formula"))) {
+ if (ComparatorUtils.equals(name, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula"))) {
columnIndex = BaseFormula.createFormulaBuilder().build(columnIndex == null ? "" : columnIndex.toString());
}
@@ -264,7 +264,7 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
int i;
boolean containFormulaType = false;
for (i = 0; i < cards.length; i++) {
- if (ComparatorUtils.equals(cards[i].getName(), com.fr.design.i18n.Toolkit.i18nText("FR-Engine_Parameter-Formula"))) {
+ if (ComparatorUtils.equals(cards[i].getName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Formula"))) {
containFormulaType = true;
break;
}
@@ -283,8 +283,8 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager();
if (designerEnvManager.isSupportStringToFormula()) {
if (!designerEnvManager.isDefaultStringToFormula()) {
- int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Edit_String_To_Formula")
- + "?", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tooltips"), JOptionPane.YES_NO_OPTION);
+ int returnValue = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit_String_To_Formula")
+ + "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.YES_NO_OPTION);
if (returnValue == JOptionPane.OK_OPTION) {
setCurrentEditor(j);
diff --git a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPaneFactory.java b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPaneFactory.java
index 17e506f70d..71959b72da 100644
--- a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPaneFactory.java
+++ b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPaneFactory.java
@@ -83,7 +83,7 @@ public class ValueEditorPaneFactory {
* @return 返回公式编辑器面板
*/
public static ValueEditorPane createFormulaValueEditorPane() {
- return createValueEditorPane(new Editor[]{new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"))},
+ return createValueEditorPane(new Editor[]{new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"))},
StringUtils.EMPTY, StringUtils.EMPTY);
}
@@ -227,12 +227,12 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
public static Editor>[] basicEditors() {
- FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
+ FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
return new Editor[]{
new TextEditor(),
new SpinnerIntegerEditor(),
new DoubleEditor(),
- new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
+ new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")),
new BooleanEditor(),
formulaEditor
};
@@ -244,15 +244,15 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
public static Editor>[] formEditors() {
- FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
+ FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
- new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
+ new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")),
new BooleanEditor(),
formulaEditor,
- new WidgetNameEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Widget"))
+ new WidgetNameEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget"))
};
}
@@ -262,16 +262,16 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
public static Editor>[] extendedEditors() {
- FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
+ FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
- new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
+ new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
- new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell"))
+ new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell"))
};
}
@@ -281,16 +281,16 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
public static Editor>[] extendedCellGroupEditors() {
- FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
+ FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
- new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
+ new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
- new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell")),
+ new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell")),
new ColumnRowGroupEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell_Group"))
};
}
@@ -302,7 +302,7 @@ public class ValueEditorPaneFactory {
*/
public static Editor>[] cellGroupEditor() {
return new Editor[]{
- new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell")),
+ new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell")),
new ColumnRowGroupEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell_Group"))
};
}
@@ -316,7 +316,7 @@ public class ValueEditorPaneFactory {
*/
public static Editor>[] URLEditors(String popupName, String textEditorValue) {
return new Editor[]{
- new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? com.fr.design.i18n.Toolkit.i18nText("FR-Designer_None") : popupName),
+ new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_None") : popupName),
new TextEditor()
};
}
@@ -330,9 +330,9 @@ public class ValueEditorPaneFactory {
*/
public static Editor>[] dateEditors(String popupName, String textEditorValue) {
return new Editor[]{
- new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? com.fr.design.i18n.Toolkit.i18nText("FR-Designer_None") : popupName),
- new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
- new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"))
+ new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_None") : popupName),
+ new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")),
+ new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"))
};
}
@@ -342,17 +342,17 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
public static Editor>[] allEditors() {
- FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
+ FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
// formulaEditor.setEnabled(true);
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
- new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
+ new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
- new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Cell")),
+ new ColumnRowEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell")),
new ColumnSelectedEditor(),
//23328 allEditors中删除控件选项
// new WidgetNameEditor(com.fr.design.i18n.Toolkit.i18nText("Widget"))
@@ -369,7 +369,7 @@ public class ValueEditorPaneFactory {
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
- new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
+ new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")),
new BooleanEditor(),
};
}
@@ -380,12 +380,12 @@ public class ValueEditorPaneFactory {
* @return 编辑器
*/
public static Editor>[] noCRnoColumnEditors() {
- FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
+ FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
- new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
+ new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
@@ -398,7 +398,7 @@ public class ValueEditorPaneFactory {
* @return 编辑器
*/
public static Editor>[] numberEditors() {
- FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
+ FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
return new Editor[]{
new IntegerEditor(),
new DoubleEditor(),
@@ -413,9 +413,9 @@ public class ValueEditorPaneFactory {
* @return 编辑器
*/
public static Editor>[] dateEditors() {
- FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
+ FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
return new Editor[]{
- new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
+ new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")),
formulaEditor,
new ParameterEditor(),
};
@@ -427,14 +427,14 @@ public class ValueEditorPaneFactory {
* @return 存储过程的编辑器
*/
public static Editor>[] StoreProcedureEditors() {
- FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
+ FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
formulaEditor.setEnabled(true);
return new Editor[]{
new CursorEditor(),
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
- new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")),
+ new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")),
new BooleanEditor(),
formulaEditor
};
@@ -451,10 +451,10 @@ public class ValueEditorPaneFactory {
list.add(new TextEditor());
list.add(new IntegerEditor());
list.add(new DoubleEditor());
- list.add(new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Date")));
+ list.add(new DateEditor(true, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date")));
list.add(new BooleanEditor());
- FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter-Formula"));
+ FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula"));
formulaEditor.setEnabled(true);
list.add(formulaEditor);
@@ -498,10 +498,10 @@ public class ValueEditorPaneFactory {
JPanel paneRight = FRGUIPaneFactory.createBorderLayout_S_Pane();
pane.add(paneRight);
- paneRight.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Display_Value") + ":"), BorderLayout.NORTH);
+ paneRight.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Display_Value") + ":"), BorderLayout.NORTH);
paneRight.add(valueDictPane, BorderLayout.CENTER);
return pane;
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java
index 78ee449d91..af2589d455 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/BooleanEditor.java
@@ -42,7 +42,7 @@ public class BooleanEditor extends Editor {
booleanCheckBox = new UICheckBox("true");
this.add(booleanCheckBox, BorderLayout.CENTER);
this.setValue(value);
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Parameter-Boolean"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Boolean"));
booleanCheckBox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/ColumnNameEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/ColumnNameEditor.java
index 3cd7dddb20..f4d2a132cf 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/ColumnNameEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/ColumnNameEditor.java
@@ -23,7 +23,7 @@ public class ColumnNameEditor extends ColumnIndexEditor {
}
public ColumnNameEditor(String[] columnNames) {
- this(columnNames, com.fr.design.i18n.Toolkit.i18nText("ColumnName"));
+ this(columnNames, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Column_Name"));
}
public ColumnNameEditor(final String[] columnNames, String name) {
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/CursorEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/CursorEditor.java
index 461d657f19..3b658d0cef 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/CursorEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/CursorEditor.java
@@ -12,10 +12,10 @@ public class CursorEditor extends Editor {
public CursorEditor(){
this.setLayout(FRGUIPaneFactory.createCenterFlowLayout());
- label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Cursor"));
+ label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cursor"));
this.add(label);
this.setPreferredSize(new Dimension(10,20));
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Cursor"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cursor"));
this.setEnabled(false);
}
@@ -36,7 +36,7 @@ public class CursorEditor extends Editor {
@Override
public void setValue(CursorEditor value) {
- label.setText(com.fr.design.i18n.Toolkit.i18nText("Cursor"));
+ label.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cursor"));
}
}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/DoubleEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/DoubleEditor.java
index 0604c677a6..b39c16fe56 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/DoubleEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/DoubleEditor.java
@@ -16,7 +16,7 @@ public class DoubleEditor extends NumberEditor {
}
public DoubleEditor(Double value) {
- super(value, com.fr.design.i18n.Toolkit.i18nText("Parameter-Double"));
+ super(value, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Double"));
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/FloatEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/FloatEditor.java
index 00909d7f04..e3f6052194 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/FloatEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/FloatEditor.java
@@ -16,7 +16,7 @@ public class FloatEditor extends NumberEditor {
}
public FloatEditor(Float value) {
- super(value, com.fr.design.i18n.Toolkit.i18nText("Parameter-Float"));
+ super(value, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Float"));
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/IntegerEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/IntegerEditor.java
index 86fbe305b2..b68c62b6d3 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/IntegerEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/IntegerEditor.java
@@ -18,7 +18,7 @@ public class IntegerEditor extends NumberEditor {
}
public IntegerEditor(Integer value) {
- super(value, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter_Integer"));
+ super(value, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Integer"));
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/OldColumnIndexEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/OldColumnIndexEditor.java
index 842d83c5f1..b2cb6dc211 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/OldColumnIndexEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/OldColumnIndexEditor.java
@@ -52,7 +52,7 @@ public class OldColumnIndexEditor extends Editor {
protected void initComponents() {
indexCheckBox = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Column_Index"));
- nameCheckBox = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("ColumnName"));
+ nameCheckBox = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Column_Name"));
indexCheckBox.addActionListener(actionListener);
nameCheckBox.addActionListener(actionListener);
javax.swing.ButtonGroup buttonGroup = new javax.swing.ButtonGroup();
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/ParameterEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/ParameterEditor.java
index 813ca021ff..be25cab036 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/ParameterEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/ParameterEditor.java
@@ -28,7 +28,7 @@ public class ParameterEditor extends Editor {
this.add(parameterCombobox, BorderLayout.CENTER);
this.setValue(parameter);
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Parameter"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"));
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/SpinnerIntegerEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/SpinnerIntegerEditor.java
index 140ea8d94e..8d2bdb48ba 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/SpinnerIntegerEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/SpinnerIntegerEditor.java
@@ -21,7 +21,7 @@ public class SpinnerIntegerEditor extends Editor {
spinner = new UISpinner(-Integer.MAX_VALUE, Integer.MAX_VALUE, 1, 0);
this.add(spinner, BorderLayout.CENTER);
this.spinner.addKeyListener(textKeyListener);
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Parameter_Integer"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Integer"));
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/TextEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/TextEditor.java
index 0632be2e46..7084fbcc45 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/TextEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/TextEditor.java
@@ -45,7 +45,7 @@ public class TextEditor extends Editor {
this.textField.addKeyListener(textKeyListener);
this.setValue(value);
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Parameter-String"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_String"));
}
public UITextField getTextField() {
diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/XMLANameEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/XMLANameEditor.java
index 5676701640..0aaaea3ae8 100644
--- a/designer-base/src/main/java/com/fr/design/editor/editor/XMLANameEditor.java
+++ b/designer-base/src/main/java/com/fr/design/editor/editor/XMLANameEditor.java
@@ -34,7 +34,7 @@ public class XMLANameEditor extends ColumnIndexEditor{
* @param columnNames 度量值
*/
public XMLANameEditor(String[] columnNames) {
- this(columnNames, com.fr.design.i18n.Toolkit.i18nText("Measure"));
+ this(columnNames, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Measure"));
}
/**
diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginAbstractLoadingViewPane.java b/designer-base/src/main/java/com/fr/design/extra/PluginAbstractLoadingViewPane.java
index d2b30d3125..0eb1144665 100644
--- a/designer-base/src/main/java/com/fr/design/extra/PluginAbstractLoadingViewPane.java
+++ b/designer-base/src/main/java/com/fr/design/extra/PluginAbstractLoadingViewPane.java
@@ -98,7 +98,7 @@ public abstract class PluginAbstractLoadingViewPane extends PluginAbstract
@Override
public String textForInstallButton() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Install");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install");
}
diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginControlPane.java b/designer-base/src/main/java/com/fr/design/extra/PluginControlPane.java
index c170fea0e8..393626ce01 100644
--- a/designer-base/src/main/java/com/fr/design/extra/PluginControlPane.java
+++ b/designer-base/src/main/java/com/fr/design/extra/PluginControlPane.java
@@ -73,12 +73,12 @@ public class PluginControlPane extends BasicPane {
}
String extraInfo = "";
if (context.isLicDamaged()) {
- extraInfo = "(" + com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Plugin_Damaged") + ")";
+ extraInfo = "(" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Plugin_Damaged") + ")";
} else if (!context.isFree()) {
if (context.isAvailable()) {
- extraInfo = "(" + (context.isOnTrial() ? com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Trial") : com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Authorized")) + context.getLeftDays() + com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Left") + ")";
+ extraInfo = "(" + (context.isOnTrial() ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Designer_Trial") : com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Designer_Authorized")) + context.getLeftDays() + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Designer_Left") + ")";
} else {
- extraInfo = "(" + (context.isOnTrial() ? com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Trial") : com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Authorized")) + com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Expired") + ")";
+ extraInfo = "(" + (context.isOnTrial() ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Designer_Trial") : com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Designer_Authorized")) + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Designer_Expired") + ")";
}
}
setText(((PluginView) value).getName() + extraInfo);
diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java b/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java
index e8d2c2f103..3f7caf2fb9 100644
--- a/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java
+++ b/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java
@@ -59,7 +59,7 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane plugins) {
controlPane.loadPlugins(plugins);
- tabbedPane.setTitleAt(1, com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Update") + "(" + plugins.size() + ")");
+ tabbedPane.setTitleAt(1, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update") + "(" + plugins.size() + ")");
}
/**
@@ -201,7 +201,7 @@ public class PluginUpdatePane extends PluginAbstractLoadingViewPane map = new HashMap();
map.put("name", pluginName);
@@ -246,7 +246,7 @@ public class PluginUtils {
int leftDays = plugin.getLeftDays();
if (leftDays == Integer.MAX_VALUE) {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Store_Permanent");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Store_Permanent");
}
Calendar deadline = Calendar.getInstance();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java b/designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
index 443a2b44e4..de96c10b9b 100644
--- a/designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
+++ b/designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
@@ -53,7 +53,6 @@ public class PluginWebBridge {
private static final String PLUGIN_INFO = "pluginInfo";
private static final int COREPOOLSIZE = 3;
private static final int MAXPOOLSIZE = 5;
- private static final String I18N_PREFIX = "FR-";
private static PluginWebBridge helper;
@@ -380,7 +379,7 @@ public class PluginWebBridge {
int rv = JOptionPane.showOptionDialog(
null,
message,
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
@@ -571,13 +570,6 @@ public class PluginWebBridge {
//todo 初始化设计器其他部分
}
- /**
- * 国际化
- */
- public String parseI18(final String key) {
- return com.fr.design.i18n.Toolkit.i18nText(I18N_PREFIX + key);
- }
-
/**
* 是否是在设计器中操作
*/
diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java b/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java
index 1d3f1ac2b7..3e2cafdfea 100644
--- a/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java
+++ b/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java
@@ -1,6 +1,7 @@
package com.fr.design.extra;
import com.fr.base.TemplateUtils;
+import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StableUtils;
@@ -30,6 +31,7 @@ import java.util.Map;
*/
public class PluginWebPane extends JFXPanel {
private static final String RESOURCE_URL = "resourceURL";
+ private static final String LANGUAGE = "language";
private WebEngine webEngine;
public PluginWebPane(final String installHome, final String mainJs) {
@@ -75,6 +77,7 @@ public class PluginWebPane extends JFXPanel {
Map map4Tpl = new HashMap();
map4Tpl.put(RESOURCE_URL, "file:///" + URLEncoder.encode(installHome, "UTF-8"));
+ map4Tpl.put(LANGUAGE, GeneralContext.getLocale().toString());
while ((line = read.readLine()) != null) {
if (sb.length() > 0) {
sb.append('\n');
diff --git a/designer-base/src/main/java/com/fr/design/extra/QQLoginWebPane.java b/designer-base/src/main/java/com/fr/design/extra/QQLoginWebPane.java
index db7e32e7cf..f3d37cab70 100644
--- a/designer-base/src/main/java/com/fr/design/extra/QQLoginWebPane.java
+++ b/designer-base/src/main/java/com/fr/design/extra/QQLoginWebPane.java
@@ -177,7 +177,7 @@ public class QQLoginWebPane extends JFXPanel {
dialog.close();
}
}).build(),
- ButtonBuilder.create().text(com.fr.design.i18n.Toolkit.i18nText("FR-Engine_Cancel")).cancelButton(true).onAction(new EventHandler() {
+ ButtonBuilder.create().text(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_Cancel")).cancelButton(true).onAction(new EventHandler() {
@Override
public void handle(ActionEvent actionEvent) {
// abort action and close the dialog.
diff --git a/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java b/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java
index cc56a9c1bb..11bfc334ab 100644
--- a/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java
+++ b/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java
@@ -65,7 +65,7 @@ public class WebViewDlgHelper {
int rv = JOptionPane.showConfirmDialog(
null,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Install"),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE
);
@@ -82,7 +82,7 @@ public class WebViewDlgHelper {
int rv = JOptionPane.showConfirmDialog(
null,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Install_Version"),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE
);
@@ -202,7 +202,7 @@ public class WebViewDlgHelper {
int rv = JOptionPane.showConfirmDialog(
null,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Install"),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE
);
@@ -249,7 +249,7 @@ public class WebViewDlgHelper {
UITabbedPane tabbedPane = new UITabbedPane();
PluginInstalledPane installedPane = new PluginInstalledPane();
tabbedPane.addTab(installedPane.tabTitle(), installedPane);
- tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Update"), new PluginUpdatePane(tabbedPane));
+ tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update"), new PluginUpdatePane(tabbedPane));
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_All_Plugins"), new PluginFromStorePane(tabbedPane));
return tabbedPane;
}
@@ -266,7 +266,7 @@ public class WebViewDlgHelper {
}
});
} catch (PluginVerifyException e) {
- JOptionPane.showMessageDialog(null, e.getMessage(), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(null, e.getMessage(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
return false;
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
@@ -282,7 +282,7 @@ public class WebViewDlgHelper {
if (get()) {
IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome);
PluginStoreConstants.refreshProps(); // 下载完刷新一下版本号等
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Installed"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tooltips"), JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Installed"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.INFORMATION_MESSAGE);
}
} catch (InterruptedException | ExecutionException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
@@ -306,7 +306,7 @@ public class WebViewDlgHelper {
int rv = JOptionPane.showConfirmDialog(
null,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Update"),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE
);
diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java
index 8928c3671a..27873385a6 100644
--- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java
+++ b/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java
@@ -37,13 +37,13 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback {
public void done(PluginTaskResult result) {
if (result.isSuccess()) {
jsCallback.execute("success");
- FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Install_Success"));
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Install_Success"));
+ FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Success"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Success"));
} else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) {
int rv = JOptionPane.showOptionDialog(
null,
- com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Install_Dependence")),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Dependence")),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
@@ -62,8 +62,8 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback {
} else if(result.errorCode() == PluginErrorCode.HasLowerPluginWhenInstall){
int rv = JOptionPane.showOptionDialog(
null,
- com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Has_Install_Lower"),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Has_Install_Lower"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
@@ -76,8 +76,8 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback {
PluginOperateUtils.updatePluginFromDisk(zipFile, jsCallback);
}else {
jsCallback.execute("failed");
- FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Install_Failed"));
- JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Install_Failed"), JOptionPane.ERROR_MESSAGE);
+ FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed"));
+ JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed"), JOptionPane.ERROR_MESSAGE);
}
}
}
diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallOnlineCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallOnlineCallback.java
index 7055df6c9e..9b86641e66 100644
--- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallOnlineCallback.java
+++ b/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallOnlineCallback.java
@@ -35,13 +35,13 @@ public class InstallOnlineCallback extends AbstractDealPreTaskCallback {
String pluginInfo = PluginOperateUtils.getSuccessInfo(result);
if (result.isSuccess()) {
jsCallback.execute("success");
- FineLoggerFactory.getLogger().info(pluginInfo + com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Install_Success"));
- JOptionPane.showMessageDialog(null, pluginInfo + com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Install_Success"));
+ FineLoggerFactory.getLogger().info(pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Success"));
+ JOptionPane.showMessageDialog(null, pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Success"));
} else if(result.errorCode() == PluginErrorCode.HasLowerPluginWhenInstall){
int rv = JOptionPane.showOptionDialog(
null,
- com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Has_Install_Lower"),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Has_Install_Lower"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
@@ -55,8 +55,8 @@ public class InstallOnlineCallback extends AbstractDealPreTaskCallback {
PluginOperateUtils.updatePluginOnline(pluginMarker, jsCallback);
}else {
jsCallback.execute("failed");
- FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Install_Failed"));
- JOptionPane.showMessageDialog(null, pluginInfo, com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
+ FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Failed"));
+ JOptionPane.showMessageDialog(null, pluginInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/ModifyStatusCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/ModifyStatusCallback.java
index a945e85442..681180053e 100644
--- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/ModifyStatusCallback.java
+++ b/designer-base/src/main/java/com/fr/design/extra/exe/callback/ModifyStatusCallback.java
@@ -22,10 +22,10 @@ public class ModifyStatusCallback implements PluginTaskCallback{
public void done(PluginTaskResult result) {
if (result.isSuccess()) {
jsCallback.execute("success");
- String modifyMessage = isActive ? com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Has_Been_Disabled") : com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Has_Been_Actived");
+ String modifyMessage = isActive ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Has_Been_Disabled_Duplicate") : com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Plugin_Has_Been_Actived_Duplicate");
JOptionPane.showMessageDialog(null, modifyMessage);
} else {
- JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java
index d3d1b2ab0a..f503776993 100644
--- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java
+++ b/designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java
@@ -25,13 +25,13 @@ public class UninstallPluginCallback extends AbstractPluginTaskCallback {
public void done(PluginTaskResult result) {
if (result.isSuccess()) {
jsCallback.execute("success");
- FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Delete_Success"));
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Delete_Success"));
+ FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Success"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Success"));
}else if (result.errorCode() == PluginErrorCode.NeedUninstallDependingPluginFirst) {
int rv = JOptionPane.showOptionDialog(
null,
- com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Delete_Dependence")),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Dependence")),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
@@ -44,8 +44,8 @@ public class UninstallPluginCallback extends AbstractPluginTaskCallback {
PluginManager.getController().uninstall(pluginMarker, true, new UninstallPluginCallback(pluginMarker, jsCallback));
} else {
jsCallback.execute("failed");
- FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Delete_Failed"));
- JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
+ FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Failed"));
+ JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}
diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java
index 2d7ed2c061..de753f9ce4 100644
--- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java
+++ b/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java
@@ -37,13 +37,13 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
public void done(PluginTaskResult result) {
if (result.isSuccess()) {
jsCallback.execute("success");
- FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Update_Success"));
- JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Update_Success"));
+ FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Success"));
+ JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Success"));
} else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) {
int rv = JOptionPane.showOptionDialog(
null,
- com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Update_Dependence")),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Dependence")),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
@@ -62,8 +62,8 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
} else if(result.errorCode() == PluginErrorCode.NoPluginToUpdate){
int rv = JOptionPane.showOptionDialog(
null,
- com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_No_Plugin_Update"),
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_No_Plugin_Update"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
@@ -76,8 +76,8 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
PluginOperateUtils.installPluginFromDisk(zipFile, jsCallback);
}else {
jsCallback.execute("failed");
- FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Update_Failed"));
- JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
+ FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Failed"));
+ JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}
diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java
index cad84e8c9a..c857960c78 100644
--- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java
+++ b/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateOnlineCallback.java
@@ -31,12 +31,12 @@ public class UpdateOnlineCallback extends AbstractDealPreTaskCallback {
String pluginInfo = PluginOperateUtils.getSuccessInfo(result);
if (result.isSuccess()) {
jsCallback.execute("success");
- FineLoggerFactory.getLogger().info(pluginInfo + com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Update_Success"));
- JOptionPane.showMessageDialog(null,pluginInfo + com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Update_Success"));
+ FineLoggerFactory.getLogger().info(pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Success"));
+ JOptionPane.showMessageDialog(null,pluginInfo + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Success"));
} else {
jsCallback.execute("failed");
- FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin_Update_Failed"));
- JOptionPane.showMessageDialog(null, pluginInfo, com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
+ FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Failed"));
+ JOptionPane.showMessageDialog(null, pluginInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}
diff --git a/designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java b/designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java
index e08bc96093..193ad0c005 100644
--- a/designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java
+++ b/designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java
@@ -50,7 +50,7 @@ public class UpdateOnlineCallback implements ProgressCallback {
PluginManager.getController().update(pluginMarker, toPluginMarker, new UpdateOnlineCallback(pluginMarker, toPluginMarker, pane));
} else {
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Delete_Failed"));
- JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(null, PluginUtils.getMessageByErrorCode(result.errorCode()), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
}
diff --git a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java
index 4e991c05c3..b1cb56ede1 100644
--- a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java
+++ b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java
@@ -167,14 +167,14 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
this.addMouseMotionListener(this);
this.setBorder(null);
this.setForeground(new Color(58, 56, 58));
- this.setFont(new Font(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Song_TypeFace"), 0, 12));
+ this.setFont(new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Song_TypeFace"), 0, 12));
openedTemplate = HistoryTemplateListPane.getInstance().getHistoryList();
selectedIndex = openedTemplate.size() - 1;
Toolkit.getDefaultToolkit().addAWTEventListener(awt, AWTEvent.MOUSE_EVENT_MASK);
}
private UIMenuItem initCloseOther() {
- UIMenuItem closeOther = new UIMenuItem(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FS_Close_Other_Templates"));
+ UIMenuItem closeOther = new UIMenuItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FS_Close_Other_Templates"));
setListDownItemPreferredSize(closeOther);
closeOther.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -694,8 +694,8 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
//如果在权限编辑情况下,不允许切换到表单类型的工作簿
if (DesignerMode.isAuthorityEditing() && !openedTemplate.get(selectedIndex).isJWorkBook()) {
DesignerContext.getDesignerFrame().addAndActivateJTemplate(openedTemplate.get(tempSelectedIndex));
- JOptionPane.showMessageDialog(this, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Form-AuthorityEdited_Cannot_be_Supported")
- + "!", com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Alert"), JOptionPane.WARNING_MESSAGE);
+ JOptionPane.showMessageDialog(this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported")
+ + "!", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
this.repaint();
return;
}
@@ -734,7 +734,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
if (!specifiedTemplate.isALLSaved() && !DesignerMode.isVcsMode()) {
specifiedTemplate.stopEditing();
- int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Utils-Would_you_like_to_save") + " \"" + specifiedTemplate.getEditingFILE() + "\" ?",
+ int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save") + " \"" + specifiedTemplate.getEditingFILE() + "\" ?",
ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.YES_OPTION && specifiedTemplate.saveTemplate()) {
specifiedTemplate.saveTemplate();
diff --git a/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java b/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java
index a3c54113a0..295b63385b 100644
--- a/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java
+++ b/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java
@@ -1 +1 @@
-package com.fr.design.file;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.UIList;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ProductConstants;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
/**
* Author : daisy
* Date: 13-8-9
* Time: 下午3:41
*/
public class SaveSomeTemplatePane extends BasicPane {
private UICheckBox[] templateCheckBoxes = null;
private BasicDialog dialog;
private JPanel templatesChoosePane;
private UIScrollPane scrollPane;
private java.util.List> unSavedTemplate = new ArrayList>();
private boolean isAllSaved = false;
//该变量用来判断是在关闭其他模板或是关闭设计器的时候,是否需要判断当前模板有没有保存
private boolean isJudgeCurrentEditingTemplate = true;
public SaveSomeTemplatePane(boolean isNeedTojudgeCurrent) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
if (this.dialog == null) {
this.dialog = this.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
for (int i = 0; i < templateCheckBoxes.length; i++) {
if (templateCheckBoxes[i].isSelected()) {
saveSelectedTemplate(unSavedTemplate.get(i));
}
}
isAllSaved = true;
}
public void doCancel() {
isAllSaved = false;
}
});
}
UILabel tip = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Select_The_Source_To_Save"));
this.add(tip, BorderLayout.NORTH);
templatesChoosePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
UIScrollPane scrollPane = new UIScrollPane(templatesChoosePane);
this.add(scrollPane, BorderLayout.CENTER);
this.isJudgeCurrentEditingTemplate = isNeedTojudgeCurrent;
}
private void initTemplatesChoosePane() {
templatesChoosePane.setBorder(BorderFactory.createTitledBorder(""));
for (int i = 0; i < unSavedTemplate.size(); i++) {
templateCheckBoxes[i] = new UICheckBox(unSavedTemplate.get(i).getEditingFILE().getName());
templateCheckBoxes[i].setSelected(true);
}
final UIList templatesList = new UIList(templateCheckBoxes);
templatesList.setModel(new UnSeletedTemplateListDataMode());
templatesList.setCellRenderer(new UnSelectedListCellRender());
templatesList.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
super.mousePressed(e);
int index = templatesList.getSelectedIndex();
if (index < 0) {
return;
}
UICheckBox checkBox = (UICheckBox) templatesList.getModel().getElementAt(index);
checkBox.setSelected(!checkBox.isSelected());
templatesList.repaint();
}
});
final UICheckBox filenameCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Choose_All"));
filenameCheckBox.setSelected(true);
filenameCheckBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
boolean isSelected = filenameCheckBox.isSelected();
for (int i = 0; i < templatesList.getModel().getSize(); i++) {
UICheckBox checkBox = (UICheckBox) templatesList.getModel().getElementAt(i);
checkBox.setSelected(isSelected);
}
templatesList.repaint();
}
});
templatesChoosePane.add(filenameCheckBox, BorderLayout.NORTH);
templatesChoosePane.add(templatesList, BorderLayout.CENTER);
}
public boolean showSavePane() {
populate();
//如果有未保存的文件 ,则跳出保存对话框,选择要存储的项目
if (!unSavedTemplate.isEmpty()) {
dialog.setVisible(true);
} else {
isAllSaved = true;
}
return isAllSaved;
}
public void populate() {
java.util.List> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList();
JTemplate, ?> currentTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
for (int i = 0; i < opendedTemplate.size(); i++) {
if (isneedToAdd(opendedTemplate.get(i), currentTemplate)) {
unSavedTemplate.add(opendedTemplate.get(i));
}
}
templateCheckBoxes = new UICheckBox[unSavedTemplate.size()];
initTemplatesChoosePane();
}
private boolean isneedToAdd(JTemplate, ?> template, JTemplate, ?> currentTemplate) {
//所有模板都判断是不是保存
if (isJudgeCurrentEditingTemplate) {
return !template.isALLSaved();
}
//当前编辑的模板不判断是否已经保存
if (ComparatorUtils.equals(template, currentTemplate)) {
return false;
} else {
return !template.isALLSaved();
}
}
private void saveSelectedTemplate(JTemplate, ?> specifiedTemplate) {
if (!specifiedTemplate.isSaved()) {
specifiedTemplate.stopEditing();
specifiedTemplate.saveTemplate();
}
FineLoggerFactory.getLogger().info( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Template_Already_Saved", specifiedTemplate.getEditingFILE().getName()));
}
public int saveLastOneTemplate() {
JTemplate, ?> specifiedTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (!specifiedTemplate.isALLSaved()) {
specifiedTemplate.stopEditing();
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Utils-Would_you_like_to_save") + " \"" + specifiedTemplate.getEditingFILE() + "\" ?",
ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.YES_OPTION && specifiedTemplate.saveTemplate()) {
specifiedTemplate.saveTemplate();
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Template_Already_Saved", specifiedTemplate.getEditingFILE().getName()));
}
return returnVal;
}
return JOptionPane.YES_OPTION;
}
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Save");
}
private class UnSelectedListCellRender extends DefaultListCellRenderer {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, final boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
templateCheckBoxes[index] = (UICheckBox) value;
templateCheckBoxes[index].setBackground(list.getBackground());
return templateCheckBoxes[index];
}
}
private class UnSeletedTemplateListDataMode extends AbstractListModel {
@Override
public int getSize() {
return templateCheckBoxes.length;
}
@Override
public UICheckBox getElementAt(int index) {
if (index > getSize() - 1 || index < 0) {
return null;
}
return templateCheckBoxes[index];
}
}
}
\ No newline at end of file
+package com.fr.design.file;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.UIList;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ProductConstants;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
/**
* Author : daisy
* Date: 13-8-9
* Time: 下午3:41
*/
public class SaveSomeTemplatePane extends BasicPane {
private UICheckBox[] templateCheckBoxes = null;
private BasicDialog dialog;
private JPanel templatesChoosePane;
private UIScrollPane scrollPane;
private java.util.List> unSavedTemplate = new ArrayList>();
private boolean isAllSaved = false;
//该变量用来判断是在关闭其他模板或是关闭设计器的时候,是否需要判断当前模板有没有保存
private boolean isJudgeCurrentEditingTemplate = true;
public SaveSomeTemplatePane(boolean isNeedTojudgeCurrent) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
if (this.dialog == null) {
this.dialog = this.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
for (int i = 0; i < templateCheckBoxes.length; i++) {
if (templateCheckBoxes[i].isSelected()) {
saveSelectedTemplate(unSavedTemplate.get(i));
}
}
isAllSaved = true;
}
public void doCancel() {
isAllSaved = false;
}
});
}
UILabel tip = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select_The_Source_To_Save"));
this.add(tip, BorderLayout.NORTH);
templatesChoosePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
UIScrollPane scrollPane = new UIScrollPane(templatesChoosePane);
this.add(scrollPane, BorderLayout.CENTER);
this.isJudgeCurrentEditingTemplate = isNeedTojudgeCurrent;
}
private void initTemplatesChoosePane() {
templatesChoosePane.setBorder(BorderFactory.createTitledBorder(""));
for (int i = 0; i < unSavedTemplate.size(); i++) {
templateCheckBoxes[i] = new UICheckBox(unSavedTemplate.get(i).getEditingFILE().getName());
templateCheckBoxes[i].setSelected(true);
}
final UIList templatesList = new UIList(templateCheckBoxes);
templatesList.setModel(new UnSeletedTemplateListDataMode());
templatesList.setCellRenderer(new UnSelectedListCellRender());
templatesList.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
super.mousePressed(e);
int index = templatesList.getSelectedIndex();
if (index < 0) {
return;
}
UICheckBox checkBox = (UICheckBox) templatesList.getModel().getElementAt(index);
checkBox.setSelected(!checkBox.isSelected());
templatesList.repaint();
}
});
final UICheckBox filenameCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Choose_All"));
filenameCheckBox.setSelected(true);
filenameCheckBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
boolean isSelected = filenameCheckBox.isSelected();
for (int i = 0; i < templatesList.getModel().getSize(); i++) {
UICheckBox checkBox = (UICheckBox) templatesList.getModel().getElementAt(i);
checkBox.setSelected(isSelected);
}
templatesList.repaint();
}
});
templatesChoosePane.add(filenameCheckBox, BorderLayout.NORTH);
templatesChoosePane.add(templatesList, BorderLayout.CENTER);
}
public boolean showSavePane() {
populate();
//如果有未保存的文件 ,则跳出保存对话框,选择要存储的项目
if (!unSavedTemplate.isEmpty()) {
dialog.setVisible(true);
} else {
isAllSaved = true;
}
return isAllSaved;
}
public void populate() {
java.util.List> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList();
JTemplate, ?> currentTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
for (int i = 0; i < opendedTemplate.size(); i++) {
if (isneedToAdd(opendedTemplate.get(i), currentTemplate)) {
unSavedTemplate.add(opendedTemplate.get(i));
}
}
templateCheckBoxes = new UICheckBox[unSavedTemplate.size()];
initTemplatesChoosePane();
}
private boolean isneedToAdd(JTemplate, ?> template, JTemplate, ?> currentTemplate) {
//所有模板都判断是不是保存
if (isJudgeCurrentEditingTemplate) {
return !template.isALLSaved();
}
//当前编辑的模板不判断是否已经保存
if (ComparatorUtils.equals(template, currentTemplate)) {
return false;
} else {
return !template.isALLSaved();
}
}
private void saveSelectedTemplate(JTemplate, ?> specifiedTemplate) {
if (!specifiedTemplate.isSaved()) {
specifiedTemplate.stopEditing();
specifiedTemplate.saveTemplate();
}
FineLoggerFactory.getLogger().info( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Template_Already_Saved", specifiedTemplate.getEditingFILE().getName()));
}
public int saveLastOneTemplate() {
JTemplate, ?> specifiedTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (!specifiedTemplate.isALLSaved()) {
specifiedTemplate.stopEditing();
int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save") + " \"" + specifiedTemplate.getEditingFILE() + "\" ?",
ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnVal == JOptionPane.YES_OPTION && specifiedTemplate.saveTemplate()) {
specifiedTemplate.saveTemplate();
FineLoggerFactory.getLogger().info(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Template_Already_Saved", specifiedTemplate.getEditingFILE().getName()));
}
return returnVal;
}
return JOptionPane.YES_OPTION;
}
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save");
}
private class UnSelectedListCellRender extends DefaultListCellRenderer {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, final boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
templateCheckBoxes[index] = (UICheckBox) value;
templateCheckBoxes[index].setBackground(list.getBackground());
return templateCheckBoxes[index];
}
}
private class UnSeletedTemplateListDataMode extends AbstractListModel {
@Override
public int getSize() {
return templateCheckBoxes.length;
}
@Override
public UICheckBox getElementAt(int index) {
if (index > getSize() - 1 || index < 0) {
return null;
}
return templateCheckBoxes[index];
}
}
}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java
index b0d5828c74..e3d12da1ac 100644
--- a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java
+++ b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java
@@ -176,7 +176,7 @@ public class TemplateTreePane extends JPanel implements FileOperations {
if (nodeFile.isLocked()) {
if (JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FileLocked_Undeleted"),
- com.fr.design.i18n.Toolkit.i18nText("Error"), JOptionPane.YES_OPTION, JOptionPane.ERROR_MESSAGE) == JOptionPane.YES_OPTION) {
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.YES_OPTION, JOptionPane.ERROR_MESSAGE) == JOptionPane.YES_OPTION) {
refreshDockingView();
}
break;
@@ -187,7 +187,7 @@ public class TemplateTreePane extends JPanel implements FileOperations {
fileAssistUtils.moveToTrash(nodeFile.getPath());
deleteHistory(path.replaceAll("/", "\\\\"));
} else {
- JOptionPane.showMessageDialog(this, com.fr.design.i18n.Toolkit.i18nText("Warning-Template_Do_Not_Exsit"), ProductConstants.PRODUCT_NAME,
+ JOptionPane.showMessageDialog(this, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Warning_Template_Do_Not_Exsit"), ProductConstants.PRODUCT_NAME,
JOptionPane.INFORMATION_MESSAGE);
}
}
diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
index f543591d06..c2c69299d1 100644
--- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
+++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
@@ -89,7 +89,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
String text = formulaTextArea.getText();
// 判断在中文输入状态是否还包含提示符 要删掉
//Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column
- String tip = "\n\n\n" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaPane_Tips");
+ String tip = "\n\n\n" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Tips");
if (text.contains(tip)) {
text = text.substring(0, text.indexOf(tip));
insertPosition = 0;
@@ -161,7 +161,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
JPanel searchPane = new JPanel(new BorderLayout(4, 4));
searchPane.add(keyWordTextField, BorderLayout.CENTER);
- UIButton searchButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaPane_Search"));
+ UIButton searchButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Search"));
searchPane.add(searchButton, BorderLayout.EAST);
tipsPane.add(searchPane, BorderLayout.NORTH);
initKeyWordTextFieldKeyListener();
@@ -496,7 +496,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
if (content.trim().equals("=")) {
this.formulaTextArea.setForeground(Color.gray);
//Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column
- this.formulaTextArea.setText("\n\n\n" + com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaPane_Tips"));
+ this.formulaTextArea.setText("\n\n\n" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Tips"));
this.formulaTextArea.setCaretPosition(0);
ifHasBeenWriten = 0;
this.listModel.removeAllElements();
@@ -716,7 +716,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea);
desScrollPane.setBorder(null);
- this.add(this.createNamePane(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST);
+ this.add(this.createNamePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST);
descriptionTextArea.setBackground(Color.white);
descriptionTextArea.setLineWrap(true);
descriptionTextArea.setWrapStyleWord(true);
@@ -789,7 +789,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
UIScrollPane variablesTreePane = new UIScrollPane(variablesTree);
variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC));
this.add(this.createNamePane(
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaPane_Variables") + ":", variablesTreePane), BorderLayout.CENTER);
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Variables") + ":", variablesTreePane), BorderLayout.CENTER);
variablesTree.setRootVisible(false);
variablesTree.setShowsRootHandles(true);
variablesTree.addMouseListener(applyTextMouseListener);
@@ -818,7 +818,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
private class LookDetailAction extends UpdateAction {
public LookDetailAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaPane_Function_Detail"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Function_Detail"));
this.setMnemonic('L');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png"));
}
@@ -833,7 +833,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
BasicPane basicPane = new BasicPane() {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaPane_Function_Detail");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Function_Detail");
}
};
basicPane.setLayout(FRGUIPaneFactory.createBorderLayout());
@@ -929,7 +929,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
variableResolver.resolveColumnNames()).createMutableTreeNode());
// Set cutReport Variable
- rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaPane_Variables"),
+ rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Variables"),
BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"),
variableResolver.resolveCurReportVariables()).createMutableTreeNode());
@@ -937,11 +937,11 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"),
variableResolver.resolveTableDataParameterVariables()).createMutableTreeNode());
- rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("ParameterD-Report_Parameter"),
+ rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ParameterD_Report_Parameter"),
BaseUtils.readIcon("/com/fr/design/images/m_report/p.gif"),
variableResolver.resolveReportParameterVariables()).createMutableTreeNode());
- rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("M_Server-Global_Parameters"),
+ rootNode.add(new TextFolderUserObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Server_Global_Parameters"),
BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"),
variableResolver.resolveGlobalParameterVariables()).createMutableTreeNode());
diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPaneWhenReserveFormula.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPaneWhenReserveFormula.java
index 752f005a2a..e08f7e3b40 100644
--- a/designer-base/src/main/java/com/fr/design/formula/FormulaPaneWhenReserveFormula.java
+++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPaneWhenReserveFormula.java
@@ -25,7 +25,7 @@ public class FormulaPaneWhenReserveFormula extends FormulaPane {
@Override
protected void extendCheckBoxPane(JPanel checkBoxPane) {
// peter:添加公式是否兼容Excel的属性
- reserveCheckBox4Result = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Export-Save-Formula"));
+ reserveCheckBox4Result = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Export_Save_Formula"));
reserveCheckBox4Result.setSelected(false);
reserveCheckBox4Result.addChangeListener(new ChangeListener() {
@@ -38,7 +38,7 @@ public class FormulaPaneWhenReserveFormula extends FormulaPane {
}
}
});
- reserveCheckBox4Write = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Write-Save-Formula"));
+ reserveCheckBox4Write = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_Save_Formula"));
reserveCheckBox4Write.setSelected(false);
checkBoxPane.add(reserveCheckBox4Result, BorderLayout.CENTER);
diff --git a/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java b/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java
index a661a3b023..4595b04ac0 100644
--- a/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java
+++ b/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java
@@ -123,19 +123,19 @@ public abstract class FunctionConstants {
public static NameAndTypeAndFunctionList[] EMBFUNCTIONS = new NameAndTypeAndFunctionList[] {
new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Math_&_Trig"), Function.MATH),
- new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaD-Text"), Function.TEXT),
+ new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Text"), Function.TEXT),
new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Date_&_Time"), Function.DATETIME),
- new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaD-Logical"), Function.LOGIC),
- new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaD-Array"), Function.ARRAY),
- new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaD-Report"), Function.REPORT),
- new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaD-Other"), Function.OTHER),
+ new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Logical"), Function.LOGIC),
+ new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Array"), Function.ARRAY),
+ new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Report"), Function.REPORT),
+ new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_Other"), Function.OTHER),
new NameAndTypeAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function_Type_Hierarchy"), Function.HA)
};
public static FunctionGroup ALL = new FunctionGroup() {
@Override
public String getGroupName() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_FormulaD-All");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_All");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java b/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java
index 57ad06d7d7..3d56dd925e 100644
--- a/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java
+++ b/designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java
@@ -44,7 +44,7 @@ public class FunctionManagerPane extends BasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Function-Function_Manager");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function_Function_Manager");
}
/**
@@ -94,7 +94,7 @@ public class FunctionManagerPane extends BasicPane {
@Override
public NameableCreator[] createNameableCreators() {
- NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Function"), FunctionDef.class,
+ NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"), FunctionDef.class,
FunctionContentPane.class);
return new NameableCreator[]{funcDef};
}
@@ -123,7 +123,7 @@ public class FunctionManagerPane extends BasicPane {
JPanel reportletNamePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(25);
reportletNamePane.add(classNameTextField);
- UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Select"));
+ UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height));
reportletNamePane.add(browserButton);
browserButton.addActionListener(new ActionListener() {
@@ -138,7 +138,7 @@ public class FunctionManagerPane extends BasicPane {
}).setVisible(true);
}
});
- UIButton editorButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Edit"));
+ UIButton editorButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editorButton.setPreferredSize(new Dimension(editorButton.getPreferredSize().width, classNameTextField.getPreferredSize().height));
reportletNamePane.add(editorButton);
editorButton.addActionListener(createEditorButtonActionListener());
@@ -151,12 +151,12 @@ public class FunctionManagerPane extends BasicPane {
String path1 = getEscapePath(File.separator + ProjectConstants.WEBINF_NAME + File.separator + ProjectConstants.CLASSES_NAME);
String path2 = getEscapePath(WorkContext.getCurrent().getPath() + File.separator + ProjectConstants.CLASSES_NAME);
- descriptionArea.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Function_Description_Area_Text", path1, path2));
+ descriptionArea.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function_Description_Area_Text", path1, path2));
JPanel descriptionPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); //Description Pane
this.add(descriptionPane, BorderLayout.SOUTH);
descriptionPane.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
- descriptionPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Description") + ":"), BorderLayout.NORTH);
+ descriptionPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Description") + ":"), BorderLayout.NORTH);
this.descriptionTextArea = new UITextArea(6, 24);
descriptionPane.add(new JScrollPane(this.descriptionTextArea), BorderLayout.CENTER);
}
@@ -211,4 +211,4 @@ public class FunctionManagerPane extends BasicPane {
return editing;
}
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java
index 1e075ecf2f..6c99f24c68 100644
--- a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java
+++ b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java
@@ -79,9 +79,9 @@ public class JavaEditorPane extends BasicPane {
UIScrollPane jt = new UIScrollPane(javaText);
JPanel toolbarPane = new JPanel(new FlowLayout(FlowLayout.LEFT));
- UIButton saveButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Save"));
+ UIButton saveButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save"));
saveButton.setAction(new SaveAction());
- UIButton compileButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Compile"));
+ UIButton compileButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Compile"));
compileButton.setAction(new CompilerAction());
toolbarPane.add(saveButton);
toolbarPane.add(compileButton);
@@ -141,7 +141,7 @@ public class JavaEditorPane extends BasicPane {
private class SaveAction extends AbstractAction { //新建文件命令
public SaveAction() {
- super(com.fr.design.i18n.Toolkit.i18nText("Save"));
+ super(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save"));
}
public void actionPerformed(ActionEvent e) {
saveTextToFile(javaText.getText());
@@ -168,7 +168,7 @@ public class JavaEditorPane extends BasicPane {
private class CompilerAction extends AbstractAction {
public CompilerAction() {
- super(com.fr.design.i18n.Toolkit.i18nText("Compile"));
+ super(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Compile"));
}
public void actionPerformed(ActionEvent e) {
new SwingWorker() {
diff --git a/designer-base/src/main/java/com/fr/design/formula/SortFormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/SortFormulaPane.java
index 5348c12b45..222aa90fec 100644
--- a/designer-base/src/main/java/com/fr/design/formula/SortFormulaPane.java
+++ b/designer-base/src/main/java/com/fr/design/formula/SortFormulaPane.java
@@ -38,7 +38,7 @@ public abstract class SortFormulaPane extends JPanel {
sortFormulaTextField = new UITextField(16);
//Lance:添加一公式编辑器按钮
sortFormulaTextFieldButton = new UIButton("...");
- sortFormulaTextFieldButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Formula") + "...");
+ sortFormulaTextFieldButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula") + "...");
sortFormulaTextFieldButton.setPreferredSize(new Dimension(25, sortFormulaTextFieldButton.getPreferredSize().height));
sortFormulaTextFieldButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
@@ -48,7 +48,7 @@ public abstract class SortFormulaPane extends JPanel {
this.add(GUICoreUtils.createFlowPane(new JComponent[]{new UILabel(InsetText), //new UILabel(com.fr.design.i18n.Toolkit.i18nText("Select_sort_order") + ":"),
sortOrderComboBox, new UILabel(InsetText),
- new UILabel(com.fr.design.i18n.Toolkit.i18nText("Formula") + ":="), sortFormulaTextField, //selectButton,
+ new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula") + ":="), sortFormulaTextField, //selectButton,
sortFormulaTextFieldButton}, FlowLayout.LEFT));
}
diff --git a/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java
index 12df93459b..d3060b42b8 100644
--- a/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java
+++ b/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java
@@ -39,7 +39,7 @@ public class TinyFormulaPane extends BasicBeanPane implements UIObserver
// 添加一公式编辑器按钮
formulaTextFieldButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/m_insert/formula.png"));
- formulaTextFieldButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Formula") + "...");
+ formulaTextFieldButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula") + "...");
formulaTextFieldButton.setPreferredSize(new Dimension(24, 20));
formulaTextFieldButton.setOpaque(false);
formulaTextFieldButton.setCursor(new Cursor(Cursor.HAND_CURSOR));
@@ -107,7 +107,7 @@ public class TinyFormulaPane extends BasicBeanPane implements UIObserver
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Present-Formula_Present");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Present_Formula_Present");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/gui/HyperlinkFilterHelper.java b/designer-base/src/main/java/com/fr/design/gui/HyperlinkFilterHelper.java
index 47d1532fa2..bc2cbdbf90 100644
--- a/designer-base/src/main/java/com/fr/design/gui/HyperlinkFilterHelper.java
+++ b/designer-base/src/main/java/com/fr/design/gui/HyperlinkFilterHelper.java
@@ -18,7 +18,7 @@ public class HyperlinkFilterHelper {
return false;
}
//先屏蔽掉这个,之后还有别的
- String[] names = {com.fr.design.i18n.Toolkit.i18nText("FR-Hyperlink_Chart_Float")};
+ String[] names = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ Hyperlink_Chart_Float")};
for (String name : names) {
if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) {
return false;
@@ -33,7 +33,7 @@ public class HyperlinkFilterHelper {
return false;
}
//先屏蔽掉这个,之后还有别的
- String[] names = {com.fr.design.i18n.Toolkit.i18nText("FR-Hyperlink_Chart_Float"), com.fr.design.i18n.Toolkit.i18nText("FR-Hyperlink_Chart_Cell")};
+ String[] names = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ Hyperlink_Chart_Float"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Chart_Cell")};
for (String name : names) {
if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) {
if (jTemplate.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB && ComparatorUtils.equals(itemName, names[0])) {
@@ -53,7 +53,7 @@ public class HyperlinkFilterHelper {
}
private static boolean whetherAddFormLink(JTemplate jTemplate, String itemName) {
- String formName = com.fr.design.i18n.Toolkit.i18nText("Hyperlink-Form_link");
+ String formName = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Form_Link");
return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName));
}
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java b/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java
index 8c2c288538..a269359b73 100644
--- a/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java
@@ -25,7 +25,7 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
this.add(pane, BorderLayout.NORTH);
JPanel colPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
- colPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Column") + ":"));
+ colPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column") + ":"));
pane.add(colPane);
initColSpinner();
@@ -34,7 +34,7 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
JPanel rowPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
pane.add(rowPane);
- rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Row") + ":"));
+ rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row") + ":"));
initRowSpinner();
rowPane.add(rowSpinner);
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/CommonShortCutHandlers.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/CommonShortCutHandlers.java
new file mode 100644
index 0000000000..42c0d2f2d0
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/CommonShortCutHandlers.java
@@ -0,0 +1,212 @@
+package com.fr.design.gui.controlpane;
+
+import com.fr.base.BaseUtils;
+import com.fr.base.FRContext;
+import com.fr.design.gui.ilist.JNameEdList;
+import com.fr.design.gui.ilist.ListModelElement;
+import com.fr.design.utils.gui.GUICoreUtils;
+import com.fr.general.ComparatorUtils;
+import com.fr.stable.ArrayUtils;
+import com.fr.stable.Nameable;
+
+import javax.swing.DefaultListModel;
+import javax.swing.SwingUtilities;
+import java.awt.Component;
+import java.util.Arrays;
+import java.util.Comparator;
+
+/**
+ * 存放一些通用的事件处理方法
+ * Created by plough on 2018/8/13.
+ */
+public class CommonShortCutHandlers {
+ ListControlPaneProvider listControlPane;
+ JNameEdList nameableList;
+
+ private CommonShortCutHandlers(ListControlPaneProvider listControlPane) {
+ this.listControlPane = listControlPane;
+ this.nameableList = listControlPane.getNameableList();
+ }
+
+ public static CommonShortCutHandlers newInstance(ListControlPaneProvider listControlPane) {
+ return new CommonShortCutHandlers(listControlPane);
+ }
+
+ public void onAddItem(NameableCreator creator) {
+ if (listControlPane.hasInvalid(true)) {
+ return;
+ }
+
+ Nameable nameable = creator.createNameable(listControlPane);
+ listControlPane.addNameable(nameable, listControlPane.getModel().getSize());
+ }
+
+ public void onRemoveItem() {
+ try {
+ nameableList.getCellEditor()
+ .stopCellEditing();
+ } catch (Exception ignored) {
+ }
+ if (GUICoreUtils.removeJListSelectedNodes(SwingUtilities
+ .getWindowAncestor((Component) listControlPane), nameableList)) {
+ listControlPane.checkButtonEnabled();
+ }
+ }
+
+ public void onCopyItem() {
+ // p:选中的值.
+ ListModelElement selectedValue = (ListModelElement) nameableList.getSelectedValue();
+ if (selectedValue == null) {
+ return;
+ }
+
+ listControlPane.getControlUpdatePane().update();
+
+ Nameable selectedNameable = selectedValue.wrapper;
+
+ // p: 用反射机制实现
+ try {
+ Nameable newNameable = (Nameable) BaseUtils.cloneObject(selectedNameable);
+ newNameable.setName(createUnrepeatedCopyName(selectedNameable.getName()));
+
+ listControlPane.addNameable(newNameable, listControlPane.getSelectedIndex() + 1);
+ } catch (Exception e) {
+ FRContext.getLogger().error(e.getMessage(), e);
+ }
+ }
+
+ public void onMoveUpItem() {
+ int selectedIndex = nameableList.getSelectedIndex();
+ if (selectedIndex == -1) {
+ return;
+ }
+
+ // 上移
+ if (selectedIndex > 0) {
+ DefaultListModel listModel = (DefaultListModel) nameableList.getModel();
+ Object selecteObj1 = listModel.get(selectedIndex - 1);
+ listModel.set(selectedIndex - 1, listModel.get(selectedIndex));
+ listModel.set(selectedIndex, selecteObj1);
+
+ nameableList.setSelectedIndex(selectedIndex - 1);
+ nameableList.ensureIndexIsVisible(selectedIndex - 1);
+ }
+ }
+
+ public void onMoveDownItem() {
+ int selectedIndex = nameableList.getSelectedIndex();
+ if (selectedIndex == -1) {
+ return;
+ }
+
+ if (selectedIndex < nameableList.getModel().getSize() - 1) {
+ DefaultListModel listModel = (DefaultListModel) nameableList
+ .getModel();
+
+ Object selecteObj1 = listModel.get(selectedIndex + 1);
+ listModel.set(selectedIndex + 1, listModel.get(selectedIndex));
+ listModel.set(selectedIndex, selecteObj1);
+
+ nameableList.setSelectedIndex(selectedIndex + 1);
+ nameableList.ensureIndexIsVisible(selectedIndex + 1);
+ }
+ }
+
+ public void onSortItem(boolean isAtoZ) {
+ // p:选中的值.
+ Object selectedValue = nameableList.getSelectedValue();
+
+ DefaultListModel listModel = (DefaultListModel) nameableList
+ .getModel();
+ Nameable[] nameableArray = new Nameable[listModel.getSize()];
+ if (nameableArray.length <= 0) {
+ return;
+ }
+
+ for (int i = 0; i < listModel.getSize(); i++) {
+ nameableArray[i] = ((ListModelElement) listModel.getElementAt(i)).wrapper;
+ }
+
+ // p:排序.
+ if (isAtoZ) {
+ Comparator nameableComparator = new Comparator() {
+ @Override
+ public int compare(Nameable o1, Nameable o2) {
+ return -ComparatorUtils.compare(o1.getName(), o2
+ .getName());
+ }
+ };
+ isAtoZ = !isAtoZ;
+ Arrays.sort(nameableArray, nameableComparator);
+ } else {
+ Comparator nameableComparator = new Comparator() {
+ @Override
+ public int compare(Nameable o1, Nameable o2) {
+ return ComparatorUtils.compare(o1.getName(), o2
+ .getName());
+ }
+ };
+ isAtoZ = !isAtoZ;
+ Arrays.sort(nameableArray, nameableComparator);
+ }
+
+ for (int i = 0; i < nameableArray.length; i++) {
+ listModel.set(i, new ListModelElement(nameableArray[i]));
+ }
+
+ // p:需要选中以前的那个值.
+ if (selectedValue != null) {
+ nameableList.setSelectedValue(selectedValue, true);
+ }
+
+ listControlPane.checkButtonEnabled();
+ // p:需要repaint.
+ nameableList.repaint();
+ }
+
+ private String createUnrepeatedCopyName(String suffix) {
+ DefaultListModel model = listControlPane.getModel();
+ String[] names = new String[model.getSize()];
+ for (int i = 0; i < model.size(); i++) {
+ names[i] = ((ListModelElement) model.get(i)).wrapper.getName();
+ }
+ String lastName = "CopyOf" + suffix;
+ while (ArrayUtils.contains(names, lastName)) {
+ lastName = "CopyOf" + lastName;
+ }
+ return lastName;
+ }
+
+ /**
+ * 生成不重复的名字
+ *
+ * @param prefix 名字前缀
+ * @return 名字
+ */
+ public String createUnrepeatedName(String prefix) {
+ DefaultListModel model = listControlPane.getModel();
+ Nameable[] all = new Nameable[model.getSize()];
+ for (int i = 0; i < model.size(); i++) {
+ all[i] = ((ListModelElement) model.get(i)).wrapper;
+ }
+ // richer:生成的名字从1开始. kunsnat: 添加属性从0开始.
+ int count = all.length + 1;
+ while (true) {
+ String name_test = prefix + count;
+ boolean repeated = false;
+ for (int i = 0, len = model.size(); i < len; i++) {
+ Nameable nameable = all[i];
+ if (ComparatorUtils.equals(nameable.getName(), name_test)) {
+ repeated = true;
+ break;
+ }
+ }
+
+ if (!repeated) {
+ return name_test;
+ }
+
+ count++;
+ }
+ }
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java
index 55201d639e..0d01ddbdaa 100644
--- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java
@@ -1,6 +1,8 @@
package com.fr.design.gui.controlpane;
import com.fr.design.dialog.BasicPane;
+import com.fr.design.gui.controlpane.shortcutfactory.AbstractShortCutFactory;
+import com.fr.design.gui.controlpane.shortcutfactory.OldShortCutFactory;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory;
@@ -17,24 +19,32 @@ import java.awt.*;
* Date: 2016/5/17
* Time: 15:07
*/
-public abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper {
- protected static final int SHORT_WIDTH = 30; //每加一个short Divider位置加30
- protected JPanel controlUpdatePane;
-
- private ShortCut4JControlPane[] shorts;
- private NameableCreator[] creators;
+abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, ShortCutListenerProvider {
+ private static final int SHORT_WIDTH = 30; //每加一个short Divider位置加30
+ private static final String SELECT = "SELECT";
+ private static final String EDIT = "EDIT";
+ JPanel controlUpdatePane;
+
+ ShortCut4JControlPane[] shorts;
+ NameableCreator[] creators;
private ToolBarDef toolbarDef;
- private UIToolbar toolBar;
+ UIToolbar toolBar;
// peter:这是整体的一个cardLayout Pane
protected CardLayout cardLayout;
protected JPanel cardPane;
+ protected AbstractShortCutFactory shortCutFactory;
- public JControlPane() {
+ JControlPane() {
+ this.initShortCutFactory();
this.initComponentPane();
}
+ protected void initShortCutFactory() {
+ this.shortCutFactory = OldShortCutFactory.newInstance(this);
+ }
+
/**
* 生成添加按钮的NameableCreator
*
@@ -46,10 +56,6 @@ public abstract class JControlPane extends BasicPane implements UnrepeatedNameHe
return shorts;
}
- public void setShorts(ShortCut4JControlPane[] shorts) {
- this.shorts = shorts;
- }
-
public void setCreators(NameableCreator[] creators) {
this.creators = creators;
}
@@ -89,6 +95,18 @@ public abstract class JControlPane extends BasicPane implements UnrepeatedNameHe
protected void initComponentPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.creators = this.createNameableCreators();
+ initCardPane();
+ // SplitPane
+ JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, getLeftPane(), cardPane);
+ mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
+ mainSplitPane.setOneTouchExpandable(true);
+
+ this.add(mainSplitPane, BorderLayout.CENTER);
+ mainSplitPane.setDividerLocation(getLeftPreferredSize());
+ this.checkButtonEnabled();
+ }
+
+ protected void initCardPane() {
this.controlUpdatePane = createControlUpdatePane();
// p: edit card layout
@@ -97,20 +115,29 @@ public abstract class JControlPane extends BasicPane implements UnrepeatedNameHe
cardPane.setLayout(this.cardLayout);
// p:选择的Label
UILabel selectLabel = new UILabel();
- cardPane.add(selectLabel, "SELECT");
- cardPane.add(controlUpdatePane, "EDIT");
- // SplitPane
- JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, getLeftPane(), cardPane);
- mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
- mainSplitPane.setOneTouchExpandable(true);
+ cardPane.add(selectLabel, SELECT);
+ cardPane.add(controlUpdatePane, EDIT);
+ }
- this.add(mainSplitPane, BorderLayout.CENTER);
- mainSplitPane.setDividerLocation(getLeftPreferredSize());
- this.checkButtonEnabled();
+ public void showEditPane() {
+ this.cardLayout.show(cardPane, EDIT);
+ }
+
+ public void showSelectPane() {
+ this.cardLayout.show(cardPane, SELECT);
}
protected abstract JPanel createControlUpdatePane();
+ protected void initToolBar() {
+ toolbarDef = new ToolBarDef();
+ for (ShortCut4JControlPane sj : shorts) {
+ toolbarDef.addShortCut(sj.getShortCut());
+ }
+ toolBar = ToolBarDef.createJToolBar();
+ toolbarDef.updateToolBar(toolBar);
+ }
+
protected JPanel getLeftPane() {
// LeftPane
JPanel leftPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@@ -122,12 +149,8 @@ public abstract class JControlPane extends BasicPane implements UnrepeatedNameHe
return leftPane;
}
- toolbarDef = new ToolBarDef();
- for (ShortCut4JControlPane sj : shorts) {
- toolbarDef.addShortCut(sj.getShortCut());
- }
- toolBar = ToolBarDef.createJToolBar();
- toolbarDef.updateToolBar(toolBar);
+ initToolBar();
+
leftPane.add(toolBar, BorderLayout.NORTH);
return leftPane;
}
@@ -143,30 +166,10 @@ public abstract class JControlPane extends BasicPane implements UnrepeatedNameHe
return shorts.length * SHORT_WIDTH;
}
-
protected ShortCut4JControlPane[] createShortcuts() {
- return new ShortCut4JControlPane[]{
- addItemShortCut(),
- removeItemShortCut(),
- copyItemShortCut(),
- moveUpItemShortCut(),
- moveDownItemShortCut(),
- sortItemShortCut()
- };
+ return shortCutFactory.createShortCuts();
}
- protected abstract ShortCut4JControlPane addItemShortCut();
-
- protected abstract ShortCut4JControlPane removeItemShortCut();
-
- protected abstract ShortCut4JControlPane copyItemShortCut();
-
- protected abstract ShortCut4JControlPane moveUpItemShortCut();
-
- protected abstract ShortCut4JControlPane moveDownItemShortCut();
-
- protected abstract ShortCut4JControlPane sortItemShortCut();
-
public abstract Nameable[] update();
@@ -179,23 +182,15 @@ public abstract class JControlPane extends BasicPane implements UnrepeatedNameHe
public void checkButtonEnabled() {
}
- protected void doBeforeRemove() {
- }
-
- protected void doAfterRemove() {
- }
-
public NameableCreator[] creators() {
return creators == null ? new NameableCreator[0] : creators;
}
- protected abstract boolean hasInvalid(boolean isAdd);
-
/**
- * 刷新 NameableCreator
- *
- * @param creators 生成器
- */
+ * 刷新 NameableCreator
+ *
+ * @param creators 生成器
+ */
public void refreshNameableCreator(NameableCreator[] creators) {
this.creators = creators;
shorts = this.createShortcuts();
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java
new file mode 100644
index 0000000000..17e3182860
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java
@@ -0,0 +1,112 @@
+package com.fr.design.gui.controlpane;
+
+import com.fr.design.beans.BasicBeanPane;
+import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane;
+import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane;
+import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane;
+import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane;
+import com.fr.design.gui.ilist.ListModelElement;
+import com.fr.design.layout.FRGUIPaneFactory;
+import com.fr.general.ComparatorUtils;
+
+import javax.swing.JPanel;
+import java.awt.CardLayout;
+
+/**
+ * Created by plough on 2018/8/13.
+ */
+class JControlUpdatePane extends JPanel {
+ private ListControlPaneProvider listControlPane;
+ private CardLayout card;
+ private JPanel cardPane;
+ private BasicBeanPane[] updatePanes;
+
+ private ListModelElement elEditing;
+
+ private JControlUpdatePane(ListControlPaneProvider listControlPane) {
+ this.listControlPane = listControlPane;
+ initUpdatePane();
+ }
+
+ public static JControlUpdatePane newInstance(ListControlPaneProvider listControlPane) {
+ return new JControlUpdatePane(listControlPane);
+ }
+
+ private void initUpdatePane() {
+ NameableCreator[] creators = listControlPane.creators();
+ if (creators == null) {
+ return;
+ }
+ card = new CardLayout();
+ cardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
+ cardPane.setLayout(card);
+ this.setLayout(FRGUIPaneFactory.createBorderLayout());
+ this.add(cardPane);
+ int len = creators.length;
+ updatePanes = new BasicBeanPane[len];
+ }
+
+ public BasicBeanPane[] getUpdatePanes() {
+ return updatePanes;
+ }
+
+ public void populate() {
+ ListModelElement el = listControlPane.getSelectedValue();
+ if (el == null) {
+ return;
+ }
+
+ elEditing = el;
+ NameableCreator[] creators = listControlPane.creators();
+
+ for (int i = 0, len = updatePanes.length; i < len; i++) {
+ Object ob2Populate = creators[i].acceptObject2Populate(el.wrapper);
+ if (ob2Populate != null) {
+ if (updatePanes[i] == null) {
+ if (isMulti(creators[i].getUpdatePane()) || isTree(creators[i].getUpdatePane())) {
+ updatePanes[i] = listControlPane.createPaneByCreators(creators[i], el.wrapper.getName());
+ } else {
+ updatePanes[i] = listControlPane.createPaneByCreators(creators[i]);
+ }
+ cardPane.add(updatePanes[i], String.valueOf(i));
+ }
+ card.show(cardPane, String.valueOf(i));
+ updatePanes[i].populateBean(ob2Populate);
+ break;
+ }
+ }
+ }
+
+
+ public boolean isMulti(Class _class) {
+ return ComparatorUtils.equals(_class, GlobalMultiTDTableDataPane.class) || ComparatorUtils.equals(_class, MultiTDTableDataPane.class);
+ }
+
+ public boolean isTree(Class _class) {
+ return ComparatorUtils.equals(_class, GlobalTreeTableDataPane.class) || ComparatorUtils.equals(_class, TreeTableDataPane.class);
+ }
+
+ public void update() {
+ NameableCreator[] creators = listControlPane.creators();
+ for (int i = 0; i < updatePanes.length; i++) {
+ BasicBeanPane pane = updatePanes[i];
+
+ if (pane != null && pane.isVisible()) {
+ Object bean = pane.updateBean();
+ if (i < creators.length) {
+ creators[i].saveUpdatedBean(elEditing, bean);
+ }
+ }
+ }
+ }
+
+ public void checkValid() throws Exception {
+ if (updatePanes != null) {
+ for (int i = 0; i < updatePanes.length; i++) {
+ if (updatePanes[i] != null) {
+ updatePanes[i].checkValid();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java
index fd6f385676..3eb644c334 100644
--- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java
@@ -1,22 +1,10 @@
package com.fr.design.gui.controlpane;
-import com.fr.base.BaseUtils;
-import com.fr.base.FRContext;
-import com.fr.design.actions.UpdateAction;
import com.fr.design.beans.BasicBeanPane;
-import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane;
-import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane;
-import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane;
-import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane;
-import com.fr.design.gui.HyperlinkFilterHelper;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilist.JNameEdList;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.ilist.ModNameActionListener;
-import com.fr.design.layout.FRGUIPaneFactory;
-import com.fr.design.menu.LineSeparator;
-import com.fr.design.menu.MenuDef;
-import com.fr.design.menu.ShortCut;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
@@ -25,24 +13,30 @@ import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
import com.fr.stable.core.PropertyChangeAdapter;
-import javax.swing.*;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.DefaultListModel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.ListSelectionModel;
+import javax.swing.SwingUtilities;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
-import java.awt.*;
-import java.awt.event.ActionEvent;
+import java.awt.BorderLayout;
+import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
-import java.util.Arrays;
-import java.util.Comparator;
-public abstract class JListControlPane extends JControlPane {
- public static final String LIST_NAME = "JControl_List";
+public abstract class JListControlPane extends JControlPane implements ListControlPaneProvider {
+ private static final String LIST_NAME = "JControl_List";
protected JNameEdList nameableList;
protected int editingIndex;
protected String selectedName;
private boolean isNameRepeated = false;
+ private CommonShortCutHandlers commonHandlers;
+ private ListControlPaneHelper helper;
public JListControlPane() {
this.initComponentPane();
@@ -50,7 +44,21 @@ public abstract class JListControlPane extends JControlPane {
@Override
protected JPanel createControlUpdatePane() {
- return new JControlUpdatePane();
+ return JControlUpdatePane.newInstance(this);
+ }
+
+ private ListControlPaneHelper getHelper() {
+ if (helper == null) {
+ helper = ListControlPaneHelper.newInstance(this);
+ }
+ return helper;
+ }
+
+ private CommonShortCutHandlers getCommonHandlers() {
+ if (commonHandlers == null) {
+ commonHandlers = CommonShortCutHandlers.newInstance(this);
+ }
+ return commonHandlers;
}
/**
@@ -68,7 +76,6 @@ public abstract class JListControlPane extends JControlPane {
nameableList.setName(LIST_NAME);
leftPane.add(new UIScrollPane(nameableList), BorderLayout.CENTER);
-
nameableList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
nameableList.addMouseListener(listMouseListener);
nameableList.addListSelectionListener(new ListSelectionListener() {
@@ -87,7 +94,7 @@ public abstract class JListControlPane extends JControlPane {
});
}
- public JNameEdList createJNameList() {
+ protected JNameEdList createJNameList() {
JNameEdList nameEdList = new JNameEdList(new DefaultListModel()) {
@Override
protected void doAfterLostFocus() {
@@ -98,69 +105,13 @@ public abstract class JListControlPane extends JControlPane {
return nameEdList;
}
- public void updateControlUpdatePane() {
+ private void updateControlUpdatePane() {
((JControlUpdatePane) controlUpdatePane).update();
}
- protected void doWhenPopulate(BasicBeanPane beanPane) {
-
- }
-
- protected void doBeforePopulate(ListModelElement el, Object obj) {
-
- }
-
- @Override
- protected ShortCut4JControlPane addItemShortCut() {
- ShortCut addItemShortCut;
- NameableCreator[] creators = creators();
- if (creators.length == 1) {
- addItemShortCut = new AddItemUpdateAction(creators);
- } else {
- addItemShortCut = new AddItemMenuDef(creators);
- }
- return new AbsoluteEnableShortCut(addItemShortCut);
- }
-
- @Override
- protected ShortCut4JControlPane removeItemShortCut() {
- return new NormalEnableShortCut(new RemoveItemAction());
- }
-
- @Override
- protected ShortCut4JControlPane copyItemShortCut() {
- return new NormalEnableShortCut(new CopyItemAction());
- }
-
- @Override
- protected ShortCut4JControlPane moveUpItemShortCut() {
- return new NormalEnableShortCut(new MoveUpItemAction());
- }
-
- @Override
- protected ShortCut4JControlPane moveDownItemShortCut() {
- return new NormalEnableShortCut(new MoveDownItemAction());
- }
-
- @Override
- protected ShortCut4JControlPane sortItemShortCut() {
- return new NormalEnableShortCut(new SortItemAction());
- }
-
- public void setNameListEditable(boolean editable) {
- this.nameableList.setEditable(editable);
- }
-
@Override
public Nameable[] update() {
- java.util.List res = new java.util.ArrayList();
- ((JControlUpdatePane) this.controlUpdatePane).update();
- DefaultListModel listModel = (DefaultListModel) this.nameableList.getModel();
- for (int i = 0, len = listModel.getSize(); i < len; i++) {
- res.add(((ListModelElement) listModel.getElementAt(i)).wrapper);
- }
-
- return res.toArray(new Nameable[res.size()]);
+ return getHelper().update();
}
@Override
@@ -186,7 +137,7 @@ public abstract class JListControlPane extends JControlPane {
*
* @param l 名字改变时的监听
*/
- public void addModNameActionListener(ModNameActionListener l) {
+ protected void addModNameActionListener(ModNameActionListener l) {
this.nameableList.addModNameActionListener(l);
}
@@ -195,7 +146,7 @@ public abstract class JListControlPane extends JControlPane {
*
* @param l 监听
*/
- public void addEditingListener(PropertyChangeAdapter l) {
+ protected void addEditingListener(PropertyChangeAdapter l) {
this.nameableList.addEditingListner(l);
}
@@ -236,9 +187,7 @@ public abstract class JListControlPane extends JControlPane {
* 获取选中的名字
*/
public String getSelectedName() {
- ListModelElement el = (ListModelElement) this.nameableList.getSelectedValue();
-
- return el == null ? null : el.wrapper.getName();
+ return getHelper().getSelectedName();
}
protected boolean isNameRepeated(java.util.List[] list, String name) {
@@ -268,15 +217,7 @@ public abstract class JListControlPane extends JControlPane {
* @param index 序号
*/
public void addNameable(Nameable nameable, int index) {
- JNameEdList nameEdList = JListControlPane.this.nameableList;
- DefaultListModel model = (DefaultListModel) nameEdList.getModel();
-
- ListModelElement el = new ListModelElement(nameable);
- model.add(index, el);
- nameableList.setSelectedIndex(index);
- nameableList.ensureIndexIsVisible(index);
-
- nameEdList.repaint();
+ getHelper().addNameable(nameable, index);
}
/**
@@ -285,7 +226,7 @@ public abstract class JListControlPane extends JControlPane {
* @return 是则true
*/
public boolean isContainsRename() {
- String rename = com.fr.design.i18n.Toolkit.i18nText("FR-Please_Rename") + "!";
+ String rename = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Please_Rename") + "!";
String[] names = this.nameableList.getAllNames();
for (int i = names.length - 1; i >= 0; i--) {
if (ComparatorUtils.equals(names[i], rename)) {
@@ -295,314 +236,54 @@ public abstract class JListControlPane extends JControlPane {
return false;
}
- protected DefaultListModel getModel() {
+ public DefaultListModel getModel() {
return (DefaultListModel) JListControlPane.this.nameableList.getModel();
}
- private String createUnrepeatedCopyName(String suffix) {
- DefaultListModel model = this.getModel();
- String[] names = new String[model.getSize()];
- for (int i = 0; i < model.size(); i++) {
- names[i] = ((ListModelElement) model.get(i)).wrapper.getName();
- }
- String lastName = "CopyOf" + suffix;
- while (ArrayUtils.contains(names, lastName)) {
- lastName = "CopyOf" + lastName;
- }
- return lastName;
- }
-
-
/**
- * 生成不重复的名字
- *
- * @param prefix 名字前缀
- * @return 名字
- */
+ * 生成不重复的名字
+ *
+ * @param prefix 名字前缀
+ * @return 名字
+ */
@Override
public String createUnrepeatedName(String prefix) {
- DefaultListModel model = this.getModel();
- Nameable[] all = new Nameable[model.getSize()];
- for (int i = 0; i < model.size(); i++) {
- all[i] = ((ListModelElement) model.get(i)).wrapper;
- }
- // richer:生成的名字从1开始. kunsnat: 添加属性从0开始.
- int count = all.length + 1;
- while (true) {
- String name_test = prefix + count;
- boolean repeated = false;
- for (int i = 0, len = model.size(); i < len; i++) {
- Nameable nameable = all[i];
- if (ComparatorUtils.equals(nameable.getName(), name_test)) {
- repeated = true;
- break;
- }
- }
-
- if (!repeated) {
- return name_test;
- }
-
- count++;
- }
+ return getCommonHandlers().createUnrepeatedName(prefix);
}
- /**
- * 增加项的UpdateAction
- */
- protected class AddItemUpdateAction extends UpdateAction {
- final NameableCreator creator;
-
- public AddItemUpdateAction(NameableCreator[] creators) {
- this.creator = creators[0];
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Add"));
- this.setMnemonic('A');
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- Nameable nameable = creator.createNameable(JListControlPane.this);
-
- JListControlPane.this.addNameable(nameable, getModel().getSize());
- }
+ @Override
+ public void onAddItem(NameableCreator creator) {
+ getCommonHandlers().onAddItem(creator);
}
- /*
- * 增加项的MenuDef
- */
- protected class AddItemMenuDef extends MenuDef {
- public AddItemMenuDef(NameableCreator[] creators) {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Add"));
- this.setMnemonic('A');
- this.setIconPath("/com/fr/design/images/control/addPopup.png");
- wrapActionListener(creators);
- }
-
- private void wrapActionListener(NameableCreator[] creators) {
- for (final NameableCreator creator : creators) {
- if (filterNameableCreator(creator)) {
- continue;
- }
- boolean isTrue = ComparatorUtils.equals(creator.menuName(), com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure")) ||
- ComparatorUtils.equals(creator.menuName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Relation_TableData")) || ComparatorUtils.equals(creator.menuName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Multi_Dimensional_Database"));
- if (isTrue) {
- this.addShortCut(new LineSeparator());
- }
- this.addShortCut(new UpdateAction() {
- {
- this.setName(creator.menuName());
- Icon icon = creator.menuIcon();
- if (icon != null) {
- this.setSmallIcon(icon);
- }
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- if (hasInvalid(true)) {
- return;
- }
-
- Nameable nameable = creator.createNameable(JListControlPane.this);
-
- JListControlPane.this.addNameable(nameable, getModel().getSize());
- }
- });
- }
- }
+ @Override
+ public void onRemoveItem() {
+ getCommonHandlers().onRemoveItem();
}
- /*
- * 移除item
- */
- private class RemoveItemAction extends UpdateAction {
- public RemoveItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Remove"));
- this.setMnemonic('R');
- this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/base/images/cell/control/remove.png"));
- }
-
- @Override
- public void actionPerformed(ActionEvent evt) {
- try {
- JListControlPane.this.nameableList.getCellEditor()
- .stopCellEditing();
- } catch (Exception ignored) {
- }
- // bug:在选中一个NameObject并删除,会遗留下Name.
- doBeforeRemove();
- if (GUICoreUtils.removeJListSelectedNodes(SwingUtilities
- .getWindowAncestor(JListControlPane.this), nameableList)) {
- checkButtonEnabled();
- doAfterRemove();
- }
- }
+ @Override
+ public void onCopyItem() {
+ getCommonHandlers().onCopyItem();
}
- /*
- * CopyItem
- */
- private class CopyItemAction extends UpdateAction {
- public CopyItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Copy"));
- this.setMnemonic('C');
- this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/design/images/m_edit/copy.png"));
- }
-
- @Override
- public void actionPerformed(ActionEvent evt) {
- // p:选中的值.
- ListModelElement selectedValue = (ListModelElement) nameableList.getSelectedValue();
- if (selectedValue == null) {
- return;
- }
-
- ((JControlUpdatePane) controlUpdatePane).update();
-
- Nameable selectedNameable = selectedValue.wrapper;
-
- // p: 用反射机制实现
- try {
- Nameable newNameable = (Nameable) BaseUtils.cloneObject(selectedNameable);
- newNameable.setName(createUnrepeatedCopyName(selectedNameable.getName()));
-
- JListControlPane.this.addNameable(newNameable, nameableList.getSelectedIndex() + 1);
- } catch (Exception e) {
- FRContext.getLogger().error(e.getMessage(), e);
- }
- }
+ @Override
+ public void onMoveUpItem() {
+ getCommonHandlers().onMoveUpItem();
}
- /*
- * 上移Item
- */
- private class MoveUpItemAction extends UpdateAction {
- public MoveUpItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Up"));
- this.setMnemonic('U');
- this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/design/images/control/up.png"));
- }
-
- @Override
- public void actionPerformed(ActionEvent evt) {
- int selectedIndex = nameableList.getSelectedIndex();
- if (selectedIndex == -1) {
- return;
- }
-
- // 上移
- if (selectedIndex > 0) {
- DefaultListModel listModel = (DefaultListModel) nameableList
- .getModel();
-
- Object selecteObj1 = listModel.get(selectedIndex - 1);
- listModel.set(selectedIndex - 1, listModel.get(selectedIndex));
- listModel.set(selectedIndex, selecteObj1);
-
- nameableList.setSelectedIndex(selectedIndex - 1);
- nameableList.ensureIndexIsVisible(selectedIndex - 1);
- }
- }
+ @Override
+ public void onMoveDownItem() {
+ getCommonHandlers().onMoveDownItem();
}
- /*
- * 下移Item
- */
- private class MoveDownItemAction extends UpdateAction {
- public MoveDownItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Down"));
- this.setMnemonic('D');
- this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/design/images/control/down.png"));
- }
-
- @Override
- public void actionPerformed(ActionEvent evt) {
- int selectedIndex = nameableList.getSelectedIndex();
- if (selectedIndex == -1) {
- return;
- }
-
- if (selectedIndex < nameableList.getModel().getSize() - 1) {
- DefaultListModel listModel = (DefaultListModel) nameableList
- .getModel();
-
- Object selecteObj1 = listModel.get(selectedIndex + 1);
- listModel.set(selectedIndex + 1, listModel.get(selectedIndex));
- listModel.set(selectedIndex, selecteObj1);
-
- nameableList.setSelectedIndex(selectedIndex + 1);
- nameableList.ensureIndexIsVisible(selectedIndex + 1);
- }
- }
+ @Override
+ public void onSortItem(boolean isAtoZ) {
+ getCommonHandlers().onSortItem(isAtoZ);
}
- private class SortItemAction extends UpdateAction {
- private boolean isAtoZ = false;
-
- public SortItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Sort"));
- this.setMnemonic('S');
- this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/design/images/control/sortAsc.png"));
- }
-
- @Override
- public void actionPerformed(ActionEvent evt) {
- // p:选中的值.
- Object selectedValue = nameableList.getSelectedValue();
-
- DefaultListModel listModel = (DefaultListModel) nameableList
- .getModel();
- Nameable[] nameableArray = new Nameable[listModel.getSize()];
- if (nameableArray.length <= 0) {
- return;
- }
-
- for (int i = 0; i < listModel.getSize(); i++) {
- nameableArray[i] = ((ListModelElement) listModel.getElementAt(i)).wrapper;
- }
-
- // p:排序.
- if (isAtoZ) {
- Comparator nameableComparator = new Comparator() {
- @Override
- public int compare(Nameable o1, Nameable o2) {
- return -ComparatorUtils.compare(o1.getName(), o2
- .getName());
- }
- };
- isAtoZ = !isAtoZ;
- Arrays.sort(nameableArray, nameableComparator);
- } else {
- Comparator nameableComparator = new Comparator() {
- @Override
- public int compare(Nameable o1, Nameable o2) {
- return ComparatorUtils.compare(o1.getName(), o2
- .getName());
- }
- };
- isAtoZ = !isAtoZ;
- Arrays.sort(nameableArray, nameableComparator);
- }
-
- for (int i = 0; i < nameableArray.length; i++) {
- listModel.set(i, new ListModelElement(nameableArray[i]));
- }
-
- // p:需要选中以前的那个值.
- if (selectedValue != null) {
- nameableList.setSelectedValue(selectedValue, true);
- }
-
- checkButtonEnabled();
- // p:需要repaint.
- nameableList.repaint();
- }
+ @Override
+ public boolean isItemSelected() {
+ return getModel().getSize() > 0 && nameableList.getSelectedIndex() != -1;
}
/*
@@ -649,16 +330,7 @@ public abstract class JListControlPane extends JControlPane {
*/
@Override
public void checkButtonEnabled() {
-
- int selectedIndex = nameableList.getSelectedIndex();
- if (selectedIndex == -1) {
- this.cardLayout.show(cardPane, "SELECT");
- } else {
- this.cardLayout.show(cardPane, "EDIT");
- }
- for (ShortCut4JControlPane sj : getShorts()) {
- sj.checkEnable();
- }
+ getHelper().checkButtonEnabled();
}
private class NameableListCellRenderer extends
@@ -690,129 +362,13 @@ public abstract class JListControlPane extends JControlPane {
}
}
- public class AbsoluteEnableShortCut extends ShortCut4JControlPane {
- public AbsoluteEnableShortCut(ShortCut shortCut) {
- this.shortCut = shortCut;
- }
-
- /**
- * 检查是否可用
- */
- @Override
- public void checkEnable() {
- this.shortCut.setEnabled(true);
- }
- }
-
- public class NormalEnableShortCut extends ShortCut4JControlPane {
- public NormalEnableShortCut(ShortCut shortCut) {
- this.shortCut = shortCut;
- }
-
- /**
- * 检查是否可用
- */
- @Override
- public void checkEnable() {
- this.shortCut.setEnabled(getModel()
- .getSize() > 0
- && JListControlPane.this.nameableList.getSelectedIndex() != -1);
- }
- }
-
-
- private class JControlUpdatePane extends JPanel {
- private CardLayout card;
- private JPanel cardPane;
- private BasicBeanPane[] updatePanes;
-
- private ListModelElement elEditing;
-
- public JControlUpdatePane() {
- initUpdatePane();
- }
-
- private void initUpdatePane() {
- NameableCreator[] creators = creators();
- if (creators == null) {
- return;
- }
- card = new CardLayout();
- cardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
- cardPane.setLayout(card);
- this.setLayout(FRGUIPaneFactory.createBorderLayout());
- this.add(cardPane);
- int len = creators.length;
- updatePanes = new BasicBeanPane[len];
- }
-
- public void populate() {
- ListModelElement el = (ListModelElement) JListControlPane.this.nameableList.getSelectedValue();
- if (el == null) {
- return;
- }
-
- elEditing = el;
- NameableCreator[] creators = creators();
-
- for (int i = 0, len = updatePanes.length; i < len; i++) {
- Object ob2Populate = creators[i].acceptObject2Populate(el.wrapper);
- if (ob2Populate != null) {
- if (updatePanes[i] == null) {
- if (isMulti(creators[i].getUpdatePane()) || isTree(creators[i].getUpdatePane())) {
- updatePanes[i] = createPaneByCreators(creators[i], el.wrapper.getName());
- } else {
- updatePanes[i] = createPaneByCreators(creators[i]);
- }
- cardPane.add(updatePanes[i], String.valueOf(i));
- }
- card.show(cardPane, String.valueOf(i));
- doBeforePopulate(el, ob2Populate);
- updatePanes[i].populateBean(ob2Populate);
- doWhenPopulate(updatePanes[i]);
- break;
- }
- }
- }
-
- public boolean isMulti(Class _class) {
- return ComparatorUtils.equals(_class, GlobalMultiTDTableDataPane.class) || ComparatorUtils.equals(_class, MultiTDTableDataPane.class);
- }
-
- public boolean isTree(Class _class) {
- return ComparatorUtils.equals(_class, GlobalTreeTableDataPane.class) || ComparatorUtils.equals(_class, TreeTableDataPane.class);
- }
-
- public void update() {
- NameableCreator[] creators = creators();
- for (int i = 0; i < updatePanes.length; i++) {
- BasicBeanPane pane = updatePanes[i];
-
- if (pane != null && pane.isVisible()) {
- Object bean = pane.updateBean();
- if (i < creators.length) {
- creators[i].saveUpdatedBean(elEditing, bean);
- }
- }
- }
- }
-
- public void checkValid() throws Exception {
- if (updatePanes != null) {
- for (int i = 0; i < updatePanes.length; i++) {
- if (updatePanes[i] != null) {
- updatePanes[i].checkValid();
- }
- }
- }
- }
- }
-
- protected BasicBeanPane createPaneByCreators(NameableCreator creator) {
+ @Override
+ public BasicBeanPane createPaneByCreators(NameableCreator creator) {
return Reflect.on(creator.getUpdatePane()).create().get();
}
- private BasicBeanPane createPaneByCreators(NameableCreator creator, String string) {
+ @Override
+ public BasicBeanPane createPaneByCreators(NameableCreator creator, String string) {
return Reflect.on(creator.getUpdatePane()).create(string).get();
}
@@ -826,35 +382,9 @@ public abstract class JListControlPane extends JControlPane {
((JControlUpdatePane) this.controlUpdatePane).checkValid();
}
- private int getInValidIndex() {
- BasicBeanPane[] p = ((JControlUpdatePane) controlUpdatePane).updatePanes;
- if (p != null) {
- for (int i = 0; i < p.length; i++) {
- if (p[i] != null) {
- try {
- p[i].checkValid();
- } catch (Exception e) {
- return i;
- }
- }
- }
- }
- return -1;
- }
-
@Override
- protected boolean hasInvalid(boolean isAdd) {
- int idx = JListControlPane.this.getInValidIndex();
- if (isAdd || nameableList.getSelectedIndex() != idx) {
- try {
- checkValid();
- } catch (Exception exp) {
- JOptionPane.showMessageDialog(JListControlPane.this, exp.getMessage());
- nameableList.setSelectedIndex(idx);
- return true;
- }
- }
- return false;
+ public boolean hasInvalid(boolean isAdd) {
+ return getHelper().hasInvalid(isAdd);
}
/**
@@ -862,16 +392,28 @@ public abstract class JListControlPane extends JControlPane {
*
* @param index 选中项的序列号
*/
+ @Override
public void setSelectedIndex(int index) {
nameableList.setSelectedIndex(index);
}
+ @Override
+ public int getSelectedIndex() {
+ return nameableList.getSelectedIndex();
+ }
- /**
- * 用于在list面板中,过滤某些下拉选项
- * @return true:过滤掉这个creator
- */
- protected boolean filterNameableCreator(NameableCreator creator) {
- return !HyperlinkFilterHelper.whetherAddHyperlink4cell(creator.menuName());
+ @Override
+ public JNameEdList getNameableList() {
+ return nameableList;
+ }
+
+ @Override
+ public ListModelElement getSelectedValue() {
+ return (ListModelElement) this.nameableList.getSelectedValue();
+ }
+
+ @Override
+ public JControlUpdatePane getControlUpdatePane() {
+ return (JControlUpdatePane) controlUpdatePane;
}
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java
new file mode 100644
index 0000000000..5618c407c0
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java
@@ -0,0 +1,112 @@
+package com.fr.design.gui.controlpane;
+
+import com.fr.design.beans.BasicBeanPane;
+import com.fr.design.gui.ilist.JNameEdList;
+import com.fr.design.gui.ilist.ListModelElement;
+import com.fr.stable.Nameable;
+import com.fr.stable.StringUtils;
+
+import javax.swing.DefaultListModel;
+import javax.swing.JOptionPane;
+import java.awt.Component;
+
+/**
+ * 存放一些公用的方法
+ * Created by plough on 2018/8/13.
+ */
+class ListControlPaneHelper {
+ private ListControlPaneProvider listControlPane;
+
+ private ListControlPaneHelper(ListControlPaneProvider listControlPane) {
+ this.listControlPane = listControlPane;
+ }
+
+ public static ListControlPaneHelper newInstance(ListControlPaneProvider listControlPane) {
+ return new ListControlPaneHelper(listControlPane);
+ }
+
+ public boolean hasInvalid(boolean isAdd) {
+
+ int idx = getInValidIndex();
+ if (isAdd || listControlPane.getSelectedIndex() != idx) {
+ try {
+ listControlPane.checkValid();
+ } catch (Exception exp) {
+ JOptionPane.showMessageDialog((Component) listControlPane, exp.getMessage());
+ listControlPane.setSelectedIndex(idx);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private int getInValidIndex() {
+ BasicBeanPane[] p = listControlPane.getControlUpdatePane().getUpdatePanes();
+ if (p != null) {
+ for (int i = 0; i < p.length; i++) {
+ if (p[i] != null) {
+ try {
+ p[i].checkValid();
+ } catch (Exception e) {
+ return i;
+ }
+ }
+ }
+ }
+ return -1;
+ }
+
+ public Nameable[] update() {
+ java.util.List res = new java.util.ArrayList();
+ listControlPane.getControlUpdatePane().update();
+ DefaultListModel listModel = listControlPane.getModel();
+ for (int i = 0, len = listModel.getSize(); i < len; i++) {
+ res.add(((ListModelElement) listModel.getElementAt(i)).wrapper);
+ }
+
+ return res.toArray(new Nameable[res.size()]);
+ }
+
+ /**
+ * 获取选中的名字
+ */
+ public String getSelectedName() {
+ ListModelElement el = listControlPane.getSelectedValue();
+ return el == null ? StringUtils.EMPTY : el.wrapper.getName();
+ }
+
+ /**
+ * 添加 Nameable
+ *
+ * @param nameable 添加的Nameable
+ * @param index 序号
+ */
+ public void addNameable(Nameable nameable, int index) {
+ JNameEdList nameableList = listControlPane.getNameableList();
+ DefaultListModel model = listControlPane.getModel();
+
+ ListModelElement el = new ListModelElement(nameable);
+ model.add(index, el);
+ nameableList.setSelectedIndex(index);
+ nameableList.ensureIndexIsVisible(index);
+ nameableList.repaint();
+ }
+
+ /**
+ * 检查按钮可用状态 Check button enabled.
+ */
+ public void checkButtonEnabled() {
+
+ int selectedIndex = listControlPane.getSelectedIndex();
+ if (selectedIndex == -1) {
+ listControlPane.showSelectPane();
+ } else {
+ listControlPane.showEditPane();
+ }
+ for (ShortCut4JControlPane sj : listControlPane.getShorts()) {
+ sj.checkEnable();
+ }
+ }
+
+
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneProvider.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneProvider.java
new file mode 100644
index 0000000000..1565f348d0
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneProvider.java
@@ -0,0 +1,35 @@
+package com.fr.design.gui.controlpane;
+
+import com.fr.design.beans.BasicBeanPane;
+import com.fr.design.gui.ilist.JNameEdList;
+import com.fr.design.gui.ilist.ListModelElement;
+import com.fr.stable.Nameable;
+
+import javax.swing.DefaultListModel;
+
+/**
+ * Created by plough on 2018/8/13.
+ */
+public interface ListControlPaneProvider extends UnrepeatedNameHelper {
+ NameableCreator[] creators();
+ BasicBeanPane createPaneByCreators(NameableCreator creator);
+ BasicBeanPane createPaneByCreators(NameableCreator creator, String string);
+ DefaultListModel getModel();
+ boolean hasInvalid(boolean isAdd);
+ void addNameable(Nameable nameable, int index);
+ JNameEdList getNameableList();
+ int getSelectedIndex();
+ void setSelectedIndex(int idx);
+ ListModelElement getSelectedValue();
+ void checkButtonEnabled();
+ JControlUpdatePane getControlUpdatePane();
+// BasicBeanPane[] getUpdatePanes();
+ /**
+ * 检查是否符合规范
+ * @throws Exception
+ */
+ void checkValid() throws Exception;
+ void showSelectPane();
+ void showEditPane();
+ ShortCut4JControlPane[] getShorts();
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectJControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectJControlPane.java
index 2fd680a9c5..5fc72214c5 100644
--- a/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectJControlPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectJControlPane.java
@@ -22,7 +22,7 @@ public abstract class ObjectJControlPane extends JListControlPane {
}
@Override
- protected BasicBeanPane createPaneByCreators(NameableCreator creator) {
+ public BasicBeanPane createPaneByCreators(NameableCreator creator) {
try {
return Reflect.on(creator.getUpdatePane()).create(object).get();
} catch (Exception e) {
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectUIControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectUIControlPane.java
index 3b2a1b0711..c5786b4c64 100644
--- a/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectUIControlPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectUIControlPane.java
@@ -10,17 +10,13 @@ import com.fr.design.beans.BasicBeanPane;
public abstract class ObjectUIControlPane extends UIListControlPane {
private Object object;
- public ObjectUIControlPane() {
- this(null);
- }
-
public ObjectUIControlPane(Object object) {
super();
this.object = object;
}
@Override
- protected BasicBeanPane createPaneByCreators(NameableCreator creator) {
+ public BasicBeanPane createPaneByCreators(NameableCreator creator) {
try {
if (object == null) {
return super.createPaneByCreators(creator);
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/ShortCutListenerProvider.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/ShortCutListenerProvider.java
new file mode 100644
index 0000000000..5ee93bd47f
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/ShortCutListenerProvider.java
@@ -0,0 +1,15 @@
+package com.fr.design.gui.controlpane;
+
+/**
+ * Created by plough on 2018/8/12.
+ */
+public interface ShortCutListenerProvider {
+ void onAddItem(NameableCreator creator);
+ void onRemoveItem();
+ void onCopyItem();
+ void onMoveUpItem();
+ void onMoveDownItem();
+ void onSortItem(boolean isAtoZ);
+ boolean isItemSelected();
+ NameableCreator[] creators();
+}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
index d0a4c12c5f..ff9e48e5db 100644
--- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
@@ -2,7 +2,7 @@ package com.fr.design.gui.controlpane;
import com.fr.base.chart.BasePlot;
import com.fr.design.constants.UIConstants;
-import com.fr.design.dialog.BasicPane;
+import com.fr.design.gui.controlpane.shortcutfactory.ShortCutFactory;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolBarUI;
import com.fr.design.gui.itoolbar.UIToolbar;
@@ -11,10 +11,8 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.ShortCut;
-import com.fr.design.menu.ToolBarDef;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ArrayUtils;
-import com.fr.stable.Nameable;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
@@ -25,7 +23,6 @@ import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.border.EmptyBorder;
import java.awt.BorderLayout;
-import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor;
@@ -49,85 +46,30 @@ import java.awt.event.WindowEvent;
/**
* Created by plough on 2017/7/21.
*/
-public abstract class UIControlPane extends BasicPane implements UnrepeatedNameHelper {
- protected static final int SHORT_WIDTH = 30; //每加一个short Divider位置加30
- protected JPanel controlUpdatePane;
- private ShortCut4JControlPane[] shorts;
- private NameableCreator[] creators;
- private ToolBarDef toolbarDef;
- private UIToolbar toolBar;
+abstract class UIControlPane extends JControlPane {
private UIToolbar topToolBar;
protected Window popupEditDialog;
- // peter:这是整体的一个cardLayout Pane
- protected CardLayout cardLayout;
- protected JPanel cardPane;
protected BasePlot plot;
private static final int TOP_TOOLBAR_HEIGHT = 20;
private static final int TOP_TOOLBAR_WIDTH = 156; // 可能因为用了tablelayout,要比其他地方多一个像素,看起来才正常
private static final int TOP_TOOLBAR_WIDTH_SHORT = 76;
- public UIControlPane() {
- this.initComponentPane();
+ UIControlPane() {
+ super();
}
- public UIControlPane(BasePlot plot) {
+ UIControlPane(BasePlot plot) {
+ super();
this.plot = plot;
- this.initComponentPane();
}
- /**
- * 生成添加按钮的NameableCreator
- *
- * @return 按钮的NameableCreator
- */
- public abstract NameableCreator[] createNameableCreators();
-
- public ShortCut4JControlPane[] getShorts() {
- return shorts;
- }
-
- public void setShorts(ShortCut4JControlPane[] shorts) {
- this.shorts = shorts;
- }
-
- public void setCreators(NameableCreator[] creators) {
- this.creators = creators;
- }
-
- public ToolBarDef getToolbarDef() {
- return toolbarDef;
- }
-
- public void setToolbarDef(ToolBarDef toolbarDef) {
- this.toolbarDef = toolbarDef;
- }
-
- public UIToolbar getToolBar() {
- return toolBar;
- }
-
- public void setToolBar(UIToolbar toolBar) {
- this.toolBar = toolBar;
- }
-
- public CardLayout getCardLayout() {
- return cardLayout;
- }
-
- public void setCardLayout(CardLayout cardLayout) {
- this.cardLayout = cardLayout;
- }
-
- public JPanel getCardPane() {
- return cardPane;
- }
+ public abstract void saveSettings();
- public void setCardPane(JPanel cardPane) {
- this.cardPane = cardPane;
+ @Override
+ protected void initShortCutFactory() {
+ this.shortCutFactory = ShortCutFactory.newInstance(this);
}
- public abstract void saveSettings();
-
// 是否使用新样式
protected boolean isNewStyle() {
return true;
@@ -136,16 +78,9 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
protected void initComponentPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.creators = this.createNameableCreators();
- this.controlUpdatePane = createControlUpdatePane();
-
- // p: edit card layout
- this.cardLayout = new CardLayout();
- cardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
- cardPane.setLayout(this.cardLayout);
- // p:选择的Label
- UILabel selectLabel = new UILabel();
- cardPane.add(selectLabel, "SELECT");
- cardPane.add(controlUpdatePane, "EDIT");
+
+ initCardPane();
+
if (isNewStyle()) {
getPopupEditDialog(cardPane);
this.add(getLeftPane(), BorderLayout.CENTER);
@@ -169,11 +104,22 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
this.checkButtonEnabled();
}
- protected void getPopupEditDialog(JPanel cardPane) {
+ private void getPopupEditDialog(JPanel cardPane) {
popupEditDialog = new PopupEditDialog(cardPane);
}
- protected abstract JPanel createControlUpdatePane();
+ @Override
+ protected void initToolBar() {
+ super.initToolBar();
+ toolBar.setUI(new UIToolBarUI() {
+ @Override
+ public void paint(Graphics g, JComponent c) {
+ Graphics2D g2 = (Graphics2D) g;
+ g2.setColor(Color.WHITE);
+ g2.fillRect(0, 0, c.getWidth(), c.getHeight());
+ }
+ });
+ }
protected JPanel getLeftPane() {
// LeftPane
@@ -188,20 +134,8 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
return leftPane;
}
- toolbarDef = new ToolBarDef();
- for (ShortCut4JControlPane sj : shorts) {
- toolbarDef.addShortCut(sj.getShortCut());
- }
- toolBar = ToolBarDef.createJToolBar();
- toolBar.setUI(new UIToolBarUI() {
- @Override
- public void paint(Graphics g, JComponent c) {
- Graphics2D g2 = (Graphics2D) g;
- g2.setColor(Color.WHITE);
- g2.fillRect(0, 0, c.getWidth(), c.getHeight());
- }
- });
- toolbarDef.updateToolBar(toolBar);
+ initToolBar();
+
// 封装一层,加边框
JPanel toolBarPane = new JPanel(new BorderLayout());
toolBarPane.add(toolBar, BorderLayout.CENTER);
@@ -220,7 +154,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
});
topToolBar.setBorder(null);
topToolBar.setLayout(new BorderLayout());
- ShortCut addItem = addItemShortCut().getShortCut();
+ ShortCut addItem = shortCutFactory.addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar);
JPanel leftTopPane = getLeftTopPane(topToolBar);
@@ -249,85 +183,22 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
return "add item ";
}
- /**
- * 初始化左边面板
- */
- protected void initLeftPane(JPanel leftPane) {
-
- }
-
- protected int getLeftPreferredSize() {
- return shorts.length * SHORT_WIDTH;
- }
-
-
protected ShortCut4JControlPane[] createShortcuts() {
- return new ShortCut4JControlPane[]{
- copyItemShortCut(),
- moveUpItemShortCut(),
- moveDownItemShortCut(),
- sortItemShortCut(),
- removeItemShortCut()
- };
+// return AbstractShortCutFactory.getInstance(this).createNewShortCuts();
+ return shortCutFactory.createShortCuts();
}
- protected abstract ShortCut4JControlPane addItemShortCut();
-
- protected abstract ShortCut4JControlPane removeItemShortCut();
-
- protected abstract ShortCut4JControlPane copyItemShortCut();
-
- protected abstract ShortCut4JControlPane moveUpItemShortCut();
-
- protected abstract ShortCut4JControlPane moveDownItemShortCut();
-
- protected abstract ShortCut4JControlPane sortItemShortCut();
-
- public abstract Nameable[] update();
-
-
- public void populate(Nameable[] nameableArray) {
- }
-
- /**
- * 检查按钮可用状态 Check button enabled.
- */
- public void checkButtonEnabled() {
- }
-
- protected void doBeforeRemove() {
- }
-
- protected void doAfterRemove() {
- }
-
- public NameableCreator[] creators() {
- return creators == null ? new NameableCreator[0] : creators;
- }
-
- protected abstract boolean hasInvalid(boolean isAdd);
-
/**
* 刷新 NameableCreator
*
* @param creators 生成器
*/
public void refreshNameableCreator(NameableCreator[] creators) {
- this.creators = creators;
- shorts = this.createShortcuts();
- toolbarDef.clearShortCuts();
- for (ShortCut4JControlPane sj : shorts) {
- toolbarDef.addShortCut(sj.getShortCut());
- }
-
- toolbarDef.updateToolBar(toolBar);
- toolBar.validate();
- toolBar.repaint();
-
+ super.refreshNameableCreator(creators);
// 顶部按钮
topToolBar.removeAll();
- ShortCut addItem = addItemShortCut().getShortCut();
+ ShortCut addItem = shortCutFactory.addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar);
topToolBar.validate();
this.controlUpdatePane = createControlUpdatePane();//REPORT-4841 刷新一下编辑面板
@@ -337,13 +208,13 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
}
// 点击"编辑"按钮,弹出面板
- protected class PopupEditDialog extends JDialog {
+ class PopupEditDialog extends JDialog {
private JComponent editPane;
private PopupToolPane popupToolPane;
private static final int WIDTH = 570;
private static final int HEIGHT = 490;
- public PopupEditDialog(JComponent pane) {
+ PopupEditDialog(JComponent pane) {
super(DesignerContext.getDesignerFrame());
setUndecorated(true);
pane.setBorder(BorderFactory.createEmptyBorder(20, 10, 10, 10));
@@ -475,11 +346,11 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
}
};
- public PopupToolPane(JDialog parentDialog) {
+ PopupToolPane(JDialog parentDialog) {
this(StringUtils.EMPTY, parentDialog);
}
- public PopupToolPane(String title, JDialog parentDialog) {
+ PopupToolPane(String title, JDialog parentDialog) {
super();
this.parentDialog = parentDialog;
originColor = UIConstants.DIALOG_TITLEBAR_BACKGROUND;
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java
index 225354ccdb..de2a42fa80 100644
--- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java
@@ -1,72 +1,81 @@
package com.fr.design.gui.controlpane;
-import com.fr.base.BaseUtils;
-import com.fr.base.FRContext;
import com.fr.base.chart.BasePlot;
-import com.fr.design.actions.UpdateAction;
-import com.fr.design.actions.core.ActionFactory;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants;
-import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane;
-import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane;
-import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane;
-import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane;
-import com.fr.design.gui.HyperlinkFilterHelper;
-import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane;
+import com.fr.design.gui.ilist.JNameEdList;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.ilist.UINameEdList;
-import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
-import com.fr.design.menu.LineSeparator;
-import com.fr.design.menu.MenuDef;
-import com.fr.design.menu.ShortCut;
-import com.fr.design.menu.ToolBarDef;
import com.fr.design.utils.gui.GUICoreUtils;
-import com.fr.general.ComparatorUtils;
-
import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
-import com.fr.stable.StringUtils;
-import javax.swing.*;
+import javax.swing.DefaultListModel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.ListSelectionModel;
+import javax.swing.SwingUtilities;
import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
-import java.awt.*;
-import java.awt.event.*;
+import java.awt.BorderLayout;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Toolkit;
+import java.awt.Window;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-import java.util.Comparator;
/**
* Created by plough on 2017/7/19.
*/
-public abstract class UIListControlPane extends UIControlPane {
- public static final String LIST_NAME = "UIControl_List";
+public abstract class UIListControlPane extends UIControlPane implements ListControlPaneProvider {
+ private static final String LIST_NAME = "UIControl_List";
private static final int EDIT_RANGE = 25; // 编辑按钮的x坐标范围
protected UINameEdList nameableList;
- protected int editingIndex;
+ private int editingIndex;
protected String selectedName;
- private boolean isNameRepeated = false;
protected boolean isPopulating = false;
+ private CommonShortCutHandlers commonHandlers;
+ private ListControlPaneHelper helper;
public UIListControlPane() {
- this.initComponentPane();
+ super();
+
}
public UIListControlPane(BasePlot plot) {
super(plot);
}
+ private ListControlPaneHelper getHelper() {
+ if (helper == null) {
+ helper = ListControlPaneHelper.newInstance(this);
+ }
+ return helper;
+ }
+
+ private CommonShortCutHandlers getCommonHandlers() {
+ if (commonHandlers == null) {
+ commonHandlers = CommonShortCutHandlers.newInstance(this);
+ }
+ return commonHandlers;
+ }
+
@Override
protected JPanel createControlUpdatePane() {
- return new JControlUpdatePane();
+ return JControlUpdatePane.newInstance(this);
}
/**
@@ -87,7 +96,7 @@ public abstract class UIListControlPane extends UIControlPane {
nameableList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
- nameableList.addMouseListener(listMouseListener);
+ nameableList.addMouseListener(getListMouseListener());
nameableList.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent evt) {
// richie:避免多次update和populate大大降低效率
@@ -122,7 +131,7 @@ public abstract class UIListControlPane extends UIControlPane {
}
}
- public UINameEdList createJNameList() {
+ private UINameEdList createJNameList() {
UINameEdList nameEdList = new UINameEdList(new DefaultListModel()) {
@Override
protected void doAfterLostFocus() {
@@ -137,73 +146,17 @@ public abstract class UIListControlPane extends UIControlPane {
return nameEdList;
}
- public void updateControlUpdatePane() {
+ private void updateControlUpdatePane() {
((JControlUpdatePane) controlUpdatePane).update();
}
- protected void doWhenPopulate(BasicBeanPane beanPane) {
-
- }
-
- protected void doBeforePopulate(ListModelElement el, Object obj) {
-
- }
-
- @Override
- protected ShortCut4JControlPane addItemShortCut() {
- ShortCut addItemShortCut;
- NameableCreator[] creators = creators();
- if (creators.length == 1) {
- addItemShortCut = new AddItemUpdateAction(creators);
- } else {
- addItemShortCut = getAddItemMenuDef(creators);
- }
- return new AbsoluteEnableShortCut(addItemShortCut);
- }
-
- protected AddItemMenuDef getAddItemMenuDef (NameableCreator[] creators) {
- return new AddItemMenuDef(creators);
- }
-
- @Override
- protected ShortCut4JControlPane removeItemShortCut() {
- return new NormalEnableShortCut(new RemoveItemAction());
- }
-
- @Override
- protected ShortCut4JControlPane copyItemShortCut() {
- return new NormalEnableShortCut(new CopyItemAction());
- }
-
- @Override
- protected ShortCut4JControlPane moveUpItemShortCut() {
- return new NormalEnableShortCut(new MoveUpItemAction());
- }
-
- @Override
- protected ShortCut4JControlPane moveDownItemShortCut() {
- return new NormalEnableShortCut(new MoveDownItemAction());
- }
-
- @Override
- protected ShortCut4JControlPane sortItemShortCut() {
- return new NormalEnableShortCut(new SortItemAction());
- }
-
- public void setNameListEditable(boolean editable) {
+ protected void setNameListEditable(boolean editable) {
this.nameableList.setEditable(editable);
}
@Override
public Nameable[] update() {
- java.util.List res = new java.util.ArrayList();
- ((JControlUpdatePane) this.controlUpdatePane).update();
- DefaultListModel listModel = (DefaultListModel) this.nameableList.getModel();
- for (int i = 0, len = listModel.getSize(); i < len; i++) {
- res.add(((ListModelElement) listModel.getElementAt(i)).wrapper);
- }
-
- return res.toArray(new Nameable[res.size()]);
+ return getHelper().update();
}
@Override
@@ -235,9 +188,7 @@ public abstract class UIListControlPane extends UIControlPane {
* 获取选中的名字
*/
public String getSelectedName() {
- ListModelElement el = (ListModelElement) this.nameableList.getSelectedValue();
-
- return el == null ? null : el.wrapper.getName();
+ return getHelper().getSelectedName();
}
/**
@@ -247,86 +198,14 @@ public abstract class UIListControlPane extends UIControlPane {
* @param index 序号
*/
public void addNameable(Nameable nameable, int index) {
- UINameEdList nameEdList = UIListControlPane.this.nameableList;
- DefaultListModel model = (DefaultListModel) nameEdList.getModel();
-
- ListModelElement el = new ListModelElement(nameable);
- model.add(index, el);
- nameableList.setSelectedIndex(index);
- nameableList.ensureIndexIsVisible(index);
-
- nameEdList.repaint();
+ getHelper().addNameable(nameable, index);
popupEditDialog();
}
- /**
- * 是否重命名
- *
- * @return 是则true
- */
- public boolean isContainsRename() {
- String rename = com.fr.design.i18n.Toolkit.i18nText("FR-Please_Rename") + "!";
- String[] names = this.nameableList.getAllNames();
- for (int i = names.length - 1; i >= 0; i--) {
- if (ComparatorUtils.equals(names[i], rename)) {
- return true;
- }
- }
- return false;
- }
-
- protected DefaultListModel getModel() {
+ public DefaultListModel getModel() {
return (DefaultListModel) UIListControlPane.this.nameableList.getModel();
}
- private String createUnrepeatedCopyName(String suffix) {
- DefaultListModel model = this.getModel();
- String[] names = new String[model.getSize()];
- for (int i = 0; i < model.size(); i++) {
- names[i] = ((ListModelElement) model.get(i)).wrapper.getName();
- }
- String lastName = "CopyOf" + suffix;
- while (ArrayUtils.contains(names, lastName)) {
- lastName = "CopyOf" + lastName;
- }
- return lastName;
- }
-
-
- /**
- * 生成不重复的名字
- *
- * @param prefix 名字前缀
- * @return 名字
- */
- @Override
- public String createUnrepeatedName(String prefix) {
- DefaultListModel model = this.getModel();
- Nameable[] all = new Nameable[model.getSize()];
- for (int i = 0; i < model.size(); i++) {
- all[i] = ((ListModelElement) model.get(i)).wrapper;
- }
- // richer:生成的名字从1开始. kunsnat: 添加属性从0开始.
- int count = all.length + 1;
- while (true) {
- String name_test = prefix + count;
- boolean repeated = false;
- for (int i = 0, len = model.size(); i < len; i++) {
- Nameable nameable = all[i];
- if (ComparatorUtils.equals(nameable.getName(), name_test)) {
- repeated = true;
- break;
- }
- }
-
- if (!repeated) {
- return name_test;
- }
-
- count++;
- }
- }
-
private void popupEditDialog() {
popupEditDialog(null);
}
@@ -378,569 +257,120 @@ public abstract class UIListControlPane extends UIControlPane {
}
/**
- * 增加项的UpdateAction
+ * 生成不重复的名字
+ *
+ * @param prefix 名字前缀
+ * @return 名字
*/
- protected class AddItemUpdateAction extends UpdateAction {
- final NameableCreator creator;
-
- public AddItemUpdateAction(NameableCreator[] creators) {
- this.creator = creators[0];
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Add"));
- this.setMnemonic('A');
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
- }
-
- /**
- * Gets component on toolbar.
- *
- * @return the created components on toolbar.
- */
- @Override
- public JComponent createToolBarComponent() {
- Object object = this.getValue(UIButton.class.getName());
- if (!(object instanceof AbstractButton)) {
- // 直接使用默认UI
- UIButton button = new UIButton();
- // 添加一个名字作为自动化测试用
- button.setName(getName());
-
- //设置属性.
- Integer mnemonicInteger = (Integer) this.getValue(Action.MNEMONIC_KEY);
- if (mnemonicInteger != null) {
- button.setMnemonic((char) mnemonicInteger.intValue());
- }
-
- button.setIcon((Icon) this.getValue(Action.SMALL_ICON));
- button.addActionListener(this);
-
- button.registerKeyboardAction(this, this.getAccelerator(), JComponent.WHEN_IN_FOCUSED_WINDOW);
-
- this.putValue(UIButton.class.getName(), button);
- button.setText(StringUtils.EMPTY);
- button.setEnabled(this.isEnabled());
-
- //peter:产生tooltip
- button.setToolTipText(ActionFactory.createButtonToolTipText(this));
- object = button;
- }
-
- return (JComponent) object;
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- Nameable nameable = creator.createNameable(UIListControlPane.this);
-
- UIListControlPane.this.addNameable(nameable, getModel().getSize());
- }
+ @Override
+ public String createUnrepeatedName(String prefix) {
+ return getCommonHandlers().createUnrepeatedName(prefix);
}
- /*
- * 增加项的MenuDef
- */
- protected class AddItemMenuDef extends MenuDef {
- public AddItemMenuDef(NameableCreator[] creators) {
- super(true);
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Add"));
- this.setMnemonic('A');
- this.setIconPath("/com/fr/design/images/control/addPopup.png");
- wrapActionListener(creators);
- }
-
- /**
- * 生成UIButton
- * @return 菜单按钮
- */
- public UIButton createUIButton() {
- createdButton = super.createUIButton();
- // 此按钮单独抽出,不应使用工具栏外观
- if (!createdButton.isOpaque()) {
- createdButton.setOpaque(true);
- createdButton.setNormalPainted(true);
- createdButton.setBorderPaintedOnlyWhenPressed(false);
- }
- return createdButton;
- }
-
- private void wrapActionListener(NameableCreator[] creators) {
- for (final NameableCreator creator : creators) {
- if (!whetherAdd(creator.menuName())) {
- continue;
- }
- boolean isTrue = ComparatorUtils.equals(creator.menuName(), com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure")) ||
- ComparatorUtils.equals(creator.menuName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Relation_TableData")) || ComparatorUtils.equals(creator.menuName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Multi_Dimensional_Database"));
- if (isTrue) {
- this.addShortCut(new LineSeparator());
- }
- this.addShortCut(new UpdateAction() {
- {
- this.setName(creator.menuName());
- Icon icon = creator.menuIcon();
- if (icon != null) {
- this.setSmallIcon(icon);
- }
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- if (hasInvalid(true)) {
- return;
- }
-
- Nameable nameable = creator.createNameable(UIListControlPane.this);
-
- UIListControlPane.this.addNameable(nameable, getModel().getSize());
- }
- });
- }
- }
-
- protected boolean whetherAdd(String itemName){
- return HyperlinkFilterHelper.whetherAddHyperlink4cell(itemName);
- }
+ @Override
+ public void onAddItem(NameableCreator creator) {
+ getCommonHandlers().onAddItem(creator);
}
- /*
- * 移除item
- */
- private class RemoveItemAction extends UpdateAction {
- public RemoveItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Remove"));
- this.setMnemonic('R');
- this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/base/images/cell/control/remove.png"));
- }
-
- @Override
- public void actionPerformed(ActionEvent evt) {
- try {
- UIListControlPane.this.nameableList.getCellEditor()
- .stopCellEditing();
- } catch (Exception ignored) {
- // do nothing
- }
- // bug:在选中一个NameObject并删除,会遗留下Name.
- doBeforeRemove();
- if (GUICoreUtils.removeJListSelectedNodes(SwingUtilities
- .getWindowAncestor(UIListControlPane.this), nameableList)) {
- checkButtonEnabled();
- doAfterRemove();
- }
- }
+ @Override
+ public void onRemoveItem() {
+ getCommonHandlers().onRemoveItem();
}
- /*
- * CopyItem
- */
- private class CopyItemAction extends UpdateAction {
- public CopyItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Copy"));
- this.setMnemonic('C');
- this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/design/images/m_edit/copy.png"));
- }
-
- @Override
- public void actionPerformed(ActionEvent evt) {
- // p:选中的值.
- ListModelElement selectedValue = (ListModelElement) nameableList.getSelectedValue();
- if (selectedValue == null) {
- return;
- }
-
- ((JControlUpdatePane) controlUpdatePane).update();
-
- Nameable selectedNameable = selectedValue.wrapper;
-
- // p: 用反射机制实现
- try {
- Nameable newNameable = (Nameable) BaseUtils.cloneObject(selectedNameable);
- newNameable.setName(createUnrepeatedCopyName(selectedNameable.getName()));
-
- UIListControlPane.this.addNameable(newNameable, nameableList.getSelectedIndex() + 1);
- } catch (Exception e) {
- FRContext.getLogger().error(e.getMessage(), e);
- }
- }
+ @Override
+ public void onCopyItem() {
+ getCommonHandlers().onCopyItem();
}
- /*
- * 上移Item
- */
- private class MoveUpItemAction extends UpdateAction {
- public MoveUpItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Up"));
- this.setMnemonic('U');
- this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/design/images/control/up.png"));
- }
-
- @Override
- public void actionPerformed(ActionEvent evt) {
- int selectedIndex = nameableList.getSelectedIndex();
- if (selectedIndex == -1) {
- return;
- }
+ @Override
+ public void onMoveUpItem() {
+ getCommonHandlers().onMoveUpItem();
+ }
- // 上移
- if (selectedIndex > 0) {
- DefaultListModel listModel = (DefaultListModel) nameableList
- .getModel();
+ @Override
+ public void onMoveDownItem() {
+ getCommonHandlers().onMoveDownItem();
+ }
- Object selecteObj1 = listModel.get(selectedIndex - 1);
- listModel.set(selectedIndex - 1, listModel.get(selectedIndex));
- listModel.set(selectedIndex, selecteObj1);
+ @Override
+ public void onSortItem(boolean isAtoZ) {
+ getCommonHandlers().onSortItem(isAtoZ);
+ }
- nameableList.setSelectedIndex(selectedIndex - 1);
- nameableList.ensureIndexIsVisible(selectedIndex - 1);
- }
- }
+ @Override
+ public boolean isItemSelected() {
+ return getModel().getSize() > 0 && nameableList.getSelectedIndex() != -1;
}
/*
- * 下移Item
+ * UINameEdList的鼠标事件
*/
- private class MoveDownItemAction extends UpdateAction {
- public MoveDownItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Down"));
- this.setMnemonic('D');
- this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/design/images/control/down.png"));
- }
-
- @Override
- public void actionPerformed(ActionEvent evt) {
- int selectedIndex = nameableList.getSelectedIndex();
- if (selectedIndex == -1) {
- return;
- }
-
- if (selectedIndex < nameableList.getModel().getSize() - 1) {
- DefaultListModel listModel = (DefaultListModel) nameableList
- .getModel();
-
- Object selecteObj1 = listModel.get(selectedIndex + 1);
- listModel.set(selectedIndex + 1, listModel.get(selectedIndex));
- listModel.set(selectedIndex, selecteObj1);
+ private MouseListener getListMouseListener() {
+ return new MouseAdapter() {
+ @Override
+ public void mouseReleased(MouseEvent evt) {
+ nameableList.stopEditing();
+ if (evt.getClickCount() >= 2
+ && SwingUtilities.isLeftMouseButton(evt) && evt.getX() > EDIT_RANGE) {
+ editingIndex = nameableList.getSelectedIndex();
+ selectedName = nameableList.getNameAt(editingIndex);
+ nameableList.editItemAt(nameableList.getSelectedIndex());
+ } else if (SwingUtilities.isLeftMouseButton(evt) && evt.getX() <= EDIT_RANGE) {
+ editingIndex = nameableList.getSelectedIndex();
+ selectedName = nameableList.getNameAt(editingIndex);
+ popupEditDialog(evt.getPoint());
+ }
- nameableList.setSelectedIndex(selectedIndex + 1);
- nameableList.ensureIndexIsVisible(selectedIndex + 1);
- }
- }
- }
+ // peter:处理右键的弹出菜单
+ if (!SwingUtilities.isRightMouseButton(evt)) {
+ return;
+ }
- private class SortItemAction extends UpdateAction {
- private boolean isAtoZ = false;
+ // peter: 注意,在checkButtonEnabled()方法里面,设置了所有的Action的Enabled.
+ checkButtonEnabled();
- public SortItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Sort"));
- this.setMnemonic('S');
- this.setSmallIcon(BaseUtils
- .readIcon("/com/fr/design/images/control/sortAsc.png"));
- }
+ // p:右键菜单.
+ JPopupMenu popupMenu = new JPopupMenu();
- @Override
- public void actionPerformed(ActionEvent evt) {
- // p:选中的值.
- Object selectedValue = nameableList.getSelectedValue();
+ for (ShortCut4JControlPane sj : getShorts()) {
+ sj.getShortCut().intoJPopupMenu(popupMenu);
+ }
- DefaultListModel listModel = (DefaultListModel) nameableList
- .getModel();
- Nameable[] nameableArray = new Nameable[listModel.getSize()];
- if (nameableArray.length <= 0) {
- return;
+ // peter: 只有弹出菜单有子菜单的时候,才需要弹出来.
+ GUICoreUtils.showPopupMenu(popupMenu, nameableList, evt.getX() - 1,
+ evt.getY() - 1);
}
- for (int i = 0; i < listModel.getSize(); i++) {
- nameableArray[i] = ((ListModelElement) listModel.getElementAt(i)).wrapper;
+ @Override
+ public void mouseClicked(MouseEvent e) {
+ JList list = (JList) e.getSource();
+ if (list.locationToIndex(e.getPoint()) == -1 && !e.isShiftDown()
+ && !isMenuShortcutKeyDown(e)) {
+ list.clearSelection();
+ }
}
- // p:排序.
- if (isAtoZ) {
- Comparator nameableComparator = new Comparator() {
- @Override
- public int compare(Nameable o1, Nameable o2) {
- return -ComparatorUtils.compare(o1.getName(), o2
- .getName());
- }
- };
- isAtoZ = !isAtoZ;
- Arrays.sort(nameableArray, nameableComparator);
- } else {
- Comparator nameableComparator = new Comparator() {
- @Override
- public int compare(Nameable o1, Nameable o2) {
- return ComparatorUtils.compare(o1.getName(), o2
- .getName());
- }
- };
- isAtoZ = !isAtoZ;
- Arrays.sort(nameableArray, nameableComparator);
+ private boolean isMenuShortcutKeyDown(InputEvent event) {
+ return (event.getModifiers() & Toolkit.getDefaultToolkit()
+ .getMenuShortcutKeyMask()) != 0;
}
- for (int i = 0; i < nameableArray.length; i++) {
- listModel.set(i, new ListModelElement(nameableArray[i]));
- }
+ @Override
+ public void mouseMoved(MouseEvent e) {
- // p:需要选中以前的那个值.
- if (selectedValue != null) {
- nameableList.setSelectedValue(selectedValue, true);
}
-
- checkButtonEnabled();
- // p:需要repaint.
- nameableList.repaint();
- }
+ };
}
- /*
- * UINameEdList的鼠标事件
- */
- private MouseListener listMouseListener = new MouseAdapter() {
- @Override
- public void mouseReleased(MouseEvent evt) {
- nameableList.stopEditing();
- if (evt.getClickCount() >= 2
- && SwingUtilities.isLeftMouseButton(evt) && evt.getX() > EDIT_RANGE) {
- editingIndex = nameableList.getSelectedIndex();
- selectedName = nameableList.getNameAt(editingIndex);
- nameableList.editItemAt(nameableList.getSelectedIndex());
- } else if (SwingUtilities.isLeftMouseButton(evt) && evt.getX() <= EDIT_RANGE) {
- editingIndex = nameableList.getSelectedIndex();
- selectedName = nameableList.getNameAt(editingIndex);
- popupEditDialog(evt.getPoint());
- }
-
- // peter:处理右键的弹出菜单
- if (!SwingUtilities.isRightMouseButton(evt)) {
- return;
- }
-
- // peter: 注意,在checkButtonEnabled()方法里面,设置了所有的Action的Enabled.
- checkButtonEnabled();
-
- // p:右键菜单.
- JPopupMenu popupMenu = new JPopupMenu();
-
- for (ShortCut4JControlPane sj : getShorts()) {
- sj.getShortCut().intoJPopupMenu(popupMenu);
- }
-
- // peter: 只有弹出菜单有子菜单的时候,才需要弹出来.
- GUICoreUtils.showPopupMenu(popupMenu, nameableList, evt.getX() - 1,
- evt.getY() - 1);
- }
-
- @Override
- public void mouseClicked(MouseEvent e) {
- JList list = (JList) e.getSource();
- if (list.locationToIndex(e.getPoint()) == -1 && !e.isShiftDown()
- && !isMenuShortcutKeyDown(e)) {
- list.clearSelection();
- }
- }
-
- private boolean isMenuShortcutKeyDown(InputEvent event) {
- return (event.getModifiers() & Toolkit.getDefaultToolkit()
- .getMenuShortcutKeyMask()) != 0;
- }
-
- @Override
- public void mouseMoved(MouseEvent e) {
-
- }
- };
-
/**
* 检查按钮可用状态 Check button enabled.
*/
@Override
public void checkButtonEnabled() {
-
- int selectedIndex = nameableList.getSelectedIndex();
- if (selectedIndex == -1) {
- this.cardLayout.show(cardPane, "SELECT");
- } else {
- this.cardLayout.show(cardPane, "EDIT");
- }
- for (ShortCut4JControlPane sj : getShorts()) {
- sj.checkEnable();
- }
- }
-
-
- public class AbsoluteEnableShortCut extends ShortCut4JControlPane {
- public AbsoluteEnableShortCut(ShortCut shortCut) {
- this.shortCut = shortCut;
- }
-
- /**
- * 检查是否可用
- */
- @Override
- public void checkEnable() {
- this.shortCut.setEnabled(true);
- }
- }
-
- public class NormalEnableShortCut extends ShortCut4JControlPane {
- public NormalEnableShortCut(ShortCut shortCut) {
- this.shortCut = shortCut;
- }
-
- /**
- * 检查是否可用
- */
- @Override
- public void checkEnable() {
- this.shortCut.setEnabled(getModel()
- .getSize() > 0
- && UIListControlPane.this.nameableList.getSelectedIndex() != -1);
- }
+ getHelper().checkButtonEnabled();
}
- public class SortEnableShortCut extends ShortCut4JControlPane {
- public SortEnableShortCut(ShortCut shortCut) {
- this.shortCut = shortCut;
- }
-
- /**
- * 检查是否可用
- */
- @Override
- public void checkEnable() {
- this.shortCut.setEnabled(getModel().getSize() > 1);
- }
-
- }
-
- public class MoveUpEnableShortCut extends ShortCut4JControlPane {
- public MoveUpEnableShortCut(ShortCut shortCut) {
- this.shortCut = shortCut;
- }
-
- /**
- * 检查是否可用
- */
- @Override
- public void checkEnable() {
- this.shortCut.setEnabled(getModel().getSize() > 1
- && UIListControlPane.this.nameableList.getSelectedIndex() > 0);
- }
-
- }
-
- public class MoveDownEnableShortCut extends ShortCut4JControlPane {
- public MoveDownEnableShortCut(ShortCut shortCut) {
- this.shortCut = shortCut;
- }
-
- /**
- * 检查是否可用
- */
- @Override
- public void checkEnable() {
- this.shortCut.setEnabled(getModel().getSize() > 1
- && UIListControlPane.this.nameableList.getSelectedIndex() < UIListControlPane.this.nameableList.getModel().getSize() - 1);
- }
-
- }
-
-
- protected Object getob2Populate (Object ob2Populate) {
- return ob2Populate;
- }
-
- private class JControlUpdatePane extends JPanel {
- private CardLayout card;
- private JPanel cardPane;
- private BasicBeanPane[] updatePanes;
-
- private ListModelElement elEditing;
-
- public JControlUpdatePane() {
- initUpdatePane();
- }
-
- private void initUpdatePane() {
- NameableCreator[] creators = creators();
- if (creators == null) {
- return;
- }
- card = new CardLayout();
- cardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
- cardPane.setLayout(card);
- this.setLayout(FRGUIPaneFactory.createBorderLayout());
- this.add(cardPane);
- int len = creators.length;
- updatePanes = new BasicBeanPane[len];
- }
-
- public void populate() {
- ListModelElement el = (ListModelElement) UIListControlPane.this.nameableList.getSelectedValue();
- if (el == null) {
- return;
- }
-
- elEditing = el;
- NameableCreator[] creators = creators();
-
- for (int i = 0, len = updatePanes.length; i < len; i++) {
- Object ob2Populate = creators[i].acceptObject2Populate(el.wrapper);
- ob2Populate = getob2Populate(ob2Populate);
- if (ob2Populate != null) {
- if (updatePanes[i] == null) {
- if (isMulti(creators[i].getUpdatePane()) || isTree(creators[i].getUpdatePane())) {
- updatePanes[i] = createPaneByCreators(creators[i], el.wrapper.getName());
- } else {
- updatePanes[i] = createPaneByCreators(creators[i]);
- }
- cardPane.add(updatePanes[i], String.valueOf(i));
- }
- card.show(cardPane, String.valueOf(i));
- doBeforePopulate(el, ob2Populate);
- updatePanes[i].populateBean(ob2Populate);
- doWhenPopulate(updatePanes[i]);
- break;
- }
- }
- }
-
-
- public boolean isMulti(Class _class) {
- return ComparatorUtils.equals(_class, GlobalMultiTDTableDataPane.class) || ComparatorUtils.equals(_class, MultiTDTableDataPane.class);
- }
-
- public boolean isTree(Class _class) {
- return ComparatorUtils.equals(_class, GlobalTreeTableDataPane.class) || ComparatorUtils.equals(_class, TreeTableDataPane.class);
- }
-
- public void update() {
- NameableCreator[] creators = creators();
- for (int i = 0; i < updatePanes.length; i++) {
- BasicBeanPane pane = updatePanes[i];
-
- if (pane != null && pane.isVisible()) {
- Object bean = pane.updateBean();
- if (i < creators.length) {
- creators[i].saveUpdatedBean(elEditing, bean);
- }
- }
- }
- }
-
- public void checkValid() throws Exception {
- if (updatePanes != null) {
- for (int i = 0; i < updatePanes.length; i++) {
- if (updatePanes[i] != null) {
- updatePanes[i].checkValid();
- }
- }
- }
- }
- }
-
- protected BasicBeanPane createPaneByCreators(NameableCreator creator) {
+ public BasicBeanPane createPaneByCreators(NameableCreator creator) {
try {
return creator.getUpdatePane().newInstance();
} catch (InstantiationException e) {
@@ -950,7 +380,7 @@ public abstract class UIListControlPane extends UIControlPane {
}
}
- protected BasicBeanPane createPaneByCreators(NameableCreator creator, String string) {
+ public BasicBeanPane createPaneByCreators(NameableCreator creator, String string) {
Constructor constructor = null;
try {
constructor = creator.getUpdatePane().getDeclaredConstructor(new Class[]{String.class});
@@ -965,21 +395,6 @@ public abstract class UIListControlPane extends UIControlPane {
} catch (InvocationTargetException e) {
throw new RuntimeException(e);
}
-
- }
-
- // 选项添加个数有限制等情况下 要求能控制快捷按钮的状态
- protected void setToolbarDefEnable(int shortCutIndex, int itemIndex, boolean enabled) {
- ToolBarDef toolbarDef = getToolbarDef();
- if (toolbarDef.getShortCutCount() > shortCutIndex) {
- ShortCut sc = toolbarDef.getShortCut(shortCutIndex);
- if (sc instanceof AddItemMenuDef) {
- AddItemMenuDef am = (AddItemMenuDef) sc;
- if (am.getShortCutCount() > itemIndex) {
- am.getShortCut(itemIndex).setEnabled(enabled);
- }
- }
- }
}
/**
@@ -992,35 +407,9 @@ public abstract class UIListControlPane extends UIControlPane {
((JControlUpdatePane) this.controlUpdatePane).checkValid();
}
- private int getInValidIndex() {
- BasicBeanPane[] p = ((JControlUpdatePane) controlUpdatePane).updatePanes;
- if (p != null) {
- for (int i = 0; i < p.length; i++) {
- if (p[i] != null) {
- try {
- p[i].checkValid();
- } catch (Exception e) {
- return i;
- }
- }
- }
- }
- return -1;
- }
-
@Override
- protected boolean hasInvalid(boolean isAdd) {
- int idx = UIListControlPane.this.getInValidIndex();
- if (isAdd || nameableList.getSelectedIndex() != idx) {
- try {
- checkValid();
- } catch (Exception exp) {
- JOptionPane.showMessageDialog(UIListControlPane.this, exp.getMessage());
- nameableList.setSelectedIndex(idx);
- return true;
- }
- }
- return false;
+ public boolean hasInvalid(boolean isAdd) {
+ return getHelper().hasInvalid(isAdd);
}
/**
* 设置选中项
@@ -1031,4 +420,23 @@ public abstract class UIListControlPane extends UIControlPane {
nameableList.setSelectedIndex(index);
}
+ @Override
+ public int getSelectedIndex() {
+ return nameableList.getSelectedIndex();
+ }
+
+ @Override
+ public ListModelElement getSelectedValue() {
+ return (ListModelElement) this.nameableList.getSelectedValue();
+ }
+
+ @Override
+ public JControlUpdatePane getControlUpdatePane() {
+ return (JControlUpdatePane) controlUpdatePane;
+ }
+
+ @Override
+ public JNameEdList getNameableList() {
+ return nameableList;
+ }
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java
index f5da7e2f8f..29c8c0602b 100644
--- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java
@@ -228,7 +228,7 @@ public class UISimpleListControlPane extends BasicPane {
*/
private class MoveUpItemAction extends UpdateAction {
public MoveUpItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Up"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Move_Up"));
this.setMnemonic('U');
this.setSmallIcon(BaseUtils
.readIcon("/com/fr/design/images/control/up.png"));
@@ -261,7 +261,7 @@ public class UISimpleListControlPane extends BasicPane {
*/
private class MoveDownItemAction extends UpdateAction {
public MoveDownItemAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Down"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Move_Down"));
this.setMnemonic('D');
this.setSmallIcon(BaseUtils
.readIcon("/com/fr/design/images/control/down.png"));
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/AbstractShortCutFactory.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/AbstractShortCutFactory.java
new file mode 100644
index 0000000000..8d837fcc09
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/AbstractShortCutFactory.java
@@ -0,0 +1,178 @@
+package com.fr.design.gui.controlpane.shortcutfactory;
+
+import com.fr.base.BaseUtils;
+import com.fr.design.actions.UpdateAction;
+import com.fr.design.gui.controlpane.NameableCreator;
+import com.fr.design.gui.controlpane.ShortCut4JControlPane;
+import com.fr.design.gui.controlpane.ShortCutListenerProvider;
+import com.fr.design.menu.ShortCut;
+
+import java.awt.event.ActionEvent;
+
+/**
+ * 生成 ShortCut 的抽象工厂
+ * Created by plough on 2018/8/2.
+ */
+public abstract class AbstractShortCutFactory {
+ protected ShortCutListenerProvider listener;
+
+ AbstractShortCutFactory(ShortCutListenerProvider listener) {
+ setListener(listener);
+ }
+
+ /**
+ * 生成一组默认的 ShortCut
+ */
+ abstract public ShortCut4JControlPane[] createShortCuts();
+
+ abstract public ShortCut createAddItemUpdateAction(NameableCreator[] creator);
+
+ abstract public ShortCut createAddItemMenuDef(NameableCreator[] creator);
+
+ public ShortCut4JControlPane addItemShortCut() {
+ ShortCut addItemShortCut;
+ NameableCreator[] creators = listener.creators();
+ if (creators.length == 1) {
+ addItemShortCut = createAddItemUpdateAction(creators);
+ } else {
+ addItemShortCut = createAddItemMenuDef(creators);
+ }
+ return new AbsoluteEnableShortCut(addItemShortCut);
+ }
+
+ public ShortCut4JControlPane removeItemShortCut() {
+ return new NormalEnableShortCut(new RemoveItemAction());
+ }
+
+ public ShortCut4JControlPane copyItemShortCut() {
+ return new NormalEnableShortCut(new CopyItemAction());
+ }
+
+ public ShortCut4JControlPane moveUpItemShortCut() {
+ return new NormalEnableShortCut(new MoveUpItemAction());
+ }
+
+ public ShortCut4JControlPane moveDownItemShortCut() {
+ return new NormalEnableShortCut(new MoveDownItemAction());
+ }
+
+ public ShortCut4JControlPane sortItemShortCut() {
+ return new NormalEnableShortCut(new SortItemAction());
+ }
+
+ public void setListener(ShortCutListenerProvider listener) {
+ this.listener = listener;
+ }
+
+ private class AbsoluteEnableShortCut extends ShortCut4JControlPane {
+ AbsoluteEnableShortCut(ShortCut shortCut) {
+ this.shortCut = shortCut;
+ }
+
+ /**
+ * 检查是否可用
+ */
+ @Override
+ public void checkEnable() {
+ this.shortCut.setEnabled(true);
+ }
+ }
+
+ private class NormalEnableShortCut extends ShortCut4JControlPane {
+ NormalEnableShortCut(ShortCut shortCut) {
+ this.shortCut = shortCut;
+ }
+
+ /**
+ * 检查是否可用
+ */
+ @Override
+ public void checkEnable() {
+ this.shortCut.setEnabled(listener.isItemSelected());
+ }
+ }
+
+ /*
+ * 移除item
+ */
+ private class RemoveItemAction extends UpdateAction {
+ RemoveItemAction() {
+ this.setName(com.fr.design.i18n.Toolkit.i18nText(("Fine-Design_Basic_Action_Remove")));
+ this.setMnemonic('R');
+ this.setSmallIcon(BaseUtils
+ .readIcon("/com/fr/base/images/cell/control/remove.png"));
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent evt) {
+ listener.onRemoveItem();
+ }
+ }
+
+ /*
+ * CopyItem
+ */
+ private class CopyItemAction extends UpdateAction {
+ CopyItemAction() {
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Copy"));
+ this.setMnemonic('C');
+ this.setSmallIcon(BaseUtils
+ .readIcon("/com/fr/design/images/m_edit/copy.png"));
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent evt) {
+ listener.onCopyItem();
+ }
+ }
+
+ /*
+ * 上移Item
+ */
+ private class MoveUpItemAction extends UpdateAction {
+ MoveUpItemAction() {
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Move_Up"));
+ this.setMnemonic('U');
+ this.setSmallIcon(BaseUtils
+ .readIcon("/com/fr/design/images/control/up.png"));
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent evt) {
+ listener.onMoveUpItem();
+ }
+ }
+
+ /*
+ * 下移Item
+ */
+ private class MoveDownItemAction extends UpdateAction {
+ MoveDownItemAction() {
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Move_Down"));
+ this.setMnemonic('D');
+ this.setSmallIcon(BaseUtils
+ .readIcon("/com/fr/design/images/control/down.png"));
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent evt) {
+ listener.onMoveDownItem();
+ }
+ }
+
+ private class SortItemAction extends UpdateAction {
+ private boolean isAtoZ = false;
+
+ SortItemAction() {
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Sort"));
+ this.setMnemonic('S');
+ this.setSmallIcon(BaseUtils
+ .readIcon("/com/fr/design/images/control/sortAsc.png"));
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent evt) {
+ listener.onSortItem(isAtoZ);
+ }
+ }
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/OldShortCutFactory.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/OldShortCutFactory.java
new file mode 100644
index 0000000000..a7608e2bdf
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/OldShortCutFactory.java
@@ -0,0 +1,112 @@
+package com.fr.design.gui.controlpane.shortcutfactory;
+
+import com.fr.base.BaseUtils;
+import com.fr.design.actions.UpdateAction;
+import com.fr.design.gui.HyperlinkFilterHelper;
+import com.fr.design.gui.controlpane.NameableCreator;
+import com.fr.design.gui.controlpane.ShortCut4JControlPane;
+import com.fr.design.gui.controlpane.ShortCutListenerProvider;
+import com.fr.design.menu.LineSeparator;
+import com.fr.design.menu.MenuDef;
+import com.fr.design.menu.ShortCut;
+import com.fr.general.ComparatorUtils;
+import com.fr.general.Inter;
+
+import javax.swing.Icon;
+import java.awt.event.ActionEvent;
+
+/**
+ * Created by plough on 2018/8/13.
+ */
+public class OldShortCutFactory extends AbstractShortCutFactory {
+
+ private OldShortCutFactory(ShortCutListenerProvider listenerProvider) {
+ super(listenerProvider);
+ }
+
+ public static OldShortCutFactory newInstance(ShortCutListenerProvider listenerProvider) {
+ return new OldShortCutFactory(listenerProvider);
+ }
+
+ @Override
+ public ShortCut4JControlPane[] createShortCuts() {
+ return new ShortCut4JControlPane[]{
+ addItemShortCut(),
+ removeItemShortCut(),
+ copyItemShortCut(),
+ moveUpItemShortCut(),
+ moveDownItemShortCut(),
+ sortItemShortCut()
+ };
+ }
+
+ @Override
+ public ShortCut createAddItemUpdateAction(NameableCreator[] creators) {
+ return new AddItemUpdateAction(creators);
+ }
+
+ @Override
+ public ShortCut createAddItemMenuDef(NameableCreator[] creators) {
+ return new AddItemMenuDef(creators);
+ }
+
+
+ /**
+ * 增加项的UpdateAction
+ */
+ protected class AddItemUpdateAction extends UpdateAction {
+ final NameableCreator creator;
+
+ public AddItemUpdateAction(NameableCreator[] creators) {
+ this.creator = creators[0];
+ this.setName(com.fr.design.i18n.Toolkit.i18nText(("Fine-Design_Basic_Action_Add")));
+ this.setMnemonic('A');
+ this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ listener.onAddItem(creator);
+ }
+ }
+
+ /*
+ * 增加项的MenuDef
+ */
+ private class AddItemMenuDef extends MenuDef {
+ AddItemMenuDef(NameableCreator[] creators) {
+ this.setName(com.fr.design.i18n.Toolkit.i18nText(("Fine-Design_Basic_Action_Add")));
+ this.setMnemonic('A');
+ this.setIconPath("/com/fr/design/images/control/addPopup.png");
+ wrapActionListener(creators);
+ }
+
+ private void wrapActionListener(NameableCreator[] creators) {
+ for (final NameableCreator creator : creators) {
+ if (!HyperlinkFilterHelper.whetherAddHyperlink4cell(creator.menuName())) {
+ continue;
+ }
+ boolean isTrue = ComparatorUtils.equals(creator.menuName(), Inter.getLocText("Datasource-Stored_Procedure")) ||
+ ComparatorUtils.equals(creator.menuName(), Inter.getLocText("DS-Relation_TableData")) || ComparatorUtils.equals(creator.menuName(), Inter.getLocText("DS-Multi_Dimensional_Database"));
+ if (isTrue) {
+ this.addShortCut(new LineSeparator());
+ }
+ this.addShortCut(new UpdateAction() {
+ {
+ this.setName(creator.menuName());
+ Icon icon = creator.menuIcon();
+ if (icon != null) {
+ this.setSmallIcon(icon);
+ }
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ listener.onAddItem(creator);
+ }
+ });
+ }
+ }
+ }
+
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/ShortCutFactory.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/ShortCutFactory.java
new file mode 100644
index 0000000000..b561c28bac
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/shortcutfactory/ShortCutFactory.java
@@ -0,0 +1,171 @@
+package com.fr.design.gui.controlpane.shortcutfactory;
+
+import com.fr.base.BaseUtils;
+import com.fr.design.actions.UpdateAction;
+import com.fr.design.actions.core.ActionFactory;
+import com.fr.design.gui.HyperlinkFilterHelper;
+import com.fr.design.gui.controlpane.NameableCreator;
+import com.fr.design.gui.controlpane.ShortCut4JControlPane;
+import com.fr.design.gui.controlpane.ShortCutListenerProvider;
+import com.fr.design.gui.ibutton.UIButton;
+import com.fr.design.menu.LineSeparator;
+import com.fr.design.menu.MenuDef;
+import com.fr.design.menu.ShortCut;
+import com.fr.general.ComparatorUtils;
+import com.fr.stable.StringUtils;
+
+import javax.swing.AbstractButton;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JComponent;
+import java.awt.event.ActionEvent;
+
+/**
+ * Created by plough on 2018/8/13.
+ */
+public class ShortCutFactory extends AbstractShortCutFactory {
+
+ protected ShortCutFactory(ShortCutListenerProvider listenerProvider) {
+ super(listenerProvider);
+ }
+
+ public static ShortCutFactory newInstance(ShortCutListenerProvider listenerProvider) {
+ return new ShortCutFactory(listenerProvider);
+ }
+
+ @Override
+ public ShortCut4JControlPane[] createShortCuts() {
+ return new ShortCut4JControlPane[]{
+ copyItemShortCut(),
+ moveUpItemShortCut(),
+ moveDownItemShortCut(),
+ sortItemShortCut(),
+ removeItemShortCut()
+ };
+ }
+
+ @Override
+ public ShortCut createAddItemUpdateAction(NameableCreator[] creators) {
+ return new AddItemUpdateAction(creators);
+ }
+
+ @Override
+ public ShortCut createAddItemMenuDef(NameableCreator[] creators) {
+ return new AddItemMenuDef(creators);
+ }
+
+ /**
+ * 增加项的UpdateAction
+ */
+ protected class AddItemUpdateAction extends UpdateAction {
+ final NameableCreator creator;
+
+ public AddItemUpdateAction(NameableCreator[] creators) {
+ this.creator = creators[0];
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Add"));
+ this.setMnemonic('A');
+ this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
+ }
+
+ /**
+ * Gets component on toolbar.
+ *
+ * @return the created components on toolbar.
+ */
+ @Override
+ public JComponent createToolBarComponent() {
+ Object object = this.getValue(UIButton.class.getName());
+ if (!(object instanceof AbstractButton)) {
+ // 直接使用默认UI
+ UIButton button = new UIButton();
+ // 添加一个名字作为自动化测试用
+ button.setName(getName());
+
+ //设置属性.
+ Integer mnemonicInteger = (Integer) this.getValue(Action.MNEMONIC_KEY);
+ if (mnemonicInteger != null) {
+ button.setMnemonic((char) mnemonicInteger.intValue());
+ }
+
+ button.setIcon((Icon) this.getValue(Action.SMALL_ICON));
+ button.addActionListener(this);
+
+ button.registerKeyboardAction(this, this.getAccelerator(), JComponent.WHEN_IN_FOCUSED_WINDOW);
+
+ this.putValue(UIButton.class.getName(), button);
+ button.setText(StringUtils.EMPTY);
+ button.setEnabled(this.isEnabled());
+
+ //peter:产生tooltip
+ button.setToolTipText(ActionFactory.createButtonToolTipText(this));
+ object = button;
+ }
+
+ return (JComponent) object;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ listener.onAddItem(creator);
+ }
+ }
+
+ /*
+ * 增加项的MenuDef
+ */
+ protected class AddItemMenuDef extends MenuDef {
+ public AddItemMenuDef(NameableCreator[] creators) {
+ super(true);
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Add"));
+ this.setMnemonic('A');
+ this.setIconPath("/com/fr/design/images/control/addPopup.png");
+ wrapActionListener(creators);
+ }
+
+ /**
+ * 生成UIButton
+ * @return 菜单按钮
+ */
+ public UIButton createUIButton() {
+ createdButton = super.createUIButton();
+ // 此按钮单独抽出,不应使用工具栏外观
+ if (!createdButton.isOpaque()) {
+ createdButton.setOpaque(true);
+ createdButton.setNormalPainted(true);
+ createdButton.setBorderPaintedOnlyWhenPressed(false);
+ }
+ return createdButton;
+ }
+
+ private void wrapActionListener(NameableCreator[] creators) {
+ for (final NameableCreator creator : creators) {
+ if (!whetherAdd(creator.menuName())) {
+ continue;
+ }
+ boolean isTrue = ComparatorUtils.equals(creator.menuName(), com.fr.design.i18n.Toolkit.i18nText("Datasource-Stored_Procedure")) ||
+ ComparatorUtils.equals(creator.menuName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Relation_TableData")) || ComparatorUtils.equals(creator.menuName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Multi_Dimensional_Database"));
+ if (isTrue) {
+ this.addShortCut(new LineSeparator());
+ }
+ this.addShortCut(new UpdateAction() {
+ {
+ this.setName(creator.menuName());
+ Icon icon = creator.menuIcon();
+ if (icon != null) {
+ this.setSmallIcon(icon);
+ }
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ listener.onAddItem(creator);
+ }
+ });
+ }
+ }
+
+ protected boolean whetherAdd(String itemName){
+ return HyperlinkFilterHelper.whetherAddHyperlink4cell(itemName);
+ }
+ }
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/core/WidgetConstants.java b/designer-base/src/main/java/com/fr/design/gui/core/WidgetConstants.java
index 409a598865..02f6a37866 100644
--- a/designer-base/src/main/java/com/fr/design/gui/core/WidgetConstants.java
+++ b/designer-base/src/main/java/com/fr/design/gui/core/WidgetConstants.java
@@ -55,24 +55,24 @@ public class WidgetConstants {
public static final int MULTI_FILE = 19;
// 默认控件
- public static final String DEFAULT_WIDGETCONFIG = com.fr.design.i18n.Toolkit.i18nText("Widget-Form_Widget_Config");
+ public static final String DEFAULT_WIDGETCONFIG = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Form_Widget_Config");
// 报表控件,与默认控件不同,比如label,table,SEARCH等,这里是不需要的
- public static final String REPORT_WIDGETCONFIG = com.fr.design.i18n.Toolkit.i18nText("Widget-Default_Widget_Config");
+ public static final String REPORT_WIDGETCONFIG = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Default_Widget_Config");
- public static final String FORM_CHARTWIDGET = com.fr.design.i18n.Toolkit.i18nText("Widget-Chart_Widget_Config");
+ public static final String FORM_CHARTWIDGET = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Chart_Widget_Config");
// 表单容器控件
- public static final String FORM_WIDGETCONTAINER = com.fr.design.i18n.Toolkit.i18nText("Widget-Form_Widget_Container");
+ public static final String FORM_WIDGETCONTAINER = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Form_Widget_Container");
- public static final String POLY_REPORT_WIDGET = com.fr.design.i18n.Toolkit.i18nText("Poly-Report_Component");
+ public static final String POLY_REPORT_WIDGET = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Poly_Report_Component");
// 服务器预定义控件
- public static final String USER_DEFINED_WIDGETCONFIG = com.fr.design.i18n.Toolkit.i18nText("Widget-User_Defined_Widget_Config");
+ public static final String USER_DEFINED_WIDGETCONFIG = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_User_Defined_Widget_Config");
// 服务器组合控件
- public static final String COMB_WIDGETCONFIG = com.fr.design.i18n.Toolkit.i18nText("Widget-Comb_Widget_Config");
+ public static final String COMB_WIDGETCONFIG = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Comb_Widget_Config");
// 服务器自定义控件
- public static final String CUSTOM_WIDGETCONFIG = com.fr.design.i18n.Toolkit.i18nText("Widget-Custom_Widget_Config");
+ public static final String CUSTOM_WIDGETCONFIG = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Custom_Widget_Config");
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/core/WidgetOption.java b/designer-base/src/main/java/com/fr/design/gui/core/WidgetOption.java
index ec165b5a6a..e3bf61e9dc 100644
--- a/designer-base/src/main/java/com/fr/design/gui/core/WidgetOption.java
+++ b/designer-base/src/main/java/com/fr/design/gui/core/WidgetOption.java
@@ -130,10 +130,10 @@ public abstract class WidgetOption implements Serializable {
BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/date_16.png"),
DateEditor.class);
- public static final WidgetOption TREE = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Form-View_Tree"),
+ public static final WidgetOption TREE = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_View_Tree"),
BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/tree_16.png"), TreeEditor.class);
- public static final WidgetOption TREECOMBOBOX = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Tree-ComboBox"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/comboboxtree.png"),
+ public static final WidgetOption TREECOMBOBOX = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tree_ComboBox"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/comboboxtree.png"),
TreeComboBoxEditor.class);
public static final WidgetOption CHECKBOXGROUP = WidgetOptionFactory.createByWidgetClass(
@@ -192,7 +192,7 @@ public abstract class WidgetOption implements Serializable {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Password"),
BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/password_field_16.png"), Password.class);
- public static final WidgetOption IFRAMEDITOR = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Form-Iframe"), BaseUtils.readIcon("/com/fr/web/images/form/resources/iframe_16.png"),
+ public static final WidgetOption IFRAMEDITOR = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Form_Iframe"), BaseUtils.readIcon("/com/fr/web/images/form/resources/iframe_16.png"),
IframeEditor.class);
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/date/CalendarNumberField.java b/designer-base/src/main/java/com/fr/design/gui/date/CalendarNumberField.java
index b7e989ad35..5a3fb62b50 100644
--- a/designer-base/src/main/java/com/fr/design/gui/date/CalendarNumberField.java
+++ b/designer-base/src/main/java/com/fr/design/gui/date/CalendarNumberField.java
@@ -30,7 +30,7 @@ public class CalendarNumberField extends UINumberField {
setValue(getIntValue());
}
});
- this.setFont(new Font(com.fr.design.i18n.Toolkit.i18nText("Song_TypeFace"),0,12));
+ this.setFont(new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Song_TypeFace"),0,12));
}
public void setValue(int value) {
diff --git a/designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java b/designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java
index 9a8f1c0116..c97b671dec 100644
--- a/designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java
+++ b/designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java
@@ -45,8 +45,8 @@ import java.util.Calendar;
import java.util.Date;
public class UICalendarPanel extends JPanel {
- private static final Font FONT_SONG = new Font(com.fr.design.i18n.Toolkit.i18nText("Song_TypeFace"),0,12);
- private static final Font FONT_BLACK = new Font(com.fr.design.i18n.Toolkit.i18nText("Black_Font"),0,12);
+ private static final Font FONT_SONG = new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Song_TypeFace"),0,12);
+ private static final Font FONT_BLACK = new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Black_Font"),0,12);
private static final int WEEKDAY_COUNT = 7;
private static final int TOTAL_DAYS_COUNT = 42;
@@ -161,9 +161,9 @@ public class UICalendarPanel extends JPanel {
pWeeks.setPreferredSize(new Dimension(216, 22));
pWeeks.setBackground(new Color(0xFFFFFF));
pWeeks.setOpaque(true);
- String[] strWeeks = new String[] {StringUtils.EMPTY, com.fr.design.i18n.Toolkit.i18nText("Sun"), com.fr.design.i18n.Toolkit.i18nText("Mon"),
- com.fr.design.i18n.Toolkit.i18nText("Tue"),com.fr.design.i18n.Toolkit.i18nText("Wed"),com.fr.design.i18n.Toolkit.i18nText("Thu"),
- com.fr.design.i18n.Toolkit.i18nText("Fri"),com.fr.design.i18n.Toolkit.i18nText("Sat")
+ String[] strWeeks = new String[] {StringUtils.EMPTY, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Sun"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Mon"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tue"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Wed"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Thu"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Fri"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sat")
};
for (int i = 1; i <= WEEKDAY_COUNT; i++) {
UILabel label = new UILabel();
@@ -202,7 +202,7 @@ public class UICalendarPanel extends JPanel {
sPane.setPreferredSize(new Dimension(216, 30));
sPane.setBackground(Color.WHITE);
sPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 6));
- UILabel timeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Time") + ":");
+ UILabel timeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Time") + ":");
timeLabel.setBorder(BorderFactory.createEmptyBorder(0,9,0,5));
timeLabel.setFont(FONT_SONG);
sPane.add(timeLabel);
@@ -769,4 +769,4 @@ public class UICalendarPanel extends JPanel {
frame.getContentPane().add(calendarPanel);
frame.setVisible(true);
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java b/designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java
index 8d38c9e4eb..0ba64b3f64 100644
--- a/designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java
+++ b/designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java
@@ -1,11 +1,12 @@
package com.fr.design.gui.date;
-import java.awt.*;
+import com.fr.design.gui.ilable.UILabel;
+
+import java.awt.Dimension;
+import java.awt.Font;
import java.text.SimpleDateFormat;
import java.util.Date;
-import com.fr.design.gui.ilable.UILabel;
-
public class UIDayLabel extends UILabel {
@@ -27,13 +28,13 @@ public class UIDayLabel extends UILabel {
public UIDayLabel(Date date, boolean isSmallLabel) {
setHorizontalAlignment(UILabel.CENTER);
- setFont(new Font(com.fr.design.i18n.Toolkit.i18nText("Song_TypeFace"), 0, 12));
+ setFont(new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Song_TypeFace"), 0, 12));
this.date = date;
setPreferredSize(new Dimension(30, 18));
if (isSmallLabel) {
setText(dayFormat.format(date));
} else {
- setText(com.fr.design.i18n.Toolkit.i18nText("Today")+":" + dateFormat.format(new Date()));
+ setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Today")+":" + dateFormat.format(new Date()));
}
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java
index 4b326dd951..d3370a7c07 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java
@@ -1,13 +1,11 @@
package com.fr.design.gui.frpane;
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.ArrayList;
-import java.util.List;
+import com.fr.design.beans.BasicBeanPane;
+import com.fr.design.gui.ibutton.UIButton;
+import com.fr.design.layout.FRGUIPaneFactory;
+import com.fr.design.utils.gui.GUICoreUtils;
+import com.fr.design.utils.gui.JListUtils;
+import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer;
@@ -20,14 +18,14 @@ import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
-
-import com.fr.design.beans.BasicBeanPane;
-import com.fr.design.gui.ibutton.UIButton;
-import com.fr.design.layout.FRGUIPaneFactory;
-
-import com.fr.stable.StringUtils;
-import com.fr.design.utils.gui.GUICoreUtils;
-import com.fr.design.utils.gui.JListUtils;
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
+import java.util.List;
public abstract class EditingStringListPane extends BasicBeanPane> {
@@ -57,11 +55,11 @@ public abstract class EditingStringListPane extends BasicBeanPane>
});
- addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Add"));
- editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Modify"));
- removeButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Remove"));
- moveUpButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Up"));
- moveDownButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Utils-Move_Down"));
+ addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"));
+ editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Modify"));
+ removeButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
+ moveUpButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Move_Up"));
+ moveDownButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Move_Down"));
JPanel eastPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
eastPane.add(editButton);
@@ -151,7 +149,7 @@ public abstract class EditingStringListPane extends BasicBeanPane>
public void actionPerformed(ActionEvent e) {
Object selected = jlist.getSelectedValue();
if (selected != null) {
- int re = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this), com.fr.design.i18n.Toolkit.i18nText("sure_to_delete") + selected.toString() + "?");
+ int re = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete") + selected.toString() + "?");
if (re == JOptionPane.OK_OPTION) {
JListUtils.removeSelectedListItems(jlist);
}
@@ -205,4 +203,4 @@ public abstract class EditingStringListPane extends BasicBeanPane>
}
return lists;
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/HyperlinkGroupPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/HyperlinkGroupPane.java
index 1fd5b8f4f1..3f4ae9b2a5 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/HyperlinkGroupPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/HyperlinkGroupPane.java
@@ -82,12 +82,12 @@ public abstract class HyperlinkGroupPane extends UIListControlPane {
*/
@Override
public String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Hyperlink");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Hyperlink");
}
@Override
protected String getAddItemText() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Add_Hyperlink");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add_Hyperlink");
}
public void populate(NameJavaScriptGroup hyperlinkArray) {
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChoosePane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChoosePane.java
index 225d5bcdf7..58f0e8f837 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChoosePane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChoosePane.java
@@ -34,7 +34,7 @@ public class ImgChoosePane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel previewContainner = new JPanel();
- previewContainner.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Preview")));
+ previewContainner.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview")));
previewPane = new ImagePreviewPane();
previewContainner.add(previewPane);
@@ -73,7 +73,7 @@ public class ImgChoosePane extends BasicPane {
}
private void initButton() {
- chooseButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Image-Select_Picture"));
+ chooseButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Image_Select_Picture"));
chooseButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -91,7 +91,7 @@ public class ImgChoosePane extends BasicPane {
}
});
- clearButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Clear"));
+ clearButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Clear"));
clearButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
previewPane.setImage(null);
@@ -115,6 +115,6 @@ public class ImgChoosePane extends BasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Image");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Image");
}
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java
index 32a706fc5f..36183f1078 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java
@@ -148,7 +148,7 @@ public class ImgChooseWrapper {
imageSizeLabel.setText(StringUtils.EMPTY);
} else {
imageSizeLabel.setText(selectImage.getWidth(null) + "x"
- + selectImage.getHeight(null) + com.fr.design.i18n.Toolkit.i18nText("px"));
+ + selectImage.getHeight(null) + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Px"));
}
}
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeAutoBuildPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeAutoBuildPane.java
index 49402b9504..46cdae35bd 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeAutoBuildPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeAutoBuildPane.java
@@ -51,7 +51,7 @@ public class JTreeAutoBuildPane extends BasicPane implements PreviewLabel.Previe
*/
public void initComponent() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
- UILabel selectTreeDataLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Select_A_Tree_DataSource_To_Build") + ": ");
+ UILabel selectTreeDataLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select_A_Tree_DataSource_To_Build") + ": ");
treeTableDataComboBox = new TreeTableDataComboBox(DesignTableDataManager.getEditingTableDataSource());
treeTableDataComboBox.setPreferredSize(new Dimension(180, 20));
selectTreeDataPanel = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
@@ -78,9 +78,9 @@ public class JTreeAutoBuildPane extends BasicPane implements PreviewLabel.Previe
formulaEditor.setEnabled(true);
textPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor(), formulaEditor});
Component[][] coms = {
- {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Actual_Value") + ":"),
+ {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Actual_Value") + ":"),
valuePane},
- {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Display_Value") + ":"),
+ {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Display_Value") + ":"),
textPane}};
double p = TableLayout.PREFERRED;
@@ -108,10 +108,10 @@ public class JTreeAutoBuildPane extends BasicPane implements PreviewLabel.Previe
formulaEditor.setEnabled(true);
textPane.setEditors(new Editor[]{new ColumnNameEditor(columnNames), new ColumnIndexEditor(columnNames.length), formulaEditor}, columnNames[0]);
} catch (Exception e) {
- valuePane.setEditors(new Editor[]{new OldColumnIndexEditor(100, com.fr.design.i18n.Toolkit.i18nText("ColumnName"))}, 1);
+ valuePane.setEditors(new Editor[]{new OldColumnIndexEditor(100, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Column_Name"))}, 1);
FormulaEditor formulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Parameter_Formula"));
formulaEditor.setEnabled(true);
- textPane.setEditors(new Editor[]{new OldColumnIndexEditor(100, com.fr.design.i18n.Toolkit.i18nText("ColumnName")), formulaEditor}, 1);
+ textPane.setEditors(new Editor[]{new OldColumnIndexEditor(100, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Column_Name")), formulaEditor}, 1);
}
}
@@ -230,4 +230,4 @@ public class JTreeAutoBuildPane extends BasicPane implements PreviewLabel.Previe
valuePane.populate(1);
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java
index 59bce3944b..0c266b81ac 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java
@@ -57,9 +57,9 @@ public class JTreeControlPane extends ControlPane {
// LeftPane
JPanel leftPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel northPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
- DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Root"));
+ DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Root"));
defaultTreeModel = new DefaultTreeModel(rootNode);
- DefaultMutableTreeNode firstLayer = new DefaultMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Gradation") + 1, new TreeNodeAttr()));
+ DefaultMutableTreeNode firstLayer = new DefaultMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Gradation") + 1, new TreeNodeAttr()));
tree = new JTree(defaultTreeModel);
tree.setRootVisible(false);
((DefaultMutableTreeNode) defaultTreeModel.getRoot()).getLastLeaf().add(firstLayer);
@@ -84,7 +84,7 @@ public class JTreeControlPane extends ControlPane {
leftPane.add(toolBar, BorderLayout.NORTH);
- isPerformanceFirst = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Performance_First"));
+ isPerformanceFirst = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Performance_First"));
northPane.add(new UILabel(" "));
northPane.add(isPerformanceFirst);
this.add(northPane, BorderLayout.NORTH);
@@ -134,7 +134,7 @@ public class JTreeControlPane extends ControlPane {
for (int i = 0; i < count; i++) {
DefaultMutableTreeNode node4add = new DefaultMutableTreeNode(
- new NameObject(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Gradation") + (i + 1), treeNodeAttr[i]));
+ new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Gradation") + (i + 1), treeNodeAttr[i]));
node4root.add(node4add);
node4root = node4add;
}
@@ -193,7 +193,7 @@ public class JTreeControlPane extends ControlPane {
public AddTreeNodeAction(NameableCreator[] creators) {
this.creator = creators[0];
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Add"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"));
this.setMnemonic('A');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png"));
}
@@ -224,15 +224,15 @@ public class JTreeControlPane extends ControlPane {
private class RemoveTreeNodeAction extends UpdateAction {
public RemoveTreeNodeAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
this.setMnemonic('R');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/remove.png"));
}
public void actionPerformed(ActionEvent e) {
// TODO remove tree node
- int val = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Utils-Are_you_sure_to_remove_the_selected_item") + "?",
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
+ int val = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?",
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (val != JOptionPane.OK_OPTION) {
return;
}
@@ -267,4 +267,4 @@ public class JTreeControlPane extends ControlPane {
return this;
}
};
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ListenerUpdatePane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ListenerUpdatePane.java
index 28025844e6..9f5101ae63 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/ListenerUpdatePane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ListenerUpdatePane.java
@@ -29,7 +29,7 @@ public abstract class ListenerUpdatePane extends BasicBeanPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Event");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event");
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/LoadingBasicPaneTest.java b/designer-base/src/main/java/com/fr/design/gui/frpane/LoadingBasicPaneTest.java
index a379360533..372a37be86 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/LoadingBasicPaneTest.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/LoadingBasicPaneTest.java
@@ -31,7 +31,7 @@ public class LoadingBasicPaneTest {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Test") ;
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Test") ;
}
};
BasicDialog dlg = lb.showWindow(null);
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java
index b57ed131e6..e946ad4f94 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java
@@ -29,7 +29,7 @@ public class ObjectProperiesPane extends BasicBeanPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel buttonPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
- this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Add") + " " +com.fr.design.i18n.Toolkit.i18nText("Property"));
+ this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add") + " " +com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"));
buttonPane.add(this.addButton, BorderLayout.WEST);
this.add(buttonPane, BorderLayout.NORTH);
@@ -124,16 +124,16 @@ public class ObjectProperiesPane extends BasicBeanPane {
this.setLayout(FRGUIPaneFactory.createLabelFlowLayout());
UIButton cancel = new UIButton(BaseUtils.readIcon("/com/fr/base/images/cell/control/remove.png"));
- cancel.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Remove"));
+ cancel.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
cancel.addActionListener(cancleListener);
cancel.setMargin(new Insets(0, 0, 0, 0));
this.add(cancel);
- this.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Name")+":"));
+ this.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name")+":"));
this.nameField = new UITextField(6);
this.add(this.nameField);
- this.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Value")+ ":"));
+ this.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Value")+ ":"));
this.valueEditorPane = ValueEditorPaneFactory.createExtendedValueEditorPane();
this.add(this.valueEditorPane);
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java
index 20f28fb087..5d37fb4a96 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java
@@ -73,7 +73,7 @@ public class RegFieldPane extends RegPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L5, 0, 0));
initRegErrorMsgField();
- UILabel tipLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Widget_Error_Tip"));
+ UILabel tipLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Error_Tip"));
tipLabel.setPreferredSize(new Dimension(60, 20));
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{tipLabel, regErrorMsgField}}, TableLayoutHelper.FILL_LASTCOLUMN, 10, LayoutConstants.VGAP_MEDIUM);
this.add(panel);
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java
index 34f1883110..2df45f8923 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java
@@ -76,7 +76,7 @@ public class RegPane extends BasicPane {
regComboBox.setRenderer(listCellRender);
JPanel contentPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
- new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Input_Rule")), regComboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
+ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Input_Rule")), regComboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
jPanel.add(contentPane, BorderLayout.NORTH);
@@ -119,7 +119,7 @@ public class RegPane extends BasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Input_Rule");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Input_Rule");
}
private int getRegTypeIndex(RegExp regex) {
@@ -330,14 +330,14 @@ public class RegPane extends BasicPane {
private static final String REG_PATTERN = "0123456789-*# ";
private UIComboBox dataTypeComboBox;
- private final String[] dataType = {EMB_REG1, EMB_REG2, EMB_REG3, com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Custom")};
+ private final String[] dataType = {EMB_REG1, EMB_REG2, EMB_REG3, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom")};
DefaultComboBoxModel DefaultComboBoxModel= new DefaultComboBoxModel(dataType);
public RegPhonePane() {
this.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L5, 0, 0));
this.setLayout(FRGUIPaneFactory.createBorderLayout());
dataTypeComboBox = new UIComboBox(DefaultComboBoxModel);
JTextField editFiled = (JTextField)(dataTypeComboBox.getEditor().getEditorComponent());
- UILabel dataTypeLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Data_Type"));
+ UILabel dataTypeLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Data_Type"));
dataTypeLable.setPreferredSize(new Dimension(60, 20));
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{dataTypeLable, dataTypeComboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, 10, 0);
this.add(panel);
@@ -401,8 +401,8 @@ public class RegPane extends BasicPane {
this.setPreferredSize(new Dimension(210, 56));
minLenSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
maxLenSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
- UILabel minLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Reg_Min_Length"));
- UILabel maxLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Reg_Max_Length"));
+ UILabel minLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Reg_Min_Length"));
+ UILabel maxLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Reg_Max_Length"));
minLabel.setPreferredSize(new Dimension(60, 20));
maxLabel.setPreferredSize(new Dimension(60, 20));
double f = TableLayout.FILL;
@@ -456,7 +456,7 @@ public class RegPane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L5, 0, 0));
regTextField = new UITextField();
- JPanel panel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Reg_Expressions")), regTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, 10, LayoutConstants.VGAP_MEDIUM);
+ JPanel panel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Reg_Expressions")), regTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, 10, LayoutConstants.VGAP_MEDIUM);
this.add(panel);
}
@@ -490,24 +490,24 @@ public class RegPane extends BasicPane {
int index, boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof NoneReg){
- this.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_None"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_None"));
} else if (value instanceof LengthReg){
- this.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Length"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Length"));
} else if (value instanceof MailReg){
- this.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Email"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"));
} else if (value instanceof PhoneReg){
- this.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Phone"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Phone"));
} else if (value instanceof MobileReg) {
- this.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_MobilePhone"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Mobile_Phone"));
} else if (value instanceof IDCardReg){
- this.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_IDCard"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ID_Card"));
} else if (value instanceof PostCardReg){
- this.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_PostCode"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Post_Code"));
} else if (value instanceof CustomReg){
- this.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Custom"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom"));
}
return this;
}
};
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java
index e18d04b94e..37bd82bfc5 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java
@@ -95,7 +95,7 @@ public class ReportletParameterViewPane extends BasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Parameters");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameters");
}
public void populate(ParameterProvider[] parameters) {
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/TemplateParameterPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/TemplateParameterPane.java
index 4d2eb918d0..6702319b78 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/TemplateParameterPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/TemplateParameterPane.java
@@ -1,20 +1,19 @@
package com.fr.design.gui.frpane;
-import java.awt.BorderLayout;
-import java.awt.Component;
-
-import javax.swing.BorderFactory;
-import com.fr.design.gui.ilable.UILabel;
-import javax.swing.JPanel;
-
import com.fr.base.Parameter;
+import com.fr.design.dialog.BasicPane;
+import com.fr.design.editor.ValueEditorPane;
+import com.fr.design.editor.ValueEditorPaneFactory;
+import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
-import com.fr.design.dialog.BasicPane;
-import com.fr.design.editor.ValueEditorPane;
-import com.fr.design.editor.ValueEditorPaneFactory;
+
+import javax.swing.BorderFactory;
+import javax.swing.JPanel;
+import java.awt.BorderLayout;
+import java.awt.Component;
/**
@@ -30,7 +29,7 @@ public class TemplateParameterPane extends BasicPane {
}
public void initComponents() {
- this.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Parameter")));
+ this.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@@ -39,8 +38,8 @@ public class TemplateParameterPane extends BasicPane {
JPanel defaultPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
northPane.add(defaultPane, BorderLayout.CENTER);
- UILabel nameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Name") + ":");
- UILabel valueLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Value") + ":");
+ UILabel nameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":");
+ UILabel valueLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Value") + ":");
nameTextField = new UITextField(12);
valuePane = ValueEditorPaneFactory.createBasicValueEditorPane();
@@ -55,7 +54,7 @@ public class TemplateParameterPane extends BasicPane {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("Parameter");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter");
}
public void populate(Parameter parameter) {
@@ -82,7 +81,7 @@ public class TemplateParameterPane extends BasicPane {
public void checkValid() throws Exception {
Parameter parameter = this.update();
if (parameter.getName() == null || parameter.getName().trim().length() <= 0) {
- throw new Exception(com.fr.design.i18n.Toolkit.i18nText("ParameterD-Parameter_name_cannot_be_null") + ".");
+ throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ParameterD_Parameter_Name_Cannot_Be_Null") + ".");
}
this.valuePane.checkValid();
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/TreeSettingPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/TreeSettingPane.java
index 07ec4974b2..ba75cce9df 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/TreeSettingPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/TreeSettingPane.java
@@ -42,8 +42,8 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
*/
private static final long serialVersionUID = 1762889323082827111L;
- private String[] buildWay = new String[]{com.fr.design.i18n.Toolkit.i18nText("FR-Designer_DataTable-Build"),
- com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Auto_Build"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Layer-Build")};
+ private String[] buildWay = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DataTable_Build"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Auto_Build"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Layer_Build")};
public TreeSettingPane(boolean isEditor) {
this.initComponents(isEditor);
@@ -53,7 +53,7 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel buildWayPanel= FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane();
buildWayPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
- UILabel buildWayLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Build-Way") + " :");
+ UILabel buildWayLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Build_Way") + " :");
buildWayPanel.add(buildWayLabel);
buildBox = new UIComboBox(buildWay);
buildBox.addItemListener(new ItemListener() {
@@ -99,7 +99,7 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
@Override
protected String title4PopupWindow() {
- return com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Create_Tree");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Create_Tree");
}
@Override
@@ -108,7 +108,7 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
}
NameableCreator treeNode = new NameObjectCreator(
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Gradation"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Gradation"),
"/com/fr/design/images/data/source/jdbcTableData.png",
TreeNodeAttr.class);
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/UIAdvancedTextPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/UIAdvancedTextPane.java
index 40039deb20..c3dda67741 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/UIAdvancedTextPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/UIAdvancedTextPane.java
@@ -142,7 +142,7 @@ public class UIAdvancedTextPane extends UITextPane {
private class CutAction extends UpdateAction {
public CutAction() {
- setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Cut"));
+ setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Cut"));
setMnemonic('T');
setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/cut.png"));
setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER));
@@ -161,7 +161,7 @@ public class UIAdvancedTextPane extends UITextPane {
private class CopyAction extends UpdateAction {
public CopyAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Copy"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Copy"));
this.setMnemonic('C');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/copy.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER));
@@ -180,7 +180,7 @@ public class UIAdvancedTextPane extends UITextPane {
private class PasteAction extends UpdateAction {
public PasteAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("M_Edit-Paste"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Edit_Paste"));
this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER));
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java
index 79ed963094..a1f92ddd0e 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java
@@ -377,13 +377,13 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver {
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout());
List data = new ArrayList();
- UIMenuNameableCreator reportlet = new UIMenuNameableCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Hyperlink_Reportlet"),
+ UIMenuNameableCreator reportlet = new UIMenuNameableCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"),
new ReportletHyperlink(), ReportletHyperlinkPane.class);
- UIMenuNameableCreator email = new UIMenuNameableCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Email"),
+ UIMenuNameableCreator email = new UIMenuNameableCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"),
new EmailJavaScript(), EmailPane.class);
- UIMenuNameableCreator web = new UIMenuNameableCreator(com.fr.design.i18n.Toolkit.i18nText("Hyperlink-Web_link"),
+ UIMenuNameableCreator web = new UIMenuNameableCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"),
new WebHyperlink(), WebHyperlinkPane.class);
data.add(reportlet);
data.add(email);
@@ -411,4 +411,4 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver {
public boolean shouldResponseChangeListener() {
return true;
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationPane.java
index e8ea9fdaf5..3a23a478c3 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationPane.java
@@ -386,7 +386,7 @@ public class UICorrelationPane extends JPanel implements UIObserver {
*/
public static void main(String... args) {
JFrame jf = new JFrame("test");
- final String[] columnNames = {com.fr.design.i18n.Toolkit.i18nText("Actual_Value"), com.fr.design.i18n.Toolkit.i18nText("Display_Value")};
+ final String[] columnNames = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Actual_Value"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Display_Value")};
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout());
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/UINumberDragPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/UINumberDragPane.java
index eb63c0b64f..b1958a8c19 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/UINumberDragPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/UINumberDragPane.java
@@ -36,7 +36,7 @@ public class UINumberDragPane extends BasicBeanPane implements GlobalNam
public UINumberDragPane(double minValue, double maxValue, double dierta) {
dragBar = new NumberDragBar((int) minValue, (int) maxValue);
spinner = new UISpinner(minValue, maxValue, dierta, minValue);
- spinner.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("StyleAlignment-Text_Rotation"));
+ spinner.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"));
this.setLayout(new BorderLayout(4, 0));
this.add(spinner, BorderLayout.EAST);
this.add(dragBar, BorderLayout.CENTER);
@@ -137,4 +137,4 @@ public class UINumberDragPane extends BasicBeanPane implements GlobalNam
public boolean shouldResponseNameListener() {
return true;
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java
index 288396c29a..92ad39559e 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java
@@ -113,10 +113,10 @@ public class UITabbedPane extends JTabbedPane{
* @param i tab索引
*/
public void doRemoveTab(int i){
- int re = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(UITabbedPane.this), com.fr.design.i18n.Toolkit.i18nText("sure_to_delete")+ "?", com.fr.design.i18n.Toolkit.i18nText("Remove")
+ int re = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(UITabbedPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete")+ "?", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove")
, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (re == JOptionPane.OK_OPTION) {
super.removeTabAt(i);
}
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java
index 858e7f53c2..128adca1f1 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java
@@ -47,10 +47,10 @@ public class LayerDataControlPane extends ControlPane {
configPane = new LayerDataConfigPane();
//创建树结构及树控件
JPanel leftPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
- DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Root"));
+ DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Root"));
defaultTreeModel = new DefaultTreeModel(rootNode);
tree = new JTree(defaultTreeModel);
- DefaultMutableTreeNode firstLayer = new DefaultMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Gradation") + 1, new LayerConfig(1)));
+ DefaultMutableTreeNode firstLayer = new DefaultMutableTreeNode(new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Gradation") + 1, new LayerConfig(1)));
tree.setRootVisible(false);
((DefaultMutableTreeNode) defaultTreeModel.getRoot()).getLastLeaf().add(firstLayer);
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
@@ -143,7 +143,7 @@ public class LayerDataControlPane extends ControlPane {
public AddTreeNodeAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Add"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"));
this.setMnemonic('A');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png"));
}
@@ -157,7 +157,7 @@ public class LayerDataControlPane extends ControlPane {
do {
nodeCount++;
} while ((innerNode = innerNode.getNextNode()) != null);
- NameObject nameable = new NameObject(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Gradation") + nodeCount, new LayerConfig(nodeCount));
+ NameObject nameable = new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Gradation") + nodeCount, new LayerConfig(nodeCount));
node.getLastLeaf().add(new DefaultMutableTreeNode(nameable));
defaultTreeModel.reload();
@@ -170,15 +170,15 @@ public class LayerDataControlPane extends ControlPane {
public RemoveTreeNodeAction() {
- this.setName(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"));
+ this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
this.setMnemonic('R');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/remove.png"));
}
public void actionPerformed(ActionEvent e) {
// TODO remove tree node
- int val = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Utils-Are_you_sure_to_remove_the_selected_item") + "?",
- com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
+ int val = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Are_You_Sure_To_Remove_The_Selected_Item") + "?",
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (val != JOptionPane.OK_OPTION) {
return;
}
@@ -208,7 +208,7 @@ public class LayerDataControlPane extends ControlPane {
for (int i = 0; i < count; i++) {
DefaultMutableTreeNode node4add = new DefaultMutableTreeNode(
- new NameObject(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Gradation") + (i + 1), layerConfigs[i].clone()));
+ new NameObject(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Gradation") + (i + 1), layerConfigs[i].clone()));
node4root.add(node4add);
node4root = node4add;
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java
index 3975c2d435..2c0612e024 100644
--- a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java
+++ b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java
@@ -69,8 +69,8 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener {
tableDataDictPane.tableDataNameComboBox.addItemListener(this);
//初始化按钮对象
- addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("add"));
- delButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Delete"));
+ addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"));
+ delButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Delete"));
//初始化Table对象,并添加renderer和editor
model = new LayerDepenceTableModel();
dependenceTable = new JTable();
@@ -392,9 +392,9 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener {
String name;
if (column == 0) {
- name = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_layerIndex");
+ name = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Layer_Index");
} else {
- name = com.fr.design.i18n.Toolkit.i18nText("FR-Designer_filedChosen");
+ name = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Filed_Chosen");
}
return name;
}
diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/AlignmentComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/AlignmentComboBox.java
index 364e68d211..cd135a1db2 100644
--- a/designer-base/src/main/java/com/fr/design/gui/icombobox/AlignmentComboBox.java
+++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/AlignmentComboBox.java
@@ -3,9 +3,6 @@
*/
package com.fr.design.gui.icombobox;
-import com.fr.design.gui.icombobox.UIComboBox;
-import com.fr.design.gui.icombobox.UIComboBoxRenderer;
-
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
@@ -50,17 +47,17 @@ public class AlignmentComboBox extends UIComboBox {
public static String getAlignDescription(int alignment) {
if (alignment == Constants.CENTER) {//0
- return com.fr.design.i18n.Toolkit.i18nText("Center");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Center");
} else if (alignment == Constants.TOP) {//1
- return com.fr.design.i18n.Toolkit.i18nText("StyleAlignment-Top");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Top");
} else if (alignment == Constants.LEFT) {//2
- return com.fr.design.i18n.Toolkit.i18nText("StyleAlignment-Left");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Left");
} else if (alignment == Constants.BOTTOM) {//3
- return com.fr.design.i18n.Toolkit.i18nText("StyleAlignment-Bottom");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Bottom");
} else if (alignment == Constants.RIGHT) { //4
- return com.fr.design.i18n.Toolkit.i18nText("StyleAlignment-Right");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Right");
} else if (alignment == Constants.DISTRIBUTED) { //added by Kevin Wang 6
- return com.fr.design.i18n.Toolkit.i18nText("StyleAlignment-Distibuted");
+ return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Distibuted");
} else {
return StringUtils.EMPTY;
}
@@ -80,4 +77,4 @@ public class AlignmentComboBox extends UIComboBox {
return this;
}
}
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/DictionaryConstants.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/DictionaryConstants.java
index 38677afb64..d865fdb690 100644
--- a/designer-base/src/main/java/com/fr/design/gui/icombobox/DictionaryConstants.java
+++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/DictionaryConstants.java
@@ -18,15 +18,15 @@ public class DictionaryConstants {
public final static String[] regexpsDisplays = new String[] {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_None"),
- com.fr.design.i18n.Toolkit.i18nText("Required"),
- com.fr.design.i18n.Toolkit.i18nText("Length"),
- com.fr.design.i18n.Toolkit.i18nText("Float"),
- com.fr.design.i18n.Toolkit.i18nText("Email"),
- com.fr.design.i18n.Toolkit.i18nText("Phone"),
- com.fr.design.i18n.Toolkit.i18nText("MobilePhone"),
- com.fr.design.i18n.Toolkit.i18nText("IDCard"),
- com.fr.design.i18n.Toolkit.i18nText("PostCode"),
- com.fr.design.i18n.Toolkit.i18nText("Custom")};
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Required"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Length"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Float"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Phone"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_MobilePhone"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_IDCard"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_PostCode"),
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom")};
public final static int REG_NONE = 0;
public final static int REG_REQUIRED = 1;
@@ -83,4 +83,4 @@ public class DictionaryConstants {
"jpg,png,gif",
"doc,xls,ppt"
};
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/SortOrderComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/SortOrderComboBox.java
index e4c25470ad..75dabb56d2 100644
--- a/designer-base/src/main/java/com/fr/design/gui/icombobox/SortOrderComboBox.java
+++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/SortOrderComboBox.java
@@ -3,12 +3,11 @@
*/
package com.fr.design.gui.icombobox;
-import java.awt.Component;
+import com.fr.data.util.SortOrder;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JList;
-
-import com.fr.data.util.SortOrder;
+import java.awt.Component;
/**
@@ -53,11 +52,11 @@ public class SortOrderComboBox extends UIComboBox {
SortOrder sortOrder = (SortOrder) value;
if (sortOrder.getOrder() == SortOrder.ASC) {
- this.setText(com.fr.design.i18n.Toolkit.i18nText("Sort-Ascending"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sort_Ascending"));
} else if (sortOrder.getOrder() == SortOrder.DESC) {
- this.setText(com.fr.design.i18n.Toolkit.i18nText("Sort-Descending"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sort_Descending"));
} else if (sortOrder.getOrder() == SortOrder.ORIGINAL) {
- this.setText(com.fr.design.i18n.Toolkit.i18nText("Sort-Original"));
+ this.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sort_Original"));
}
}
@@ -70,4 +69,4 @@ public class SortOrderComboBox extends UIComboBox {
new SortOrder(SortOrder.DESC),
new SortOrder(SortOrder.ORIGINAL)
};
-}
\ No newline at end of file
+}
diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/JNameEdList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/JNameEdList.java
index 90aeff3dd3..0efa74cec7 100644
--- a/designer-base/src/main/java/com/fr/design/gui/ilist/JNameEdList.java
+++ b/designer-base/src/main/java/com/fr/design/gui/ilist/JNameEdList.java
@@ -22,7 +22,6 @@ import java.util.ArrayList;
import java.util.Vector;
public class JNameEdList extends UIList implements CellEditorListener {
- private static final int TEST_LIST_LENTH = 20;
private static final int ICON_WIDTH = 20;
private boolean editable = true;
@@ -232,7 +231,7 @@ public class JNameEdList extends UIList implements CellEditorListener {
}
Rectangle rect = this.getCellBounds(index, index);
// alex:所有的JNameEdList都有Icon,空出前面20 * 20的位置就是放的Icon
- rect.setRect(createRect(rect, ICON_WIDTH));
+ rect.setRect(createRect(rect, getIconWidth()));
editorComp.setBounds(rect);
add(editorComp);
@@ -247,6 +246,10 @@ public class JNameEdList extends UIList implements CellEditorListener {
return true;
}
+ public int getIconWidth() {
+ return ICON_WIDTH;
+ }
+
public Rectangle createRect(Rectangle rect, int iconWidth) {
return new Rectangle(rect.x + iconWidth, rect.y, rect.width - iconWidth, rect.height);
}
@@ -301,9 +304,14 @@ public class JNameEdList extends UIList implements CellEditorListener {
String name = StringUtils.isBlank(value.toString()) ? oldName : value.toString();
setNameAt(name, editingIndex);
removeComp();
+ doAfterStopEditing();
}
}
+ protected void doAfterStopEditing() {
+ // default: do nothing
+ }
+
public String[] getAllNames() {
int length = this.getModel().getSize();
String[] names = new String[length];
@@ -335,53 +343,4 @@ public class JNameEdList extends UIList implements CellEditorListener {
editorComp = null;
repaint(cellRect);
}
-
- /**
- * 主函数
- *
- * @param args 参数
- */
- public static void main(String... args) {
- JFrame f = new JFrame();
- JPanel c = (JPanel) f.getContentPane();
- c.setLayout(new BorderLayout());
- ListModelElement[] data = new ListModelElement[TEST_LIST_LENTH];
- for (int i = 0; i < TEST_LIST_LENTH; i++) {
- data[i] = new ListModelElement(new NameObject(i + 1 + "", i));
- }
- final JNameEdList list = new JNameEdList(data);
- list.setEditable(true);
- list.addMouseListener(new MouseAdapter() {
- public void mouseReleased(MouseEvent evt) {
- list.stopEditing();
- if (evt.getClickCount() >= 2
- && SwingUtilities.isLeftMouseButton(evt)) {
- list.editItemAt(list.getSelectedIndex());
- }
- }
- })
- ;
-
- list.setCellEditor(new DefaultListCellEditor(new UITextField()));
- list.setCellRenderer(new NameableListCellRenderer());
- c.add(list, BorderLayout.CENTER);
- f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
- f.setSize(400, 600);
- f.setVisible(true);
- }
-
- private static class NameableListCellRenderer extends DefaultListCellRenderer {
- @Override
- public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
- boolean cellHasFocus) {
- super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
-
- if (value instanceof Nameable) {
- Nameable wrappee = (Nameable) value;
- this.setText(wrappee.getName());
- }
- return this;
- }
- }
-
}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/UINameEdList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/UINameEdList.java
index c9e3f1d687..131adbed7a 100644
--- a/designer-base/src/main/java/com/fr/design/gui/ilist/UINameEdList.java
+++ b/designer-base/src/main/java/com/fr/design/gui/ilist/UINameEdList.java
@@ -1,163 +1,21 @@
package com.fr.design.gui.ilist;
-import com.fr.base.Utils;
-import com.fr.design.gui.itextfield.UITextField;
-
import com.fr.general.NameObject;
import com.fr.stable.Nameable;
-import com.fr.stable.StringUtils;
-import com.fr.stable.core.PropertyChangeAdapter;
-import javax.swing.*;
-import javax.swing.event.CellEditorListener;
-import javax.swing.event.ChangeEvent;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.ArrayList;
-import java.util.Vector;
+import javax.swing.ListModel;
+import java.awt.Point;
/**
* Created by plough on 2017/7/23.
*/
-public class UINameEdList extends UIList implements CellEditorListener {
- private static final int TEST_LIST_LENTH = 20;
+public class UINameEdList extends JNameEdList {
private static final int BUTTON_WIDTH = 25;
- private boolean editable = true;
-
- // kunsnat: 是否强制ListName是数字 (int型)
- private boolean isNameShouldNumber = false;
- transient protected ListCellEditor cellEditor;
- transient protected Component editorComp;
- transient protected int editingIndex;
- private PropertyChangeAdapter editingListner;
- private java.util.List ll = new ArrayList();
-
- public UINameEdList(ListModel dataModel) {
+ protected UINameEdList(ListModel dataModel) {
super(dataModel);
}
- public UINameEdList(final Object[] listData) {
- super(listData);
- }
-
- public UINameEdList(final Vector> listData) {
- super(listData);
- }
-
- public UINameEdList() {
- super();
- }
-
- /*
- * Sets是否可编辑
- */
- public void setEditable(boolean editable) {
- this.editable = editable;
- }
-
- /**
- * 是否可编辑
- *
- * @return 是则返回true
- */
- public boolean isEditable() {
- return this.editable;
- }
-
- public void setNameShouldNumber(boolean isNameShouldNumber) {
- this.isNameShouldNumber = isNameShouldNumber;
- }
-
- /**
- * 是否强制ListName是数字 (int型)
- *
- * @return 是则返回true
- */
- public boolean isNameShouldNumber() {
- return isNameShouldNumber;
- }
-
- /**
- * 添加名字改变时的listener
- *
- * @param l 监听器
- */
- public void addModNameActionListener(ModNameActionListener l) {
- ll.add(l);
- }
-
- /**
- * 编辑时的监听器
- *
- * @param l 监听器
- */
- public void addEditingListner(PropertyChangeAdapter l) {
- this.editingListner = l;
- }
-
- /**
- * 移除某名字改变时的listener
- *
- * @param l 监听器
- */
- public void removeModNameActionListener(ModNameActionListener l) {
- ll.remove(l);
- }
-
- public ListCellEditor getCellEditor() {
- if (cellEditor == null) {
- UITextField editField = new UITextField();
- if (editingListner != null) {
- editField.addFocusListener(new FocusListener() {
-
- @Override
- public void focusLost(FocusEvent e) {
- editingListner.propertyChange();
-
- }
-
- @Override
- public void focusGained(FocusEvent e) {
- // TODO Auto-generated method stub
-
- }
- });
- }
- cellEditor = new DefaultListCellEditor(editField) {
- public boolean stopCellEditing() {
- boolean isTrue = super.stopCellEditing();
- stopEditing();
-
- return isTrue;
- }
- };
- cellEditor.addCellEditorListener(this);
- }
-
- return cellEditor;
- }
-
- protected void doAfterLostFocus() {
-
- }
-
- public void setCellEditor(ListCellEditor editor) {
- this.cellEditor = editor;
- }
-
- /*
- * 取得index节点的名字
- */
- public String getNameAt(int index) {
- Nameable nameable = ((ListModelElement) getModel().getElementAt(index)).wrapper;
- if (nameable != null) {
- return nameable.getName();
- }
-
- return null;
- }
-
public Object getType(int index) {
Nameable nameable = ((ListModelElement) getModel().getElementAt(index)).wrapper;
if (nameable != null && nameable instanceof NameObject) {
@@ -166,177 +24,8 @@ public class UINameEdList extends UIList implements CellEditorListener {
return null;
}
- /*
- * 设置index节点的名字
- */
- // b:edit改变name的时候怎么办?
- public void setNameAt(String name, int index) {
- Nameable nameable = ((ListModelElement) getModel().getElementAt(index)).wrapper;
- if (nameable != null) {
- String oldName = nameable.getName();
-
- if (isNameShouldNumber()) {
- // kunsnat: 限制只能是数字(int型)
- Number number = Utils.string2Number(name);
- if (number == null) {
- nameable.setName(oldName);
- } else {
- int newName = number.intValue();
- nameable.setName(String.valueOf(newName));
- }
- } else {
- nameable.setName(name);
- }
-
- for (int i = 0, len = ll.size(); i < len; i++) {
- ll.get(i).nameModed(index, oldName, name);
- }
- }
- }
-
- /*
- * 编辑第index个item
- */
- private String oldName;
-
- /**
- * 编辑第index项
- *
- * @param index 序号
- * @return 成功返回true
- */
- public boolean editItemAt(int index) {
- // 如果不可编辑,返回
- if (!this.editable) {
- return false;
- }
-
- if (cellEditor != null && !cellEditor.stopCellEditing()) {
- return false;
- }
- if (index < 0 || index >= this.getModel().getSize()) {
- return false;
- }
-
- ListCellEditor editor = getCellEditor();
- Object value = editor.getCellEditorValue();
- if (!StringUtils.isBlank(value.toString())) {
- oldName = value.toString();
- }
- editorComp = prepareEditor(editor, index);
- if (editorComp == null) {
- return false;
- }
- Rectangle rect = this.getCellBounds(index, index);
- // alex:所有的UINameEdList都有Icon,空出前面20 * 20的位置就是放的Icon
- rect.setRect(createRect(rect, BUTTON_WIDTH));
-
- editorComp.setBounds(rect);
- add(editorComp);
- editorComp.validate();
- editorComp.requestFocus();
- if (editorComp instanceof UITextField) {
- ((UITextField) editorComp).selectAll();
- }
-
- setEditingIndex(index);
-
- return true;
- }
-
- public Rectangle createRect(Rectangle rect, int iconWidth) {
- return new Rectangle(rect.x + iconWidth, rect.y, rect.width - iconWidth, rect.height);
- }
-
- public String getEditingName() {
- return (String) getCellEditor().getCellEditorValue();
- }
-
- /*
- * 根据ListCellEditor取得编辑器的Component
- */
- private Component prepareEditor(ListCellEditor cellEditor, int index) {
- String name = getNameAt(index);
- boolean isSelected = this.isSelectedIndex(index);
- Component comp = cellEditor.getListCellEditorComponent(this, name, isSelected, index);
-
- return comp;
- }
-
- /*
- * 记录正在编辑的index
- */
- private void setEditingIndex(int idx) {
- editingIndex = idx;
- }
-
- /**
- * 编辑取消
- *
- * @param e 事件
- */
- public void editingCanceled(ChangeEvent e) {
- removeComp();
- }
-
- /**
- * 编辑结束
- *
- * @param e 事件
- */
- public void editingStopped(ChangeEvent e) {
- doAfterLostFocus();
- stopEditing();
- }
-
- /**
- * 停止编辑事件
- */
- public void stopEditing() {
- ListCellEditor editor = getCellEditor();
- if (editor != null && editorComp != null) {
- Object value = editor.getCellEditorValue();
- String name = StringUtils.isBlank(value.toString()) ? oldName : value.toString();
- setNameAt(name, editingIndex);
- removeComp();
- doAfterStopEditing();
- }
- }
-
- protected void doAfterStopEditing() {
- // default: do nothing
- }
-
- public String[] getAllNames() {
- int length = this.getModel().getSize();
- String[] names = new String[length];
- for (int i = 0; i < length; i++) {
- names[i] = getNameAt(i);
- }
- return names;
- }
-
- public Object[] getAllTypes() {
- int length = this.getModel().getSize();
- Object[] types = new Object[length];
- for (int i = 0; i < length; i++) {
- types[i] = getType(i);
- }
- return types;
- }
-
-
- /*
- * 移除编辑器的Component
- */
- private void removeComp() {
- if (editorComp != null) {
- remove(editorComp);
- }
- Rectangle cellRect = this.getCellBounds(editingIndex, editingIndex);
- setEditingIndex(-1);
- editorComp = null;
- repaint(cellRect);
+ public int getIconWidth() {
+ return BUTTON_WIDTH;
}
@Override
@@ -349,67 +38,4 @@ public class UINameEdList extends UIList implements CellEditorListener {
return index;
}
}
-
- /**
- * 主函数
- *
- * @param args 参数
- */
- public static void main(String... args) {
- JFrame f = new JFrame();
- JPanel c = (JPanel) f.getContentPane();
- c.setLayout(new BorderLayout());
- ListModelElement[] data = new ListModelElement[TEST_LIST_LENTH];
- for (int i = 0; i < TEST_LIST_LENTH; i++) {
- data[i] = new ListModelElement(new NameObject(i + 1 + "", i));
- }
- final UINameEdList list = new UINameEdList(data);
- list.setEditable(true);
- list.addMouseListener(new MouseAdapter() {
- public void mouseReleased(MouseEvent evt) {
- list.stopEditing();
- if (evt.getClickCount() >= 2
- && SwingUtilities.isLeftMouseButton(evt)) {
- list.editItemAt(list.getSelectedIndex());
- }
- }
-
- @Override
- public void mouseClicked(MouseEvent e) {
- JList list = (JList) e.getSource();
- if (list.locationToIndex(e.getPoint()) == -1 && !e.isShiftDown()
- && !isMenuShortcutKeyDown(e)) {
- list.clearSelection();
- }
- }
-
- private boolean isMenuShortcutKeyDown(InputEvent event) {
- return (event.getModifiers() & Toolkit.getDefaultToolkit()
- .getMenuShortcutKeyMask()) != 0;
- }
- })
- ;
-
- list.setCellEditor(new DefaultListCellEditor(new UITextField()));
- list.setCellRenderer(new NameableListCellRenderer());
- c.add(list, BorderLayout.CENTER);
- f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
- f.setSize(400, 600);
- f.setVisible(true);
- }
-
- private static class NameableListCellRenderer extends DefaultListCellRenderer {
- @Override
- public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
- boolean cellHasFocus) {
- super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
-
- if (value instanceof Nameable) {
- Nameable wrappee = (Nameable) value;
- this.setText(wrappee.getName());
- }
- return this;
- }
- }
-
}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/gui/imenutable/UIMenuTable.java b/designer-base/src/main/java/com/fr/design/gui/imenutable/UIMenuTable.java
index 4bcba97961..d950e91ed7 100644
--- a/designer-base/src/main/java/com/fr/design/gui/imenutable/UIMenuTable.java
+++ b/designer-base/src/main/java/com/fr/design/gui/imenutable/UIMenuTable.java
@@ -45,13 +45,13 @@ public class UIMenuTable extends JTable {
public void editingEvent(int rowIndex, int mouseY) {
selectedRowIndex = rowIndex;
repaint();
-
+
final UIMenuNameableCreator nameObject = UIMenuTable.this.getLine(rowIndex);
-
+
final BasicBeanPane