xiaoxia 8 years ago
parent
commit
bdbf6a8d10
  1. 9
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  2. 5
      designer/src/com/fr/design/mainframe/alphafine/searchManager/ActionSearchManager.java
  3. 13
      designer/src/com/fr/design/mainframe/alphafine/searchManager/AlphaSearchManager.java
  4. 3
      designer/src/com/fr/design/mainframe/alphafine/searchManager/ConcludeSearchManager.java
  5. 5
      designer/src/com/fr/design/mainframe/alphafine/searchManager/DocumentSearchManager.java
  6. 5
      designer/src/com/fr/design/mainframe/alphafine/searchManager/FileSearchManager.java
  7. 5
      designer/src/com/fr/design/mainframe/alphafine/searchManager/LatestSearchManager.java
  8. 5
      designer/src/com/fr/design/mainframe/alphafine/searchManager/PluginSearchManager.java
  9. 26
      designer_base/src/com/fr/design/actions/help/AlphaFine/AlphafineConfigPane.java
  10. 13
      designer_base/src/com/fr/design/locale/designer.properties
  11. 4
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  12. 13
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties

9
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -25,6 +25,7 @@ import com.fr.form.main.Form;
import com.fr.form.main.FormIO; import com.fr.form.main.FormIO;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.io.TemplateWorkBookIO; import com.fr.io.TemplateWorkBookIO;
import com.fr.io.exporter.ImageExporter; import com.fr.io.exporter.ImageExporter;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
@ -367,12 +368,12 @@ public class AlphaFineDialog extends UIDialog {
} }
private void HandleMoreOrLessResult(int index, MoreModel selectedValue) { private void HandleMoreOrLessResult(int index, MoreModel selectedValue) {
if (selectedValue.getContent().equals("显示全部")) { if (selectedValue.getContent().equals(Inter.getLocText("FR-Designer_AlphaFine_ShowAll"))) {
selectedValue.setContent("收起"); selectedValue.setContent(Inter.getLocText("FR-Designer_AlphaFine_ShowLess"));
rebuildList(index, selectedValue); rebuildList(index, selectedValue);
} else { } else {
selectedValue.setContent("显示全部"); selectedValue.setContent(Inter.getLocText("FR-Designer_AlphaFine_ShowAll"));
rebuildList(index, selectedValue); rebuildList(index, selectedValue);
} }
} }
@ -541,7 +542,7 @@ public class AlphaFineDialog extends UIDialog {
private void rebuildList(int index, MoreModel selectedValue) { private void rebuildList(int index, MoreModel selectedValue) {
SearchResult moreResult = getMoreResult(selectedValue); SearchResult moreResult = getMoreResult(selectedValue);
if((selectedValue).getContent().equals("收起")) { if((selectedValue).getContent().equals(Inter.getLocText("FR-Designer_AlphaFine_ShowLess"))) {
for (int i = 0; i < moreResult.size(); i++) { for (int i = 0; i < moreResult.size(); i++) {
this.searchListModel.insertElementAt(moreResult.get(i), index + 4 + i); this.searchListModel.insertElementAt(moreResult.get(i), index + 4 + i);
} }

5
designer/src/com/fr/design/mainframe/alphafine/searchManager/ActionSearchManager.java

@ -7,6 +7,7 @@ import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel;
import com.fr.design.mainframe.alphafine.cell.cellModel.ActionModel; import com.fr.design.mainframe.alphafine.cell.cellModel.ActionModel;
import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.design.mainframe.toolbar.UpdateActionManager; import com.fr.design.mainframe.toolbar.UpdateActionManager;
import com.fr.general.Inter;
import java.util.List; import java.util.List;
@ -47,9 +48,9 @@ public class ActionSearchManager implements AlphaFineSearchProcessor {
} }
if (filterModelList.size() > 0) { if (filterModelList.size() > 0) {
if (filterModelList.size() > 5) { if (filterModelList.size() > 5) {
lessModelList.add(0, new MoreModel("设置", "显示全部",true, CellType.ACTION)); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"),true, CellType.ACTION));
} else { } else {
lessModelList.add(0, new MoreModel("设置", CellType.ACTION)); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set"), CellType.ACTION));
} }
} }
} }

13
designer/src/com/fr/design/mainframe/alphafine/searchManager/AlphaSearchManager.java

@ -3,6 +3,7 @@ package com.fr.design.mainframe.alphafine.searchManager;
import com.fr.design.mainframe.alphafine.AlphaFineHelper; import com.fr.design.mainframe.alphafine.AlphaFineHelper;
import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel; import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel;
import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.general.Inter;
import java.io.*; import java.io.*;
@ -54,12 +55,12 @@ public class AlphaSearchManager implements AlphaFineSearchProcessor {
public SearchResult showDefaultSearchResult() { public SearchResult showDefaultSearchResult() {
SearchResult searchResult = new SearchResult(); SearchResult searchResult = new SearchResult();
searchResult.add(new MoreModel("本地常用")); searchResult.add(new MoreModel(Inter.getLocText("FR-Designer_AlphaFine_Latest")));
searchResult.add(new MoreModel("猜您喜欢")); searchResult.add(new MoreModel(Inter.getLocText("FR-Designer_AlphaFine_Conclude")));
searchResult.add(new MoreModel("设置")); searchResult.add(new MoreModel(Inter.getLocText("FR-Designer_Set")));
searchResult.add(new MoreModel("模板")); searchResult.add(new MoreModel(Inter.getLocText("FR-Designer_Templates")));
searchResult.add(new MoreModel("帮助文档")); searchResult.add(new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP")));
searchResult.add(new MoreModel("应用中心")); searchResult.add(new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon")));
return searchResult; return searchResult;
} }

3
designer/src/com/fr/design/mainframe/alphafine/searchManager/ConcludeSearchManager.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.alphafine.searchManager;
import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel; import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel;
import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.general.Inter;
/** /**
* Created by XiaXiang on 2017/3/31. * Created by XiaXiang on 2017/3/31.
@ -20,7 +21,7 @@ public class ConcludeSearchManager implements AlphaFineSearchProcessor {
public synchronized SearchResult showLessSearchResult(String searchText) { public synchronized SearchResult showLessSearchResult(String searchText) {
//todo: 猜您喜欢逻辑需要重新设计 //todo: 猜您喜欢逻辑需要重新设计
this.modelList = new SearchResult(); this.modelList = new SearchResult();
modelList.add(new MoreModel("猜您需要", false)); modelList.add(new MoreModel(Inter.getLocText("FR-Designer_AlphaFine_Conclude"), false));
return modelList; return modelList;
} }

5
designer/src/com/fr/design/mainframe/alphafine/searchManager/DocumentSearchManager.java

@ -7,6 +7,7 @@ import com.fr.design.mainframe.alphafine.cell.cellModel.DocumentModel;
import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel; import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel;
import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
import com.fr.json.JSONException; import com.fr.json.JSONException;
@ -49,9 +50,9 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor {
} }
if (jsonArray.length() > 0) { if (jsonArray.length() > 0) {
if (jsonArray.length() > 5) { if (jsonArray.length() > 5) {
lessModelList.add(new MoreModel("帮助文档", "显示全部",true, CellType.DOCUMENT)); lessModelList.add(new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"),true, CellType.DOCUMENT));
} else { } else {
lessModelList.add(new MoreModel("帮助文档", CellType.DOCUMENT)); lessModelList.add(new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"), CellType.DOCUMENT));
} }
} }

5
designer/src/com/fr/design/mainframe/alphafine/searchManager/FileSearchManager.java

@ -10,6 +10,7 @@ import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel;
import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
@ -93,9 +94,9 @@ public class FileSearchManager implements AlphaFineSearchProcessor {
} }
if (filterModelList.size() > 0) { if (filterModelList.size() > 0) {
if (filterModelList.size() > AlphaFineConstants.SHOW_SIZE) { if (filterModelList.size() > AlphaFineConstants.SHOW_SIZE) {
lessModelList.add(0,new MoreModel("模板", "显示全部",true, CellType.FILE)); lessModelList.add(0,new MoreModel(Inter.getLocText("FR-Designer_Templates"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"),true, CellType.FILE));
} else { } else {
lessModelList.add(0,new MoreModel("模板", CellType.FILE)); lessModelList.add(0,new MoreModel(Inter.getLocText("FR-Designer_Templates"), CellType.FILE));
} }
} }

5
designer/src/com/fr/design/mainframe/alphafine/searchManager/LatestSearchManager.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.alphafine.searchManager;
import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel; import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel;
import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.general.Inter;
/** /**
* Created by XiaXiang on 2017/3/31. * Created by XiaXiang on 2017/3/31.
@ -20,8 +21,8 @@ public class LatestSearchManager implements AlphaFineSearchProcessor {
@Override @Override
public synchronized SearchResult showLessSearchResult(String searchText) { public synchronized SearchResult showLessSearchResult(String searchText) {
this.modelList = new SearchResult(); this.modelList = new SearchResult();
modelList.add(new MoreModel("本地常用", false)); modelList.add(new MoreModel(Inter.getLocText("FR-Designer_AlphaFine_Latest"), false));
//todo: 常用逻辑需要重新设计 //todo: 本地常用逻辑需要重新设计
// if (getLatestModelList() != null && getLatestModelList().size() > 0) { // if (getLatestModelList() != null && getLatestModelList().size() > 0) {
// modelList.addAll(getLatestModelList()); // modelList.addAll(getLatestModelList());
// } // }

5
designer/src/com/fr/design/mainframe/alphafine/searchManager/PluginSearchManager.java

@ -8,6 +8,7 @@ import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel;
import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
import com.fr.json.JSONException; import com.fr.json.JSONException;
@ -52,9 +53,9 @@ public class PluginSearchManager implements AlphaFineSearchProcessor {
} }
if (jsonArray.length() > 0) { if (jsonArray.length() > 0) {
if (jsonArray.length() > AlphaFineConstants.SHOW_SIZE) { if (jsonArray.length() > AlphaFineConstants.SHOW_SIZE) {
lessModelList.add(new MoreModel("应用中心", "显示全部",true, CellType.PLUGIN)); lessModelList.add(new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"),true, CellType.PLUGIN));
} else { } else {
lessModelList.add(new MoreModel("应用中心", CellType.PLUGIN)); lessModelList.add(new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon"), CellType.PLUGIN));
} }
} }

26
designer_base/src/com/fr/design/actions/help/AlphaFine/AlphafineConfigPane.java

@ -78,20 +78,20 @@ public class AlphafineConfigPane extends BasicPane {
double[] rowSize = {p, p}; double[] rowSize = {p, p};
double[] columnSize = {d, d, d}; double[] columnSize = {d, d, d};
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane("搜索范围"); JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_SearchRange"));
isContainConcludeCheckbox = new UICheckBox("猜您需要"); isContainConcludeCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_AlphaFine_Conclude"));
isContainActionCheckbox = new UICheckBox("设置"); isContainActionCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_Set"));
isContainPluginCheckbox = new UICheckBox("应用中心"); isContainPluginCheckbox = new UICheckBox(Inter.getLocText("FR-Designer-Plugin_Addon"));
isContainDocumentCheckbox = new UICheckBox("帮助文档"); isContainDocumentCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_COMMUNITY_HELP"));
isContainTemplateCheckbox = new UICheckBox("模板"); isContainTemplateCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_Templates"));
isContainFileContentCheckbox = new UICheckBox("模板内容"); isContainFileContentCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_Templates_Content"));
JPanel searchConfigPane = TableLayoutHelper.createTableLayoutPane(initsearchRangeComponents(), rowSize, columnSize); JPanel searchConfigPane = TableLayoutHelper.createTableLayoutPane(initsearchRangeComponents(), rowSize, columnSize);
northPane.add(searchConfigPane); northPane.add(searchConfigPane);
contentPane.add(northPane); contentPane.add(northPane);
} }
private void createShortcutsPane(JPanel contentPane) { private void createShortcutsPane(JPanel contentPane) {
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane("快捷键配置"); JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_Shortcut_Config"));
shortcutsField = new UITextField(); shortcutsField = new UITextField();
shortcutsField.setPreferredSize(new Dimension(100, 20)); shortcutsField.setPreferredSize(new Dimension(100, 20));
shortcutsField.addKeyListener(new KeyAdapter() { shortcutsField.addKeyListener(new KeyAdapter() {
@ -107,14 +107,14 @@ public class AlphafineConfigPane extends BasicPane {
shortcutsField.setText(getDisplayShortCut(str)); shortcutsField.setText(getDisplayShortCut(str));
} }
}); });
northPane.add(new UILabel(Inter.getLocText("Open") + ":")); northPane.add(new UILabel(Inter.getLocText("FR-Designer_Open") + ":"));
northPane.add(shortcutsField); northPane.add(shortcutsField);
contentPane.add(northPane); contentPane.add(northPane);
} }
private void createOnlinePane(JPanel contentPane) { private void createOnlinePane(JPanel contentPane) {
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane("联网"); JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_EnableInternet"));
isSearchOnlineCheckbox = new UICheckBox("联网搜索"); isSearchOnlineCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_AlphaFine_EnableInternetSearch"));
isSearchOnlineCheckbox.addActionListener(new ActionListener() { isSearchOnlineCheckbox.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -137,8 +137,8 @@ public class AlphafineConfigPane extends BasicPane {
} }
private void createOpenPane(JPanel contentPane) { private void createOpenPane(JPanel contentPane) {
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane("开启"); JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_AlphaFine_Enable"));
isEnabledCheckbox = new UICheckBox("开启AlphaFine功能"); isEnabledCheckbox = new UICheckBox(Inter.getLocText("FR-Designer_AlphaFine_EnableAlphaFine"));
northPane.add(isEnabledCheckbox); northPane.add(isEnabledCheckbox);
contentPane.add(northPane); contentPane.add(northPane);
} }

13
designer_base/src/com/fr/design/locale/designer.properties

@ -539,3 +539,16 @@ FR-Designer_PageSetup_Page=Page
FR-Designer_Custom_Job_Description=Description FR-Designer_Custom_Job_Description=Description
FR-Designer_Property=Property FR-Designer_Property=Property
FR-Designer_ClassName=Class Name FR-Designer_ClassName=Class Name
FR-Designer_AlphaFine_Enable=enable
FR-Designer_AlphaFine_EnableAlphaFine=FR-Designer_AlphaFine_EnableAlphaFine
FR-Designer_AlphaFine_EnableInternet=Designer_AlphaFine_EnableInternet
FR-Designer_AlphaFine_EnableInternetSearch=
FR-Designer_AlphaFine_Shortcut_Config=
FR-Designer_AlphaFine_SearchRange=
FR-Designer_AlphaFine_Conclude=
FR-Designer-Plugin_Addon=
FR-Designer_Templates=FR-Designer_Templates
FR-Designer_Templates_Content=
FR-Designer_AlphaFine_ShowAll=
FR-Designer_AlphaFine_Latest=
FR-Designer_AlphaFine_ShowLess=

4
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -539,3 +539,7 @@ FR-Designer_PageSetup_Page=Page
FR-Designer_Custom_Job_Description=Description FR-Designer_Custom_Job_Description=Description
FR-Designer_Property=Property FR-Designer_Property=Property
FR-Designer_ClassName=Class Name FR-Designer_ClassName=Class Name
FR-Designer_AlphaFine_Enable=enable
FR-Designer_AlphaFine_EnableAlphaFine=Enable AlphaFine
FR-Designer_AlphaFine_EnableInternet=EnableInternet
FR-Designer_Templates=Templates

13
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -543,4 +543,17 @@ FR-Designer_PageSetup_Page=\u9875\u9762
FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Custom_Job_Description=\u63CF\u8FF0
FR-Designer_Property=\u5C5E\u6027 FR-Designer_Property=\u5C5E\u6027
FR-Designer_ClassName=\u7C7B\u540D FR-Designer_ClassName=\u7C7B\u540D
FR-Designer_AlphaFine_Enable=\u5F00\u542F
FR-Designer_AlphaFine_EnableAlphaFine=\u5F00\u542FAlphaFine\u529F\u80FD
FR-Designer_AlphaFine_EnableInternet=\u8054\u7F51
FR-Designer_AlphaFine_EnableInternetSearch=\u8054\u7F51\u641C\u7D22
FR-Designer_AlphaFine_Shortcut_Config=\u5FEB\u6377\u952E\u914D\u7F6E
FR-Designer_AlphaFine_SearchRange=\u641C\u7D22\u8303\u56F4
FR-Designer-Plugin_Addon=\u5E94\u7528\u4E2D\u5FC3
FR-Designer_Templates=\u6A21\u677F
FR-Designer_Templates_Content=\u6A21\u677F\u5185\u5BB9
FR-Designer_AlphaFine_ShowAll=\u663E\u793A\u5168\u90E8
FR-Designer_AlphaFine_Conclude=\u731C\u60A8\u9700\u8981
FR-Designer_AlphaFine_Latest=\u6700\u8FD1\u5E38\u7528
FR-Designer_AlphaFine_ShowLess=\u6536\u8D77

Loading…
Cancel
Save