From 5f4f608c371f26dfea615934041e0c4392ac19c3 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 16 Aug 2017 13:43:02 +0800 Subject: [PATCH] =?UTF-8?q?alphafine=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/component/AlphaFineDialog.java | 32 ++++++++++++--- .../mainframe/alphafine/images/no_result.png | Bin 0 -> 4747 bytes .../alphafine/preview/DefaulPane.java | 37 ++++++++++++++++++ .../com/fr/design/locale/designer.properties | 3 +- .../design/locale/designer_en_US.properties | 3 +- .../design/locale/designer_zh_CN.properties | 3 +- .../design/locale/designer_zh_TW.properties | 1 + 7 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 designer/src/com/fr/design/mainframe/alphafine/images/no_result.png create mode 100644 designer/src/com/fr/design/mainframe/alphafine/preview/DefaulPane.java 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 6b1113f35..32de9a078 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -16,10 +16,7 @@ import com.fr.design.mainframe.alphafine.cell.model.PluginModel; import com.fr.design.mainframe.alphafine.cell.render.ContentCellRender; import com.fr.design.mainframe.alphafine.listener.DocumentAdapter; 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; +import com.fr.design.mainframe.alphafine.preview.*; import com.fr.design.mainframe.alphafine.search.manager.*; import com.fr.form.main.Form; import com.fr.form.main.FormIO; @@ -75,6 +72,7 @@ public class AlphaFineDialog extends UIDialog { private JPanel searchResultPane; private Point pressedPoint; private UIScrollPane leftSearchResultPane; + private JPanel defaultPane; private JPanel rightSearchResultPane; private AlphaFineList searchResultList; private SearchListModel searchListModel; @@ -344,6 +342,31 @@ public class AlphaFineDialog extends UIDialog { */ private void fireStopLoading() { searchListModel.resetState(); + replaceLeftPane(); + } + + private void refreshContainer() { + validate(); + repaint(); + revalidate(); + } + + /** + * 重置结果面板 + */ + private void replaceLeftPane() { + if (searchListModel.getSize() > 0 && defaultPane != null) { + searchResultPane.remove(defaultPane); + defaultPane = null; + searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); + refreshContainer(); + } else if (searchListModel.getSize() == 0 && defaultPane == null){ + defaultPane = new DefaulPane(); + searchResultPane.remove(leftSearchResultPane); + searchResultPane.add(defaultPane, BorderLayout.WEST); + refreshContainer(); + } + } /** @@ -625,7 +648,6 @@ public class AlphaFineDialog extends UIDialog { */ private void initGlobalListener() { initAWTEventListener(); - initMouseListener(); } /** diff --git a/designer/src/com/fr/design/mainframe/alphafine/images/no_result.png b/designer/src/com/fr/design/mainframe/alphafine/images/no_result.png new file mode 100644 index 0000000000000000000000000000000000000000..cd3d803af0b8f2e5a440e7673fc6b54dd3723d00 GIT binary patch literal 4747 zcmWkyc|25Y6u$N?+gP$S4I#VnWtc2sEX_zrgUN1WUmA*t!q}2z&r*~a8T(+!nq9Ue zJK3|R$gb3PyT9|^`+NVm=e_5g=e*DJ-dI!PtL&^otN;M8W6*kL;PW{+e3%)*duPkW zzX=Nged{g&utEL}n$I(jeggnR6Qiet4V>Dtz3wJFKJ`fMGNp?mv5b`VSyE>0=!i?5 zh$=7^#pSYe$RnGJ`K=&=5a#N&6V%zsQQNcxxw2xjdMP~_`YeTHlaE~m5;jq&jd})I zU$?JF!bN}EuIu+?j!n$urtjxo8cr&Cm4pzA{~DythRG9L@6S8@`_N>jtBdiBfT^&g z6U!Najv_88Qh?!lA_c-o8Hwg>=}t9!OX2M`b)CQ+OYmJV=LFQlf&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