diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index eac17200a..d8293f772 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -16,6 +16,7 @@ import com.fr.design.mainframe.alphafine.listener.ComponentHandler; import com.fr.design.mainframe.alphafine.listener.DocumentAdapter; import com.fr.design.mainframe.alphafine.model.SearchListModel; import com.fr.design.mainframe.alphafine.model.SearchResult; +import com.fr.design.mainframe.alphafine.preview.ActionPreviewPane; import com.fr.design.mainframe.alphafine.preview.DocumentPreviewPane; import com.fr.design.mainframe.alphafine.preview.FilePreviewPane; import com.fr.design.mainframe.alphafine.preview.PluginPreviewPane; @@ -539,7 +540,10 @@ public class AlphaFineDialog extends UIDialog { this.searchWorker.execute(); } else if (selectedValue instanceof ActionModel) { - showDefaultPreviewPane(); + rightSearchResultPane.removeAll(); + rightSearchResultPane.add(new ActionPreviewPane()); + validate(); + repaint(); } } diff --git a/designer/src/com/fr/design/mainframe/alphafine/images/noresult.png b/designer/src/com/fr/design/mainframe/alphafine/images/noresult.png new file mode 100644 index 000000000..388bb84ff Binary files /dev/null and b/designer/src/com/fr/design/mainframe/alphafine/images/noresult.png differ diff --git a/designer/src/com/fr/design/mainframe/alphafine/preview/ActionPreviewPane.java b/designer/src/com/fr/design/mainframe/alphafine/preview/ActionPreviewPane.java index ec2d6ca38..f0f209901 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/preview/ActionPreviewPane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/preview/ActionPreviewPane.java @@ -1,8 +1,36 @@ package com.fr.design.mainframe.alphafine.preview; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.alphafine.AlphaFineConstants; +import com.fr.design.mainframe.alphafine.AlphaFineHelper; +import com.fr.general.IOUtils; + +import javax.swing.*; +import java.awt.*; + + /** * Created by XiaXiang on 2017/5/5. */ -public class ActionPreviewPane { - //todo:还没确定要不要使用面板截图 +public class ActionPreviewPane extends JPanel { + private static final Font NAME = new Font("Song_TypeFace",0,14); + public ActionPreviewPane() { + setLayout(new BorderLayout()); + setBackground(null); + setBorder(BorderFactory.createEmptyBorder(120,0,0,0)); + UILabel image = new UILabel(); + image.setPreferredSize(new Dimension(150,111)); + image.setHorizontalAlignment(SwingConstants.CENTER); + image.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + image.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/noresult.png")); + UILabel name = new UILabel("暂不支持显示"); + name.setForeground(AlphaFineConstants.MEDIUM_GRAY); + name.setFont(NAME); + name.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + name.setHorizontalAlignment(SwingConstants.CENTER); + this.add(image, BorderLayout.CENTER); + this.add(name, BorderLayout.SOUTH); + } + } diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 1453ff2df..96aaff01c 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2008,4 +2008,5 @@ FR-Designer_AlphaFine_ShowLess=show less FR-Designer_Alphafine=AlphaFine FR-Designer-Alphafine_No_Remind= FR-Designer_AlphaFine_NoResult=no results -FR-Designer_ConnectionFailed=connection failed \ No newline at end of file +FR-Designer_ConnectionFailed=connection failed +FR-Designer_NoResult=No results \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 96d737429..8c8e4046a 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -2009,3 +2009,4 @@ FR-Designer_AlphaFine_NoResult=No results FR-Designer_ConnectionFailed=Connection failed FR-Designer_AlphaFine_EnableAlphaFine=Enable AlphaFine FR-Designer_AlphaFine_EnableInternet=Internet +FR-Designer_NoResult=No results diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index d63b22e16..f37ed736f 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -2005,3 +2005,4 @@ FR-Designer_Alphafine=AlphaFine\u667A\u80FD\u641C\u7D22 FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A FR-Designer_AlphaFine_NoResult=\u6682\u65E0\u76F8\u5173\u5185\u5BB9 FR-Designer_ConnectionFailed=\u94FE\u63A5\u5931\u8D25 +FR-Designer_NoResult=\u6682\u4E0D\u652F\u6301\u663E\u793A diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 9e59a18a0..01fb047ff 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -2003,3 +2003,4 @@ FR-Designer_AlphaFine_ShowAll=\u986F\u793A\u5168\u90E8 FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A FR-Designer_AlphaFine_NoResult=\u66AB\u7121\u76F8\u95DC\u5167\u5BB9 FR-Designer_ConnectionFailed=\u93C8\u63A5\u5931\u6557 +FR-Designer_NoResult=\u66AB\u4E0D\u652F\u6301\u986F\u793A