From 84122ebe93978e250237b2e4d6ab2d5fb1c2d45f Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Fri, 18 Aug 2017 15:24:06 +0800 Subject: [PATCH 01/18] =?UTF-8?q?alphafine=20=E7=BB=86=E8=8A=82=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineDialog.java | 4 ++-- .../design/mainframe/alphafine/component/AlphaFinePane.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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 83945d324..1d5faa3b6 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -354,11 +354,11 @@ public class AlphaFineDialog extends UIDialog { * 重置结果面板 */ private void replaceLeftPane() { - if (searchListModel.getSize() == 0 && defaultPane == null) { + if (searchListModel.getSize() == 0 && searchResultPane != null) { defaultPane = new NoResultPane(Inter.getLocText("FR-Designer-AlphaFine_NO_Result"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/no_result.png")); searchResultPane.remove(leftSearchResultPane); searchResultPane.add(defaultPane, BorderLayout.WEST); - } else if (searchListModel.getSize() > 0 && defaultPane != null) { + } else if (searchResultPane != null && searchListModel.getSize() > 0 && defaultPane != null) { searchResultPane.remove(defaultPane); defaultPane = null; searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java index cfd37479e..8c962a001 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java @@ -30,6 +30,7 @@ public class AlphaFinePane extends BasicPane { refreshButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/smallsearch.png")); refreshButton.setToolTipText(Inter.getLocText("FR-Designer_AlphaFine")); refreshButton.set4ToolbarButton(); + refreshButton.setRolloverEnabled(false); this.add(refreshButton); this.setBackground(ThemeUtils.WHITE_BORDER_COLOR); refreshButton.addActionListener(new ActionListener() { From b5ab96067866a89c8e6415a3e398c559eddb9a79 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 22 Aug 2017 21:33:56 +0800 Subject: [PATCH 02/18] =?UTF-8?q?REPORT-3694=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=95=8C=E9=9D=A2=E6=8E=A7=E4=BB=B6=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/WidgetPropertyPane.java | 15 ++++++++++----- .../mainframe/widget/ui/FormWidgetCardPane.java | 7 +++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java index d24e79c5a..bffc4b11d 100644 --- a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java @@ -49,6 +49,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope private CardLayout cardLayout; // 卡片布局,选中参数面板时显示mobileWidgetTable,选中body时显示mobileBodyWidgetTable private JTableHeader header;//把表头单独get出来作为一个组件 private UIHeadGroup tabsHeaderIconPane; + private XComponent lastAffectedCreator; public static WidgetPropertyPane getInstance() { @@ -132,9 +133,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope */ private void createPropertyTable() { formWidgetCardPane = new FormWidgetCardPane(designer); - designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(formWidgetCardPane)); - psp = new UIScrollPane(formWidgetCardPane); // 用来装载属性表table psp.setBorder(null); } @@ -318,6 +317,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope private class WidgetPropertyDesignerAdapter implements DesignerEditListener { FormWidgetCardPane formWidgetCardPane; + WidgetPropertyDesignerAdapter(FormWidgetCardPane formWidgetCardPane) { this.formWidgetCardPane = formWidgetCardPane; } @@ -329,14 +329,20 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope || evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED) { formWidgetCardPane.populate(); }else if(evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED){ - formWidgetCardPane = new FormWidgetCardPane(designer); + // 防止多次触发 + if (lastAffectedCreator != null && lastAffectedCreator == evt.getAffectedCreator()) { + formWidgetCardPane.populate(); + return; + } + lastAffectedCreator = evt.getAffectedCreator(); + refreshDockingView(); formWidgetCardPane.populate(); } } @Override public boolean equals(Object o) { - return o instanceof WidgetPropertyDesignerAdapter && ((WidgetPropertyDesignerAdapter) o).formWidgetCardPane == this.formWidgetCardPane; + return o instanceof WidgetPropertyDesignerAdapter; } } @@ -345,7 +351,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope */ private class EventPropertyDesignerAdapter implements DesignerEditListener { EventPropertyTable propertyTable; - private XComponent lastAffectedCreator; EventPropertyDesignerAdapter(EventPropertyTable eventTable) { this.propertyTable = eventTable; diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 2a8e1de2b..29327fa1e 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -27,7 +27,7 @@ import java.awt.*; * Created by ibm on 2017/7/25. */ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { - private AttributeChangeListener listener2; + private AttributeChangeListener listener; private FormDesigner designer; //当前的编辑器属性定义面板 private DataModify currentEditorDefinePane; @@ -81,7 +81,6 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { } else { return null; } - } /** @@ -138,7 +137,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { jPanel.add(attriCardPane, BorderLayout.CENTER); - this.listener2 = new AttributeChangeListener() { + this.listener = new AttributeChangeListener() { @Override public void attributeChange() { updateCreator(); @@ -196,7 +195,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { } widgetPropertyPane.populate(cellWidget); reinitAllListeners(); - this.addAttributeChangeListener(listener2); + this.addAttributeChangeListener(listener); } From ae7cfe25636e6c932b95c2070fc041aa7144e81b Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Tue, 22 Aug 2017 22:59:26 +0800 Subject: [PATCH 03/18] =?UTF-8?q?alphafine=20=E4=BA=A4=E4=BA=92=E6=94=B9?= =?UTF-8?q?=E8=89=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cell/render/TitleCellRender.java | 8 --- .../alphafine/component/AlphaFineDialog.java | 57 +++++------------- .../mainframe/alphafine/images/bigloading.gif | Bin 0 -> 14550 bytes 3 files changed, 15 insertions(+), 50 deletions(-) create mode 100644 designer/src/com/fr/design/mainframe/alphafine/images/bigloading.gif diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java b/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java index c5329da68..97f68cbf7 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java @@ -33,14 +33,6 @@ public class TitleCellRender implements ListCellRenderer { showMoreLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); panel.add(showMoreLabel, BorderLayout.EAST); } - if (moreModel.isLoading()) { - ImageIcon imageIcon = new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/loading.gif")); - //设置cell的加载动画 - imageIcon.setImageObserver(list); - UILabel loadingLabel = new UILabel(imageIcon); - loadingLabel.setBorder(BorderFactory.createEmptyBorder(LOAD_OFFSET,0,0,0)); - panel.add(loadingLabel, 0); - } panel.setPreferredSize(new Dimension(list.getFixedCellWidth(), AlphaFineConstants.CELL_TITLE_HEIGHT)); return panel; } 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 f0f80f58c..0ca1fb664 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -72,9 +72,10 @@ public class AlphaFineDialog extends UIDialog { private AlphaFineTextField searchTextField; private UIButton closeButton; private JPanel searchResultPane; - private Point pressedPoint; private UIScrollPane leftSearchResultPane; private JPanel defaultPane; + //分割线 + private UILabel splitLabel; private JPanel rightSearchResultPane; private AlphaFineList searchResultList; private SearchListModel searchListModel; @@ -302,7 +303,7 @@ public class AlphaFineDialog extends UIDialog { rightSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.RIGHT_WIDTH - 1, AlphaFineConstants.CONTENT_HEIGHT)); searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); searchResultPane.add(rightSearchResultPane, BorderLayout.EAST); - UILabel splitLabel = new UILabel(); + splitLabel = new UILabel(); splitLabel.setPreferredSize(new Dimension(AlphaFineConstants.HEIGHT, 1)); searchResultPane.add(splitLabel, BorderLayout.NORTH); add(searchResultPane, BorderLayout.SOUTH); @@ -320,6 +321,7 @@ public class AlphaFineDialog extends UIDialog { this.searchWorker = new SwingWorker() { @Override protected Object doInBackground() throws Exception { + splitLabel.setIcon(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/bigloading.gif"))); rebuildList(searchTextField.getText().toLowerCase()); return null; } @@ -327,6 +329,7 @@ public class AlphaFineDialog extends UIDialog { @Override protected void done() { if (!isCancelled()) { + splitLabel.setIcon(null); fireStopLoading(); } } @@ -339,7 +342,8 @@ public class AlphaFineDialog extends UIDialog { */ private void fireStopLoading() { searchListModel.resetState(); - replaceLeftPane(); + refreshContainer(); + //replaceLeftPane(); } /** @@ -680,45 +684,6 @@ public class AlphaFineDialog extends UIDialog { } - /** - * 窗口拖拽 - */ - private void initMouseListener() { - addMouseMotionListener(new MouseMotionAdapter() { - @Override - public void mouseDragged(MouseEvent e) { - doMouseDragged(e); - } - }); - - addMouseListener(new MouseAdapter() { - public void mousePressed(MouseEvent e) { - doMousePressed(e); - } - - }); - } - - private void doMousePressed(MouseEvent e) { - - pressedPoint = e.getPoint(); - - } - - private void doMouseDragged(MouseEvent e) { - - Point point = e.getPoint();// 获取当前坐标 - - Point locationPoint = getLocation();// 获取窗体坐标 - - int x = locationPoint.x + point.x - pressedPoint.x;// 计算移动后的新坐标 - - int y = locationPoint.y + point.y - pressedPoint.y; - - setLocation(x, y);// 改变窗体位置 - - } - /** * 当鼠标在搜索界面边界外点击时触发 */ @@ -880,6 +845,14 @@ public class AlphaFineDialog extends UIDialog { this.storeText = storeText; } + public UILabel getSplitLabel() { + return splitLabel; + } + + public void setSplitLabel(UILabel splitLabel) { + this.splitLabel = splitLabel; + } + /** * +-------------------------------------+ diff --git a/designer/src/com/fr/design/mainframe/alphafine/images/bigloading.gif b/designer/src/com/fr/design/mainframe/alphafine/images/bigloading.gif new file mode 100644 index 0000000000000000000000000000000000000000..715ab7aeccd5bc9916ce280dbe986c87e209bc2e GIT binary patch literal 14550 zcmeHuc|6p6)c@Erv>~NisxeZi?6M^WlP$Z7t`^G_vRzH3Za2G-LKM1Wn{3fyskB^c zWhqOf{a#5$>kNaLG0XG$4r9Ljru%CA?(6yM>7SUs%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~j8GSR>8v6 zpZ6(qmSsZC(~;igBQ()sf5_P*`~(dJx)e&m(IyGaE=jJDwPt+!qU@ zF7OqOv(G8~!Fg!boXexNwp98%iP7l+%&Dxr(*^7}nBZHB1GFzRimo;JrsR+nns#LZ+;h5Rk{q ziXr>1M%GO30V{Sa(5qjcu01W$fnxjmMHe6)Pyo1NQ^j^ke>V2!8KsV#z-KbXlagi6 zJui(-QoM8W>Dgw#7Uwvn$XGEK)Yg)>lT7^T>bX!&L=)C8sB#(J*Op~k;XC3=9^ek2 z&&RfTKgZ_RrkhSI0IIweG4!KTd9SGcwC9yb3omUj2;ObOG<}dS7c4#KqLluLt(tu{cVtN#HpIFU9#16 z`JKEcj6Yxcf_qn46`J(_cI}Y>LQrAGzPep>Xh~^sedC#$%@W5k*_V(9`Jz~q5nJe_a{WKq+>{XKOOCh-52-G2cD_>Tujuo*uw1ma@&zkh&CV(>rL14OF; literal 0 HcmV?d00001 From fdfeb3c026c5c98cd1e3af0c1029f9b34541dc8b Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Tue, 22 Aug 2017 23:53:13 +0800 Subject: [PATCH 04/18] bug fix --- .../alphafine/component/AlphaFineDialog.java | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) 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 0ca1fb664..8246056ec 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -73,6 +73,7 @@ public class AlphaFineDialog extends UIDialog { private UIButton closeButton; private JPanel searchResultPane; private UIScrollPane leftSearchResultPane; + private JPanel defaultPane; //分割线 private UILabel splitLabel; @@ -342,8 +343,7 @@ public class AlphaFineDialog extends UIDialog { */ private void fireStopLoading() { searchListModel.resetState(); - refreshContainer(); - //replaceLeftPane(); + replaceLeftPane(); } /** @@ -359,16 +359,14 @@ public class AlphaFineDialog extends UIDialog { * 重置结果面板 */ private void replaceLeftPane() { - if (searchListModel.getSize() == 0 && searchResultPane != null) { - defaultPane = new NoResultPane(Inter.getLocText("FR-Designer-AlphaFine_NO_Result"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/no_result.png")); - searchResultPane.remove(leftSearchResultPane); - searchResultPane.add(defaultPane, BorderLayout.WEST); - } else if (searchResultPane != null && searchListModel.getSize() > 0 && defaultPane != null) { - searchResultPane.remove(defaultPane); - defaultPane = null; - searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); + if (searchResultPane != null) { + if (searchListModel.isEmpty() && defaultPane == null) { + defaultPane = new NoResultPane(Inter.getLocText("FR-Designer-AlphaFine_NO_Result"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/no_result.png")); + searchResultPane.remove(leftSearchResultPane); + searchResultPane.add(defaultPane, BorderLayout.WEST); + refreshContainer(); + } } - refreshContainer(); } /** @@ -971,6 +969,12 @@ public class AlphaFineDialog extends UIDialog { */ private void fireSelectedStateChanged(AlphaCellModel element, int index) { if (element.hasAction() && !isValidSelected()) { + if (defaultPane != null) { + searchResultPane.remove(defaultPane); + defaultPane = null; + searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); + refreshContainer(); + } searchResultList.setSelectedIndex(index); setValidSelected(true); } @@ -1020,6 +1024,11 @@ public class AlphaFineDialog extends UIDialog { isValidSelected = selected; } + @Override + public boolean isEmpty() { + return myDelegate.isEmpty(); + } + public void resetState() { for (int i = 0; i< getSize(); i++) { getElementAt(i).resetState(); From 8c04871fc7a2bdd978c239350b3adcd21393e6a4 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 23 Aug 2017 00:33:23 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/help/alphafine/AlphaFineConfigManager.java | 7 ++++++- .../com/fr/design/mainframe/toolbar/ToolBarMenuDock.java | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java index 0796d1dff..700b5fbf5 100644 --- a/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java +++ b/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java @@ -1,5 +1,7 @@ package com.fr.design.actions.help.alphafine; +import com.fr.base.FRCoreContext; +import com.fr.general.VT4FR; import com.fr.stable.OperatingSystem; import com.fr.stable.StringUtils; import com.fr.stable.xml.XMLPrintWriter; @@ -199,7 +201,10 @@ public class AlphaFineConfigManager implements XMLable { } public boolean isEnabled() { - return isEnabled; + if (VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support()) { + return isEnabled; + } + return false; } public void setEnabled(boolean isEnabled) { diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 17d9d6e36..fa99f0e28 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -5,6 +5,7 @@ package com.fr.design.mainframe.toolbar; import com.fr.base.BaseUtils; import com.fr.base.FRContext; +import com.fr.base.FRCoreContext; import com.fr.design.DesignState; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; @@ -34,6 +35,7 @@ import com.fr.env.RemoteEnv; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; import com.fr.general.Inter; +import com.fr.general.VT4FR; import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginRuntime; import com.fr.plugin.manage.PluginFilter; @@ -379,8 +381,10 @@ public abstract class ToolBarMenuDock { // shortCuts.add(new ForumAction()); } shortCuts.add(SeparatorDef.DEFAULT); - shortCuts.add(new AlphaFineAction()); - shortCuts.add(SeparatorDef.DEFAULT); + if (VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support()) { + shortCuts.add(new AlphaFineAction()); + shortCuts.add(SeparatorDef.DEFAULT); + } shortCuts.add(new AboutAction()); return shortCuts.toArray(new ShortCut[shortCuts.size()]); } From 4bdb196aabc8c7d4aa926375be7606f20575e315 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 23 Aug 2017 07:58:25 +0800 Subject: [PATCH 06/18] rt --- .../mainframe/alphafine/component/AlphaFineDialog.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 8246056ec..c3966b1de 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -411,8 +411,7 @@ public class AlphaFineDialog extends UIDialog { searchListModel.removeAllElements(); searchListModel.resetSelectedState(); rightSearchResultPane.removeAll(); - validate(); - repaint(); + refreshContainer(); } /** @@ -607,7 +606,7 @@ public class AlphaFineDialog extends UIDialog { this.showWorker.execute(); break; default: - return; + rightSearchResultPane.removeAll(); } From e25e5da475e6e81a7f700b34f61a88a0b5adb836 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 23 Aug 2017 09:14:34 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/WidgetPropertyPane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java index bffc4b11d..ff6a8c640 100644 --- a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java @@ -331,7 +331,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope }else if(evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED){ // 防止多次触发 if (lastAffectedCreator != null && lastAffectedCreator == evt.getAffectedCreator()) { - formWidgetCardPane.populate(); return; } lastAffectedCreator = evt.getAffectedCreator(); From 1db52a5f2cad6a058e64bd09693978f662302b13 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 23 Aug 2017 10:06:32 +0800 Subject: [PATCH 08/18] bug fix --- .../alphafine/component/AlphaFineDialog.java | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) 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 c3966b1de..6376759c8 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -322,6 +322,7 @@ public class AlphaFineDialog extends UIDialog { this.searchWorker = new SwingWorker() { @Override protected Object doInBackground() throws Exception { + resumeLeftPane(); splitLabel.setIcon(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/bigloading.gif"))); rebuildList(searchTextField.getText().toLowerCase()); return null; @@ -339,24 +340,20 @@ public class AlphaFineDialog extends UIDialog { } /** - * 停止加载状态 - */ - private void fireStopLoading() { - searchListModel.resetState(); - replaceLeftPane(); - } - - /** - * 刷新容器 + * 恢复左侧列表面板 */ - private void refreshContainer() { - validate(); - repaint(); - revalidate(); + private void resumeLeftPane() { + if (searchResultPane != null && defaultPane != null) { + searchResultPane.remove(defaultPane); + defaultPane = null; + searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); + rightSearchResultPane.removeAll(); + refreshContainer(); + } } /** - * 重置结果面板 + * 移除左侧列表面板 */ private void replaceLeftPane() { if (searchResultPane != null) { @@ -369,6 +366,23 @@ public class AlphaFineDialog extends UIDialog { } } + /** + * 停止加载状态 + */ + private void fireStopLoading() { + searchListModel.resetState(); + replaceLeftPane(); + } + + /** + * 刷新容器 + */ + private void refreshContainer() { + validate(); + repaint(); + revalidate(); + } + /** * 重新构建搜索结果列表 * 先根据输入判断是不是隐藏的搜索功能 @@ -968,12 +982,6 @@ public class AlphaFineDialog extends UIDialog { */ private void fireSelectedStateChanged(AlphaCellModel element, int index) { if (element.hasAction() && !isValidSelected()) { - if (defaultPane != null) { - searchResultPane.remove(defaultPane); - defaultPane = null; - searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); - refreshContainer(); - } searchResultList.setSelectedIndex(index); setValidSelected(true); } From 58afb5c9ee4c823440b991d5084d83447b5091f2 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 23 Aug 2017 13:07:03 +0800 Subject: [PATCH 09/18] rt --- .../design/mainframe/alphafine/component/AlphaFineDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6376759c8..bc6913436 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -344,10 +344,10 @@ public class AlphaFineDialog extends UIDialog { */ private void resumeLeftPane() { if (searchResultPane != null && defaultPane != null) { + rightSearchResultPane.removeAll(); searchResultPane.remove(defaultPane); defaultPane = null; searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); - rightSearchResultPane.removeAll(); refreshContainer(); } } From 7bb1e75faf18811d8bff0c84a862c65fd982bc23 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 23 Aug 2017 13:16:26 +0800 Subject: [PATCH 10/18] pmd --- .../alphafine/component/AlphaFineDialog.java | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) 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 bc6913436..dd7fc1031 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -17,7 +17,10 @@ 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.*; +import com.fr.design.mainframe.alphafine.preview.DocumentPreviewPane; +import com.fr.design.mainframe.alphafine.preview.FilePreviewPane; +import com.fr.design.mainframe.alphafine.preview.NoResultPane; +import com.fr.design.mainframe.alphafine.preview.PluginPreviewPane; import com.fr.design.mainframe.alphafine.search.manager.*; import com.fr.form.main.Form; import com.fr.form.main.FormIO; @@ -356,13 +359,11 @@ public class AlphaFineDialog extends UIDialog { * 移除左侧列表面板 */ private void replaceLeftPane() { - if (searchResultPane != null) { - if (searchListModel.isEmpty() && defaultPane == null) { - defaultPane = new NoResultPane(Inter.getLocText("FR-Designer-AlphaFine_NO_Result"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/no_result.png")); - searchResultPane.remove(leftSearchResultPane); - searchResultPane.add(defaultPane, BorderLayout.WEST); - refreshContainer(); - } + if (searchListModel.isEmpty() && defaultPane == null) { + defaultPane = new NoResultPane(Inter.getLocText("FR-Designer-AlphaFine_NO_Result"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/no_result.png")); + searchResultPane.remove(leftSearchResultPane); + searchResultPane.add(defaultPane, BorderLayout.WEST); + refreshContainer(); } } @@ -371,7 +372,9 @@ public class AlphaFineDialog extends UIDialog { */ private void fireStopLoading() { searchListModel.resetState(); - replaceLeftPane(); + if (searchResultPane != null) { + replaceLeftPane(); + } } /** @@ -1037,7 +1040,7 @@ public class AlphaFineDialog extends UIDialog { } public void resetState() { - for (int i = 0; i< getSize(); i++) { + for (int i = 0; i < getSize(); i++) { getElementAt(i).resetState(); } } From d3e9c054e416ef22ea61535719b8993d46236557 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 23 Aug 2017 13:27:55 +0800 Subject: [PATCH 11/18] pmd --- .../mainframe/alphafine/component/AlphaFineDialog.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 dd7fc1031..ae811dbda 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -358,7 +358,7 @@ public class AlphaFineDialog extends UIDialog { /** * 移除左侧列表面板 */ - private void replaceLeftPane() { + private void removeLeftPane() { if (searchListModel.isEmpty() && defaultPane == null) { defaultPane = new NoResultPane(Inter.getLocText("FR-Designer-AlphaFine_NO_Result"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/no_result.png")); searchResultPane.remove(leftSearchResultPane); @@ -373,7 +373,7 @@ public class AlphaFineDialog extends UIDialog { private void fireStopLoading() { searchListModel.resetState(); if (searchResultPane != null) { - replaceLeftPane(); + removeLeftPane(); } } @@ -771,7 +771,7 @@ public class AlphaFineDialog extends UIDialog { } final HashMap para = new HashMap<>(); String date = new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime()); - para.put("token", CodeUtils.md5Encode(date, "", "MD5")); + para.put("token", CodeUtils.md5Encode(date, StringUtils.EMPTY, "MD5")); para.put("content", object.toString()); HttpClient httpClient = new HttpClient(AlphaFineConstants.CLOUD_SERVER_URL, para, true); httpClient.asGet(); From 89df2e5bcc20a01bc6f72b04cda5080ac0c25d55 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 23 Aug 2017 13:33:03 +0800 Subject: [PATCH 12/18] pmd --- .../design/actions/help/alphafine/AlphaFineConfigManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java index 700b5fbf5..b1248df70 100644 --- a/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java +++ b/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java @@ -90,7 +90,8 @@ public class AlphaFineConfigManager implements XMLable { @Override public Object clone() throws CloneNotSupportedException { - return super.clone(); + AlphaFineConfigManager manager = (AlphaFineConfigManager) super.clone(); + return manager; } @Override From 602ce1cf4ad221b52f0543a1dcf49c0f39f52cfa Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 23 Aug 2017 14:05:35 +0800 Subject: [PATCH 13/18] =?UTF-8?q?REPORT-3815=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E6=A0=B7=E5=BC=8F=E7=BC=A9=E8=BF=9B=E7=AD=89=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=95=B0=E5=AD=97=E6=AF=8F=E6=AC=A1=E5=8F=AA=E8=83=BD?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E4=B8=80=E4=BD=8D=20REPORT-4025=20[9.0?= =?UTF-8?q?=E4=B8=80=E8=BD=AE=E5=9B=9E=E5=BD=92]=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=88=86=E9=A1=B5=E4=B8=AD=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=8B=BE=E9=80=89=E9=A1=B9=E6=97=A0=E6=B3=95=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=8B=BE=E7=BA=BF=20REPORT-4022=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E9=80=89=E4=B8=AD=E4=B8=80=E7=89=87?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E6=97=B6=E5=AF=B9=E9=BD=90=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E8=AE=BE=E7=BD=AE=E5=BC=82=E5=B8=B8=E5=A6=82=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E5=9B=BE=E7=89=87=20=E6=A0=B9=E6=8D=AE=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E8=A6=81=E6=B1=82=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E6=9D=A1=E8=BE=93=E5=85=A5=E6=A1=86=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E9=99=90=E5=88=B60-400=E7=9A=84=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/CellElementPropertyPane.java | 3 +-- .../cell/settingpane/CellOtherSetPane.java | 14 +++++++------- .../com/fr/design/mainframe/JSliderPane.java | 17 ++++++++++++++--- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java index a607538d6..9e22680cf 100644 --- a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java @@ -134,8 +134,7 @@ public class CellElementPropertyPane extends DockingView { } public void reInit(ElementCasePane ePane) { - if (titlePane.getParent() == null) { // 如果处于隐藏状态,则让其显示 -// this.add(titlePane, BorderLayout.NORTH); + if (cellElementEditPane.getParent() == null) { // 如果处于隐藏状态,则让其显示 this.add(cellElementEditPane, BorderLayout.CENTER); } cellElementEditPane.populate(ePane); diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 53aa5e3dc..6be46f1c5 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -10,7 +10,7 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UIPropertyTextField; +import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.JTemplate; @@ -48,9 +48,9 @@ public class CellOtherSetPane extends AbstractCellAttrPane { private UIComboBox showContent; - private UIPropertyTextField tooltipTextField; + private UITextField tooltipTextField; - private UIPropertyTextField fileNameTextField; + private UITextField fileNameTextField; // 分页 private UICheckBox pageBeforeRowCheckBox; @@ -229,8 +229,8 @@ public class CellOtherSetPane extends AbstractCellAttrPane { final JPanel fileNamePane = new JPanel(fileNameLayout); JPanel fileNameCCPane = new JPanel(new BorderLayout(4, 0)); fileNameCCPane.add(new UILabel(Inter.getLocText("FR-Designer_File_Name_For_Download")), BorderLayout.WEST); - fileNameTextField = new UIPropertyTextField(); - tooltipTextField = new UIPropertyTextField(); + fileNameTextField = new UITextField(); + tooltipTextField = new UITextField(); tooltipTextField.getUI(); fileNamePane.add(new JPanel(), "none"); fileNamePane.add(fileNameCCPane, "content"); @@ -452,10 +452,10 @@ public class CellOtherSetPane extends AbstractCellAttrPane { if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellWrite_Page_After_Column"))) { cellPageAttr.setPageAfterColumn(this.pageAfterColumnCheckBox.isSelected()); } - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellWrite_Can_Break_On_Paginate"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellPage_Can_Break_On_Paginate"))) { cellPageAttr.setCanBreakOnPaginate(canBreakOnPaginateCheckBox.isSelected()); } - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellWrite_Repeat_Content_When_Paging"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellPage_Repeat_Content_When_Paging"))) { cellPageAttr.setRepeat(this.repeatCheckBox.isSelected()); } diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index 7f3ad51f4..9d23ecf5e 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -17,6 +17,8 @@ import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.plaf.basic.BasicSliderUI; +import javax.swing.text.DefaultFormatterFactory; +import javax.swing.text.NumberFormatter; import java.awt.*; import java.awt.event.*; import java.math.BigDecimal; @@ -77,6 +79,15 @@ public class JSliderPane extends JPanel { this.setLayout(new BorderLayout()); initSlider(); initShowValSpinner(); + //MoMeak:控制只能输入10-400,但是用起来感觉不舒服,先注释掉吧 + JSpinner.NumberEditor editor = new JSpinner.NumberEditor(showValSpinner, "0"); + showValSpinner.setEditor(editor); + JFormattedTextField textField = ((JSpinner.NumberEditor) showValSpinner.getEditor()).getTextField(); + textField.setEditable(true); + DefaultFormatterFactory factory = (DefaultFormatterFactory) textField .getFormatterFactory(); + NumberFormatter formatter = (NumberFormatter) factory.getDefaultFormatter(); + formatter.setAllowsInvalid(false); + initDownUpButton(); initShowValButton(); initUIRadioButton(); @@ -114,7 +125,7 @@ public class JSliderPane extends JPanel { } private void initShowValSpinner() { - showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, TEN, FOUR_HUNDRED, 1)) { + showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, 10, FOUR_HUNDRED, 1)) { public Point getToolTipLocation(MouseEvent event) { return new Point(event.getX(), event.getY() - TOOLTIP_Y); } @@ -221,7 +232,7 @@ public class JSliderPane extends JPanel { new Component[]{fiveTenButton, null}, new Component[]{twoFiveButton, null}, new Component[]{selfAdaptButton, null}, - new Component[]{customButton, createSpinnerPanel()} + new Component[]{createSpinnerPanel(), customButton} }; dialogContentPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, LayoutConstants.VGAP_MEDIUM, 0); dialogContentPanel.setBackground(BACK_COLOR); @@ -464,7 +475,7 @@ class JSliderPaneUI extends BasicSliderUI { class PopupPane extends JPopupMenu { private static final int DIALOG_WIDTH = 157; - private static final int DIALOG_HEIGHT = 192; + private static final int DIALOG_HEIGHT = 292; PopupPane(JButton b, JPanel dialogContentPanel) { this.add(dialogContentPanel, BorderLayout.CENTER); From c655df1ccb49fb2263715eb3bd3e2629949334dd Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 23 Aug 2017 14:51:55 +0800 Subject: [PATCH 14/18] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E8=A6=81=E6=B1=82=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=BC=A9=E6=94=BE?= =?UTF-8?q?=E6=9D=A1=E8=BE=93=E5=85=A5=E6=A1=86=E6=9D=A1=E4=BB=B6=E9=99=90?= =?UTF-8?q?=E5=88=B60-400=E7=9A=84=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JFormSliderPane.java | 13 ++++++++++++- .../src/com/fr/design/mainframe/JSliderPane.java | 8 ++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java b/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java index 3a9e5e6dd..9509e23b6 100644 --- a/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java @@ -16,6 +16,8 @@ import com.fr.general.Inter; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import javax.swing.text.DefaultFormatterFactory; +import javax.swing.text.NumberFormatter; import java.awt.*; import java.awt.event.*; import java.math.BigDecimal; @@ -75,6 +77,15 @@ public class JFormSliderPane extends JPanel { this.setLayout(new BorderLayout()); initSlider(); initShowValSpinner(); + //MoMeak:控制只能输入10-400 + JSpinner.NumberEditor editor = new JSpinner.NumberEditor(showValSpinner, "0"); + showValSpinner.setEditor(editor); + JFormattedTextField textField = ((JSpinner.NumberEditor) showValSpinner.getEditor()).getTextField(); + textField.setEditable(true); + DefaultFormatterFactory factory = (DefaultFormatterFactory) textField .getFormatterFactory(); + NumberFormatter formatter = (NumberFormatter) factory.getDefaultFormatter(); + formatter.setAllowsInvalid(false); + initDownUpButton(); initShowValButton(); initUIRadioButton(); @@ -111,7 +122,7 @@ public class JFormSliderPane extends JPanel { } private void initShowValSpinner() { - showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, TEN, FOUR_HUNDRED, 1)){ + showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, 0, FOUR_HUNDRED, 1)){ public Point getToolTipLocation(MouseEvent event){ return new Point(event.getX(), event.getY() - TOOLTIP_Y); } diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index 9d23ecf5e..7de271d6e 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -79,7 +79,7 @@ public class JSliderPane extends JPanel { this.setLayout(new BorderLayout()); initSlider(); initShowValSpinner(); - //MoMeak:控制只能输入10-400,但是用起来感觉不舒服,先注释掉吧 + //MoMeak:控制只能输入10-400 JSpinner.NumberEditor editor = new JSpinner.NumberEditor(showValSpinner, "0"); showValSpinner.setEditor(editor); JFormattedTextField textField = ((JSpinner.NumberEditor) showValSpinner.getEditor()).getTextField(); @@ -125,7 +125,7 @@ public class JSliderPane extends JPanel { } private void initShowValSpinner() { - showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, 10, FOUR_HUNDRED, 1)) { + showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, 0, FOUR_HUNDRED, 1)) { public Point getToolTipLocation(MouseEvent event) { return new Point(event.getX(), event.getY() - TOOLTIP_Y); } @@ -232,7 +232,7 @@ public class JSliderPane extends JPanel { new Component[]{fiveTenButton, null}, new Component[]{twoFiveButton, null}, new Component[]{selfAdaptButton, null}, - new Component[]{createSpinnerPanel(), customButton} + new Component[]{customButton, createSpinnerPanel()} }; dialogContentPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, LayoutConstants.VGAP_MEDIUM, 0); dialogContentPanel.setBackground(BACK_COLOR); @@ -475,7 +475,7 @@ class JSliderPaneUI extends BasicSliderUI { class PopupPane extends JPopupMenu { private static final int DIALOG_WIDTH = 157; - private static final int DIALOG_HEIGHT = 292; + private static final int DIALOG_HEIGHT = 192; PopupPane(JButton b, JPanel dialogContentPanel) { this.add(dialogContentPanel, BorderLayout.CENTER); From 4afd2d8ffa9c34d51f03e2507850cbf5d983cd54 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 23 Aug 2017 15:26:12 +0800 Subject: [PATCH 15/18] PMD --- .../src/com/fr/design/mainframe/CellElementPropertyPane.java | 4 ++-- .../src/com/fr/design/mainframe/JFormSliderPane.java | 4 ++-- designer_base/src/com/fr/design/mainframe/JSliderPane.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java index 9e22680cf..dbf166048 100644 --- a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java @@ -79,7 +79,7 @@ public class CellElementPropertyPane extends DockingView { @Override public void fireTitleChange(String addName) { - title.setText(Inter.getLocText("CellElement-Property_Table") + '-' + addName); + title.setText(Inter.getLocText("FR-Designer_CellElement_Property_Table") + '-' + addName); } }; @@ -150,7 +150,7 @@ public class CellElementPropertyPane extends DockingView { @Override public String getViewTitle() { - return Inter.getLocText("CellElement-Property_Table"); + return Inter.getLocText("FR-Designer_CellElement_Property_Table"); } @Override diff --git a/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java b/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java index 9509e23b6..c796baa6c 100644 --- a/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JFormSliderPane.java @@ -336,7 +336,7 @@ public class JFormSliderPane extends JPanel { public void actionPerformed(ActionEvent e) { showValue = (int) showValSpinner.getValue(); isButtonOrIsTxt = true; - if (e.getActionCommand().equals("less")) { + if ("less".equals(e.getActionCommand())) { int newDownVal = showValue - TEN; if (newDownVal >= TEN) { showValue = newDownVal; @@ -346,7 +346,7 @@ public class JFormSliderPane extends JPanel { showValSpinner.setValue(TEN); } } - if (e.getActionCommand().equals("more")) { + if ("more".equals(e.getActionCommand())) { int newUpVal = showValue + TEN; if (newUpVal <= FOUR_HUNDRED) { showValue = newUpVal; diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index 7de271d6e..006a38ce4 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -342,7 +342,7 @@ public class JSliderPane extends JPanel { public void actionPerformed(ActionEvent e) { showValue = (int) showValSpinner.getValue(); isButtonOrIsTxt = true; - if (e.getActionCommand().equals("less")) { + if ("less".equals(e.getActionCommand())) { int newDownVal = showValue - TEN; if (newDownVal >= TEN) { showValue = newDownVal; @@ -352,7 +352,7 @@ public class JSliderPane extends JPanel { showValSpinner.setValue(TEN); } } - if (e.getActionCommand().equals("more")) { + if ("more".equals(e.getActionCommand())) { int newUpVal = showValue + TEN; if (newUpVal <= FOUR_HUNDRED) { showValue = newUpVal; From 3f3d4a563dd65086d8711faf72147cb83fcd3c6f Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 23 Aug 2017 15:33:35 +0800 Subject: [PATCH 16/18] =?UTF-8?q?REPORT-2354=20=E4=B8=8D=E4=BB=8E=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E8=87=AA=E5=8A=A8=E7=99=BB=E5=BD=95=EF=BC=8C=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E7=8E=AF=E5=A2=83=E8=BF=9B=E8=A1=8C=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/bbs/UserInfoPane.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java index 711fd634d..32efda9ce 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java @@ -18,7 +18,9 @@ import com.fr.design.dialog.BasicPane; import com.fr.design.mainframe.DesignerContext; import com.fr.general.DateUtils; import com.fr.general.FRLogger; +import com.fr.general.GeneralContext; import com.fr.general.Inter; +import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; @@ -45,6 +47,7 @@ public class UserInfoPane extends BasicPane{ private UserInfoLabel userInfoLabel; + public UserInfoLabel getUserInfoLabel() { return userInfoLabel; } @@ -64,18 +67,15 @@ public class UserInfoPane extends BasicPane{ this.userInfoLabel = new UserInfoLabel(this); this.markUnSignIn(); - autoLogin(); + addEnvChangedListener(); autoPushLoginDialog(); this.add(userInfoLabel, BorderLayout.CENTER); } - - // 后台自动登录 - private void autoLogin(){ - Thread bbsAutoLoginThread = new Thread(new Runnable() { - @Override - public void run() { + private void addEnvChangedListener(){ + GeneralContext.addEnvChangedListener(new EnvChangedListener() { + public void envChanged() { String username = ConfigManager.getProviderInstance().getBbsUsername(); if (StringUtils.isEmpty(username)){ markUnSignIn(); @@ -84,8 +84,8 @@ public class UserInfoPane extends BasicPane{ } } }); - bbsAutoLoginThread.start(); } + // 计算xml保存的上次弹框时间和当前时间的时间差 private int getDiffFromLastLogin(){ From 2d6a2493ae66b60b9408b0268824816db1fb9750 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Wed, 23 Aug 2017 15:39:19 +0800 Subject: [PATCH 17/18] =?UTF-8?q?REPORT-3457=20=E6=9C=89=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E6=B2=A1=E6=88=AA=E5=8F=96=E5=88=B0=E6=97=A5?= =?UTF-8?q?=E5=BF=97.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java index 26ae4d61f..30356efe8 100644 --- a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java @@ -78,7 +78,8 @@ public class ErrorInfoLogAppender extends AppenderSkeleton { private String readLogID(String log) { String errorCode = Inter.getLocText("FR-Engine_ErrorCode-Prefix"); - String[] matchs = log.split(errorCode + ".*?:"); + // 报错信息国际化不规范, 有些是中文分号, 有些是英文 + String[] matchs = log.split(errorCode + ".*?[:,:]"); if (matchs.length <= 1) { return StringUtils.EMPTY; } From 345cb24b7fbb24b4469b0e155715f94549a2df2a Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Wed, 23 Aug 2017 15:49:24 +0800 Subject: [PATCH 18/18] build failed --- .../src/com/fr/design/file/HistoryTemplateListPane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/file/HistoryTemplateListPane.java b/designer_base/src/com/fr/design/file/HistoryTemplateListPane.java index 50eb2a46f..ab1b30bab 100644 --- a/designer_base/src/com/fr/design/file/HistoryTemplateListPane.java +++ b/designer_base/src/com/fr/design/file/HistoryTemplateListPane.java @@ -233,7 +233,6 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations, C getCurrentEditingTemplate().repaint(); } - @Override public void downLoadSources() { DownLoadOnLineSourcesHelper pane = new DownLoadOnLineSourcesHelper(); pane.addMapJSONSiteInfo();