From 4849f46757742fcd5a5e0b601967a2aba508fa15 Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Mon, 8 Oct 2018 16:11:14 +0800 Subject: [PATCH 01/31] =?UTF-8?q?REPORT-10699=20=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=87=8C=E9=9D=A2=E7=9A=84=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=2010.0=E5=88=86=E6=94=AF=E4=B9=9F=E8=A6=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/fun/JavaScriptActionProvider.java | 1 + .../fun/impl/AbstractJavaScriptActionProvider.java | 9 +++++++++ .../com/fr/design/javascript/JavaScriptActionPane.java | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java b/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java index 6d70e8785b..93b6cab2fe 100644 --- a/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java @@ -18,4 +18,5 @@ public interface JavaScriptActionProvider extends Mutable{ FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane); + boolean isSupportType(); } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java index daf4f92c81..9928124cfb 100644 --- a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java @@ -26,4 +26,13 @@ public abstract class AbstractJavaScriptActionProvider extends AbstractProvider public FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane) { return getJavaScriptActionPane(); } + + /** + * 判断是否是支持的类型(cpt,frm),默认是 + * @return + */ + @Override + public boolean isSupportType(){ + return true; + } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java index 3734800964..fb19c89d7f 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java @@ -46,7 +46,9 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { for (JavaScriptActionProvider jsp : javaScriptActionProviders) { - paneList.add(jsp.getJavaScriptActionPane(this)); + if(jsp.isSupportType()){ + paneList.add(jsp.getJavaScriptActionPane(this)); + } } } // 自定义事件 From 98a24462d5f92b29db9c3186614b3a8d33cc5644 Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Tue, 9 Oct 2018 09:19:37 +0800 Subject: [PATCH 02/31] =?UTF-8?q?REPORT-11709=20AlphaFine=E6=95=B4?= =?UTF-8?q?=E5=90=88=E5=B0=8F=E5=B8=86=E8=A7=86=E8=A7=89=E9=AA=8C=E6=94=B6?= =?UTF-8?q?=20REPORT-11692=20alphafine=E5=88=86=E8=AF=8D=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=AD=E5=8C=85=E5=90=AB=E4=BA=86=E8=BF=9E?= =?UTF-8?q?=E8=AF=8D=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/AlphaFineConstants.java | 10 ++++++++- .../cell/render/BottomCellRender.java | 2 +- .../alphafine/component/AlphaFineDialog.java | 3 +++ .../manager/impl/SegmentationManager.java | 19 ++++++++++++++++++ .../mainframe/alphafine/images/back@1x.png | Bin 0 -> 221 bytes .../mainframe/alphafine/images/back@2x.png | Bin 0 -> 336 bytes 6 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@1x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@2x.png diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java index fe72f9c1de..250116542a 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java @@ -5,7 +5,7 @@ import com.fr.general.CloudCenter; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; - +import java.util.ArrayList; /** * Created by XiaXiang on 2017/5/10. @@ -137,5 +137,13 @@ public class AlphaFineConstants { public static final FileExtension[] FILE_EXTENSIONS= new FileExtension[]{FileExtension.CPT, FileExtension.FRM}; public static final int RECOMMEND_MAX_ITEM_NUM = 3; + + public static final String BACK_ICON_NAME = "back@1x.png"; + + public static final ArrayList CONJUNCTION = new ArrayList() {{ + add("和"); + add("与"); + add("的"); + }}; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java index 824fc3bfc0..43aca2cae8 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java @@ -24,7 +24,7 @@ public class BottomCellRender implements ListCellRenderer { JPanel line = new JPanel(); line.setPreferredSize(new Dimension(200, 1)); - line.setBackground(AlphaFineConstants.GRAY); + line.setBackground(AlphaFineConstants.WHITE); panel.add(line, BorderLayout.NORTH); goToWebLabel.setFont(AlphaFineConstants.MEDIUM_FONT); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index 6b21b0b6a7..c21dee121e 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -239,6 +239,7 @@ public class AlphaFineDialog extends UIDialog { hotPane.setLayout(new BorderLayout()); UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Hot")); + uiLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); uiLabel.setFont(AlphaFineConstants.SMALL_FONT); uiLabel.setForeground(AlphaFineConstants.DARK_GRAY); @@ -1378,6 +1379,8 @@ public class AlphaFineDialog extends UIDialog { private void initBackPane() { backPane = new JPanel(new BorderLayout()); JLabel jLabel = new JLabel(" < " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back")); + jLabel.setIcon(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + AlphaFineConstants.BACK_ICON_NAME)); + jLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); jLabel.setPreferredSize(new Dimension(80, 20)); jLabel.setFont(AlphaFineConstants.SMALL_FONT); jLabel.setForeground(AlphaFineConstants.DARK_GRAY); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java index 6f1e3850a0..7ca123a35d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java @@ -6,6 +6,7 @@ import com.fr.stable.StringUtils; import com.fr.third.ibm.icu.text.BreakIterator; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -76,8 +77,26 @@ public class SegmentationManager { result.add(temp); } } + result = removeConjunction(result); String[] strings = new String[result.size()]; result.toArray(strings); return strings; } + + /** + * 去除连词 + * + * @param result + * @return + */ + public static List removeConjunction(List result) { + Iterator it = result.iterator(); + while (it.hasNext()) { + String s = it.next(); + if (AlphaFineConstants.CONJUNCTION.contains(s)) { + it.remove(); + } + } + return result; + } } diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@1x.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..3cc82966536005104870347a6260ffbd0055445a GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4F%}28J29*~C-V}>neOT07$PB= zoN$1#r?SPn$UL=D#m5FY_xDuF110es)H4!SYA{{{B|y3SwbmsNi-x Uc>1{o(1i>Pp00i_>zopr0PZqZkN^Mx literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@2x.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7a0e30162f762e2edc9597e25356b45a7497b5cb GIT binary patch literal 336 zcmV-W0k8gvP)Px$3Q0skR5%f1U?3BOhK90X)5?NP5TBTXg9Fc(FJCs_yLV3vs7@PQEfcx`K0e5> z&!0bU`~UyH15n*YY-$;?31Sn283vTIWn^URJ9FktF*bEX8Az;QAPWc@NQz+u4J6et zyatkE7)}GpH4J1R)?@=r8Y_Tucw-Z!85_WAAd*6Yk%pue%*1M-u&{7AQ1&n|0T-H> znDn7*!pCRECVBVn-QT*px~sl_|85JE50{pf=709=*-mU~(Z#SD2vS6@p*RgB*HF9$ zl4B@A14%WMC<9@Js;jH7{`Kn@IHIJaq}ZQ7f4&zahYYYL8)OB@>;nf5eBtHg^#Y3R i2V#F@If~i1ssI4qxto(zpcf Date: Tue, 9 Oct 2018 09:26:00 +0800 Subject: [PATCH 03/31] =?UTF-8?q?REPORT-10617=2010.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=B8=AD=E6=9C=89=E9=83=A8=E4=BB=BD9.0=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E7=9A=84=E5=8A=9F=E8=83=BD=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-form/src/main/java/com/fr/design/mainframe/JForm.java | 2 +- .../src/main/java/com/fr/design/mainframe/JWorkBook.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 95d4e16ce3..2fb5febd3c 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -936,7 +936,7 @@ public class JForm extends JTemplate implements BaseJForm { */ @Override public PreviewProvider[] supportPreview() { - return new PreviewProvider[]{new FormPreview()}; + return new PreviewProvider[]{new FormPreview(), new MobilePreview()}; } /** diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index b546d618bb..bfc01d0bf9 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -52,6 +52,7 @@ import com.fr.design.menu.ToolBarDef; import com.fr.design.module.DesignModuleFactory; import com.fr.design.parameter.ParameterDefinitePane; import com.fr.design.parameter.ParameterInputPane; +import com.fr.design.preview.MobilePreview; import com.fr.design.preview.PagePreview; import com.fr.design.preview.ViewPreview; import com.fr.design.preview.WriteEnhancePreview; @@ -889,7 +890,7 @@ public class JWorkBook extends JTemplate { public PreviewProvider[] supportPreview() { Set set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); return ArrayUtils.addAll(new PreviewProvider[]{ - new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview() + new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview(), new MobilePreview() }, set.toArray(new PreviewProvider[set.size()])); } From 417414a9f20b3a416fa37591b287fe988652965a Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 9 Oct 2018 09:31:25 +0800 Subject: [PATCH 04/31] =?UTF-8?q?REPORT-11335=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BC=9A=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8A=E4=B8=80=E4=B8=AA=E7=9A=84=E8=AE=B0=E5=BD=95=3D>?= =?UTF-8?q?=E9=AA=8C=E6=94=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/data/datapane/connect/JDBCDefPane.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index 81d52d4e63..d6137b986e 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java @@ -35,12 +35,12 @@ public class JDBCDefPane extends JPanel { public static final String DRIVER_TYPE = "driver_type"; public static final String USER_NAME = "user_name"; public static final int TIME_MULTIPLE = 1000; - private static final String EMPTY_DB = StringUtils.EMPTY; + private static final String OTHER_DB = "Others"; private static Map jdbcMap = new HashMap(); static { - jdbcMap.put("Others", new DriverURLName[]{new DriverURLName("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:"), + jdbcMap.put(OTHER_DB, new DriverURLName[]{new DriverURLName("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:"), new DriverURLName("org.hsqldb.jdbcDriver", "jdbc:hsqldb:file:[PATH_TO_DB_FILES]"), new DriverURLName("com.inet.tds.TdsDriver", "jdbc:inetdae7:localhost:1433/"), new DriverURLName("COM.cloudscape.JDBCDriver", "jdbc:cloudscape:/cloudscape/"), new DriverURLName("com.internetcds.jdbc.tds.Driver", "jdbc:freetds:sqlserver://localhost/")}); @@ -65,7 +65,7 @@ public class JDBCDefPane extends JPanel { private UITextField userNameTextField; private JPasswordField passwordTextField; // 请不要改动dbtype,只应该最后添加 - private final String[] dbtype = {EMPTY_DB, "Oracle", "DB2", "SQL Server", "MySQL", "Sybase", "Access", "Derby", "Postgre","SQLite","Inceptor", "Others"}; + private final String[] dbtype = {"Oracle", "DB2", "SQL Server", "MySQL", "Sybase", "Access", "Derby", "Postgre","SQLite","Inceptor", OTHER_DB}; // carl:DBCP的一些属性 private IntegerEditor DBCP_INITIAL_SIZE = new IntegerEditor(); @@ -184,7 +184,7 @@ public class JDBCDefPane extends JPanel { } } if (!out) { - this.dbtypeComboBox.setSelectedItem(EMPTY_DB); + this.dbtypeComboBox.setSelectedItem(OTHER_DB); } } this.driverComboBox.setSelectedItem(jdbcDatabase.getDriver()); From d891df9538d99d07fb3dc88ad649e7453d1746b3 Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Tue, 9 Oct 2018 10:14:54 +0800 Subject: [PATCH 05/31] =?UTF-8?q?REPORT-11692=20alphafine=E5=88=86?= =?UTF-8?q?=E8=AF=8D=E6=9F=A5=E8=AF=A2=E7=BB=93=E6=9E=9C=E4=B8=AD=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E4=BA=86=E8=BF=9E=E8=AF=8D=E7=BB=93=E6=9E=9C=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/AlphaFineConstants.java | 6 ++--- .../manager/impl/SegmentationManager.java | 22 ++----------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java index 250116542a..1166efad85 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java @@ -141,9 +141,9 @@ public class AlphaFineConstants { public static final String BACK_ICON_NAME = "back@1x.png"; public static final ArrayList CONJUNCTION = new ArrayList() {{ - add("和"); - add("与"); - add("的"); + add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_HE")); + add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_YU")); + add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_DE")); }}; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java index 7ca123a35d..49075769b9 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java @@ -6,7 +6,6 @@ import com.fr.stable.StringUtils; import com.fr.third.ibm.icu.text.BreakIterator; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -73,30 +72,13 @@ public class SegmentationManager { int start = itor.first(); for (int end = itor.next(); end != BreakIterator.DONE; start = end, end = itor.next()) { String temp = searchText.substring(start, end); - if (!StringUtils.isEmpty(temp)) { + //去掉空和连词 + if (!StringUtils.isEmpty(temp) & !AlphaFineConstants.CONJUNCTION.contains(temp)) { result.add(temp); } } - result = removeConjunction(result); String[] strings = new String[result.size()]; result.toArray(strings); return strings; } - - /** - * 去除连词 - * - * @param result - * @return - */ - public static List removeConjunction(List result) { - Iterator it = result.iterator(); - while (it.hasNext()) { - String s = it.next(); - if (AlphaFineConstants.CONJUNCTION.contains(s)) { - it.remove(); - } - } - return result; - } } From 01065e0accadc6759708de326f567b528120bb4e Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Tue, 9 Oct 2018 10:19:18 +0800 Subject: [PATCH 06/31] =?UTF-8?q?=E5=82=BB=E9=80=BC=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/search/manager/impl/SegmentationManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java index 49075769b9..03c39af8ff 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java @@ -73,7 +73,7 @@ public class SegmentationManager { for (int end = itor.next(); end != BreakIterator.DONE; start = end, end = itor.next()) { String temp = searchText.substring(start, end); //去掉空和连词 - if (!StringUtils.isEmpty(temp) & !AlphaFineConstants.CONJUNCTION.contains(temp)) { + if (StringUtils.isNotEmpty(temp) && !AlphaFineConstants.CONJUNCTION.contains(temp)) { result.add(temp); } } From 4eb126b9ad08775375c87a5a521356be9f855f74 Mon Sep 17 00:00:00 2001 From: ju Date: Tue, 9 Oct 2018 12:15:26 +0800 Subject: [PATCH 07/31] =?UTF-8?q?BI-33768=20=E6=8F=90=E4=BE=9B=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=89=80=E6=9C=89=E5=90=AF=E5=8A=A8=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/module/DesignerStartup.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java index 237a19fa90..71f197ea6e 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java @@ -7,6 +7,7 @@ import com.fr.event.Listener; import com.fr.module.Activator; import com.fr.record.analyzer.EnableMetrics; import com.fr.record.analyzer.Metrics; +import com.fr.runtime.FineRuntime; import com.fr.start.Designer; import com.fr.start.ServerStarter; import com.fr.start.SplashContext; @@ -63,7 +64,7 @@ public class DesignerStartup extends Activator { DesignerContext.getDesignerFrame().getProgressDialog().setVisible(true); startSub(StartFinishActivator.class); - + FineRuntime.startFinish(); } private void browserDemo() { From 3269aab42295ef7a2eb54f596c9084f6c59f848c Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Tue, 9 Oct 2018 14:46:46 +0800 Subject: [PATCH 08/31] =?UTF-8?q?REPORT-11709=20AlphaFine=E6=95=B4?= =?UTF-8?q?=E5=90=88=E5=B0=8F=E5=B8=86=E8=A7=86=E8=A7=89=E9=AA=8C=E6=94=B6?= =?UTF-8?q?=2010.0=E5=88=86=E6=94=AF=E6=B2=A1=E6=94=B9=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index c21dee121e..b8b9362cc2 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -1378,7 +1378,7 @@ public class AlphaFineDialog extends UIDialog { */ private void initBackPane() { backPane = new JPanel(new BorderLayout()); - JLabel jLabel = new JLabel(" < " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back")); + JLabel jLabel = new JLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back")); jLabel.setIcon(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + AlphaFineConstants.BACK_ICON_NAME)); jLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); jLabel.setPreferredSize(new Dimension(80, 20)); From 7db1c448d073dcd3900a7dc4d272688fa5a2df36 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 10 Oct 2018 19:40:33 +0800 Subject: [PATCH 09/31] =?UTF-8?q?REPORT-11794=2010.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=AE=89=E8=A3=85=E8=B7=AF=E5=BE=84=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2=E8=B5=84=E6=BA=90=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/extra/PluginWebPane.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java b/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java index 3e2cafdfea..627d16855e 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java @@ -4,6 +4,7 @@ import com.fr.base.TemplateUtils; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; +import com.fr.stable.EncodeConstants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import javafx.application.Platform; @@ -32,6 +33,9 @@ import java.util.Map; public class PluginWebPane extends JFXPanel { private static final String RESOURCE_URL = "resourceURL"; private static final String LANGUAGE = "language"; + private static final String URL_PLUS = "+"; + private static final String URL_SPACING = "%20"; + private static final String URL_PREFIX = "file:///"; private WebEngine webEngine; public PluginWebPane(final String installHome, final String mainJs) { @@ -75,8 +79,9 @@ public class PluginWebPane extends JFXPanel { StringBuffer sb = new StringBuffer(); String line; Map map4Tpl = new HashMap(); - - map4Tpl.put(RESOURCE_URL, "file:///" + URLEncoder.encode(installHome, "UTF-8")); + //URL中关于空格的编码与空格所在位置相关:空格被编码成+的情况只能在查询字符串部分出现,而被编码成%20则可以出现在路径和查询字符串中 + //URLEncoder会将空格转成+,这边需要+转成%20 + map4Tpl.put(RESOURCE_URL, URL_PREFIX + URLEncoder.encode(installHome, EncodeConstants.ENCODING_UTF_8).replace(URL_PLUS, URL_SPACING)); map4Tpl.put(LANGUAGE, GeneralContext.getLocale().toString()); while ((line = read.readLine()) != null) { if (sb.length() > 0) { From c9cb2e9aea5ad4413821c4909db88e3e45f40fe4 Mon Sep 17 00:00:00 2001 From: zheng Date: Thu, 11 Oct 2018 14:59:04 +0800 Subject: [PATCH 10/31] =?UTF-8?q?CHART-2982=20gis=E8=BD=AE=E6=92=AD?= =?UTF-8?q?=E5=9B=BE=20=E4=BF=AE=E6=94=B9typepane=20update=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=BC=9A=E6=9B=BF=E6=8D=A2=E9=BB=98=E8=AE=A4chart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/chart/gui/ChartTypePane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index e847f190c6..cc9a201048 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -152,9 +152,10 @@ public class ChartTypePane extends AbstractChartAttrPane{ try{ Chart newDefaultChart = (Chart)((AbstractChartTypePane)getSelectedPane()).getDefaultChart().clone(); - if(!chart.accept(newDefaultChart.getClass())){ - //vanChart 和 chart 之间切换 - editingCollection.removeNameObject(editingCollection.getSelectedIndex()); + if (!ComparatorUtils.equals(chart.getClass(), newDefaultChart.getClass())) { + //vanChart 和 chart 之间切换 + //不同chart之间切换 + editingCollection.removeNameObject(editingCollection.getSelectedIndex()); editingCollection.addChart(newDefaultChart); chart = newDefaultChart; } From 1622209ed5178b22fcfed527398dde6096845d37 Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 31 Oct 2018 22:07:10 +0800 Subject: [PATCH 11/31] =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/fun/JavaScriptActionProvider.java | 3 +-- .../impl/AbstractJavaScriptActionProvider.java | 4 ++-- .../design/javascript/JavaScriptActionPane.java | 3 ++- .../mainframe/chart/gui/ChartTypePane.java | 2 +- .../mainframe/alphafine/AlphaFineConstants.java | 12 +++++------- .../alphafine/component/AlphaFineDialog.java | 16 ++++++++-------- 6 files changed, 19 insertions(+), 21 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java b/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java index 754bdaeb4a..93b6cab2fe 100644 --- a/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java @@ -18,6 +18,5 @@ public interface JavaScriptActionProvider extends Mutable{ FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane); - boolean isSupportType(); - + boolean isSupportType(); } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java index 4640eaf4fa..9928124cfb 100644 --- a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java @@ -26,8 +26,8 @@ public abstract class AbstractJavaScriptActionProvider extends AbstractProvider public FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane) { return getJavaScriptActionPane(); } - - /** + + /** * 判断是否是支持的类型(cpt,frm),默认是 * @return */ diff --git a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java index 05208762e3..fb19c89d7f 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java @@ -9,6 +9,7 @@ import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.write.submit.DBManipulationPane; import com.fr.form.ui.WebContentUtils; + import com.fr.js.JavaScript; import javax.swing.BorderFactory; @@ -45,7 +46,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { for (JavaScriptActionProvider jsp : javaScriptActionProviders) { - if(jsp.isSupportType()){ + if(jsp.isSupportType()){ paneList.add(jsp.getJavaScriptActionPane(this)); } } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index 5f9dd9a15b..cc9a201048 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -155,7 +155,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ if (!ComparatorUtils.equals(chart.getClass(), newDefaultChart.getClass())) { //vanChart 和 chart 之间切换 //不同chart之间切换 - editingCollection.removeNameObject(editingCollection.getSelectedIndex()); + editingCollection.removeNameObject(editingCollection.getSelectedIndex()); editingCollection.addChart(newDefaultChart); chart = newDefaultChart; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java index 4cebe741ca..1166efad85 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java @@ -2,13 +2,11 @@ package com.fr.design.mainframe.alphafine; import com.fr.base.extension.FileExtension; import com.fr.general.CloudCenter; - import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.util.ArrayList; - /** * Created by XiaXiang on 2017/5/10. */ @@ -51,7 +49,7 @@ public class AlphaFineConstants { public static final Dimension HOT_ICON_LABEL_SIZE = new Dimension(36, 36); - public static final Dimension HOT_ISSUES_JAPNEL_SIZE = new Dimension(213, 182); + public static final Dimension HOT_ISSUES_JAPNEL_SIZE = new Dimension(213,182); public static final Dimension CLOSE_BUTTON_SIZE = new Dimension(40, 40); @@ -85,7 +83,7 @@ public class AlphaFineConstants { public static final String IMAGE_URL = "/com/fr/design/mainframe/alphafine/images/"; - public static final String ALPHA_HOT_IMAGE_NAME = "alphafine_hot"; + public static final String ALPHA_HOT_IMAGE_NAME = "alphafine_hot"; public static final String PLUGIN_SEARCH_URL = CloudCenter.getInstance().acquireUrlByKind("plugin.searchAPI"); @@ -136,11 +134,11 @@ public class AlphaFineConstants { public static final String FIRST_PAGE = "-1"; - public static final FileExtension[] FILE_EXTENSIONS = new FileExtension[]{FileExtension.CPT, FileExtension.FRM}; + public static final FileExtension[] FILE_EXTENSIONS= new FileExtension[]{FileExtension.CPT, FileExtension.FRM}; public static final int RECOMMEND_MAX_ITEM_NUM = 3; - - public static final String BACK_ICON_NAME = "back@1x.png"; + + public static final String BACK_ICON_NAME = "back@1x.png"; public static final ArrayList CONJUNCTION = new ArrayList() {{ add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_HE")); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index 6310a22331..b8b9362cc2 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -32,7 +32,7 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager import com.fr.design.mainframe.alphafine.search.manager.impl.RecentSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.RecommendSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.SegmentationManager; -import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManager; +import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManeger; import com.fr.design.mainframe.errorinfo.ErrorInfoUploader; import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.form.main.Form; @@ -239,21 +239,21 @@ public class AlphaFineDialog extends UIDialog { hotPane.setLayout(new BorderLayout()); UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Hot")); - uiLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + uiLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); uiLabel.setFont(AlphaFineConstants.SMALL_FONT); uiLabel.setForeground(AlphaFineConstants.DARK_GRAY); GridLayout gridLayout = new GridLayout(2, 3, 3, 3); JPanel panel = new JPanel(); panel.setLayout(gridLayout); - if (AlphaFineHelper.isNetworkOk()) { + if(AlphaFineHelper.isNetworkOk()) { if (hotData == null) { hotData = HotIssuesManager.getInstance().getHotIssues(); } for (int i = 0; i < hotData.length; i++) { panel.add(new HotIssueJpanel(hotData[i], i + 1)); } - } else { + }else { hotData = null; for (int i = 0; i < AlphaFineConstants.HOT_ITEMS; i++) { panel.add(new HotIssueJpanel(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Connection_Failed")}, i + 1)); @@ -573,7 +573,7 @@ public class AlphaFineDialog extends UIDialog { } private void buildSimilarList(final String[] searchText) { - addSearchResult(SimilarSearchManager.getInstance().getLessSearchResult(searchText)); + addSearchResult(SimilarSearchManeger.getInstance().getLessSearchResult(searchText)); } private synchronized void addSearchResult(SearchResult searchResult) { @@ -948,7 +948,7 @@ public class AlphaFineDialog extends UIDialog { Thread sendThread = new Thread(new Runnable() { @Override public void run() { - if (StringUtils.isNotEmpty(storeText)) { + if(StringUtils.isNotEmpty(storeText)){ RecentSearchManager searchManager = RecentSearchManager.getInstance(); searchManager.addModel(storeText, cellModel); sendDataToServer(storeText, cellModel); @@ -1052,7 +1052,7 @@ public class AlphaFineDialog extends UIDialog { break; case ROBOT: case RECOMMEND_ROBOT: - moreResult = SimilarSearchManager.getInstance().getMoreSearchResult(searchTextField.getText()); + moreResult = SimilarSearchManeger.getInstance().getMoreSearchResult(searchTextField.getText()); break; case RECOMMEND: moreResult = RecommendSearchManager.getInstance().getMoreSearchResult(searchTextField.getText()); @@ -1379,7 +1379,7 @@ public class AlphaFineDialog extends UIDialog { private void initBackPane() { backPane = new JPanel(new BorderLayout()); JLabel jLabel = new JLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back")); - jLabel.setIcon(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + AlphaFineConstants.BACK_ICON_NAME)); + jLabel.setIcon(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + AlphaFineConstants.BACK_ICON_NAME)); jLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); jLabel.setPreferredSize(new Dimension(80, 20)); jLabel.setFont(AlphaFineConstants.SMALL_FONT); From 2c3c08724965f70b66ce47dd314b4d3715aae26c Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 31 Oct 2018 22:08:01 +0800 Subject: [PATCH 12/31] ct --- .../mainframe/alphafine/AlphaFineConstants.java | 12 +++++++----- .../alphafine/component/AlphaFineDialog.java | 16 ++++++++-------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java index 1166efad85..4cebe741ca 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java @@ -2,11 +2,13 @@ package com.fr.design.mainframe.alphafine; import com.fr.base.extension.FileExtension; import com.fr.general.CloudCenter; + import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.util.ArrayList; + /** * Created by XiaXiang on 2017/5/10. */ @@ -49,7 +51,7 @@ public class AlphaFineConstants { public static final Dimension HOT_ICON_LABEL_SIZE = new Dimension(36, 36); - public static final Dimension HOT_ISSUES_JAPNEL_SIZE = new Dimension(213,182); + public static final Dimension HOT_ISSUES_JAPNEL_SIZE = new Dimension(213, 182); public static final Dimension CLOSE_BUTTON_SIZE = new Dimension(40, 40); @@ -83,7 +85,7 @@ public class AlphaFineConstants { public static final String IMAGE_URL = "/com/fr/design/mainframe/alphafine/images/"; - public static final String ALPHA_HOT_IMAGE_NAME = "alphafine_hot"; + public static final String ALPHA_HOT_IMAGE_NAME = "alphafine_hot"; public static final String PLUGIN_SEARCH_URL = CloudCenter.getInstance().acquireUrlByKind("plugin.searchAPI"); @@ -134,11 +136,11 @@ public class AlphaFineConstants { public static final String FIRST_PAGE = "-1"; - public static final FileExtension[] FILE_EXTENSIONS= new FileExtension[]{FileExtension.CPT, FileExtension.FRM}; + public static final FileExtension[] FILE_EXTENSIONS = new FileExtension[]{FileExtension.CPT, FileExtension.FRM}; public static final int RECOMMEND_MAX_ITEM_NUM = 3; - - public static final String BACK_ICON_NAME = "back@1x.png"; + + public static final String BACK_ICON_NAME = "back@1x.png"; public static final ArrayList CONJUNCTION = new ArrayList() {{ add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_HE")); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index b8b9362cc2..6310a22331 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -32,7 +32,7 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager import com.fr.design.mainframe.alphafine.search.manager.impl.RecentSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.RecommendSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.SegmentationManager; -import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManeger; +import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManager; import com.fr.design.mainframe.errorinfo.ErrorInfoUploader; import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.form.main.Form; @@ -239,21 +239,21 @@ public class AlphaFineDialog extends UIDialog { hotPane.setLayout(new BorderLayout()); UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Hot")); - uiLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + uiLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); uiLabel.setFont(AlphaFineConstants.SMALL_FONT); uiLabel.setForeground(AlphaFineConstants.DARK_GRAY); GridLayout gridLayout = new GridLayout(2, 3, 3, 3); JPanel panel = new JPanel(); panel.setLayout(gridLayout); - if(AlphaFineHelper.isNetworkOk()) { + if (AlphaFineHelper.isNetworkOk()) { if (hotData == null) { hotData = HotIssuesManager.getInstance().getHotIssues(); } for (int i = 0; i < hotData.length; i++) { panel.add(new HotIssueJpanel(hotData[i], i + 1)); } - }else { + } else { hotData = null; for (int i = 0; i < AlphaFineConstants.HOT_ITEMS; i++) { panel.add(new HotIssueJpanel(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Connection_Failed")}, i + 1)); @@ -573,7 +573,7 @@ public class AlphaFineDialog extends UIDialog { } private void buildSimilarList(final String[] searchText) { - addSearchResult(SimilarSearchManeger.getInstance().getLessSearchResult(searchText)); + addSearchResult(SimilarSearchManager.getInstance().getLessSearchResult(searchText)); } private synchronized void addSearchResult(SearchResult searchResult) { @@ -948,7 +948,7 @@ public class AlphaFineDialog extends UIDialog { Thread sendThread = new Thread(new Runnable() { @Override public void run() { - if(StringUtils.isNotEmpty(storeText)){ + if (StringUtils.isNotEmpty(storeText)) { RecentSearchManager searchManager = RecentSearchManager.getInstance(); searchManager.addModel(storeText, cellModel); sendDataToServer(storeText, cellModel); @@ -1052,7 +1052,7 @@ public class AlphaFineDialog extends UIDialog { break; case ROBOT: case RECOMMEND_ROBOT: - moreResult = SimilarSearchManeger.getInstance().getMoreSearchResult(searchTextField.getText()); + moreResult = SimilarSearchManager.getInstance().getMoreSearchResult(searchTextField.getText()); break; case RECOMMEND: moreResult = RecommendSearchManager.getInstance().getMoreSearchResult(searchTextField.getText()); @@ -1379,7 +1379,7 @@ public class AlphaFineDialog extends UIDialog { private void initBackPane() { backPane = new JPanel(new BorderLayout()); JLabel jLabel = new JLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back")); - jLabel.setIcon(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + AlphaFineConstants.BACK_ICON_NAME)); + jLabel.setIcon(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + AlphaFineConstants.BACK_ICON_NAME)); jLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); jLabel.setPreferredSize(new Dimension(80, 20)); jLabel.setFont(AlphaFineConstants.SMALL_FONT); From 673fa11ca699145c2668b484733d5c937f4b3b94 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 23 Nov 2018 14:07:13 +0800 Subject: [PATCH 13/31] =?UTF-8?q?REPORT-12928=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8finedb=E9=94=81=E4=BD=8F,=20=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E6=98=AF=E5=A4=9A=E7=BA=BF=E7=A8=8B=E5=8A=A0=E8=BD=BD=E9=97=AE?= =?UTF-8?q?=E9=A2=98.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toolbar/UpdateActionManager.java | 24 +++++++----------- .../src/main/java/com/fr/start/Designer.java | 25 ------------------- .../fr/start/module/DesignerActivator.java | 18 ++++++++++++- 3 files changed, 26 insertions(+), 41 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/UpdateActionManager.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/UpdateActionManager.java index dcc053e126..fe36297744 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/UpdateActionManager.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/UpdateActionManager.java @@ -56,21 +56,15 @@ public class UpdateActionManager { } public synchronized void dealWithSearchText(final String paneClass, final UpdateAction updateAction) { - threadPoolExecutor.allowCoreThreadTimeOut(true); - threadPoolExecutor.execute(new Runnable() { - @Override - public void run() { - JPanel panel = null; - try { - panel = (JPanel) StableUtils.classForName(paneClass).newInstance(); - if (panel instanceof LoadingBasicPane) { - panel = ((LoadingBasicPane) panel).getAllComponents(); - } - updateAction.setSearchText(updateAction.getComponentTexts(panel, "_", new StringBuffer(), new StringBuffer(), new StringBuffer())); - } catch (Exception e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); - } + JPanel panel = null; + try { + panel = (JPanel) StableUtils.classForName(paneClass).newInstance(); + if (panel instanceof LoadingBasicPane) { + panel = ((LoadingBasicPane) panel).getAllComponents(); } - }); + updateAction.setSearchText(updateAction.getComponentTexts(panel, "_", new StringBuffer(), new StringBuffer(), new StringBuffer())); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } } } \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/start/Designer.java b/designer-realize/src/main/java/com/fr/start/Designer.java index 756cd12623..c9ce8bc06a 100644 --- a/designer-realize/src/main/java/com/fr/start/Designer.java +++ b/designer-realize/src/main/java/com/fr/start/Designer.java @@ -29,7 +29,6 @@ import com.fr.design.mainframe.JWorkBook; import com.fr.design.mainframe.alphafine.component.AlphaFinePane; import com.fr.design.mainframe.bbs.UserInfoLabel; import com.fr.design.mainframe.bbs.UserInfoPane; -import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; @@ -54,7 +53,6 @@ import com.fr.stable.xml.XMLTools; import com.fr.start.fx.SplashFx; import com.fr.start.jni.SplashMac; import com.fr.start.module.StartupArgs; -import com.fr.start.preload.ImagePreLoader; import com.fr.start.server.ServerTray; import com.fr.workspace.WorkContext; @@ -69,8 +67,6 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.util.ArrayList; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; @@ -110,8 +106,6 @@ public class Designer extends BaseDesigner { RestartHelper.deleteRecordFilesWhenStart(); - preloadResource(); - SplashContext.getInstance().registerSplash(createSplash()); SplashContext.getInstance().show(); @@ -131,25 +125,6 @@ public class Designer extends BaseDesigner { } - private static void preloadResource() { - ExecutorService service = Executors.newCachedThreadPool(); - - service.submit(new Runnable() { - @Override - public void run() { - new ImagePreLoader(); - } - }); - - service.submit(new Runnable() { - @Override - public void run() { - TemplateInfoCollector.getInstance(); - } - }); - service.shutdown(); - } - private static SplashStrategy createSplash() { // 这里可以开接口加载自定义启动画面 if (OperatingSystem.isWindows()) { 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..2b8e77ac47 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 @@ -52,6 +52,7 @@ import com.fr.design.mainframe.form.FormReportComponentComposite; import com.fr.design.mainframe.loghandler.DesignerLogAppender; import com.fr.design.mainframe.loghandler.LogMessageBar; import com.fr.design.mainframe.socketio.DesignerSocketIO; +import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.design.module.DesignModuleFactory; import com.fr.design.parameter.FormParameterReader; import com.fr.design.parameter.ParameterPropertyPane; @@ -98,9 +99,10 @@ import com.fr.stable.script.ValueConverter; import com.fr.stable.xml.ObjectTokenizer; import com.fr.stable.xml.ObjectXMLWriterFinder; import com.fr.start.BBSGuestPaneProvider; +import com.fr.start.preload.ImagePreLoader; import com.fr.xml.ReportXMLUtils; -import java.awt.*; +import java.awt.Image; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.List; @@ -176,6 +178,20 @@ public class DesignerActivator extends Activator { private static void preLoadPane() { ExecutorService service = Executors.newCachedThreadPool(); + service.submit(new Runnable() { + @Override + public void run() { + new ImagePreLoader(); + } + }); + + service.submit(new Runnable() { + @Override + public void run() { + TemplateInfoCollector.getInstance(); + } + }); + service.submit(new Runnable() { @Override public void run() { From 22cd3c95e453180bb5a968e6c739107aefa9ebad Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 4 Dec 2018 09:01:04 +0800 Subject: [PATCH 14/31] =?UTF-8?q?REPORT-13215=2010.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=90=AF=E5=8A=A8=E8=BF=87=E7=A8=8B=E4=B8=AD=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E7=94=B1=E4=BA=8E=E6=8A=A5=E9=94=99=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=99=BD=E8=89=B2=E8=92=99=E5=B1=82=E4=B8=8D=E6=B6=88=E5=A4=B1?= =?UTF-8?q?.=E5=90=8C=E6=AD=A5master?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/ServerStarter.java | 6 +++++- .../main/java/com/fr/start/module/DesignerStartup.java | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/start/ServerStarter.java b/designer-base/src/main/java/com/fr/start/ServerStarter.java index 3115730d17..7499b1ae39 100644 --- a/designer-base/src/main/java/com/fr/start/ServerStarter.java +++ b/designer-base/src/main/java/com/fr/start/ServerStarter.java @@ -66,7 +66,11 @@ public class ServerStarter { @Override public void run() { - FineEmbedServer.start(); + try { + FineEmbedServer.start(); + } finally { + FineEmbedServerMonitor.getInstance().setComplete(); + } BrowseUtils.browser(url); } }); diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java index 71f197ea6e..701a6936c1 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java @@ -52,9 +52,11 @@ public class DesignerStartup extends Activator { @Override public void run() { - - designer.show(args); - DesignerContext.getDesignerFrame().getProgressDialog().dispose(); + try { + designer.show(args); + } finally { + DesignerContext.getDesignerFrame().getProgressDialog().dispose(); + } } }); service.shutdown(); From a8c0718ca3257b8a8cee4f7b2b66fc92eeae2314 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Tue, 4 Dec 2018 09:58:02 +0800 Subject: [PATCH 15/31] =?UTF-8?q?REPORT-12924=20=E6=8E=92=E6=9F=A5?= =?UTF-8?q?=E9=97=AA=E9=80=80,=20=E5=85=88=E6=89=93=E5=8D=B0=E6=8A=A5?= =?UTF-8?q?=E9=94=99,=20=E7=B1=BB=E4=BC=BCfinedb=E9=94=81=E4=BA=86?= =?UTF-8?q?=E6=98=AF=E4=B8=8D=E9=9C=80=E8=A6=81=E9=97=AA=E9=80=80=E7=9A=84?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-realize/src/main/java/com/fr/start/Designer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/Designer.java b/designer-realize/src/main/java/com/fr/start/Designer.java index c9ce8bc06a..5b10dc9c1c 100644 --- a/designer-realize/src/main/java/com/fr/start/Designer.java +++ b/designer-realize/src/main/java/com/fr/start/Designer.java @@ -115,7 +115,7 @@ public class Designer extends BaseDesigner { try { designerRoot.start(); } catch (LifecycleFatalError fatal) { - System.exit(0); + FineLoggerFactory.getLogger().error(fatal.getMessage(), fatal); } if (WorkContext.getCurrent().isLocal()) { From 2202ea1564806b2a992cf33c6734480575c64b4f Mon Sep 17 00:00:00 2001 From: qinghuiliu Date: Thu, 6 Dec 2018 16:36:06 +0800 Subject: [PATCH 16/31] =?UTF-8?q?CHART-3472=20=E8=BF=98=E5=8E=9FCHART-3252?= =?UTF-8?q?=E7=9A=84master=E5=88=86=E6=94=AF?= 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 950d71e8c0..aa6bbf1a04 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.BorderLayout; +import java.awt.FlowLayout; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -54,11 +54,11 @@ public abstract class AbstractExtendedChartReportDataPane Date: Tue, 11 Dec 2018 17:03:12 +0800 Subject: [PATCH 17/31] =?UTF-8?q?REPORT-13363=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=E5=90=8E=EF=BC=8C=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E9=97=AA=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/Designer.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/Designer.java b/designer-realize/src/main/java/com/fr/start/Designer.java index 5b10dc9c1c..e80a316031 100644 --- a/designer-realize/src/main/java/com/fr/start/Designer.java +++ b/designer-realize/src/main/java/com/fr/start/Designer.java @@ -57,6 +57,7 @@ import com.fr.start.server.ServerTray; import com.fr.workspace.WorkContext; import javax.swing.JComponent; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.border.MatteBorder; import java.awt.Component; @@ -92,14 +93,16 @@ public class Designer extends BaseDesigner { * @param args 参数 */ public static void main(String[] args) { - + //启动运行时 FineRuntime.start(); BuildContext.setBuildFilePath("/com/fr/stable/build.properties"); // 如果端口被占用了 说明程序已经运行了一次,也就是说,已经建立一个监听服务器,现在只要给服务器发送命令就好了 if (DesignUtils.isStarted()) { DesignUtils.clientSend(args); - FineLoggerFactory.getLogger().error("Designer port not available."); + String message = "Designer port not available."; + JOptionPane.showMessageDialog(null, message, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE); + FineLoggerFactory.getLogger().error(message); System.exit(0); return; } @@ -115,7 +118,10 @@ public class Designer extends BaseDesigner { try { designerRoot.start(); } catch (LifecycleFatalError fatal) { + SplashContext.getInstance().hide(); + JOptionPane.showMessageDialog(null, fatal.getMessage(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE); FineLoggerFactory.getLogger().error(fatal.getMessage(), fatal); + System.exit(0); } if (WorkContext.getCurrent().isLocal()) { From 94857554978ca4984db9f9d9c309cb5de5b7efbb Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 11 Dec 2018 17:06:42 +0800 Subject: [PATCH 18/31] =?UTF-8?q?REPORT-13363=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=E5=90=8E=EF=BC=8C=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E9=97=AA=E9=80=80=3D>=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-realize/src/main/java/com/fr/start/Designer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/Designer.java b/designer-realize/src/main/java/com/fr/start/Designer.java index e80a316031..60a80469fe 100644 --- a/designer-realize/src/main/java/com/fr/start/Designer.java +++ b/designer-realize/src/main/java/com/fr/start/Designer.java @@ -100,9 +100,7 @@ public class Designer extends BaseDesigner { // 如果端口被占用了 说明程序已经运行了一次,也就是说,已经建立一个监听服务器,现在只要给服务器发送命令就好了 if (DesignUtils.isStarted()) { DesignUtils.clientSend(args); - String message = "Designer port not available."; - JOptionPane.showMessageDialog(null, message, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE); - FineLoggerFactory.getLogger().error(message); + FineLoggerFactory.getLogger().error("Designer port not available."); System.exit(0); return; } From db4aca22e43cff97c53e077bbfb76b9ff30b82d2 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 24 Dec 2018 15:56:19 +0800 Subject: [PATCH 19/31] 1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 408bc7be85..7be92004bb 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ - 4.0.0 + 4.0.0 com.fr.report From e80551f3cb4bc2f9422807227da7e5fdceb58555 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 24 Dec 2018 15:56:49 +0800 Subject: [PATCH 20/31] . --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7be92004bb..408bc7be85 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ - 4.0.0 + 4.0.0 com.fr.report From 9eead4389df6551742e65a70223f67e108557647 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Thu, 27 Dec 2018 15:29:06 +0800 Subject: [PATCH 21/31] . --- .../design/fun/JavaScriptActionProvider.java | 17 ++--------------- .../impl/AbstractJavaScriptActionProvider.java | 18 +++++------------- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java b/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java index 5f1f1aa5aa..93b6cab2fe 100644 --- a/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java @@ -2,12 +2,11 @@ package com.fr.design.fun; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.javascript.JavaScriptActionPane; -import com.fr.design.mainframe.JTemplate; import com.fr.js.JavaScript; import com.fr.stable.fun.mark.Mutable; /** - * 控件的事件扩展接口 + * Created by zack on 2015/8/14. */ public interface JavaScriptActionProvider extends Mutable{ @@ -15,21 +14,9 @@ public interface JavaScriptActionProvider extends Mutable{ int CURRENT_LEVEL = 1; - /** - * 事件的界面 - */ FurtherBasicBeanPane getJavaScriptActionPane(); - /** - * 这个界面在哪些类型模板设计的时候会出现 - * @see com.fr.design.mainframe.JWorkBook - * @see com.fr.design.mainframe.JForm - */ - boolean accept(JTemplate template); - - @Deprecated FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane); - @Deprecated - boolean isSupportType(); + boolean isSupportType(); } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java index 7f57f35a5d..9928124cfb 100644 --- a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java @@ -3,8 +3,6 @@ package com.fr.design.fun.impl; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.fun.JavaScriptActionProvider; import com.fr.design.javascript.JavaScriptActionPane; -import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.JTemplate; import com.fr.js.JavaScript; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; @@ -28,17 +26,11 @@ public abstract class AbstractJavaScriptActionProvider extends AbstractProvider public FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane) { return getJavaScriptActionPane(); } - - @Override - public boolean accept(JTemplate template) { - // 这里只是为了兼容原来的isSupportType方法 - boolean result = isSupportType(); - if (result) { - return true; - } - return true; - } - + + /** + * 判断是否是支持的类型(cpt,frm),默认是 + * @return + */ @Override public boolean isSupportType(){ return true; From cc9aec02ff5957f4fd5d0657a02bfde94900e83a Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Thu, 27 Dec 2018 15:30:28 +0800 Subject: [PATCH 22/31] . --- .../java/com/fr/design/javascript/JavaScriptActionPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java index 3b025ae1fa..fb19c89d7f 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java @@ -7,9 +7,9 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.fun.JavaScriptActionProvider; import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.ibutton.UIButton; -import com.fr.design.mainframe.DesignerContext; import com.fr.design.write.submit.DBManipulationPane; import com.fr.form.ui.WebContentUtils; + import com.fr.js.JavaScript; import javax.swing.BorderFactory; @@ -46,7 +46,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { for (JavaScriptActionProvider jsp : javaScriptActionProviders) { - if(jsp.accept(DesignerContext.getDesignerFrame().getSelectedJTemplate())){ + if(jsp.isSupportType()){ paneList.add(jsp.getJavaScriptActionPane(this)); } } From 8c7b7ec9f366a1007b894ee9453a674eb1202075 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Thu, 27 Dec 2018 15:31:47 +0800 Subject: [PATCH 23/31] . --- .../AbstractExtendedChartReportDataPane.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 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 e42707a62a..aa6bbf1a04 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 @@ -6,14 +6,13 @@ import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.SwingConstants; import java.awt.Component; -import java.awt.BorderLayout; +import java.awt.FlowLayout; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -50,17 +49,16 @@ public abstract class AbstractExtendedChartReportDataPane Date: Thu, 27 Dec 2018 15:34:47 +0800 Subject: [PATCH 24/31] ct --- .../design/javascript/JavaScriptActionPane.java | 4 ++-- .../AbstractExtendedChartReportDataPane.java | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java index fb19c89d7f..3b025ae1fa 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java @@ -7,9 +7,9 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.fun.JavaScriptActionProvider; import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.mainframe.DesignerContext; import com.fr.design.write.submit.DBManipulationPane; import com.fr.form.ui.WebContentUtils; - import com.fr.js.JavaScript; import javax.swing.BorderFactory; @@ -46,7 +46,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { for (JavaScriptActionProvider jsp : javaScriptActionProviders) { - if(jsp.isSupportType()){ + if(jsp.accept(DesignerContext.getDesignerFrame().getSelectedJTemplate())){ paneList.add(jsp.getJavaScriptActionPane(this)); } } 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..e42707a62a 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 @@ -6,13 +6,14 @@ import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; 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; @@ -49,16 +50,17 @@ public abstract class AbstractExtendedChartReportDataPane Date: Thu, 27 Dec 2018 15:35:21 +0800 Subject: [PATCH 25/31] ct --- .../design/fun/JavaScriptActionProvider.java | 17 +++++++++++++++-- .../impl/AbstractJavaScriptActionProvider.java | 18 +++++++++++++----- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java b/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java index 93b6cab2fe..5f1f1aa5aa 100644 --- a/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java @@ -2,11 +2,12 @@ package com.fr.design.fun; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.javascript.JavaScriptActionPane; +import com.fr.design.mainframe.JTemplate; import com.fr.js.JavaScript; import com.fr.stable.fun.mark.Mutable; /** - * Created by zack on 2015/8/14. + * 控件的事件扩展接口 */ public interface JavaScriptActionProvider extends Mutable{ @@ -14,9 +15,21 @@ public interface JavaScriptActionProvider extends Mutable{ int CURRENT_LEVEL = 1; + /** + * 事件的界面 + */ FurtherBasicBeanPane getJavaScriptActionPane(); + /** + * 这个界面在哪些类型模板设计的时候会出现 + * @see com.fr.design.mainframe.JWorkBook + * @see com.fr.design.mainframe.JForm + */ + boolean accept(JTemplate template); + + @Deprecated FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane); - boolean isSupportType(); + @Deprecated + boolean isSupportType(); } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java index 9928124cfb..7f57f35a5d 100644 --- a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java @@ -3,6 +3,8 @@ package com.fr.design.fun.impl; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.fun.JavaScriptActionProvider; import com.fr.design.javascript.JavaScriptActionPane; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.JTemplate; import com.fr.js.JavaScript; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; @@ -26,11 +28,17 @@ public abstract class AbstractJavaScriptActionProvider extends AbstractProvider public FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane) { return getJavaScriptActionPane(); } - - /** - * 判断是否是支持的类型(cpt,frm),默认是 - * @return - */ + + @Override + public boolean accept(JTemplate template) { + // 这里只是为了兼容原来的isSupportType方法 + boolean result = isSupportType(); + if (result) { + return true; + } + return true; + } + @Override public boolean isSupportType(){ return true; From b240e98948033c8a089bd11ebc384675f1ff6915 Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Wed, 2 Jan 2019 18:05:50 +0800 Subject: [PATCH 26/31] =?UTF-8?q?REPORT-14022=20=E3=80=90=E9=9A=BE?= =?UTF-8?q?=E8=BF=98=E5=8E=9F=E3=80=91=E6=9C=80=E6=96=B0=E7=9A=8429?= =?UTF-8?q?=E5=8F=B7release=EF=BC=8C=E8=8E=AB=E5=90=8D=E5=85=B6=E5=A6=99?= =?UTF-8?q?=E7=9A=84=E5=8D=A1=E4=BD=8F=E5=BE=88=E4=B9=85=EF=BC=8C=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E7=99=BE=E5=88=86=E7=99=BE=E7=9A=84cpu=E5=8D=A0?= =?UTF-8?q?=E7=94=A8=20=E5=90=88=E5=B9=B6=E5=8F=91=E9=80=81=EF=BC=8C?= =?UTF-8?q?=E5=8E=BB=E9=87=8D=EF=BC=9B=E6=AF=8F=E6=AC=A1query=20200?= =?UTF-8?q?=E6=9D=A1=EF=BC=8C=E6=94=BE=E5=85=A5=E5=86=85=E5=AD=98=EF=BC=8C?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=88=90=E5=8A=9F=E5=86=8D=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E8=AF=B7=E6=B1=82=20=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=88=B010.0=20master?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/InformationCollector.java | 186 ++++++++++-------- 1 file changed, 104 insertions(+), 82 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java b/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java index 61b583c615..49ad7d6a37 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java @@ -89,11 +89,15 @@ public class InformationCollector implements XMLReadable, XMLWriter { private static final String ATTR_TEXT = "text"; private static final String ATTR_SOURCE = "source"; private static final String ATTR_TIME = "time"; + private static final String ATTR_TIMES = "times"; private static final String ATTR_TITLE = "title"; private static final String ATTR_USER_NAME = "username"; private static final String ATTR_UUID = "uuid"; + private static final String ATTR_ITEMS = "items"; private static final String ATTR_FUNCTION_ARRAY = "functionArray"; private static final int MAX_EACH_REQUEST_RECORD_COUNT = 200; + private static final int PAGE_SIZE = 200; + private long totalCount = -1; private static InformationCollector collector; @@ -214,26 +218,14 @@ public class InformationCollector implements XMLReadable, XMLWriter { if (currentTime - lastTime <= DELTA) { return; } - JSONArray content = getFunctionsContent(currentTime, lastTime); - boolean success = false; FineLoggerFactory.getLogger().info("Start sent function records to the cloud center..."); - String url = CloudCenter.getInstance().acquireUrlByKind(TABLE_FUNCTION_RECORD); - try { - for(int i=0;i 0){ - success = sendFunctionRecord(url, functionArray); - } - } - //服务器返回true, 说明已经获取成功, 更新最后一次发送时间 - if (success) { - this.lastTime = dateToString(); - FineLoggerFactory.getLogger().info("Function records successfully sent to the cloud center."); - } - }catch (Exception e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); + queryAndSendOnePageFunctionContent(currentTime, lastTime, 0); + long page = (totalCount/PAGE_SIZE) + 1; + for(int i=1; i focusPoints = MetricRegistry.getMetric().find(FocusPoint.class,condition); + //第一次查询获取总记录数 + if(page == 0){ + totalCount = focusPoints.getTotalCount(); + } + sendThisPageFunctionContent(focusPoints); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + + private void sendThisPageFunctionContent(DataList focusPoints) { + String url = CloudCenter.getInstance().acquireUrlByKind(TABLE_FUNCTION_RECORD); + try { + JSONObject jsonObject = dealWithSendFunctionContent(focusPoints); + sendFunctionRecord(url, jsonObject); + } catch (JSONException e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + + private JSONObject dealWithSendFunctionContent(DataList focusPoints) throws JSONException { + JSONObject jsonObject = new JSONObject(); + Map map = new HashMap<>(); + if(!focusPoints.isEmpty()){ + DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); + String bbsUserName = MarketConfig.getInstance().getBbsUsername(); + String uuid = envManager.getUUID(); + jsonObject.put(ATTR_UUID, uuid); + jsonObject.put(ATTR_USER_NAME, bbsUserName); + for(FocusPoint focusPoint : focusPoints.getList()) { + FunctionRecord functionRecord = getOneRecord(focusPoint); + if (map.containsKey(focusPoint.getId())) { + functionRecord.setTimes(functionRecord.getTimes() + 1); + map.put(focusPoint.getId(), functionRecord); + } else { + map.put(focusPoint.getId(), functionRecord); + } + } + jsonObject.put(ATTR_ITEMS, mapToJSONArray(map)); + } + return jsonObject; + } + + private JSONArray mapToJSONArray(Map map) throws JSONException { + JSONArray jsonArray = new JSONArray(); + for(String keys : map.keySet()){ + FunctionRecord functionRecord = (FunctionRecord)map.get(keys); + JSONObject jo = new JSONObject(); + jo.put(ATTR_ID, functionRecord.getId()); + jo.put(ATTR_TEXT, functionRecord.getText()); + jo.put(ATTR_SOURCE, functionRecord.getSource()); + jo.put(ATTR_TIME, functionRecord.getTime()); + jo.put(ATTR_TITLE, functionRecord.getTitle()); + jo.put(ATTR_TIMES, functionRecord.getTimes()); + jsonArray.put(jo); + } + return jsonArray; + } + + private void sendFunctionRecord(String url, JSONObject record) { boolean success = false; try { HashMap para = new HashMap<>(); @@ -260,12 +320,28 @@ public class InformationCollector implements XMLReadable, XMLWriter { para.put("content", record); String res = HttpToolbox.post(url, para); success = ComparatorUtils.equals(new JSONObject(res).get("status"), "success"); + if (success) { + this.lastTime = dateToString(); + } else { + FineLoggerFactory.getLogger().error("Error occured when sent function records to the cloud center."); + } } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } - return success; } + private FunctionRecord getOneRecord(FocusPoint focusPoint) { + FunctionRecord functionRecord = new FunctionRecord(); + functionRecord.setId(focusPoint.getId() == null?StringUtils.EMPTY : focusPoint.getId()); + functionRecord.setText(focusPoint.getText() == null?StringUtils.EMPTY : focusPoint.getText()); + functionRecord.setSource(focusPoint.getSource()); + functionRecord.setTime(focusPoint.getTime().getTime()); + functionRecord.setTitle(focusPoint.getTitle() == null?StringUtils.EMPTY : focusPoint.getTitle()); + functionRecord.setUsername(MarketConfig.getInstance().getBbsUsername() == null?StringUtils.EMPTY : MarketConfig.getInstance().getBbsUsername()); + functionRecord.setUuid(DesignerEnvManager.getEnvManager().getUUID() == null?StringUtils.EMPTY : DesignerEnvManager.getEnvManager().getUUID()); + return functionRecord; + } + /** * 收集开始使用时间,发送信息 */ @@ -426,69 +502,6 @@ public class InformationCollector implements XMLReadable, XMLWriter { }); } - public JSONArray getFunctionsContent(long current, long last) { - //记录当前条数,达到200条合并成一个请求 - int count = 0; - JSONArray functionArray = new JSONArray(); - QueryCondition condition = QueryFactory.create() - .addRestriction(RestrictionFactory.lte(COLUMN_TIME, current)) - .addRestriction(RestrictionFactory.gte(COLUMN_TIME, last)); - try { - DataList focusPoints = MetricRegistry.getMetric().find(FocusPoint.class,condition); - TreeSet focusPointsList = new TreeSet<>(); - if(!focusPoints.isEmpty()){ - for(int i=0;i< focusPoints.getList().size();i++){ - FocusPoint focusPoint = focusPoints.getList().get(i); - if(focusPoint != null){ - if((++count <= MAX_EACH_REQUEST_RECORD_COUNT)){ - focusPointsList.add(getOneRecord(focusPoint)); - } else { - count = 0; - functionArray.put(setToJSONArray(focusPointsList)); - focusPointsList.add(getOneRecord(focusPoint)); - } - if(i == (focusPoints.getList().size() -1)){ - functionArray.put(setToJSONArray(focusPointsList)); - } - } - } - } - - } catch (Exception e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); - } - return functionArray; - } - - private FunctionRecord getOneRecord(FocusPoint focusPoint) { - FunctionRecord functionRecord = new FunctionRecord(); - functionRecord.setId(focusPoint.getId() == null?StringUtils.EMPTY : focusPoint.getId()); - functionRecord.setText(focusPoint.getText() == null?StringUtils.EMPTY : focusPoint.getText()); - functionRecord.setSource(focusPoint.getSource()); - functionRecord.setTime(focusPoint.getTime().getTime()); - functionRecord.setTitle(focusPoint.getTitle() == null?StringUtils.EMPTY : focusPoint.getTitle()); - functionRecord.setUsername(MarketConfig.getInstance().getBbsUsername() == null?StringUtils.EMPTY : MarketConfig.getInstance().getBbsUsername()); - functionRecord.setUuid(DesignerEnvManager.getEnvManager().getUUID() == null?StringUtils.EMPTY : DesignerEnvManager.getEnvManager().getUUID()); - return functionRecord; - } - - private JSONArray setToJSONArray(Set set) throws JSONException { - JSONArray jsonArray = new JSONArray(); - for(Iterator iter = set.iterator(); iter.hasNext(); ) { - FunctionRecord functionRecord = (FunctionRecord)iter.next(); - com.fr.json.JSONObject record = new com.fr.json.JSONObject(); - record.put(ATTR_ID, functionRecord.getId()); - record.put(ATTR_TEXT, functionRecord.getText()); - record.put(ATTR_SOURCE, functionRecord.getSource()); - record.put(ATTR_TIME, functionRecord.getTime()); - record.put(ATTR_TITLE, functionRecord.getTitle()); - record.put(ATTR_USER_NAME, functionRecord.getUsername()); - record.put(ATTR_UUID, functionRecord.getUuid()); - jsonArray.put(record); - } - return jsonArray; - } - private class StartStopTime implements XMLReadable, XMLWriter { private String startDate; @@ -533,6 +546,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { private String text; private int source; private long time; + private int times = 1; private String title; private String username; private String uuid; @@ -548,6 +562,14 @@ public class InformationCollector implements XMLReadable, XMLWriter { this.id = id; } + public int getTimes() { + return times; + } + + public void setTimes(int times) { + this.times = times; + } + public String getText() { return text; } From 1942bbc2cae00f31b9004c5d22285582e0840b37 Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Wed, 2 Jan 2019 18:34:54 +0800 Subject: [PATCH 27/31] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=AC=A1=E6=95=B0bugfi?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/InformationCollector.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java b/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java index 49ad7d6a37..b71144774d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java @@ -285,7 +285,8 @@ public class InformationCollector implements XMLReadable, XMLWriter { for(FocusPoint focusPoint : focusPoints.getList()) { FunctionRecord functionRecord = getOneRecord(focusPoint); if (map.containsKey(focusPoint.getId())) { - functionRecord.setTimes(functionRecord.getTimes() + 1); + int times = ((FunctionRecord)map.get(focusPoint.getId())).getTimes() + 1; + functionRecord.setTimes(times); map.put(focusPoint.getId(), functionRecord); } else { map.put(focusPoint.getId(), functionRecord); From 525837842ca9a5419289eeb9be00a9f3dd8119c7 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 2 Jan 2019 19:03:53 +0800 Subject: [PATCH 28/31] =?UTF-8?q?REPORT-14020=20=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=89=93=E5=BC=80=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=20=E8=B0=83=E8=AF=95=E7=9A=84=E4=BB=A3=E7=A0=81=E4=B8=8A?= =?UTF-8?q?=E6=AC=A1=E8=AF=AF=E4=BC=A0=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/utils/DesignUtils.java | 12 ++++++------ .../fr/start/server/FineEmbedServerActivator.java | 1 + .../main/java/com/fr/start/fx/PrismImageLoader2.java | 11 ++++++++++- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index 77173cebb5..240176eef7 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -65,12 +65,12 @@ public class DesignUtils { * @return 启动了返回true */ public static boolean isStarted() { -// try { -// new Socket("localhost", port); -// return true; -// } catch (Exception exp) { -// -// } + try { + new Socket("localhost", port); + return true; + } catch (Exception exp) { + + } return false; } diff --git a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java index 2d08b286d5..eda1fb77e6 100644 --- a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java +++ b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java @@ -68,6 +68,7 @@ public class FineEmbedServerActivator extends Activator { //覆盖tomcat的WebAppClassLoader context.setLoader(new FRTomcatLoader()); + //直接指定initializer,tomcat就不用再扫描一遍了 SpringServletContainerInitializer initializer = new SpringServletContainerInitializer(); Set> classes = new HashSet>(); diff --git a/designer-realize/src/main/java/com/fr/start/fx/PrismImageLoader2.java b/designer-realize/src/main/java/com/fr/start/fx/PrismImageLoader2.java index 99066e964e..c742a3851c 100644 --- a/designer-realize/src/main/java/com/fr/start/fx/PrismImageLoader2.java +++ b/designer-realize/src/main/java/com/fr/start/fx/PrismImageLoader2.java @@ -67,11 +67,21 @@ class PrismImageLoader2 implements com.sun.javafx.tk.ImageLoader { return height; } + @Override + public boolean getError() { + return false; + } + @Override public int getFrameCount() { return gifCount; } + @Override + public PlatformImage[] getFrames() { + return new PlatformImage[0]; + } + @Override public PlatformImage getFrame(int index) { while (images[index] == null) { @@ -112,7 +122,6 @@ class PrismImageLoader2 implements com.sun.javafx.tk.ImageLoader { return 0; } - @Override public Exception getException() { return exception; } From 0e214d0eb894d399656308e878bf6804a481c57b Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Wed, 2 Jan 2019 19:07:45 +0800 Subject: [PATCH 29/31] rt --- .../main/java/com/fr/start/fx/PrismImageLoader2.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/fx/PrismImageLoader2.java b/designer-realize/src/main/java/com/fr/start/fx/PrismImageLoader2.java index c742a3851c..99066e964e 100644 --- a/designer-realize/src/main/java/com/fr/start/fx/PrismImageLoader2.java +++ b/designer-realize/src/main/java/com/fr/start/fx/PrismImageLoader2.java @@ -67,21 +67,11 @@ class PrismImageLoader2 implements com.sun.javafx.tk.ImageLoader { return height; } - @Override - public boolean getError() { - return false; - } - @Override public int getFrameCount() { return gifCount; } - @Override - public PlatformImage[] getFrames() { - return new PlatformImage[0]; - } - @Override public PlatformImage getFrame(int index) { while (images[index] == null) { @@ -122,6 +112,7 @@ class PrismImageLoader2 implements com.sun.javafx.tk.ImageLoader { return 0; } + @Override public Exception getException() { return exception; } From 51687dd770a0aa030471461a4a4937d7d2c16eb5 Mon Sep 17 00:00:00 2001 From: ju Date: Fri, 17 May 2019 20:07:17 +0800 Subject: [PATCH 30/31] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/start/module/DesignerActivator.java | 144 ++++++++---------- 1 file changed, 64 insertions(+), 80 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 f48ac546fa..87e8142f28 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 @@ -52,7 +52,6 @@ import com.fr.design.mainframe.form.FormReportComponentComposite; import com.fr.design.mainframe.loghandler.DesignerLogAppender; import com.fr.design.mainframe.loghandler.LogMessageBar; import com.fr.design.mainframe.socketio.DesignerSocketIO; -import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.design.module.DesignModuleFactory; import com.fr.design.parameter.FormParameterReader; import com.fr.design.parameter.ParameterPropertyPane; @@ -98,7 +97,6 @@ import com.fr.stable.script.ValueConverter; import com.fr.stable.xml.ObjectTokenizer; import com.fr.stable.xml.ObjectXMLWriterFinder; import com.fr.start.BBSGuestPaneProvider; -import com.fr.start.preload.ImagePreLoader; import com.fr.xml.ReportXMLUtils; import java.awt.Image; @@ -115,9 +113,9 @@ import java.util.concurrent.Executors; * 之后慢慢将DesignerModule拆成Activator */ public class DesignerActivator extends Activator { - + private LogHandler logHandler = null; - + @Override public void start() { List markers = rightCollectMutable(InterMutableKey.Path); @@ -132,11 +130,11 @@ public class DesignerActivator extends Activator { DesignerSocketIO.update(); UserInfoPane.getInstance().updateBBSUserInfo(); } - + private void loadLogAppender() { logHandler = new LogHandler() { final DesignerLogAppender logAppender = new DesignerLogAppender(); - + @Override public DesignerLogAppender getHandler() { return logAppender; @@ -144,55 +142,41 @@ public class DesignerActivator extends Activator { }; FineLoggerFactory.getLogger().addLogAppender(logHandler); } - + private void unloadLogAppender() { if (logHandler != null) { FineLoggerFactory.getLogger().removeLogAppender(logHandler); } } - + private void designerModuleStart() { - + StableFactory.registerMarkedClass(ExtraDesignClassManagerProvider.XML_TAG, ExtraDesignClassManager.class); ActionFactory.registerCellInsertActionClass(actionsForInsertCellElement()); ActionFactory.registerFloatInsertActionClass(actionsForInsertFloatElement()); DesignModuleFactory.registerCreators4Hyperlink(hyperlinkTypes()); - + justStartModules4Designer(); - + CalculatorProviderContext.setValueConverter(valueConverter()); GeneralXMLTools.Object_Tokenizer = startXMLReadObjectTokenizer(); GeneralXMLTools.Object_XML_Writer_Finder = startObjectXMLWriterFinder(); addAdapterForPlate(); - + designerRegister(); - + InformationCollector.getInstance().collectStartTime(); } - + private static void preLoadPane() { ExecutorService service = Executors.newCachedThreadPool(); - service.submit(new Runnable() { - @Override - public void run() { - new ImagePreLoader(); - } - }); - - service.submit(new Runnable() { - @Override - public void run() { - TemplateInfoCollector.getInstance(); - } - }); - service.submit(new Runnable() { @Override public void run() { LogMessageBar.getInstance(); } }); - + service.submit(new Runnable() { @Override public void run() { @@ -217,7 +201,7 @@ public class DesignerActivator extends Activator { DesignerFrameFileDealerPane.getInstance();//这边会涉及到TemplateTreePane } }); - + service.submit(new Runnable() { @Override public void run() { @@ -226,26 +210,26 @@ public class DesignerActivator extends Activator { }); service.shutdown(); } - + private static Class[] actionsForInsertCellElement() { List> classes = new ArrayList<>(); Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); for (ElementUIProvider provider : providers) { classes.add(provider.actionForInsertCellElement()); } - + return ArrayUtils.addAll(new Class[]{ - DSColumnCellAction.class, - GeneralCellAction.class, - RichTextCellAction.class, - FormulaCellAction.class, - ChartCellAction.class, - ImageCellAction.class, - BiasCellAction.class, - SubReportCellAction.class + DSColumnCellAction.class, + GeneralCellAction.class, + RichTextCellAction.class, + FormulaCellAction.class, + ChartCellAction.class, + ImageCellAction.class, + BiasCellAction.class, + SubReportCellAction.class }, classes.toArray(new Class[classes.size()])); } - + private static Class[] actionsForInsertFloatElement() { List> classes = new ArrayList<>(); Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); @@ -253,28 +237,28 @@ public class DesignerActivator extends Activator { classes.add(provider.actionForInsertFloatElement()); } return ArrayUtils.addAll(new Class[]{ - TextBoxFloatAction.class, - FormulaFloatAction.class, - ChartFloatAction.class, - ImageFloatAction.class + TextBoxFloatAction.class, + FormulaFloatAction.class, + ChartFloatAction.class, + ImageFloatAction.class }, classes.toArray(new Class[classes.size()])); } - + 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(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) }; } - - + + private static void justStartModules4Designer() { formDesignerRegister(); } - + /** * CellElementValueConverter用来处理设计器格子里的值,将公式/数组/其他元素转换成对应的值。 * @@ -283,7 +267,7 @@ public class DesignerActivator extends Activator { private static ValueConverter valueConverter() { return new CellElementValueConverter(); } - + /* * 针对不同的对象,在读取Object对象的xml的时候需要使用不同的对象生成器 * @return 返回对象生成器 @@ -291,7 +275,7 @@ public class DesignerActivator extends Activator { private static ObjectTokenizer startXMLReadObjectTokenizer() { return new ReportXMLUtils.ReportObjectTokenizer(); } - + /** * 针对不同的对象,在写对象的XML时需要使用不同的XML生成器 * @@ -300,51 +284,51 @@ public class DesignerActivator extends Activator { private static ObjectXMLWriterFinder startObjectXMLWriterFinder() { return new ReportXMLUtils.ReportObjectXMLWriterFinder(); } - - + + //wei:fs的模块中可能有需要设计器界面做设置的地方,在这边添加 private static void addAdapterForPlate() { - + ProcessTransitionAdapter.setProcessTransitionAdapter(new ProcessTransitionAdapter() { - + @Override protected String[] getTransitionNamesByBook(String book) { return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getTransitionNamesByBook(book); } - + @Override protected String[] getParaNames(String book) { return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParaNames(book); } - + @Override protected ParameterProvider[] getParas(String book) { return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParas(book); } - + @Override protected MultiFieldParameter[] getAllMultiFieldParas(String book) { return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getAllMultiFieldParas(book); } }); } - + private static void designerRegister() { registerCellEditor(); registerFloatEditor(); registerData4Form(); registerOtherPane(); } - + private static void registerOtherPane() { StableFactory.registerMarkedClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPane.class); } - + /** * kunsnat:注册单元格选中Editor */ private static void registerCellEditor() { - + ActionFactory.registerCellEditor(String.class, new CellStringQuickEditor()); ActionFactory.registerCellEditor(Number.class, new CellStringQuickEditor()); ActionFactory.registerCellEditor(BaseFormula.class, new CellFormulaQuickEditor()); @@ -357,7 +341,7 @@ public class DesignerActivator extends Activator { ActionFactory.registerCellEditor(CellImagePainter.class, new CellImageQuickEditor()); //todo 图表编辑器populate没能实现刷新面板显示 ActionFactory.registerCellEditorClass(ChartCollection.class, BasicChartQuickEditor.class); - + Set providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); for (ElementUIProvider provider : providers) { try { @@ -367,13 +351,13 @@ public class DesignerActivator extends Activator { } } } - - + + /** * kunnat: 注册悬浮选中Editor */ private static void registerFloatEditor() { - + ActionFactory.registerFloatEditor(String.class, new FloatStringQuickEditor()); ActionFactory.registerFloatEditor(Formula.class, new FloatStringQuickEditor()); ActionFactory.registerFloatEditor(Image.class, new FloatImageQuickEditor()); @@ -382,19 +366,19 @@ public class DesignerActivator extends Activator { //todo 图表编辑器populate没能实现刷新面板显示 ActionFactory.registerFloatEditorClass(ChartCollection.class, FloatChartQuickEditor.class); } - - + + private static void registerData4Form() { StableFactory.registerMarkedClass(FormECDesignerProvider.XML_TAG, FormElementCaseDesigner.class); StableFactory.registerMarkedClass(FormECCompositeProvider.XML_TAG, FormReportComponentComposite.class); DesignModuleFactory.registerParameterReader(new WorkBookParameterReader()); } - - + + private static void formDesignerRegister() { - + StableFactory.registerMarkedObject(DesignToolbarProvider.STRING_MARKED, WidgetToolBarPane.getInstance()); - + DesignModuleFactory.registerNewFormActionClass(NewFormAction.class); DesignModuleFactory.registerFormParaDesignerClass(FormParaDesigner.class); DesignModuleFactory.registerParaPropertyPaneClass(ParameterPropertyPane.class); @@ -402,12 +386,12 @@ public class DesignerActivator extends Activator { DesignModuleFactory.registerWidgetPropertyPaneClass(WidgetPropertyPane.class); DesignModuleFactory.registerButtonDetailPaneClass(FormSubmitButtonDetailPane.class); DesignModuleFactory.registerParameterReader(new FormParameterReader()); - + StableFactory.registerMarkedClass(BaseJForm.XML_TAG, JForm.class); - + StableFactory.registerMarkedObject(ElementCaseThumbnailProcessor.MARK_STRING, new ElementCaseThumbnail()); } - + @Override public void stop() { unloadLogAppender(); From d425ae62b7f1d11858b0e975f8356b94d823c95d Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 1 Jul 2020 15:54:28 +0800 Subject: [PATCH 31/31] =?UTF-8?q?REPORT-34222=20=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E7=BB=99=E5=AE=B9=E5=99=A8=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E5=BC=80=E4=B8=AA=E5=A4=8D=E5=88=B6=E7=B2=98=E8=B4=B4?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3=20=E6=94=B9=E4=B8=8B=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/designer/beans/models/SelectionModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java index 9f5f36f660..1209310f66 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java @@ -262,7 +262,7 @@ public class SelectionModel { Rectangle rec = selection.getSelctionBounds(); FormSelectionUtils.paste2Container(designer, container, clipboard, rec.x + DELTA_X_Y, rec.y + DELTA_X_Y); } else if (isExtraContainer(container)) { - provider.paste2Container(selection); + provider.paste2Container(clipboard); } }