neil 6 years ago
parent
commit
2c3c087249
  1. 6
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
  2. 12
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

6
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java

@ -2,11 +2,13 @@ package com.fr.design.mainframe.alphafine;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import java.awt.Color; import java.awt.Color;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Font; import java.awt.Font;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
* Created by XiaXiang on 2017/5/10. * Created by XiaXiang on 2017/5/10.
*/ */
@ -49,7 +51,7 @@ public class AlphaFineConstants {
public static final Dimension HOT_ICON_LABEL_SIZE = new Dimension(36, 36); public static final Dimension HOT_ICON_LABEL_SIZE = new Dimension(36, 36);
public static final Dimension HOT_ISSUES_JAPNEL_SIZE = new Dimension(213,182); public static final Dimension HOT_ISSUES_JAPNEL_SIZE = new Dimension(213, 182);
public static final Dimension CLOSE_BUTTON_SIZE = new Dimension(40, 40); public static final Dimension CLOSE_BUTTON_SIZE = new Dimension(40, 40);
@ -134,7 +136,7 @@ public class AlphaFineConstants {
public static final String FIRST_PAGE = "-1"; public static final String FIRST_PAGE = "-1";
public static final FileExtension[] FILE_EXTENSIONS= new FileExtension[]{FileExtension.CPT, FileExtension.FRM}; public static final FileExtension[] FILE_EXTENSIONS = new FileExtension[]{FileExtension.CPT, FileExtension.FRM};
public static final int RECOMMEND_MAX_ITEM_NUM = 3; public static final int RECOMMEND_MAX_ITEM_NUM = 3;

12
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -32,7 +32,7 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager
import com.fr.design.mainframe.alphafine.search.manager.impl.RecentSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.RecentSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.RecommendSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.RecommendSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.SegmentationManager; import com.fr.design.mainframe.alphafine.search.manager.impl.SegmentationManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManeger; import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManager;
import com.fr.design.mainframe.errorinfo.ErrorInfoUploader; import com.fr.design.mainframe.errorinfo.ErrorInfoUploader;
import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.design.mainframe.templateinfo.TemplateInfoCollector;
import com.fr.form.main.Form; import com.fr.form.main.Form;
@ -246,14 +246,14 @@ public class AlphaFineDialog extends UIDialog {
GridLayout gridLayout = new GridLayout(2, 3, 3, 3); GridLayout gridLayout = new GridLayout(2, 3, 3, 3);
JPanel panel = new JPanel(); JPanel panel = new JPanel();
panel.setLayout(gridLayout); panel.setLayout(gridLayout);
if(AlphaFineHelper.isNetworkOk()) { if (AlphaFineHelper.isNetworkOk()) {
if (hotData == null) { if (hotData == null) {
hotData = HotIssuesManager.getInstance().getHotIssues(); hotData = HotIssuesManager.getInstance().getHotIssues();
} }
for (int i = 0; i < hotData.length; i++) { for (int i = 0; i < hotData.length; i++) {
panel.add(new HotIssueJpanel(hotData[i], i + 1)); panel.add(new HotIssueJpanel(hotData[i], i + 1));
} }
}else { } else {
hotData = null; hotData = null;
for (int i = 0; i < AlphaFineConstants.HOT_ITEMS; i++) { for (int i = 0; i < AlphaFineConstants.HOT_ITEMS; i++) {
panel.add(new HotIssueJpanel(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Connection_Failed")}, i + 1)); panel.add(new HotIssueJpanel(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Connection_Failed")}, i + 1));
@ -573,7 +573,7 @@ public class AlphaFineDialog extends UIDialog {
} }
private void buildSimilarList(final String[] searchText) { private void buildSimilarList(final String[] searchText) {
addSearchResult(SimilarSearchManeger.getInstance().getLessSearchResult(searchText)); addSearchResult(SimilarSearchManager.getInstance().getLessSearchResult(searchText));
} }
private synchronized void addSearchResult(SearchResult searchResult) { private synchronized void addSearchResult(SearchResult searchResult) {
@ -948,7 +948,7 @@ public class AlphaFineDialog extends UIDialog {
Thread sendThread = new Thread(new Runnable() { Thread sendThread = new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
if(StringUtils.isNotEmpty(storeText)){ if (StringUtils.isNotEmpty(storeText)) {
RecentSearchManager searchManager = RecentSearchManager.getInstance(); RecentSearchManager searchManager = RecentSearchManager.getInstance();
searchManager.addModel(storeText, cellModel); searchManager.addModel(storeText, cellModel);
sendDataToServer(storeText, cellModel); sendDataToServer(storeText, cellModel);
@ -1052,7 +1052,7 @@ public class AlphaFineDialog extends UIDialog {
break; break;
case ROBOT: case ROBOT:
case RECOMMEND_ROBOT: case RECOMMEND_ROBOT:
moreResult = SimilarSearchManeger.getInstance().getMoreSearchResult(searchTextField.getText()); moreResult = SimilarSearchManager.getInstance().getMoreSearchResult(searchTextField.getText());
break; break;
case RECOMMEND: case RECOMMEND:
moreResult = RecommendSearchManager.getInstance().getMoreSearchResult(searchTextField.getText()); moreResult = RecommendSearchManager.getInstance().getMoreSearchResult(searchTextField.getText());

Loading…
Cancel
Save