|
|
@ -19,7 +19,6 @@ import com.fr.design.mainframe.alphafine.cell.model.PluginModel; |
|
|
|
import com.fr.design.mainframe.alphafine.cell.model.RobotModel; |
|
|
|
import com.fr.design.mainframe.alphafine.cell.model.RobotModel; |
|
|
|
import com.fr.design.mainframe.alphafine.cell.render.ContentCellRender; |
|
|
|
import com.fr.design.mainframe.alphafine.cell.render.ContentCellRender; |
|
|
|
import com.fr.design.mainframe.alphafine.model.SearchResult; |
|
|
|
import com.fr.design.mainframe.alphafine.model.SearchResult; |
|
|
|
import com.fr.design.mainframe.alphafine.preview.ContainsCirclePane; |
|
|
|
|
|
|
|
import com.fr.design.mainframe.alphafine.preview.DocumentPreviewPane; |
|
|
|
import com.fr.design.mainframe.alphafine.preview.DocumentPreviewPane; |
|
|
|
import com.fr.design.mainframe.alphafine.preview.FilePreviewPane; |
|
|
|
import com.fr.design.mainframe.alphafine.preview.FilePreviewPane; |
|
|
|
import com.fr.design.mainframe.alphafine.preview.NoResultPane; |
|
|
|
import com.fr.design.mainframe.alphafine.preview.NoResultPane; |
|
|
@ -40,6 +39,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.http.HttpClient; |
|
|
|
import com.fr.general.http.HttpClient; |
|
|
|
|
|
|
|
import com.fr.general.http.HttpToolbox; |
|
|
|
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.json.JSONException; |
|
|
|
import com.fr.json.JSONException; |
|
|
@ -49,6 +49,7 @@ import com.fr.main.impl.WorkBook; |
|
|
|
import com.fr.stable.CodeUtils; |
|
|
|
import com.fr.stable.CodeUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
|
|
|
|
import com.fr.third.org.apache.http.client.methods.HttpGet; |
|
|
|
|
|
|
|
|
|
|
|
import javax.imageio.ImageIO; |
|
|
|
import javax.imageio.ImageIO; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
@ -142,6 +143,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
private static String beforeSearchStr = ""; |
|
|
|
private static String beforeSearchStr = ""; |
|
|
|
private static boolean alreadySearch = false; |
|
|
|
private static boolean alreadySearch = false; |
|
|
|
private static boolean alreadyInitHot = false; |
|
|
|
private static boolean alreadyInitHot = false; |
|
|
|
|
|
|
|
public static String[][] data; |
|
|
|
|
|
|
|
|
|
|
|
public AlphaFineDialog(Frame parent, boolean forceOpen) { |
|
|
|
public AlphaFineDialog(Frame parent, boolean forceOpen) { |
|
|
|
super(parent); |
|
|
|
super(parent); |
|
|
@ -224,6 +226,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
* 初始化热门界面 |
|
|
|
* 初始化热门界面 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void initHotPane() { |
|
|
|
private void initHotPane() { |
|
|
|
|
|
|
|
removeHotPane(); |
|
|
|
hotPane = new JPanel(); |
|
|
|
hotPane = new JPanel(); |
|
|
|
hotPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); |
|
|
|
hotPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); |
|
|
|
hotPane.setPreferredSize(AlphaFineConstants.CONTENT_SIZE); |
|
|
|
hotPane.setPreferredSize(AlphaFineConstants.CONTENT_SIZE); |
|
|
@ -232,25 +235,28 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Hot")); |
|
|
|
UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Hot")); |
|
|
|
uiLabel.setFont(AlphaFineConstants.SMALL_FONT); |
|
|
|
uiLabel.setFont(AlphaFineConstants.SMALL_FONT); |
|
|
|
uiLabel.setForeground(AlphaFineConstants.DARK_GRAY); |
|
|
|
uiLabel.setForeground(AlphaFineConstants.DARK_GRAY); |
|
|
|
JPanel panel = new JPanel(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hotPane.add(uiLabel, BorderLayout.NORTH); |
|
|
|
|
|
|
|
hotPane.add(panel, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GridLayout gridLayout = new GridLayout(2, 3, 3, 3); |
|
|
|
GridLayout gridLayout = new GridLayout(2, 3, 3, 3); |
|
|
|
|
|
|
|
JPanel panel = new JPanel(); |
|
|
|
panel.setLayout(gridLayout); |
|
|
|
panel.setLayout(gridLayout); |
|
|
|
|
|
|
|
try { |
|
|
|
String[][] ss = HotIssuesManager.getInstance().getHotIssues(); |
|
|
|
HttpGet getHelp = new HttpGet(AlphaFineConstants.ALPHA_HOT_SEARCH); |
|
|
|
|
|
|
|
HttpToolbox.getHttpClient(AlphaFineConstants.ALPHA_HOT_SEARCH).execute(getHelp).getStatusLine(); |
|
|
|
if(ss != null){ |
|
|
|
if (data == null) { |
|
|
|
for (int i = 0; i < ss.length; i++) { |
|
|
|
data = HotIssuesManager.getInstance().getHotIssues(); |
|
|
|
panel.add(new HotIssueJpanel(ss[i], i + 1)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
for (int i = 0; i < data.length; i++) { |
|
|
|
|
|
|
|
panel.add(new HotIssueJpanel(data[i], i + 1)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
data = 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[]{" "}, i + 1)); |
|
|
|
panel.add(new HotIssueJpanel(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Connection_Failed")}, i + 1)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hotPane.add(uiLabel, BorderLayout.NORTH); |
|
|
|
|
|
|
|
hotPane.add(panel, BorderLayout.CENTER); |
|
|
|
add(hotPane, BorderLayout.SOUTH); |
|
|
|
add(hotPane, BorderLayout.SOUTH); |
|
|
|
setSize(AlphaFineConstants.FULL_SIZE); |
|
|
|
setSize(AlphaFineConstants.FULL_SIZE); |
|
|
|
} |
|
|
|
} |
|
|
@ -313,9 +319,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { |
|
|
|
if (hotPane == null) { |
|
|
|
|
|
|
|
initHotPane(); |
|
|
|
initHotPane(); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
removeHotPane(); |
|
|
|
removeHotPane(); |
|
|
|
setSize(AlphaFineConstants.FIELD_SIZE); |
|
|
|
setSize(AlphaFineConstants.FIELD_SIZE); |
|
|
@ -816,10 +820,8 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
removeSearchResult(); |
|
|
|
removeSearchResult(); |
|
|
|
refreshContainer(); |
|
|
|
refreshContainer(); |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { |
|
|
|
if (hotPane == null) { |
|
|
|
|
|
|
|
initHotPane(); |
|
|
|
initHotPane(); |
|
|
|
setSize(AlphaFineConstants.FULL_SIZE); |
|
|
|
setSize(AlphaFineConstants.FULL_SIZE); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
setSize(AlphaFineConstants.FIELD_SIZE); |
|
|
|
setSize(AlphaFineConstants.FIELD_SIZE); |
|
|
|
} |
|
|
|
} |
|
|
@ -1198,6 +1200,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); |
|
|
|
setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mouseDragged(MouseEvent e) { |
|
|
|
public void mouseDragged(MouseEvent e) { |
|
|
|
} |
|
|
|
} |
|
|
@ -1363,6 +1366,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
hotPane = null; |
|
|
|
hotPane = null; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 增加返回面板 |
|
|
|
* 增加返回面板 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -1382,9 +1386,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
searchResultPane = null; |
|
|
|
searchResultPane = null; |
|
|
|
} |
|
|
|
} |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { |
|
|
|
if (hotPane == null) { |
|
|
|
|
|
|
|
initHotPane(); |
|
|
|
initHotPane(); |
|
|
|
} |
|
|
|
|
|
|
|
setSize(AlphaFineConstants.FULL_SIZE); |
|
|
|
setSize(AlphaFineConstants.FULL_SIZE); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
setSize(AlphaFineConstants.FIELD_SIZE); |
|
|
|
setSize(AlphaFineConstants.FIELD_SIZE); |
|
|
@ -1407,14 +1409,19 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
this.setSize(AlphaFineConstants.HOT_ISSUES_JAPNEL_SIZE); |
|
|
|
this.setSize(AlphaFineConstants.HOT_ISSUES_JAPNEL_SIZE); |
|
|
|
|
|
|
|
|
|
|
|
JPanel pane1 = new JPanel(new BorderLayout()); |
|
|
|
JPanel pane1 = new JPanel(new BorderLayout()); |
|
|
|
ContainsCirclePane circle = new ContainsCirclePane(pngIndex); |
|
|
|
UILabel iconLabel = new UILabel(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + AlphaFineConstants.ALPHA_HOT_IMAGE_NAME + pngIndex + ".png")); |
|
|
|
circle.setBorder(BorderFactory.createEmptyBorder(20,0,10,0)); |
|
|
|
iconLabel.setOpaque(true); |
|
|
|
pane1.add(circle, BorderLayout.NORTH); |
|
|
|
iconLabel.setBackground(Color.WHITE); |
|
|
|
|
|
|
|
iconLabel.setBorder(BorderFactory.createEmptyBorder(20, 0, 0, 0)); |
|
|
|
|
|
|
|
pane1.add(iconLabel, BorderLayout.NORTH); |
|
|
|
add(pane1, BorderLayout.NORTH); |
|
|
|
add(pane1, BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
|
|
|
JPanel centerPanel = new JPanel(new BorderLayout()); |
|
|
|
JPanel centerPanel = new JPanel(new BorderLayout()); |
|
|
|
centerPanel.setBackground(Color.white); |
|
|
|
centerPanel.setBackground(Color.white); |
|
|
|
UILabel title = new UILabel(); |
|
|
|
UILabel title = new UILabel(); |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(str[0])) { |
|
|
|
|
|
|
|
title.setText(StringUtils.EMPTY); |
|
|
|
|
|
|
|
} |
|
|
|
title.setText(str[0]); |
|
|
|
title.setText(str[0]); |
|
|
|
title.setFont(AlphaFineConstants.MEDIUM_FONT_ANOTHER); |
|
|
|
title.setFont(AlphaFineConstants.MEDIUM_FONT_ANOTHER); |
|
|
|
title.setForeground(AlphaFineConstants.DARK_GRAY); |
|
|
|
title.setForeground(AlphaFineConstants.DARK_GRAY); |
|
|
|