Browse Source

REPORT-6700 国际化

master
yaoh.wu 7 years ago
parent
commit
773de9c19b
  1. 18
      designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java
  2. 5
      designer-base/src/com/fr/design/remote/RemoteMember.java
  3. 11
      designer-base/src/com/fr/design/remote/Utils.java
  4. 3
      designer-base/src/com/fr/design/remote/action/RemoteDesignAuthorityManagerAction.java
  5. 3
      designer-base/src/com/fr/design/remote/ui/AuthorityEditorPane.java
  6. 2
      designer-base/src/com/fr/design/remote/ui/AuthorityListControlPane.java
  7. 2
      designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java
  8. 32
      designer-base/src/com/fr/design/remote/ui/UserManagerPane.java

18
designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java

@ -48,7 +48,13 @@ public class EnvFileTree extends RefreshableJTree {
this.setFileNodeFilter(filter); this.setFileNodeFilter(filter);
this.setSubPathes(subPathes); 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) { private void setTreeRootPath(String path) {
@ -63,16 +69,6 @@ public class EnvFileTree extends RefreshableJTree {
this.filter = filter; this.filter = filter;
} }
protected void initi() {
this.putClientProperty("JTree.lineStyle", "Angled");
this.setCellRenderer(fileTreeCellRenderer);
this.setRootVisible(false);
this.setShowsRootHandles(true);
this.setEditable(false);
}
// CellRenderer // CellRenderer
private DefaultTreeCellRenderer fileTreeCellRenderer = new DefaultTreeCellRenderer() { private DefaultTreeCellRenderer fileTreeCellRenderer = new DefaultTreeCellRenderer() {

5
designer-base/src/com/fr/design/remote/RemoteMember.java

@ -1,8 +1,11 @@
package com.fr.design.remote; package com.fr.design.remote;
import com.fr.general.Inter;
public class RemoteMember { 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; private String username;

11
designer-base/src/com/fr/design/remote/Utils.java

@ -19,10 +19,17 @@ public class Utils {
List<UserAdditionBean> userBeans = new ArrayList<>(); List<UserAdditionBean> userBeans = new ArrayList<>();
try { try {
Map<String, Object> result = UserService.getInstance().getAllUsers(FRContext.getCurrentEnv().getUser(), 1, 10, keyword, "", true); Map<String, Object> result =
UserService.getInstance().getAllUsers(
FRContext.getCurrentEnv().getUser(),
1,
10,
keyword,
"",
true);
userBeans = (List<UserAdditionBean>) result.get("items"); userBeans = (List<UserAdditionBean>) result.get("items");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); FRContext.getLogger().error(e.getMessage());
} }
List<RemoteMember> res = new ArrayList<>(); List<RemoteMember> res = new ArrayList<>();

3
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.mainframe.DesignerContext;
import com.fr.design.remote.ui.AuthorityManagerPane; import com.fr.design.remote.ui.AuthorityManagerPane;
import com.fr.env.RemoteEnv; import com.fr.env.RemoteEnv;
import com.fr.general.Inter;
import com.fr.report.DesignAuthority; import com.fr.report.DesignAuthority;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -19,7 +20,7 @@ public class RemoteDesignAuthorityManagerAction extends UpdateAction {
public RemoteDesignAuthorityManagerAction() { 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")); this.setSmallIcon(BaseUtils.readIcon("com/fr/design/remote/images/icon_Remote_Design_Permission_Manager_normal@1x.png"));
} }

3
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.design.remote.ui.tree.FileAuthorityTree;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.file.filetree.IOFileNodeFilter; import com.fr.file.filetree.IOFileNodeFilter;
import com.fr.general.Inter;
import com.fr.report.DesignAuthority; import com.fr.report.DesignAuthority;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
@ -40,7 +41,7 @@ public class AuthorityEditorPane extends BasicBeanPane<DesignAuthority> {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return "编辑文件权限"; return Inter.getLocText("FR-Designer_Remote_Design_Configure_Authority");
} }
@Override @Override

2
designer-base/src/com/fr/design/remote/ui/AuthorityListControlPane.java

@ -77,7 +77,7 @@ public class AuthorityListControlPane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.authorityCreators = new RemoteDesignAuthorityCreator[]{ this.authorityCreators = new RemoteDesignAuthorityCreator[]{
new RemoteDesignAuthorityCreator( new RemoteDesignAuthorityCreator(
"远程设计用户", Inter.getLocText("FR-Designer_Remote_Design_User"),
BaseUtils.readIcon("com/fr/design/remote/images/icon_Member_normal@1x.png"), BaseUtils.readIcon("com/fr/design/remote/images/icon_Member_normal@1x.png"),
DesignAuthority.class, DesignAuthority.class,
AuthorityEditorPane.class) AuthorityEditorPane.class)

2
designer-base/src/com/fr/design/remote/ui/AuthorityManagerPane.java

@ -24,7 +24,7 @@ public class AuthorityManagerPane extends BasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("远程设计权限管理"); return Inter.getLocText("FR-Designer_Remote_Design_Authority_Manager");
} }
public void populate(DesignAuthority[] authorities) { public void populate(DesignAuthority[] authorities) {

32
designer-base/src/com/fr/design/remote/ui/UserManagerPane.java

@ -82,7 +82,7 @@ public class UserManagerPane extends BasicPane {
@Override @Override
public void keyReleased(KeyEvent e) { public void keyReleased(KeyEvent e) {
// 判断按下的键是否是回车键 // 判断按下的键是否是回车键
// todo 对话回车键绑定的是对话框的确定按钮 // todo 对话回车键绑定的是对话框的确定按钮
if (e.getKeyCode() == KeyEvent.VK_ENTER) { if (e.getKeyCode() == KeyEvent.VK_ENTER) {
searchAddingMembers(keyField.getText()); searchAddingMembers(keyField.getText());
} }
@ -115,7 +115,11 @@ public class UserManagerPane extends BasicPane {
resetAddedMembers(); resetAddedMembers();
sync2AddedMembersFormAdded(); 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 @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return "添加设计成员"; return Inter.getLocText("FR-Designer_Remote_Design_Add_Member");
} }
private JPanel createLeftPanel() { private JPanel createLeftPanel() {
@ -149,7 +153,10 @@ public class UserManagerPane extends BasicPane {
content.setBorder( content.setBorder(
BorderFactory.createCompoundBorder( BorderFactory.createCompoundBorder(
new EmptyBorder(6, 0, 0, 0), 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.setPreferredSize(new Dimension(200, 20));
keyField.requestFocus(); keyField.requestFocus();
keyField.addKeyListener(keyFieldKeyListener); keyField.addKeyListener(keyFieldKeyListener);
keyButton.setText("搜索"); keyButton.setText(Inter.getLocText("FR-Designer_Remote_Design_Search"));
keyButton.addActionListener(keyButtonActionListener); keyButton.addActionListener(keyButtonActionListener);
searchPanel.add(keyField); searchPanel.add(keyField);
searchPanel.add(keyButton); searchPanel.add(keyButton);
@ -186,11 +193,17 @@ public class UserManagerPane extends BasicPane {
content.setBorder( content.setBorder(
BorderFactory.createCompoundBorder( BorderFactory.createCompoundBorder(
new EmptyBorder(6, 0, 0, 0), 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<>(); addedListModel = new DefaultListModel<>();
addedList = new AddedMemberList(addedListModel); addedList = new AddedMemberList(addedListModel);
@ -225,7 +238,10 @@ public class UserManagerPane extends BasicPane {
} }
addedList.revalidate(); addedList.revalidate();
addedList.repaint(); 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() { private void resetMembers() {

Loading…
Cancel
Save