From 1949b9bb62c14b6c7d2e6dc11bb385f067ed02ef Mon Sep 17 00:00:00 2001 From: zack Date: Thu, 6 Sep 2018 14:51:04 +0800 Subject: [PATCH 01/12] =?UTF-8?q?REPORT-9679=20=E5=8E=BB=E9=99=A4=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E5=BD=B1=E5=93=8D,=E5=90=8E=E7=BB=ADfeature?= =?UTF-8?q?=E5=90=88=E8=BF=9B=E6=9D=A5=E4=B9=8B=E5=90=8E=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=88=90=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/start/module/DesignerActivator.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index 80edec701d..052a061978 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -252,11 +252,11 @@ public class DesignerActivator extends Activator { private static NameableCreator[] hyperlinkTypes() { return new NameableCreator[]{ - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), EmailJavaScript.class, EmailPane.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), - new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class) + new NameObjectCreator("Fine-Design_Basic_Hyperlink_Reportlet", ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), + new NameObjectCreator("Fine-Design_Basic_Email", EmailJavaScript.class, EmailPane.class), + new NameObjectCreator("Fine-Design_Basic_Hyperlink_Web_Link", WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), + new NameObjectCreator("Fine-Design_Basic_JavaScript_Dynamic_Parameters", ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), + new NameObjectCreator("Fine-Design_Report_JavaScript", JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class) }; } From 13679609e07ac94ceb3354ee0a4dd7d28e8b3bbb Mon Sep 17 00:00:00 2001 From: zack Date: Thu, 6 Sep 2018 14:58:22 +0800 Subject: [PATCH 02/12] rt --- .../java/com/fr/start/module/DesignerActivator.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index 052a061978..80edec701d 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -252,11 +252,11 @@ public class DesignerActivator extends Activator { private static NameableCreator[] hyperlinkTypes() { return new NameableCreator[]{ - new NameObjectCreator("Fine-Design_Basic_Hyperlink_Reportlet", ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), - new NameObjectCreator("Fine-Design_Basic_Email", EmailJavaScript.class, EmailPane.class), - new NameObjectCreator("Fine-Design_Basic_Hyperlink_Web_Link", WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), - new NameObjectCreator("Fine-Design_Basic_JavaScript_Dynamic_Parameters", ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), - new NameObjectCreator("Fine-Design_Report_JavaScript", JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class) + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), EmailJavaScript.class, EmailPane.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), + new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class) }; } From 567a6f69fa1f173a2ad5d20f82ceb66f532d2652 Mon Sep 17 00:00:00 2001 From: qinghuiliu Date: Wed, 21 Nov 2018 11:20:31 +0800 Subject: [PATCH 03/12] =?UTF-8?q?CHART-3413=20=E8=AF=8D=E4=BA=91-=E7=B3=BB?= =?UTF-8?q?=E5=88=97=20=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wordcloud/designer/style/VanChartWordCloudSeriesPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java index d5ab61b950..c57161ea77 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java @@ -222,7 +222,7 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane wordCloudPlot.setShapeType((CloudShapeType) cloudShape.getSelectedItem()); if(wordCloudPlot.getShapeType() != CloudShapeType.DEFAULT) { - wordCloudPlot.setShapeImage((ImageBackground) imageBackgroundQuickPane.updateBean()); + wordCloudPlot.setShapeImage((ImageFileBackground) imageBackgroundQuickPane.updateBean()); } else { wordCloudPlot.setShapeImage(null); } From f218ecb7d3c7e1cf28cbbbb45f497cce8a50c716 Mon Sep 17 00:00:00 2001 From: qinghuiliu Date: Wed, 21 Nov 2018 11:44:57 +0800 Subject: [PATCH 04/12] =?UTF-8?q?CHART-3413=20=E4=BC=98=E5=8C=96=E6=94=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wordcloud/designer/style/VanChartWordCloudSeriesPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java index c57161ea77..d5ab61b950 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java @@ -222,7 +222,7 @@ public class VanChartWordCloudSeriesPane extends VanChartAbstractPlotSeriesPane wordCloudPlot.setShapeType((CloudShapeType) cloudShape.getSelectedItem()); if(wordCloudPlot.getShapeType() != CloudShapeType.DEFAULT) { - wordCloudPlot.setShapeImage((ImageFileBackground) imageBackgroundQuickPane.updateBean()); + wordCloudPlot.setShapeImage((ImageBackground) imageBackgroundQuickPane.updateBean()); } else { wordCloudPlot.setShapeImage(null); } From 3340efa251188cf404bd83bd1e6d0d828c087ca2 Mon Sep 17 00:00:00 2001 From: zack Date: Thu, 22 Nov 2018 11:38:03 +0800 Subject: [PATCH 05/12] =?UTF-8?q?REPORT-12865=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=EF=BC=8Cie11=E4=B8=8B=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=87=BA=E6=9D=A5=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/webattr/ReportWebWidgetConstants.java | 2 +- .../src/main/java/com/fr/start/preload/ImagePreLoader.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java b/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java index 9fc67c3fc8..ebfb53b80c 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ReportWebWidgetConstants.java @@ -129,7 +129,7 @@ public class ReportWebWidgetConstants { BaseUtils.readIcon("/com/fr/web/images/appendRow.png"), AppendColumnRow.class); public static final WidgetOption DELETECOLUMNROW = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Delete_Record"), BaseUtils.readIcon("/com/fr/web/images/deleteRow.png"), DeleteColumnRow.class); - public static final WidgetOption VERIFY = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), BaseUtils.readIcon("/com/fr/web/images/verify.gif"), + public static final WidgetOption VERIFY = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), BaseUtils.readIcon("/com/fr/web/images/verify.png"), Verify.class); public static final WidgetOption SUBMITFORCIBLY = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit_Forcibly"), BaseUtils.readIcon("/com/fr/web/images/save2.png"), SubmitForcibly.class); diff --git a/designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java b/designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java index a1b73f8d15..c53bbb6db0 100644 --- a/designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java +++ b/designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java @@ -370,7 +370,7 @@ public class ImagePreLoader { "com/fr/web/images/scale.png", "com/fr/web/images/appendRow.png", "com/fr/web/images/deleteRow.png", - "com/fr/web/images/verify.gif", + "com/fr/web/images/verify.png", "com/fr/web/images/save2.png", "com/fr/design/images/m_file/export.png", "com/fr/web/images/showValue.png", From 58107d6830699490ba8bcfb3897166fa0a515276 Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 22 Nov 2018 15:23:10 +0800 Subject: [PATCH 06/12] =?UTF-8?q?REPORT-12885=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E9=B8=A3=E8=B0=A2=E5=90=8D=E5=8D=95SiteCenter?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/bbs/BBSConstants.java | 34 ++++++++++++--- .../main/java/com/fr/start/SplashContext.java | 41 +++++++++++++++---- 2 files changed, 60 insertions(+), 15 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSConstants.java b/designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSConstants.java index bb600b1cef..5e12f224f9 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSConstants.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSConstants.java @@ -26,29 +26,51 @@ public class BBSConstants { private static Properties PROP = null; + /** + * 获取所有的感谢对象,无法获取在线使用默认 + * @return 感谢对象的数组 + */ public static String[] getAllGuest() { return loadAllGuestsInfoOnline(GUEST_KEY_ONLINE, loadAllGuestsInfo(GUEST_KEY)); } + /** + * 获取所有的链接,无法获取在线使用默认 + * @return 链接的数组 + */ public static String[] getAllLink() { return loadAllGuestsInfoOnline(LINK_KEY_ONLINE, loadAllGuestsInfo(LINK_KEY)); } - //加载所有用户的信息, 用户名, 论坛连接 + /** + * 获取所有的感谢对象,手动选择策略 + * @return 感谢对象的数组 + */ + public static String[] getAllGuestManual(boolean isOnline) { + String guest; + if (isOnline) { + guest = CloudCenter.getInstance().acquireUrlByKind(GUEST_KEY_ONLINE, StringUtils.EMPTY); + } else { + guest = loadAllGuestsInfo(GUEST_KEY); + } + if (StringUtils.isNotEmpty(guest)) { + return guest.split("\\|"); + } + return new String[0]; + } + private static String loadAllGuestsInfo(String key) { return loadAttribute(key, StringUtils.EMPTY); } - //加载所有用户的信息, 用户名, 论坛连接 private static String[] loadAllGuestsInfoOnline(String key, String defaultValue) { - String[] allGuests = new String[0]; String guest = CloudCenter.getInstance().acquireUrlByKind(key, defaultValue); if (StringUtils.isNotEmpty(guest)) { - allGuests = guest.split("\\|"); + return guest.split("\\|"); } - return allGuests; + return new String[0]; } - + //如果要定制, 直接改bbs.properties就行了 private static String loadAttribute(String key, String defaultValue) { if (PROP == null) { diff --git a/designer-realize/src/main/java/com/fr/start/SplashContext.java b/designer-realize/src/main/java/com/fr/start/SplashContext.java index 3eb3ac1059..2e5467557c 100644 --- a/designer-realize/src/main/java/com/fr/start/SplashContext.java +++ b/designer-realize/src/main/java/com/fr/start/SplashContext.java @@ -24,6 +24,7 @@ public class SplashContext { public static final String SPLASH_PATH = "/com/fr/design/images/splash_10.gif"; public static final String SPLASH_CACHE_NAME = "splash_10.gif"; + private static final int FETCH_ONLINE_MAX_TIMES = 10; private static final SplashContext SPLASH_CONTEXT = new SplashContext(); @@ -33,7 +34,8 @@ public class SplashContext { private int loadingIndex = 0; private String[] loading = new String[]{"..", "....", "......"}; - private static final String GUEST = getRandomUser(); + private int fetchOnlineTimes = 0; + private String guest = StringUtils.EMPTY; private ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); @@ -81,6 +83,7 @@ public class SplashContext { scheduler.scheduleAtFixedRate(new Runnable() { @Override public void run() { + showThanks(); loadingIndex++; updateModuleLog(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]); } @@ -90,7 +93,6 @@ public class SplashContext { @Override public void on(Event event, String i18n) { - showThanks(); moduleID = i18n; loadingIndex++; updateModuleLog(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]); @@ -110,21 +112,42 @@ public class SplashContext { /** * 获取随机感谢人员 */ - private static String getRandomUser() { - String[] allGuest = BBSConstants.getAllGuest(); - if (allGuest.length == 0) { - return StringUtils.EMPTY; - } + private String getRandomUser(String[] allGuest) { int num = new Random().nextInt(allGuest.length); return StringUtils.BLANK + allGuest[num]; } /** - * 展示感谢信息 + * 尝试获取在线资源,达到尝试上限之后使用默认值 + */ + private void tryFetchOnline() { + if (StringUtils.isNotEmpty(guest)) { + return; + } + String[] allGuest; + if (fetchOnlineTimes < FETCH_ONLINE_MAX_TIMES) { + allGuest = BBSConstants.getAllGuestManual(true); + if (allGuest.length == 0) { + fetchOnlineTimes++; + return; + } + } else { + allGuest = BBSConstants.getAllGuestManual(false); + } + guest = getRandomUser(allGuest); + } + + /** + * 展示感谢信息。这里场景是优先使用在线名单, + * 甚至可以因此可以延迟几秒显示。目前是尝试 + * 获取10次在线资源,最大时间3秒 */ private void showThanks() { if (shouldShowThanks()) { - updateThanksLog(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Thanks_To") + GUEST); + tryFetchOnline(); + if (StringUtils.isNotEmpty(guest)) { + updateThanksLog(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Thanks_To") + guest); + } } } From 55a372ec03b0c30a4f4dfd03ba2a7e0c3950f488 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Mon, 26 Nov 2018 00:43:12 +0800 Subject: [PATCH 07/12] REPORT-12710 --- .../properties/EventPropertyTable.java | 243 +++++++++--------- .../design/mainframe/WidgetPropertyPane.java | 3 +- 2 files changed, 127 insertions(+), 119 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java b/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java index 77cb10734b..1592b0fd01 100644 --- a/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java +++ b/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java @@ -23,124 +23,131 @@ import java.util.ArrayList; public class EventPropertyTable extends UIListControlPane { - private XCreator creator; - private FormDesigner designer; - - public EventPropertyTable(FormDesigner designer) { - super(); - this.designer = designer; - } - - @Override - public String getAddItemText() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Add_Event"); - } - - public static class WidgetEventListenerUpdatePane extends ListenerUpdatePane { - - @Override - protected JavaScriptActionPane createJavaScriptActionPane() { - return new JavaScriptActionPane() { - @Override - protected DBManipulationPane createDBManipulationPane() { - return new DBManipulationPane(ValueEditorPaneFactory.formEditors()); - } - - @Override - protected String title4PopupWindow() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Callback_Function"); - } - @Override - protected EmailPane initEmaiPane() { - return new FormEmailPane(); - } - @Override - public boolean isForm() { - return true; - } - - protected String[] getDefaultArgs() { - return new String[0]; - } - - }; - } - - @Override - protected boolean supportCellAction() { - return false; - } - } - - private String switchLang(String eventName) { - // 在 properties 文件中找到相应的 key 值 + private XCreator creator; + private FormDesigner designer; + + public EventPropertyTable(FormDesigner designer) { + super(); + this.designer = designer; + } + + @Override + public String getAddItemText() { + return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Add_Event"); + } + + public static class WidgetEventListenerUpdatePane extends ListenerUpdatePane { + + @Override + protected JavaScriptActionPane createJavaScriptActionPane() { + return new JavaScriptActionPane() { + @Override + protected DBManipulationPane createDBManipulationPane() { + return new DBManipulationPane(ValueEditorPaneFactory.formEditors()); + } + + @Override + protected String title4PopupWindow() { + return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Callback_Function"); + } + + @Override + protected EmailPane initEmaiPane() { + return new FormEmailPane(); + } + + @Override + public boolean isForm() { + return true; + } + + protected String[] getDefaultArgs() { + return new String[0]; + } + + }; + } + + @Override + protected boolean supportCellAction() { + return false; + } + } + + private String switchLang(String eventName) { + // 在 properties 文件中找到相应的 key 值 String localeKey = ReportEngineEventMapping.getLocaleName(eventName); return com.fr.design.i18n.Toolkit.i18nText(localeKey); - } - - /** - * 刷新 - */ - public void refresh() { - int selectionSize = designer.getSelectionModel().getSelection().size(); - if (selectionSize == 0 || selectionSize == 1) { - this.creator = selectionSize == 0 ? designer.getRootComponent() : designer.getSelectionModel() - .getSelection().getSelectedCreator(); - } else { - this.creator = null; - ((DefaultListModel) nameableList.getModel()).removeAllElements(); - checkButtonEnabled(); - return; - } - Widget widget = creator.toData(); - - refreshNameableCreator(EventCreator.createEventCreator(widget.supportedEvents(), WidgetEventListenerUpdatePane.class)); - - ArrayList nameObjectList = new ArrayList<>(); - for (int i = 0, size = widget.getListenerSize(); i < size; i++) { - Listener listener = widget.getListener(i); - if (!listener.isDefault()) { - nameObjectList.add(i, new NameObject(switchLang(listener.getEventName()) + (i + 1), listener)); - } - } - populate(nameObjectList.toArray(new NameObject[widget.getListenerSize()])); - checkButtonEnabled(); - this.repaint(); - } - - /** - * 更新控件事件 - * @param creator 控件 - */ - public void updateWidgetListener(XCreator creator) { - (creator.toData()).clearListeners(); - Nameable[] res = this.update(); - for (int i = 0; i < res.length; i++) { - NameObject nameObject = (NameObject)res[i]; - (creator.toData()).addListener((Listener) nameObject.getObject()); - } - - designer.fireTargetModified(); - checkButtonEnabled(); - } - - @Override - protected String title4PopupWindow() { - return "Event"; - } - - @Override - public NameableCreator[] createNameableCreators() { - return new NameableCreator[]{ - new EventCreator(Widget.EVENT_STATECHANGE, WidgetEventListenerUpdatePane.class) - }; - } - - @Override - public void saveSettings() { - if (isPopulating) { - return; - } - updateWidgetListener(creator); - } + } + + /** + * 刷新 + */ + public void refresh() { + int selectionSize = designer.getSelectionModel().getSelection().size(); + if (selectionSize == 0 || selectionSize == 1) { + this.creator = selectionSize == 0 ? designer.getRootComponent() : designer.getSelectionModel() + .getSelection().getSelectedCreator(); + } else { + this.creator = null; + ((DefaultListModel) nameableList.getModel()).removeAllElements(); + checkButtonEnabled(); + return; + } + Widget widget = creator.toData(); + + refreshNameableCreator(EventCreator.createEventCreator(widget.supportedEvents(), WidgetEventListenerUpdatePane.class)); + } + + public void populateNameObjects() { + Widget widget = creator.toData(); + + ArrayList nameObjectList = new ArrayList<>(); + for (int i = 0, size = widget.getListenerSize(); i < size; i++) { + Listener listener = widget.getListener(i); + if (!listener.isDefault()) { + nameObjectList.add(i, new NameObject(switchLang(listener.getEventName()) + (i + 1), listener)); + } + } + populate(nameObjectList.toArray(new NameObject[widget.getListenerSize()])); + checkButtonEnabled(); + this.repaint(); + } + + /** + * 更新控件事件 + * + * @param creator 控件 + */ + public void updateWidgetListener(XCreator creator) { + (creator.toData()).clearListeners(); + Nameable[] res = this.update(); + for (int i = 0; i < res.length; i++) { + NameObject nameObject = (NameObject) res[i]; + (creator.toData()).addListener((Listener) nameObject.getObject()); + } + + designer.fireTargetModified(); + checkButtonEnabled(); + } + + @Override + protected String title4PopupWindow() { + return "Event"; + } + + @Override + public NameableCreator[] createNameableCreators() { + return new NameableCreator[]{ + new EventCreator(Widget.EVENT_STATECHANGE, WidgetEventListenerUpdatePane.class) + }; + } + + @Override + public void saveSettings() { + if (isPopulating) { + return; + } + updateWidgetListener(creator); + } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java b/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java index 0cf740dbe5..af17389be0 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java @@ -108,6 +108,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper */ private void initTables() { formWidgetCardPane.populate(); + eventTable.refresh(); if (mobileExtraPropertyPanes != null) { for (MobileWidgetDefinePane extraPane : mobileExtraPropertyPanes) { @@ -233,7 +234,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper public void tabChanged(int index) { //切换的时候再populate if (index == 1) { - eventTable.refresh(); + eventTable.populateNameObjects(); } else if (index == 2) { if (mobileExtraPropertyPanes != null) { for (MobileWidgetDefinePane extraPane : mobileExtraPropertyPanes) { From b7a1711422b5db2a3e64226f0b418fabb71fd945 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 27 Nov 2018 12:17:09 +0800 Subject: [PATCH 08/12] =?UTF-8?q?REPORT-12852=2010.0=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E4=BA=8B=E4=BB=B6=E5=9C=A8mac=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA=E5=BC=B9=E6=A1=86=E6=9C=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/gui/controlpane/UIControlPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java index cd3c3a5ba4..27ab268dc9 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java @@ -249,7 +249,8 @@ abstract class UIControlPane extends JControlPane { checkValid(); } catch (Exception exp) { // 存在非法输入 拒绝隐藏 - JOptionPane.showMessageDialog(UIControlPane.this.controlUpdatePane, exp.getMessage()); + this.setAlwaysOnTop(true); + JOptionPane.showMessageDialog(this, exp.getMessage()); this.requestFocus(); return; } From 09d865f0130f3627c01aed4fcbe2c45d4aab7692 Mon Sep 17 00:00:00 2001 From: qinghuiliu Date: Tue, 27 Nov 2018 12:20:52 +0800 Subject: [PATCH 09/12] =?UTF-8?q?CHART-3252=20=E6=9B=B4=E6=8D=A2=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E6=95=B0=E6=8D=AE=E5=B8=83=E5=B1=80=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E5=92=8C=E8=BE=B9=E6=A1=86=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/AbstractExtendedChartReportDataPane.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java b/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java index aa6bbf1a04..950d71e8c0 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java @@ -12,7 +12,7 @@ import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.SwingConstants; import java.awt.Component; -import java.awt.FlowLayout; +import java.awt.BorderLayout; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -54,11 +54,11 @@ public abstract class AbstractExtendedChartReportDataPane Date: Tue, 27 Nov 2018 19:55:36 +0800 Subject: [PATCH 10/12] =?UTF-8?q?REPORT-11623=20IOFile=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E5=88=B0=E6=8A=A5=E8=A1=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/fun/Feedback.java | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 designer-base/src/main/java/com/fr/design/fun/Feedback.java diff --git a/designer-base/src/main/java/com/fr/design/fun/Feedback.java b/designer-base/src/main/java/com/fr/design/fun/Feedback.java deleted file mode 100644 index f1e3c7971e..0000000000 --- a/designer-base/src/main/java/com/fr/design/fun/Feedback.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.fr.design.fun; - -/** - * @author richie - * @date 2015-03-31 - * @since 8.0 - */ -public interface Feedback { - String MARK_STRING = "FineReport_Feedback"; - - void didFeedback(); - - Feedback EMPTY = new Feedback() { - @Override - public void didFeedback() { - - } - }; -} \ No newline at end of file From 2327914ea15bbca4b6fdb36e468776edb8159f3e Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 27 Nov 2018 23:00:08 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=20=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=BF=87=E6=97=B6=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/ExtraDesignClassManager.java | 16 ---------------- .../com/fr/start/module/DesignerActivator.java | 2 -- 2 files changed, 18 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java b/designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java index 9529994f53..beb62c06e4 100644 --- a/designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java +++ b/designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java @@ -7,7 +7,6 @@ package com.fr.design; import com.fr.base.BaseUtils; import com.fr.design.data.datapane.TableDataNameObjectCreator; import com.fr.design.fun.CellWidgetOptionProvider; -import com.fr.design.fun.Feedback; import com.fr.design.fun.FormWidgetOptionProvider; import com.fr.design.fun.ParameterWidgetOptionProvider; import com.fr.design.fun.ServerTableDataDefineProvider; @@ -19,8 +18,6 @@ import com.fr.design.menu.ShortCut; import com.fr.design.widget.Appearance; import com.fr.design.widget.mobile.WidgetMobilePane; import com.fr.form.ui.Widget; -import com.fr.general.FRLogger; -import com.fr.general.GeneralUtils; import com.fr.general.IOUtils; import com.fr.plugin.AbstractExtraClassManager; import com.fr.plugin.injectable.PluginModule; @@ -210,19 +207,6 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement return map; } - - public Feedback getFeedback() { - try { - Class clazz = GeneralUtils.classForName("com.fr.design.feedback.CurrentFeedback"); - if (clazz != null) { - return (Feedback) clazz.newInstance(); - } - } catch (Exception e) { - FRLogger.getLogger().info("no feed back support"); - } - return Feedback.EMPTY; - } - @Override protected boolean demountSpecific(PluginSingleInjection injection) { diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index 80edec701d..ace5e2db8b 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -170,8 +170,6 @@ public class DesignerActivator extends Activator { designerRegister(); InformationCollector.getInstance().collectStartTime(); - - ExtraDesignClassManager.getInstance().getFeedback().didFeedback(); } private static void preLoadPane() { From 13dabcebc726cdbfad3ac5eb34b1d0e85918454b Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 28 Nov 2018 10:51:36 +0800 Subject: [PATCH 12/12] REPORT-12635 --- .../src/main/java/com/fr/design/web/CustomIconPane.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java index 90d5874ecb..edce02c7af 100644 --- a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java +++ b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java @@ -24,6 +24,8 @@ import com.fr.stable.Constants; import com.fr.stable.CoreGraphHelper; import com.fr.stable.ListMap; import com.fr.stable.StringUtils; +import com.fr.transaction.Configurations; +import com.fr.transaction.WorkerFacade; import javax.swing.*; import javax.swing.event.ChangeEvent; @@ -283,6 +285,13 @@ public class CustomIconPane extends BasicPane { } public String update() { + //把图标信息入库 + Configurations.update(new WorkerFacade(WidgetInfoConfig.class) { + @Override + public void run() { + WidgetInfoConfig.getInstance().setIconManager(IconManager.getIconManager()); + } + }); return selectedIconName; }