From 773de9c19b3d56d845544ec5d06b567ad2dd0045 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 23 May 2018 09:51:15 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-6700=20=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/itree/filetree/EnvFileTree.java | 18 ++++------- .../com/fr/design/remote/RemoteMember.java | 5 ++- .../src/com/fr/design/remote/Utils.java | 11 +++++-- .../RemoteDesignAuthorityManagerAction.java | 3 +- .../design/remote/ui/AuthorityEditorPane.java | 3 +- .../remote/ui/AuthorityListControlPane.java | 2 +- .../remote/ui/AuthorityManagerPane.java | 2 +- .../fr/design/remote/ui/UserManagerPane.java | 32 ++++++++++++++----- 8 files changed, 50 insertions(+), 26 deletions(-) diff --git a/designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java b/designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java index 460a05f82c..1f81296b0d 100644 --- a/designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java +++ b/designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java @@ -48,7 +48,13 @@ public class EnvFileTree extends RefreshableJTree { this.setFileNodeFilter(filter); this.setSubPathes(subPathes); - this.initi(); + this.putClientProperty("JTree.lineStyle", "Angled"); + + this.setCellRenderer(fileTreeCellRenderer); + + this.setRootVisible(false); + this.setShowsRootHandles(true); + this.setEditable(false); } private void setTreeRootPath(String path) { @@ -63,16 +69,6 @@ public class EnvFileTree extends RefreshableJTree { this.filter = filter; } - protected void initi() { - this.putClientProperty("JTree.lineStyle", "Angled"); - - this.setCellRenderer(fileTreeCellRenderer); - - this.setRootVisible(false); - this.setShowsRootHandles(true); - this.setEditable(false); - } - // CellRenderer private DefaultTreeCellRenderer fileTreeCellRenderer = new DefaultTreeCellRenderer() { diff --git a/designer-base/src/com/fr/design/remote/RemoteMember.java b/designer-base/src/com/fr/design/remote/RemoteMember.java index 4d8b6b97cd..dee672406f 100644 --- a/designer-base/src/com/fr/design/remote/RemoteMember.java +++ b/designer-base/src/com/fr/design/remote/RemoteMember.java @@ -1,8 +1,11 @@ package com.fr.design.remote; +import com.fr.general.Inter; + public class RemoteMember { - public static final RemoteMember DEFAULT_MEMBER = new RemoteMember("查询中..."); + public static final RemoteMember DEFAULT_MEMBER = + new RemoteMember(Inter.getLocText("FR-Designer_Remote_Design_Loading")); private String username; diff --git a/designer-base/src/com/fr/design/remote/Utils.java b/designer-base/src/com/fr/design/remote/Utils.java index daed94092b..d251099307 100644 --- a/designer-base/src/com/fr/design/remote/Utils.java +++ b/designer-base/src/com/fr/design/remote/Utils.java @@ -19,10 +19,17 @@ public class Utils { List userBeans = new ArrayList<>(); try { - Map result = UserService.getInstance().getAllUsers(FRContext.getCurrentEnv().getUser(), 1, 10, keyword, "", true); + Map result = + UserService.getInstance().getAllUsers( + FRContext.getCurrentEnv().getUser(), + 1, + 10, + keyword, + "", + true); userBeans = (List) result.get("items"); } catch (Exception e) { - e.printStackTrace(); + FRContext.getLogger().error(e.getMessage()); } List res = new ArrayList<>(); diff --git a/designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java b/designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java index 53174fccf1..39d5921d6a 100644 --- a/designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java +++ b/designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java @@ -8,6 +8,7 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.mainframe.DesignerContext; import com.fr.design.remote.ui.AuthorityManagerPane; import com.fr.env.RemoteEnv; +import com.fr.general.Inter; import com.fr.report.DesignAuthority; import java.awt.event.ActionEvent; @@ -19,7 +20,7 @@ public class RemoteDesignAuthorityManagerAction extends UpdateAction { public RemoteDesignAuthorityManagerAction() { - this.setName("远程设计权限管理"); + this.setName(Inter.getLocText("FR-Designer_Remote_Design_Authority_Manager")); this.setSmallIcon(BaseUtils.readIcon("com/fr/design/remote/images/icon_Remote_Design_Permission_Manager_normal@1x.png")); } diff --git a/designer-base/src/com/fr/design/remote/ui/AuthorityEditorPane.java b/designer-base/src/com/fr/design/remote/ui/AuthorityEditorPane.java index dd4b569e38..c4e49ea273 100644 --- a/designer-base/src/com/fr/design/remote/ui/AuthorityEditorPane.java +++ b/designer-base/src/com/fr/design/remote/ui/AuthorityEditorPane.java @@ -9,6 +9,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.remote.ui.tree.FileAuthorityTree; import com.fr.file.filetree.FileNode; import com.fr.file.filetree.IOFileNodeFilter; +import com.fr.general.Inter; import com.fr.report.DesignAuthority; import com.fr.stable.CoreConstants; @@ -40,7 +41,7 @@ public class AuthorityEditorPane extends BasicBeanPane { @Override protected String title4PopupWindow() { - return "编辑文件权限"; + return Inter.getLocText("FR-Designer_Remote_Design_Configure_Authority"); } @Override diff --git a/designer-base/src/com/fr/design/remote/ui/AuthorityListControlPane.java b/designer-base/src/com/fr/design/remote/ui/AuthorityListControlPane.java index 61ff35fded..60dfc2a3cc 100644 --- a/designer-base/src/com/fr/design/remote/ui/AuthorityListControlPane.java +++ b/designer-base/src/com/fr/design/remote/ui/AuthorityListControlPane.java @@ -77,7 +77,7 @@ public class AuthorityListControlPane extends BasicPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.authorityCreators = new RemoteDesignAuthorityCreator[]{ new RemoteDesignAuthorityCreator( - "远程设计用户", + Inter.getLocText("FR-Designer_Remote_Design_User"), BaseUtils.readIcon("com/fr/design/remote/images/icon_Member_normal@1x.png"), DesignAuthority.class, AuthorityEditorPane.class) diff --git a/designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java b/designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java index fa235ca254..6990b764e4 100644 --- a/designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java +++ b/designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java @@ -24,7 +24,7 @@ public class AuthorityManagerPane extends BasicPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("远程设计权限管理"); + return Inter.getLocText("FR-Designer_Remote_Design_Authority_Manager"); } public void populate(DesignAuthority[] authorities) { diff --git a/designer-base/src/com/fr/design/remote/ui/UserManagerPane.java b/designer-base/src/com/fr/design/remote/ui/UserManagerPane.java index 19473f7f18..226602d6f0 100644 --- a/designer-base/src/com/fr/design/remote/ui/UserManagerPane.java +++ b/designer-base/src/com/fr/design/remote/ui/UserManagerPane.java @@ -82,7 +82,7 @@ public class UserManagerPane extends BasicPane { @Override public void keyReleased(KeyEvent e) { // 判断按下的键是否是回车键 - // todo 对话款回车键绑定的是对话框的确定按钮 + // todo 对话框回车键绑定的是对话框的确定按钮 if (e.getKeyCode() == KeyEvent.VK_ENTER) { searchAddingMembers(keyField.getText()); } @@ -115,7 +115,11 @@ public class UserManagerPane extends BasicPane { resetAddedMembers(); sync2AddedMembersFormAdded(); // 不需要重复更新右侧列表显示 但是更新一下计数显示 - countLabel.setText(Inter.getLocText("已选择{R1}人", String.valueOf(addedMembers.size()))); + countLabel.setText( + Inter.getLocText("FR-Designer_Remote_Design_Selected_Member_Count", + String.valueOf(addedMembers.size()) + ) + ); } }; @@ -140,7 +144,7 @@ public class UserManagerPane extends BasicPane { @Override protected String title4PopupWindow() { - return "添加设计成员"; + return Inter.getLocText("FR-Designer_Remote_Design_Add_Member"); } private JPanel createLeftPanel() { @@ -149,7 +153,10 @@ public class UserManagerPane extends BasicPane { content.setBorder( BorderFactory.createCompoundBorder( new EmptyBorder(6, 0, 0, 0), - UITitledBorder.createBorderWithTitle(Inter.getLocText("决策系统成员"))) + UITitledBorder.createBorderWithTitle( + Inter.getLocText("FR-Designer_Remote_Design_Decision_Member") + ) + ) ); // 搜索 @@ -158,7 +165,7 @@ public class UserManagerPane extends BasicPane { keyField.setPreferredSize(new Dimension(200, 20)); keyField.requestFocus(); keyField.addKeyListener(keyFieldKeyListener); - keyButton.setText("搜索"); + keyButton.setText(Inter.getLocText("FR-Designer_Remote_Design_Search")); keyButton.addActionListener(keyButtonActionListener); searchPanel.add(keyField); searchPanel.add(keyButton); @@ -186,11 +193,17 @@ public class UserManagerPane extends BasicPane { content.setBorder( BorderFactory.createCompoundBorder( new EmptyBorder(6, 0, 0, 0), - UITitledBorder.createBorderWithTitle(Inter.getLocText("已选择的设计成员"))) + UITitledBorder.createBorderWithTitle( + Inter.getLocText("FR-Designer_Remote_Design_Selected_Member") + ) + ) ); // 计数 - countLabel.setText(Inter.getLocText("已选择{R1}人", String.valueOf(addedMembers.size()))); + countLabel.setText( + Inter.getLocText("FR-Designer_Remote_Design_Selected_Member_Count", + String.valueOf(addedMembers.size())) + ); addedListModel = new DefaultListModel<>(); addedList = new AddedMemberList(addedListModel); @@ -225,7 +238,10 @@ public class UserManagerPane extends BasicPane { } addedList.revalidate(); addedList.repaint(); - countLabel.setText(Inter.getLocText("已选择{R1}人", String.valueOf(addedMembers.size()))); + countLabel.setText( + Inter.getLocText("FR-Designer_Remote_Design_Selected_Member_Count", + String.valueOf(addedMembers.size()) + )); } private void resetMembers() {