From e9767aa0db018eaa309a2852e7b1a13c552a0d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 24 Sep 2019 14:47:06 +0800 Subject: [PATCH 01/13] =?UTF-8?q?CHART-10233=20=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/fun/impl/AbstractChartTypeUI.java | 5 +- .../design/chartx/impl/DefaultTypePane.java | 79 ------------------- .../chart/gui/type/AbstractChartTypePane.java | 73 +++++++++-------- 3 files changed, 43 insertions(+), 114 deletions(-) delete mode 100644 designer-chart/src/main/java/com/fr/design/chartx/impl/DefaultTypePane.java diff --git a/designer-chart/src/main/java/com/fr/design/chart/fun/impl/AbstractChartTypeUI.java b/designer-chart/src/main/java/com/fr/design/chart/fun/impl/AbstractChartTypeUI.java index 289505aa0e..c37ff939dc 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/fun/impl/AbstractChartTypeUI.java +++ b/designer-chart/src/main/java/com/fr/design/chart/fun/impl/AbstractChartTypeUI.java @@ -5,7 +5,6 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.chart.fun.ChartTypeUIProvider; import com.fr.design.chartx.impl.AbstractDataPane; import com.fr.design.chartx.impl.AbstractOtherPane; -import com.fr.design.chartx.impl.DefaultTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.mainframe.chart.ChartEditPane; @@ -25,9 +24,7 @@ import com.fr.stable.fun.mark.API; public abstract class AbstractChartTypeUI extends AbstractProvider implements ChartTypeUIProvider { @Override - public AbstractChartTypePane getPlotTypePane() { - return new DefaultTypePane(); - } + public abstract AbstractChartTypePane getPlotTypePane(); @Override public abstract AbstractDataPane getChartDataPane(AttributeChangeListener listener); diff --git a/designer-chart/src/main/java/com/fr/design/chartx/impl/DefaultTypePane.java b/designer-chart/src/main/java/com/fr/design/chartx/impl/DefaultTypePane.java deleted file mode 100644 index daaeb8ec15..0000000000 --- a/designer-chart/src/main/java/com/fr/design/chartx/impl/DefaultTypePane.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.fr.design.chartx.impl; - -import com.fr.chart.charttypes.ChartTypeManager; -import com.fr.chart.impl.AbstractChartWithData; -import com.fr.chartx.attr.ChartProvider; -import com.fr.design.ChartTypeInterfaceManager; -import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; -import com.fr.design.mainframe.chart.gui.type.ChartImagePane; - -/** - * Created by shine on 2019/09/04. - */ -public class DefaultTypePane extends AbstractChartTypePane { - - @Override - protected String[] getTypeIconPath() { - return ChartTypeInterfaceManager.getInstance().getDemoImagePath(getPlotID()); - } - - @Override - protected String[] getTypeTipName() { - return ChartTypeInterfaceManager.getInstance().getSubName(getPlotID()); - } - - @Override - public ChartProvider getDefaultChart() { - return ChartTypeManager.getInstance().getChartTypes(getPlotID())[0]; - } - - @Override - public String title4PopupWindow() { - return ChartTypeInterfaceManager.getInstance().getName(getPlotID()); - } - - protected int getSelectIndexInChart(T chart) { - return 0; - } - - protected void setSelectIndexInChart(T chart, int index) { - } - - @Override - public void populateBean(T ob) { - if (getTypeIconPath().length > 0) { - for (ChartImagePane imagePane : typeDemo) { - imagePane.isPressing = false; - } - typeDemo.get(getSelectIndexInChart(ob)).isPressing = true; - checkDemosBackground(); - } - } - - @Override - public void updateBean(T ob) { - if (getTypeIconPath().length > 0) { - for (int index = 0, len = typeDemo.size(); index < len; index++) { - if (typeDemo.get(index).isPressing) { - setSelectIndexInChart(ob, index); - return; - } - } - } - } - - @Override - protected String[] getTypeLayoutPath() { - return new String[0]; - } - - @Override - protected String[] getTypeLayoutTipName() { - return new String[0]; - } - - @Override - protected String getPlotTypeID() { - return null; - } -} diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java index fa80f19d8d..eee0e322e6 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java @@ -17,11 +17,11 @@ import com.fr.stable.Constants; import javax.swing.JPanel; import javax.swing.JSeparator; +import java.util.ArrayList; +import java.util.List; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; -import java.util.ArrayList; -import java.util.List; public abstract class AbstractChartTypePane extends FurtherBasicBeanPane { @@ -31,7 +31,7 @@ public abstract class AbstractChartTypePane extends Fur protected static final int STYLE_SHADE = 0; protected static final int STYLE_TRANSPARENT = 1; protected static final int STYLE_PLANE3D = 2; - protected static final int STYLE_HIGHLIGHT = 3; + protected static final int STYLE_HIGHLIGHT = 3; protected static final int BAIDU = 0; protected static final int GOOGLE = 1; @@ -43,15 +43,24 @@ public abstract class AbstractChartTypePane extends Fur protected JPanel stylePane; //样式布局的面板 private JPanel typePane; + protected abstract String[] getTypeIconPath(); + protected abstract String[] getTypeTipName(); - protected abstract String[] getTypeLayoutPath(); - protected abstract String[] getTypeLayoutTipName(); + + protected String[] getTypeLayoutPath() { + return new String[0]; + } + + protected String[] getTypeLayoutTipName() { + return new String[0]; + } + protected int lastStyleIndex = -1; protected boolean typeChanged = false;//图表类型是否发生变化 protected String[] getNormalLayoutTipName() { - return new String[] { + return new String[]{ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_TopDownShade"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Transparent"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Plane3D"), @@ -75,37 +84,37 @@ public abstract class AbstractChartTypePane extends Fur checkDemosBackground(); typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4); - for(int i = 0; i < typeDemo.size(); i++) { + for (int i = 0; i < typeDemo.size(); i++) { ChartImagePane tmp = typeDemo.get(i); typePane.add(tmp); tmp.setDemoGroup(typeDemo.toArray(new ChartSelectDemoPane[typeDemo.size()])); } JPanel layoutPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4); - if(styleList != null && !styleList.isEmpty()) { - for(int i = 0; i < styleList.size(); i ++) { + if (styleList != null && !styleList.isEmpty()) { + for (int i = 0; i < styleList.size(); i++) { ChartImagePane tmp = styleList.get(i); layoutPane.add(tmp); tmp.setDemoGroup(styleList.toArray(new ChartSelectDemoPane[styleList.size()])); } } - double[] columnSize = { p, vs, f }; - double[] rowSize = { p,p,p,p,p,p,p}; + double[] columnSize = {p, vs, f}; + double[] rowSize = {p, p, p, p, p, p, p}; - if(styleList != null && !styleList.isEmpty()) { + if (styleList != null && !styleList.isEmpty()) { Component[][] styleComp = new Component[][]{ new Component[]{new JSeparator()}, new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout"))}, new Component[]{layoutPane}, }; - stylePane = TableLayoutHelper.createTableLayoutPane(styleComp,rowSize,columnSize); + stylePane = TableLayoutHelper.createTableLayoutPane(styleComp, rowSize, columnSize); stylePane.setVisible(false); } - JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(typePane),rowSize,columnSize); + JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(typePane), rowSize, columnSize); this.setLayout(new BorderLayout()); - this.add(panel,BorderLayout.CENTER); + this.add(panel, BorderLayout.CENTER); } protected List createTypeDemoList() { @@ -120,7 +129,7 @@ public abstract class AbstractChartTypePane extends Fur List list = new ArrayList(); int iconLen = iconPaths.length; int tipLen = tipNames.length; - for(int i = 0, len = Math.min(iconLen, tipLen); i < len; i++) { + for (int i = 0, len = Math.min(iconLen, tipLen); i < len; i++) { boolean isDrawRightLine = (i != len - 1 || (i + 1) % ONE_LINE_NUM != 0); ChartImagePane imagePane = new ChartImagePane(iconPaths[i], tipNames[i], isDrawRightLine); imagePane.isPressing = (i == 0); @@ -129,7 +138,7 @@ public abstract class AbstractChartTypePane extends Fur return list; } - protected Component[][] getPaneComponents(JPanel typePane){ + protected Component[][] getPaneComponents(JPanel typePane) { return new Component[][]{ new Component[]{typePane}, new Component[]{stylePane} @@ -137,14 +146,14 @@ public abstract class AbstractChartTypePane extends Fur } //子类覆盖 - protected T getSelectedClonedPlot(){ + protected T getSelectedClonedPlot() { return null; } - protected void checkTypeChange(Plot oldPlot){ - if(styleList != null && !styleList.isEmpty()){ - for(int i = 0; i < typeDemo.size(); i++){ - if(typeDemo.get(i).isPressing && i != oldPlot.getDetailType()){ + protected void checkTypeChange(Plot oldPlot) { + if (styleList != null && !styleList.isEmpty()) { + for (int i = 0; i < typeDemo.size(); i++) { + if (typeDemo.get(i).isPressing && i != oldPlot.getDetailType()) { typeChanged = true; break; } @@ -154,8 +163,8 @@ public abstract class AbstractChartTypePane extends Fur } protected void checkDemosBackground() { - if(this.styleList != null && !styleList.isEmpty()){ - for(int i = 0; i < styleList.size(); i++) { + if (this.styleList != null && !styleList.isEmpty()) { + for (int i = 0; i < styleList.size(); i++) { styleList.get(i).checkBorder(); styleList.get(i).repaint(); } @@ -177,7 +186,7 @@ public abstract class AbstractChartTypePane extends Fur } //图表区属性清空 - protected void resetChart(Chart chart){ + protected void resetChart(Chart chart) { chart.setTitle(new Title(chart.getTitle().getTextObject())); chart.setBorderStyle(Constants.LINE_NONE); chart.setBorderColor(new Color(150, 150, 150)); @@ -192,20 +201,22 @@ public abstract class AbstractChartTypePane extends Fur /** * 此接口已删除,不用实现了 - * + *

* 获取各图表类型界面ID, 本质是plotID * 使用getPlotID + * * @return 图表类型界面ID */ @Deprecated - protected abstract String getPlotTypeID(); + protected String getPlotTypeID() { + return null; + } public String getPlotID() { return plotID; } /** - * * @param ob 对象 * @return */ @@ -216,13 +227,13 @@ public abstract class AbstractChartTypePane extends Fur return false; } - protected boolean needsResetChart(Chart chart){ + protected boolean needsResetChart(Chart chart) { return chart != null - &&chart.getPlot() != null + && chart.getPlot() != null && chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE; } - protected JPanel getTypePane(){ + protected JPanel getTypePane() { return typePane; } From 99e9199f030dc332a9911d30577f97d1e8421dde Mon Sep 17 00:00:00 2001 From: vito Date: Tue, 24 Sep 2019 14:55:19 +0800 Subject: [PATCH 02/13] =?UTF-8?q?REPORT-19945=20=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E9=9D=A2&=E4=BF=AE=E5=A4=8Dfrm=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=A0=8F=E4=B8=8D=E5=8F=98=E5=8C=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/DesignerFrame.java | 10 ++--- .../com/fr/start/common/SplashWindow.java | 42 ++++++++++++++++--- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 01cc002f93..b422be44e8 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -745,13 +745,13 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta resetCombineUpTooBar(ad.resetUpToolBar(plus)); - // 颜色,字体那些按钮的工具栏 - if (toolbarComponent == null) { - toolbarPane.add(toolbarComponent = ad.resetToolBar(null, plus), BorderLayout.CENTER); - } else { - ad.resetToolBar(toolbarComponent, plus); + if (toolbarComponent != null) { + toolbarPane.remove(toolbarComponent); } + // 颜色,字体那些按钮的工具栏 + toolbarPane.add(toolbarComponent = ad.resetToolBar(toolbarComponent, plus), BorderLayout.CENTER); + this.checkToolbarMenuEnable(); this.validate(); layeredPane.repaint(); diff --git a/designer-realize/src/main/java/com/fr/start/common/SplashWindow.java b/designer-realize/src/main/java/com/fr/start/common/SplashWindow.java index 58a27dd7f5..951fba3266 100644 --- a/designer-realize/src/main/java/com/fr/start/common/SplashWindow.java +++ b/designer-realize/src/main/java/com/fr/start/common/SplashWindow.java @@ -1,11 +1,19 @@ package com.fr.start.common; +import com.fr.base.BaseUtils; +import com.fr.design.fun.OemProcessor; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.log.FineLoggerFactory; +import com.fr.stable.image4j.codec.ico.ICODecoder; import com.fr.stable.os.OperatingSystem; +import com.fr.start.OemHandler; import com.sun.awt.AWTUtilities; import javax.swing.*; import java.awt.*; +import java.awt.image.*; +import java.io.IOException; +import java.util.List; /** * 启动画面窗口 @@ -22,6 +30,8 @@ public class SplashWindow extends JFrame { // alex:必须设置这个属性为true,才可以用透明背景 System.setProperty("sun.java2d.noddraw", "true"); + initTitleIcon(); + //slash pane this.splash = new SplashPane(); @@ -41,6 +51,32 @@ public class SplashWindow extends JFrame { GUICoreUtils.centerWindow(this); } + /** + * 设置任务栏图标,主要用于Windows + */ + @SuppressWarnings("unchecked") + private void initTitleIcon() { + try { + OemProcessor oemProcessor = OemHandler.findOem(); + List image = null; + if (oemProcessor != null) { + try { + image = oemProcessor.createTitleIcon(); + } catch (Throwable e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + if (image == null) { + image = ICODecoder.read(SplashWindow.class + .getResourceAsStream("/com/fr/base/images/oem/logo.ico")); + } + this.setIconImages(image); + } catch (IOException e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + this.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); + } + } + /** * 注销窗口 */ @@ -61,10 +97,4 @@ public class SplashWindow extends JFrame { void updateThanksLog(String text) { splash.updateThanksLog(text); } - - - public static void main(String[] args) { - SplashWindow splashWindow = new SplashWindow(); - splashWindow.setVisible(true); - } } From 355d5ebfd119a5a9506ff37015471e26d2f8f561 Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 24 Sep 2019 16:01:32 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E6=AF=94=E5=A6=82=E6=81=B6=E5=BF=83=E7=9A=84=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E7=A8=8D=E5=BE=AE=E6=94=B9=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/beans/BasicStorePane.java | 23 +++++++++++ .../fr/design/fun/ExportAttrTabProvider.java | 36 ++---------------- .../impl/AbstractExportAttrTabProvider.java | 38 ++++++++++++++++++- .../fr/design/report/AbstractExportPane.java | 4 +- .../design/report/ReportExportAttrPane.java | 20 +++++----- 5 files changed, 76 insertions(+), 45 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/beans/BasicStorePane.java diff --git a/designer-base/src/main/java/com/fr/design/beans/BasicStorePane.java b/designer-base/src/main/java/com/fr/design/beans/BasicStorePane.java new file mode 100644 index 0000000000..09a1378a87 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/beans/BasicStorePane.java @@ -0,0 +1,23 @@ +package com.fr.design.beans; + +import com.fr.common.annotations.Open; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019/9/24 + * 数据存取视图界面 + */ +@Open +public abstract class BasicStorePane extends BasicBeanPane { + + @Override + public T updateBean() { + return null; + } + + public abstract void populateBean(T t); + + @Override + public abstract void updateBean(T t); +} diff --git a/designer-base/src/main/java/com/fr/design/fun/ExportAttrTabProvider.java b/designer-base/src/main/java/com/fr/design/fun/ExportAttrTabProvider.java index 811d5e960b..d14726e7b7 100644 --- a/designer-base/src/main/java/com/fr/design/fun/ExportAttrTabProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/ExportAttrTabProvider.java @@ -1,14 +1,8 @@ package com.fr.design.fun; -import com.fr.design.report.AbstractExportPane; +import com.fr.design.beans.BasicStorePane; import com.fr.stable.fun.mark.Mutable; -import javax.swing.*; - -/** - * Created by vito on 16/5/5. - */ - /** * 导出属性Tab页的接口 */ @@ -18,31 +12,9 @@ public interface ExportAttrTabProvider extends Mutable { int CURRENT_LEVEL = 1; /** - * 转换成SwingComponent - * - * @return JComponent - */ - JComponent toSwingComponent(); - - /** - * 转换成AbstractExportPane - * - * @return AbstractExportPane - */ - AbstractExportPane toExportPane(); - - /** - * tab的标题 - * - * @return - */ - String title(); - - /** - * tag标签 + * 转换成业务视图界面 * - * @return tag名称 - * @deprecated 将来不使用tag作为区分 + * @return 业务视图界面 */ - String tag(); + BasicStorePane toServiceComponent(); } diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java index 2e526e6973..0d76c58309 100644 --- a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java @@ -1,19 +1,55 @@ package com.fr.design.fun.impl; +import com.fr.design.beans.BasicStorePane; import com.fr.design.fun.ExportAttrTabProvider; +import com.fr.design.report.AbstractExportPane; +import com.fr.stable.StringUtils; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; +import javax.swing.*; + /** * Created by vito on 16/5/5. */ @API(level = ExportAttrTabProvider.CURRENT_LEVEL) -public abstract class AbstractExportAttrTabProvider extends AbstractProvider implements ExportAttrTabProvider { +public abstract class AbstractExportAttrTabProvider extends AbstractProvider implements ExportAttrTabProvider { @Override public int currentAPILevel() { return CURRENT_LEVEL; } + /** + * @see ExportAttrTabProvider#toServiceComponent() + */ + @Deprecated + public AbstractExportPane toExportPane() { + return null; + } + + /** + * @see ExportAttrTabProvider#toServiceComponent() + */ + @Deprecated + public JComponent toSwingComponent() { + return toServiceComponent(); + } + + @Deprecated + public String title() { + return StringUtils.EMPTY; + } + + @Deprecated + public String tag() { + return StringUtils.EMPTY; + } + + @Override + public BasicStorePane toServiceComponent() { + return toExportPane(); + } + @Override public String mark4Provider() { return this.getClass().getName(); diff --git a/designer-base/src/main/java/com/fr/design/report/AbstractExportPane.java b/designer-base/src/main/java/com/fr/design/report/AbstractExportPane.java index efbde8d37d..ddf7e0c2de 100644 --- a/designer-base/src/main/java/com/fr/design/report/AbstractExportPane.java +++ b/designer-base/src/main/java/com/fr/design/report/AbstractExportPane.java @@ -1,11 +1,11 @@ package com.fr.design.report; -import com.fr.design.dialog.BasicPane; +import com.fr.design.beans.BasicStorePane; /** * Created by vito on 16/5/5. */ -public abstract class AbstractExportPane extends BasicPane { +public abstract class AbstractExportPane extends BasicStorePane { public abstract void populate(Object t); diff --git a/designer-realize/src/main/java/com/fr/design/report/ReportExportAttrPane.java b/designer-realize/src/main/java/com/fr/design/report/ReportExportAttrPane.java index f2c180abd5..1ac27cc882 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ReportExportAttrPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ReportExportAttrPane.java @@ -1,14 +1,13 @@ package com.fr.design.report; -import javax.swing.*; - import com.fr.design.ExtraDesignClassManager; +import com.fr.design.beans.BasicStorePane; import com.fr.design.dialog.BasicPane; import com.fr.design.fun.ExportAttrTabProvider; import com.fr.design.gui.frpane.UITabbedPane; - import com.fr.io.attr.ReportExportAttr; +import javax.swing.*; import java.util.ArrayList; import java.util.List; import java.util.Set; @@ -18,7 +17,7 @@ public class ReportExportAttrPane extends BasicPane { private ExcelExportPane excelExportPane; private PDFExportPane pdfExportPane; private WordExportPane wordExportPane; - private List paneList; + private List> paneList; public ReportExportAttrPane() { UITabbedPane uiTabbedPane = new UITabbedPane(); @@ -33,8 +32,9 @@ public class ReportExportAttrPane extends BasicPane { Set providers = ExtraDesignClassManager.getInstance().getArray(ExportAttrTabProvider.XML_TAG); paneList = new ArrayList<>(); for (ExportAttrTabProvider provider : providers) { - uiTabbedPane.addTab(provider.title(), provider.toSwingComponent()); - paneList.add(provider.toExportPane()); + BasicStorePane storePane = provider.toServiceComponent(); + uiTabbedPane.addTab(storePane.getTitle(), storePane); + paneList.add(storePane); } this.add(uiTabbedPane); } @@ -61,8 +61,8 @@ public class ReportExportAttrPane extends BasicPane { this.wordExportPane.populate(reportExportAttr.getWordExportAttr()); } - for (AbstractExportPane exportpane : paneList) { - exportpane.populate(reportExportAttr); + for (BasicStorePane exportpane : paneList) { + exportpane.populateBean(reportExportAttr); } } @@ -81,8 +81,8 @@ public class ReportExportAttrPane extends BasicPane { reportExportAttr.setWordExportAttr(this.wordExportPane.update()); } - for (AbstractExportPane exportPane : paneList) { - exportPane.update(reportExportAttr); + for (BasicStorePane exportPane : paneList) { + exportPane.updateBean(reportExportAttr); } return reportExportAttr; } From 009567cc4541692d6e667cb28d9d2a0001c0f1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 24 Sep 2019 17:26:27 +0800 Subject: [PATCH 04/13] =?UTF-8?q?CHART-10603=20=E5=AF=B9=E8=80=81=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E7=9A=84plotpane=E7=88=B6=E7=B1=BB=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BA=86=E8=8E=B7=E5=8F=96=E6=8F=90=E7=A4=BA=E7=9A=84=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=AE=9E=E7=8E=B0=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=8F=96?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E9=80=89=E6=8B=A9=E4=B8=AD=E5=AD=90=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../type/AbstractDeprecatedChartTypePane.java | 7 +++++++ .../mainframe/chart/gui/type/AreaPlotPane.java | 14 -------------- .../mainframe/chart/gui/type/BarPlotPane.java | 17 ----------------- .../chart/gui/type/BubblePlotPane.java | 7 ------- .../chart/gui/type/ColumnPlotPane.java | 17 ----------------- .../chart/gui/type/CustomPlotPane.java | 7 ------- .../mainframe/chart/gui/type/DonutPlotPane.java | 9 --------- .../chart/gui/type/FunnelPlotPane.java | 7 ------- .../mainframe/chart/gui/type/GanttPlotPane.java | 7 ------- .../chart/gui/type/GisMapPlotPane.java | 7 ++++++- .../mainframe/chart/gui/type/LinePlotPane.java | 7 ------- .../mainframe/chart/gui/type/MeterPlotPane.java | 10 ---------- .../mainframe/chart/gui/type/PiePlotPane.java | 9 --------- .../mainframe/chart/gui/type/RadarPlotPane.java | 7 ------- .../mainframe/chart/gui/type/RangePlotPane.java | 7 ------- .../mainframe/chart/gui/type/StockPlotPane.java | 7 ------- .../chart/gui/type/XYScatterPlotPane.java | 7 ------- 17 files changed, 13 insertions(+), 140 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractDeprecatedChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractDeprecatedChartTypePane.java index 81578ded56..4dd84beb26 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractDeprecatedChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractDeprecatedChartTypePane.java @@ -16,6 +16,7 @@ import com.fr.chart.chartattr.Legend; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Title; import com.fr.chart.chartglyph.ConditionAttr; +import com.fr.design.ChartTypeInterfaceManager; import com.fr.general.ComparatorUtils; import com.fr.general.FRFont; import com.fr.js.NameJavaScriptGroup; @@ -38,6 +39,12 @@ public abstract class AbstractDeprecatedChartTypePane extends AbstractChartTypeP } } + + @Override + protected String[] getTypeTipName() { + return ChartTypeInterfaceManager.getInstance().getSubName(getPlotID()); + } + /** * 更新界面属性 */ diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java index a84c9ab468..6293ffef01 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java @@ -32,20 +32,6 @@ public class AreaPlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - String area = Toolkit.i18nText("Fine-Design_Chart_Type_Area"); - String stack = Toolkit.i18nText("Fine-Design_Chart_Stacked"); - String percent = Toolkit.i18nText("Fine-Design_Chart_Use_Percent"); - String td = Toolkit.i18nText("Fine-Design_Chart_3D"); - return new String[]{ - stack + area, - percent + stack + area, - td + stack + area, - td + percent + stack + area - }; - } - @Override protected String getPlotTypeID() { return ChartConstants.AREA_CHART; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/BarPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/BarPlotPane.java index 7f68e153ba..33f398c8d8 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/BarPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/BarPlotPane.java @@ -30,23 +30,6 @@ public class BarPlotPane extends AbstractBarPane{ }; } - @Override - protected String[] getTypeTipName() { - String bar = Toolkit.i18nText("Fine-Design_Chart_Type_Bar"); - String stack = Toolkit.i18nText("Fine-Design_Chart_Stacked"); - String percent = Toolkit.i18nText("Fine-Design_Chart_Use_Percent"); - String td = Toolkit.i18nText("Fine-Design_Chart_3D"); - return new String[]{ - bar, - stack + bar, - percent + stack + bar, - td + bar, - td + bar + "(" + Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal") + ")", - td + stack + bar, - td + percent + stack + bar - }; - } - @Override protected String[] getTypeLayoutPath() { return new String[]{"/com/fr/design/images/chart/ColumnPlot/layout/0.png", diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/BubblePlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/BubblePlotPane.java index d8fe8664cf..84919fdf66 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/BubblePlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/BubblePlotPane.java @@ -23,13 +23,6 @@ public class BubblePlotPane extends AbstractDeprecatedChartTypePane { return new String[]{"/com/fr/design/images/chart/BubblePlot/type/0.png",}; } - @Override - protected String[] getTypeTipName() { - return new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Bubble_Chart_OLD") - }; - } - @Override protected String[] getTypeLayoutPath() { return new String[0]; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ColumnPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ColumnPlotPane.java index e6b446b569..98907e285d 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ColumnPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ColumnPlotPane.java @@ -29,23 +29,6 @@ public class ColumnPlotPane extends AbstractBarPane{ }; } - @Override - protected String[] getTypeTipName() { - String column = Toolkit.i18nText("Fine-Design_Chart_Type_Column"); - String stack = Toolkit.i18nText("Fine-Design_Chart_Stacked"); - String percent = Toolkit.i18nText("Fine-Design_Chart_Use_Percent"); - String td = Toolkit.i18nText("Fine-Design_Chart_3D"); - return new String[]{ - column, - stack + column, - percent + stack + column, - td + column, - td + column + "(" + Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal") + ")", - td + stack + column, - td + percent + stack + column - }; - } - @Override protected String[] getTypeLayoutPath() { return new String[]{"/com/fr/design/images/chart/BarPlot/layout/0.png", diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/CustomPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/CustomPlotPane.java index e922d2921b..d2ad172af5 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/CustomPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/CustomPlotPane.java @@ -24,13 +24,6 @@ public class CustomPlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - return new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Type_Combine") - }; - } - @Override protected String[] getTypeLayoutPath() { return new String[0]; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java index 44cdc85275..67d793ccf9 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java @@ -33,15 +33,6 @@ public class DonutPlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - String donut = Toolkit.i18nText("Fine-Design_Chart_Type_Donut"); - return new String[]{ - donut, - Toolkit.i18nText("Fine-Design_Chart_3D") + donut - }; - } - @Override protected String[] getTypeLayoutPath() { return new String[]{"/com/fr/design/images/chart/DonutPlot/layout/0.png", diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/FunnelPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/FunnelPlotPane.java index b3706a058a..5682d4d243 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/FunnelPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/FunnelPlotPane.java @@ -28,13 +28,6 @@ public class FunnelPlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - return new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Type_Funnel") - }; - } - @Override protected String[] getTypeLayoutPath() { return new String[0]; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GanttPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GanttPlotPane.java index f68ee1fc1c..590b2188bb 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GanttPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GanttPlotPane.java @@ -22,13 +22,6 @@ public class GanttPlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - return new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Type_Gantt") - }; - } - @Override protected String getPlotTypeID() { return ChartConstants.GANTT_CHART; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GisMapPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GisMapPlotPane.java index 67906b9e50..f12fe344e8 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GisMapPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/GisMapPlotPane.java @@ -27,7 +27,7 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane { private static final int GISMAP = 0; private UITextField keyInput; - + public GisMapPlotPane(){ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; @@ -65,6 +65,11 @@ public class GisMapPlotPane extends AbstractDeprecatedChartTypePane { } + @Override + public void reLayout(String chartID){ + + } + @Override protected String[] getTypeIconPath() { return new String[]{"/com/fr/design/images/chart/GisMapPlot/type/0.png", diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/LinePlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/LinePlotPane.java index e78bb3ac67..34280ce987 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/LinePlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/LinePlotPane.java @@ -19,13 +19,6 @@ public class LinePlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - return new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Type_Line") - }; - } - @Override protected String[] getTypeLayoutPath() { return new String[0]; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/MeterPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/MeterPlotPane.java index 791262c0bc..254a4f926e 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/MeterPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/MeterPlotPane.java @@ -30,16 +30,6 @@ public class MeterPlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - String meter = Toolkit.i18nText("Fine-Design_Chart_Type_Meter"); - return new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Mode_Custom") + meter, - meter + "1", - meter + "2" - }; - } - @Override protected String[] getTypeLayoutPath() { return new String[0]; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java index 56c2c44832..47b03fe3d7 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java @@ -34,15 +34,6 @@ public class PiePlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - String pie = Toolkit.i18nText("Fine-Design_Chart_Type_Pie"); - return new String[]{ - pie, - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_3D") + pie - }; - } - @Override protected String[] getTypeLayoutPath() { return new String[]{"/com/fr/design/images/chart/PiePlot/layout/0.png", diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/RadarPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/RadarPlotPane.java index df812fe2cb..97925b97b2 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/RadarPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/RadarPlotPane.java @@ -22,13 +22,6 @@ public class RadarPlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - return new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Type_Radar") - }; - } - @Override protected String getPlotTypeID() { return ChartConstants.RADAR_CHART; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/RangePlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/RangePlotPane.java index 9dfb36b0f0..5564dc84cc 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/RangePlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/RangePlotPane.java @@ -23,13 +23,6 @@ public class RangePlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - return new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Type_Range") - }; - } - @Override protected String getPlotTypeID() { return ChartConstants.RANGE_CHART; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/StockPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/StockPlotPane.java index 5e896d3b69..b6b0165214 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/StockPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/StockPlotPane.java @@ -22,13 +22,6 @@ public class StockPlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - return new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Type_Stock") - }; - } - @Override protected String getPlotTypeID() { return ChartConstants.STOCK_CHART; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/XYScatterPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/XYScatterPlotPane.java index ba6edba06e..67d0a10fde 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/XYScatterPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/XYScatterPlotPane.java @@ -25,13 +25,6 @@ public class XYScatterPlotPane extends AbstractDeprecatedChartTypePane { }; } - @Override - protected String[] getTypeTipName() { - return new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Type_XYScatter") - }; - } - @Override protected String[] getTypeLayoutPath() { return new String[0]; From cfb7b2be390e5fad0280b87f3a5a4e2516c1a707 Mon Sep 17 00:00:00 2001 From: author Date: Tue, 24 Sep 2019 17:51:22 +0800 Subject: [PATCH 05/13] =?UTF-8?q?REPORT-21987=20=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=EF=BC=8C=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=AE=89=E8=A3=85=EF=BC=8C=E5=8F=96=E6=B6=88=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BB=8D=E5=8F=AF=E6=AD=A3=E5=B8=B8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/extra/exe/callback/InstallFromDiskCallback.java | 4 ++-- .../fr/design/extra/exe/callback/UpdateFromDiskCallback.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java index 59d5d6a085..4cbd063284 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java +++ b/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java @@ -53,7 +53,7 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback { null, null ); - if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { + if (rv == JOptionPane.NO_OPTION || rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { return; } List pluginTasks = result.getPreTasks(); @@ -73,7 +73,7 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback { null, null ); - if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { + if (rv == JOptionPane.NO_OPTION || rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { return; } PluginOperateUtils.updatePluginFromDisk(zipFile, jsCallback); diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java index 26315fd030..392d8074e9 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java +++ b/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java @@ -51,7 +51,7 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback { null, null ); - if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { + if (rv == JOptionPane.NO_OPTION || rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { return; } List pluginTasks = result.getPreTasks(); @@ -71,7 +71,7 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback { null, null ); - if (rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { + if (rv == JOptionPane.NO_OPTION || rv == JOptionPane.CANCEL_OPTION || rv == JOptionPane.CLOSED_OPTION) { return; } PluginOperateUtils.installPluginFromDisk(zipFile, jsCallback); From 526683b73aba8ec279e35d3cafc044c0f66aa70e Mon Sep 17 00:00:00 2001 From: author Date: Wed, 25 Sep 2019 10:09:19 +0800 Subject: [PATCH 06/13] =?UTF-8?q?REPORT-21990=20=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=EF=BC=8C=E5=B8=86?= =?UTF-8?q?=E8=BD=AF=E9=80=9A=E8=A1=8C=E8=AF=81=E7=99=BB=E9=99=86-?= =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E6=B3=A8=E5=86=8C=E4=B8=8D=E4=BC=9A=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/upm/UpmBridge.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/upm/UpmBridge.java b/designer-base/src/main/java/com/fr/design/upm/UpmBridge.java index 6a4b752fd1..e7d134808a 100644 --- a/designer-base/src/main/java/com/fr/design/upm/UpmBridge.java +++ b/designer-base/src/main/java/com/fr/design/upm/UpmBridge.java @@ -443,6 +443,18 @@ public class UpmBridge { } } + /** + * 立即注册 + */ + @JSBridge + public void registerHref() { + try { + Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("bbs.register"))); + } catch (Exception e) { + FineLoggerFactory.getLogger().info(e.getMessage()); + } + } + /** * 使用系统浏览器打开网页 * @param url 要打开的网页 From 9008df794c1981c7cef83c562ff7b9d6e8ab6146 Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Wed, 25 Sep 2019 11:14:59 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8Cs?= =?UTF-8?q?onar=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/loghandler/DesignerLogHandler.java | 2 +- .../java/com/fr/design/update/ui/dialog/EncodingDetect.java | 6 +----- .../com/fr/design/update/ui/dialog/UpdateMainDialog.java | 4 ++-- .../src/main/java/com/fr/design/utils/DesignUtils.java | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java index 79e94d3991..53802507c8 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java @@ -42,7 +42,7 @@ import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_M public class DesignerLogHandler { - private static final SimpleDateFormat LOG_SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + private final SimpleDateFormat LOG_SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); private static final int GAP_X = -150; diff --git a/designer-base/src/main/java/com/fr/design/update/ui/dialog/EncodingDetect.java b/designer-base/src/main/java/com/fr/design/update/ui/dialog/EncodingDetect.java index d782428ce4..e4bbaebac7 100644 --- a/designer-base/src/main/java/com/fr/design/update/ui/dialog/EncodingDetect.java +++ b/designer-base/src/main/java/com/fr/design/update/ui/dialog/EncodingDetect.java @@ -447,11 +447,7 @@ class BytesEncodingDetect extends Encoding { bfchars++; totalfreq += 500; row = rawtext[i] - 0x81; - if (0x40 <= rawtext[i + 1] && rawtext[i + 1] <= 0x7E) { - column = rawtext[i + 1] - 0x40; - } else { - column = rawtext[i + 1] - 0x40; - } + column = rawtext[i + 1] - 0x40; // System.out.println("extended row " + row + " column " + column + " rawtext[i] " + rawtext[i]); if (Big5PFreq[row][column] != 0) { bffreq += Big5PFreq[row][column]; diff --git a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java index c7eceb0507..9e83e40ddb 100644 --- a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java +++ b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java @@ -91,8 +91,8 @@ public class UpdateMainDialog extends UIDialog { private static final String UPDATE_CACHE_STATE_FAIL = "fail"; private static final String UPDATE_CACHE_STATE_SUCCESS = "success"; - private static final SimpleDateFormat CHANGELOG_FORMAT = new SimpleDateFormat("M/d/y, h:m:s a", Locale.ENGLISH); - private static final SimpleDateFormat UPDATE_INFO_TABLE_FORMAT = new SimpleDateFormat("yyyy.MM.dd"); + private final SimpleDateFormat CHANGELOG_FORMAT = new SimpleDateFormat("M/d/y, h:m:s a", Locale.ENGLISH); + private final SimpleDateFormat UPDATE_INFO_TABLE_FORMAT = new SimpleDateFormat("yyyy.MM.dd"); private JSONObject downloadFileConfig; //最新版本标签 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 b312093816..8d32e6e0ed 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 @@ -56,7 +56,7 @@ public class DesignUtils { DesignUtils.port = port; } - public static int getPort() { + public synchronized static int getPort() { return port; } From 30c9c43eea872b302e4869bc2412c8d96d4b38e4 Mon Sep 17 00:00:00 2001 From: vito Date: Wed, 25 Sep 2019 18:53:16 +0800 Subject: [PATCH 08/13] =?UTF-8?q?REPORT-22308=20=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toolbar/UpdateActionManager.java | 1 + .../main/java/com/fr/start/BaseDesigner.java | 2 ++ .../java/com/fr/start/DesignerInitial.java | 1 + .../main/java/com/fr/start/SplashContext.java | 16 ++++++------ .../start/module/DesignerInitActivator.java | 25 +++++++++++++++++++ .../start/module/DesignerShowActivator.java | 2 +- .../com/fr/start/module/DesignerStartup.java | 2 +- 7 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java 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 5a1b9de6ce..2641a118ab 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 @@ -129,6 +129,7 @@ public class UpdateActionManager { EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener() { @Override public void on(Event event, Null param) { + EventDispatcher.stopListen(this); afterStartup = true; for (Map.Entry cache : updateActionsIndexCache.entrySet()) { searchPool.execute(new IndexTask(cache.getKey(), cache.getValue())); diff --git a/designer-base/src/main/java/com/fr/start/BaseDesigner.java b/designer-base/src/main/java/com/fr/start/BaseDesigner.java index 37c668971d..833faaef70 100644 --- a/designer-base/src/main/java/com/fr/start/BaseDesigner.java +++ b/designer-base/src/main/java/com/fr/start/BaseDesigner.java @@ -61,6 +61,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { EventDispatcher.listen(DesignerLaunchStatus.DESIGNER_INIT_COMPLETE, new Listener() { @Override public void on(Event event, Null param) { + EventDispatcher.stopListen(this); UIUtil.invokeLaterIfNeeded(new Runnable() { @Override public void run() { @@ -75,6 +76,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener() { @Override public void on(Event event, Null param) { + EventDispatcher.stopListen(this); collectUserInformation(); } }); diff --git a/designer-realize/src/main/java/com/fr/start/DesignerInitial.java b/designer-realize/src/main/java/com/fr/start/DesignerInitial.java index dfbdb940dc..e6b9e4f464 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerInitial.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerInitial.java @@ -37,6 +37,7 @@ public class DesignerInitial { EventDispatcher.listen(DesignerLaunchStatus.OPEN_LAST_FILE_COMPLETE, new Listener() { @Override public void on(Event event, Null param) { + EventDispatcher.stopListen(this); UIUtil.invokeLaterIfNeeded(new Runnable() { @Override public void run() { diff --git a/designer-realize/src/main/java/com/fr/start/SplashContext.java b/designer-realize/src/main/java/com/fr/start/SplashContext.java index b437846b95..d425d726ca 100644 --- a/designer-realize/src/main/java/com/fr/start/SplashContext.java +++ b/designer-realize/src/main/java/com/fr/start/SplashContext.java @@ -77,13 +77,15 @@ public class SplashContext { * 隐藏启动动画 */ public void hide() { - // 窗口关闭后取消定时获取模块信息的timer - scheduler.shutdown(); - //取消监听 - EventDispatcher.stopListen(listener); - splashStrategy.hide(); - // 一次性 - splashStrategy = null; + if (splashStrategy != null) { + // 窗口关闭后取消定时获取模块信息的timer + scheduler.shutdown(); + //取消监听 + EventDispatcher.stopListen(listener); + splashStrategy.hide(); + // 一次性 + splashStrategy = null; + } } private void initListener() { diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java new file mode 100644 index 0000000000..1eeb5a6a3a --- /dev/null +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java @@ -0,0 +1,25 @@ +package com.fr.start.module; + +import com.fr.module.Activator; +import com.fr.start.DesignerInitial; + +/** + * 设计器界面初始化 + * + * @author vito + * @version 10.0 + * Created by vito on 2019/9/25 + */ +public class DesignerInitActivator extends Activator { + + + @Override + public void start() { + DesignerInitial.init(findSingleton(StartupArgs.class).get()); + } + + @Override + public void stop() { + // void + } +} diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerShowActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerShowActivator.java index d41db181f9..d0c27bcc4a 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerShowActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerShowActivator.java @@ -13,7 +13,7 @@ public class DesignerShowActivator extends Activator { @Override public void start() { - DesignerInitial.init(findSingleton(StartupArgs.class).get()); +// DesignerInitial.init(findSingleton(StartupArgs.class).get()); EventDispatcher.asyncFire(ModuleEvent.MajorModuleStarting, Toolkit.i18nText("Fine-Design_Module_Name_Designer")); DesignerInitial.prepare(); } 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 c43fc8be81..1d781d31ec 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 @@ -70,7 +70,7 @@ public class DesignerStartup extends Activator { @Metrics public void start() { startSub(PreStartActivator.class); - startSub(DesignerWorkspaceActivator.class); + startSub("parallel"); //designer模块启动好后,查看demo browserDemoIfNeeded(); startupEmbedServerIfNeeded(); From 5541cab446b7ce1cf1dbe66f193fcfa3d7ca2768 Mon Sep 17 00:00:00 2001 From: vito Date: Wed, 25 Sep 2019 19:08:48 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/module/DesignerShowActivator.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerShowActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerShowActivator.java index d0c27bcc4a..d6e571575a 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerShowActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerShowActivator.java @@ -13,7 +13,6 @@ public class DesignerShowActivator extends Activator { @Override public void start() { -// DesignerInitial.init(findSingleton(StartupArgs.class).get()); EventDispatcher.asyncFire(ModuleEvent.MajorModuleStarting, Toolkit.i18nText("Fine-Design_Module_Name_Designer")); DesignerInitial.prepare(); } From f6f8e0f936a90de83a764aed970ba17d2e6380e6 Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 26 Sep 2019 14:47:13 +0800 Subject: [PATCH 10/13] =?UTF-8?q?REPORT-21295=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E9=9B=86=E7=BE=A4=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/file/PreferencePane.java | 6 +++--- .../DesignerFrameFileDealerPane.java | 20 ++++++++++++++++--- .../mainframe/vcs/common/VcsHelper.java | 20 +++++++++++-------- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 27b246188b..6a8132a609 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -1,6 +1,6 @@ package com.fr.design.actions.file; -import com.fr.cluster.engine.base.FineClusterConfig; +import com.fr.cluster.ClusterBridge; import com.fr.config.Configuration; import com.fr.config.ServerPreferenceConfig; import com.fr.design.DesignerEnvManager; @@ -307,7 +307,7 @@ public class PreferencePane extends BasicPane { }); //集群下禁用 - if (FineClusterConfig.getInstance().isCluster()) { + if (ClusterBridge.isClusterMode()) { gcEnableCheckBox.setEnabled(false); gcButton.setEnabled(false); } @@ -1050,7 +1050,7 @@ public class PreferencePane extends BasicPane { if (size > Math.pow(n, 2)) { return df.format(size / Math.pow(n, 2)) + "MB"; } - return new StringBuilder().append(df.format(size / n)).append("KB").toString(); + return df.format(size / n) + "KB"; } /** diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index ff831160b6..c8f8280a49 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -2,7 +2,7 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode; -import com.fr.cluster.engine.base.FineClusterConfig; +import com.fr.cluster.ClusterBridge; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; @@ -242,6 +242,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt /** * 响应数据集改变 */ + @Override public void fireDSChanged() { fireDSChanged(new HashMap()); @@ -252,6 +253,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt * * @param map 改变名字的数据集 */ + @Override public void fireDSChanged(Map map) { DesignTableDataManager.fireDSChanged(map); @@ -307,7 +309,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt return selectedOperation; } - /* + /** * 新建文件夹 */ private class NewFolderAction extends UpdateAction { @@ -363,7 +365,9 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt * 版本管理可用状态的监控 */ private void fireVcsActionChange() { - if (!DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() || VcsHelper.getInstance().isUnSelectedTemplate() || FineClusterConfig.getInstance().isCluster()) { + if (!DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() + || VcsHelper.getInstance().isUnSelectedTemplate() + || ClusterBridge.isClusterMode()) { setEnabled(false); return; } @@ -549,14 +553,17 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt nameField = new UITextField(oldName); nameField.getDocument().addDocumentListener(new DocumentListener() { + @Override public void changedUpdate(DocumentEvent e) { validInput(); } + @Override public void insertUpdate(DocumentEvent e) { validInput(); } + @Override public void removeUpdate(DocumentEvent e) { validInput(); } @@ -597,6 +604,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm")); confirmButton.setPreferredSize(new Dimension(60, 25)); confirmButton.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { confirmClose(); } @@ -608,6 +616,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt cancelButton.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { dispose(); } @@ -764,14 +773,17 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt nameField = new UITextField(); nameField.getDocument().addDocumentListener(new DocumentListener() { + @Override public void changedUpdate(DocumentEvent e) { validInput(); } + @Override public void insertUpdate(DocumentEvent e) { validInput(); } + @Override public void removeUpdate(DocumentEvent e) { validInput(); } @@ -812,6 +824,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm")); confirmButton.setPreferredSize(new Dimension(60, 25)); confirmButton.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { confirmClose(); } @@ -824,6 +837,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt cancelButton.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { dispose(); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java index 4f447eaef0..f4089e982f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java @@ -1,6 +1,7 @@ package com.fr.design.mainframe.vcs.common; -import com.fr.cluster.engine.base.FineClusterConfig; +import com.fr.cluster.ClusterBridge; +import com.fr.concurrent.NamedThreadFactory; import com.fr.design.DesignerEnvManager; import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.TemplateTreePane; @@ -49,10 +50,10 @@ public class VcsHelper implements JTemplateActionListener { public final static int OFFSET = 2; private static final int MINUTE = 60 * 1000; private final static String VCS_PLUGIN_ID = "com.fr.plugin.vcs.v10"; - private static final VcsHelper instance = new VcsHelper(); + private static final VcsHelper INSTANCE = new VcsHelper(); public static VcsHelper getInstance() { - return instance; + return INSTANCE; } private int containsFolderCounts() { @@ -111,7 +112,7 @@ public class VcsHelper implements JTemplateActionListener { if (configManager.isSaveCommit() && StringUtils.isNotBlank(entity.getCommitMsg())) { return false; } - return new Date().getTime() - entity.getTime().getTime() < DesignerEnvManager.getEnvManager().getVcsConfigManager().getSaveInterval() * MINUTE; + return System.currentTimeMillis() - entity.getTime().getTime() < DesignerEnvManager.getEnvManager().getVcsConfigManager().getSaveInterval() * MINUTE; } public boolean needInit() { @@ -125,7 +126,8 @@ public class VcsHelper implements JTemplateActionListener { * @param jt */ public void fireVcs(final JTemplate jt) { - new Thread(new Runnable() { + ExecutorService fireVcs = Executors.newSingleThreadExecutor(new NamedThreadFactory("fireVcs")); + fireVcs.execute(new Runnable() { @Override public void run() { @@ -152,8 +154,8 @@ public class VcsHelper implements JTemplateActionListener { } } - }).start(); - + }); + fireVcs.shutdown(); } @@ -169,7 +171,9 @@ public class VcsHelper implements JTemplateActionListener { */ @Override public void templateSaved(JTemplate jt) { - if (needInit() && DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() && !FineClusterConfig.getInstance().isCluster()) { + if (needInit() + && DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() + && !ClusterBridge.isClusterMode()) { fireVcs(jt); } } From c93cf925689a830bfa9611154687a559c74124b1 Mon Sep 17 00:00:00 2001 From: author Date: Thu, 26 Sep 2019 16:17:00 +0800 Subject: [PATCH 11/13] =?UTF-8?q?REPORT-22339=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E7=AE=A1=E7=90=86=E6=9D=83=E9=99=90=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=BB=BA=E5=A4=9A=E4=B8=AA=E8=A7=92=E8=89=B2?= =?UTF-8?q?=EF=BC=8C=E8=BF=9B=E8=A1=8C=E5=88=A0=E9=99=A4=E6=97=B6=E4=BC=9A?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=EF=BC=8C=E4=BD=86=E6=98=AF=E5=B9=B6=E6=9C=AA?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/remote/ui/AbstractManagerPane.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/remote/ui/AbstractManagerPane.java b/designer-base/src/main/java/com/fr/design/remote/ui/AbstractManagerPane.java index 1b8b71dc4f..10ab1ffd5c 100644 --- a/designer-base/src/main/java/com/fr/design/remote/ui/AbstractManagerPane.java +++ b/designer-base/src/main/java/com/fr/design/remote/ui/AbstractManagerPane.java @@ -314,16 +314,15 @@ public abstract class AbstractManagerPane extends BasicPane { private void addToMemberList() { addingListModel.clear(); - for (RemoteDesignMember member : addingMembers) { + for (RemoteDesignMember addingMember : addingMembers) { // 如果包含在右侧列表中,那么左侧列表默认选中 - if (addedMembers.contains(member)) { - member.setAuthority(true); - member.setSelected(true); - } else { - member.setAuthority(false); - member.setSelected(false); + for (RemoteDesignMember addedMember : addedMembers){ + if (addingMember.equals(addedMember)){ + addingMember.setAuthority(addedMember.hasAuthority()); + addingMember.setSelected(true); + } } - addingListModel.addElement(member); + addingListModel.addElement(addingMember); } addingList.revalidate(); addingList.repaint(); From 03fa3691a4e2eac29862f0d63bd4f8be5ae3dfca Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 26 Sep 2019 16:57:35 +0800 Subject: [PATCH 12/13] =?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 --- .../java/com/fr/design/mainframe/vcs/common/VcsHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java index f4089e982f..dc4af8750e 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java @@ -26,9 +26,9 @@ import com.fr.workspace.server.vcs.git.config.GcConfig; import javax.swing.Icon; import javax.swing.border.EmptyBorder; import java.awt.Color; -import java.util.Date; -import static com.fr.stable.StableUtils.pathJoin; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; /** * Created by XiaXiang on 2019/4/17. From 1071b66fe7a4d50d40e795967e88dd967092004c Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 26 Sep 2019 20:10:28 +0800 Subject: [PATCH 13/13] =?UTF-8?q?CHART-4027=20=E4=BB=A3=E7=A0=81=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=20chartCount=E5=92=8CswichState=E6=98=AF=E4=B8=80?= =?UTF-8?q?=E4=BB=B6=E4=BA=8B=E6=83=85=EF=BC=8C=E6=89=80=E4=BB=A5swichStat?= =?UTF-8?q?e=E4=B8=8D=E9=9C=80=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/chart/gui/ChartTypeButtonPane.java | 9 +-------- .../com/fr/design/mainframe/chart/gui/ChartTypePane.java | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java index 4dedb133d3..880c1a7792 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -3,7 +3,6 @@ package com.fr.design.mainframe.chart.gui; import com.fr.base.BaseUtils; import com.fr.chart.base.AttrChangeConfig; import com.fr.chart.chartattr.ChartCollection; -import com.fr.chart.chartattr.SwitchState; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; import com.fr.design.beans.BasicBeanPane; @@ -187,12 +186,6 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen private void calculateMultiChartMode() { //设置切换功能是否可用 editingCollection.getChangeConfigAttr().setEnable(changeEnable()); - //多图表切换模式 - if (editingCollection.getChartCount() > 1) { - editingCollection.setState(SwitchState.CHANGE); - } else { - editingCollection.setState(SwitchState.DEFAULT); - } } /** @@ -363,7 +356,7 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen private void checkConfigButtonVisible() { addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getSelectedChartProvider().getID())); //新建一个collection - if (editingCollection.getState() == SwitchState.DEFAULT && editingCollection.getSelectedChartProvider() != null) { + if (editingCollection.getChartCount() == 1 && editingCollection.getSelectedChartProvider() != null) { //Chart 不支持图表切换 configButton.setVisible(supportChange()); } 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 e9dcbedce3..eb43b8594d 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 @@ -1,7 +1,6 @@ package com.fr.design.mainframe.chart.gui; import com.fr.chart.chartattr.ChartCollection; -import com.fr.chart.chartattr.SwitchState; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; import com.fr.design.ChartTypeInterfaceManager; @@ -218,7 +217,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ //第一步就是重构cards cards.clear(); if (enabledChart) { - if (collection.getState() == SwitchState.DEFAULT) { + if (collection.getChartCount() == 1) { addAllCards(); } else { addOnePriorityCards(priority);