From 0d8e3a3256369d5907aa1ab3014cfc92ba4f38a7 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 20 Jun 2018 15:37:24 +0800 Subject: [PATCH 1/7] REPORT-8709 and REPORT-8763 --- .gitignore | 5 + .../connect/ConnectionManagerPane.java | 12 +-- .../tabledatapane/ProcedureManagerPane.java | 10 -- .../tabledatapane/TableDataManagerPane.java | 9 -- .../design/formula/FunctionManagerPane.java | 12 --- .../parameter/ParameterManagerPane.java | 10 -- .../fr/design/ChartTypeInterfaceManager.java | 100 +++++++++--------- .../design/mainframe/FormParaWidgetPane.java | 4 +- .../actions/server/StyleManagerPane.java | 9 -- .../EditReportServerParameterPane.java | 12 --- .../fr/design/webattr/WidgetManagerPane.java | 11 +- 11 files changed, 59 insertions(+), 135 deletions(-) diff --git a/.gitignore b/.gitignore index f69258f5b2..548135b38f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,10 @@ .DS_Store .classpath .project +target/ +${web-inf-path}/ +assets/ +lib/ +logs/ diff --git a/designer-base/src/com/fr/design/data/datapane/connect/ConnectionManagerPane.java b/designer-base/src/com/fr/design/data/datapane/connect/ConnectionManagerPane.java index aa0980ad58..03ea1942eb 100644 --- a/designer-base/src/com/fr/design/data/datapane/connect/ConnectionManagerPane.java +++ b/designer-base/src/com/fr/design/data/datapane/connect/ConnectionManagerPane.java @@ -12,21 +12,11 @@ import java.awt.*; import java.util.HashMap; public class ConnectionManagerPane extends LoadingBasicPane implements ConnectionShowPane { - private UITextField connectionTextField; + private ConnectionListPane connectionListPane; protected void initComponents(JPanel container) { container.setLayout(FRGUIPaneFactory.createBorderLayout()); - - JPanel connectionPathPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - container.add(connectionPathPane, BorderLayout.NORTH); - - connectionPathPane.setBorder(BorderFactory.createEmptyBorder(6, 2, 2, 2)); - - connectionPathPane.add(new UILabel(Inter.getLocText("FR-Designer_Save_Path") + ":"), BorderLayout.WEST); - this.connectionTextField = new UITextField(); - connectionPathPane.add(connectionTextField, BorderLayout.CENTER); - this.connectionTextField.setEditable(false); connectionListPane = new ConnectionListPane() { protected void rename(String oldName, String newName) { super.rename(oldName, newName); diff --git a/designer-base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureManagerPane.java b/designer-base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureManagerPane.java index e178b63b42..92b894e69e 100644 --- a/designer-base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureManagerPane.java +++ b/designer-base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureManagerPane.java @@ -11,21 +11,11 @@ import javax.swing.*; import java.awt.*; public class ProcedureManagerPane extends LoadingBasicPane { - private UITextField connectionTextField; private ProcedureListPane procedureListPane; protected void initComponents(JPanel container) { container.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel connectionPathPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - container.add(connectionPathPane, BorderLayout.NORTH); - - connectionPathPane.setBorder(BorderFactory.createEmptyBorder(6, 2, 2, 2)); - - connectionPathPane.add(new UILabel(Inter.getLocText("FR-Designer_Save_Path") + ":"), BorderLayout.WEST); - this.connectionTextField = new UITextField(); - connectionPathPane.add(connectionTextField, BorderLayout.CENTER); - this.connectionTextField.setEditable(false); procedureListPane = new ProcedureListPane(); container.add(procedureListPane, BorderLayout.CENTER); } diff --git a/designer-base/src/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java b/designer-base/src/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java index 76eeeb0048..5ceaf5a423 100644 --- a/designer-base/src/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java +++ b/designer-base/src/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java @@ -18,7 +18,6 @@ import java.util.Map; public class TableDataManagerPane extends LoadingBasicPane { - private UITextField tableDataTextField; private TableDataPaneController tableDataPane; @Override @@ -29,14 +28,6 @@ public class TableDataManagerPane extends LoadingBasicPane { private void initTableDataManagerPane(JPanel container) { container.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel tableDataPathPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - container.add(tableDataPathPane, BorderLayout.NORTH); - - - tableDataPathPane.add(new UILabel(Inter.getLocText("FR-Designer_Save_Path") + ":"), BorderLayout.WEST); - this.tableDataTextField = new UITextField(); - tableDataPathPane.add(tableDataTextField, BorderLayout.CENTER); - this.tableDataTextField.setEditable(false); TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getSingle(TableDataPaneProcessor.XML_TAG); TableDataPaneController pane = null; if (paneProcessor != null) { diff --git a/designer-base/src/com/fr/design/formula/FunctionManagerPane.java b/designer-base/src/com/fr/design/formula/FunctionManagerPane.java index 3557591901..cd6983d4f1 100644 --- a/designer-base/src/com/fr/design/formula/FunctionManagerPane.java +++ b/designer-base/src/com/fr/design/formula/FunctionManagerPane.java @@ -33,23 +33,11 @@ import java.util.List; public class FunctionManagerPane extends BasicPane { - private UITextField functionTextField; private FunctionControlPane functionControlPane; public FunctionManagerPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - //path pane - JPanel datasourcePathPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - this.add(datasourcePathPane, BorderLayout.NORTH); - - - datasourcePathPane.add(new UILabel(Inter.getLocText( - "Function-Function_File") + ":"), BorderLayout.WEST); - this.functionTextField = new UITextField(); - datasourcePathPane.add(this.functionTextField, BorderLayout.CENTER); - this.functionTextField.setEditable(false); - functionControlPane = new FunctionControlPane(); this.add(functionControlPane, BorderLayout.CENTER); } diff --git a/designer-base/src/com/fr/design/parameter/ParameterManagerPane.java b/designer-base/src/com/fr/design/parameter/ParameterManagerPane.java index 91a994de45..97ca5daca1 100644 --- a/designer-base/src/com/fr/design/parameter/ParameterManagerPane.java +++ b/designer-base/src/com/fr/design/parameter/ParameterManagerPane.java @@ -13,21 +13,11 @@ import java.awt.*; public class ParameterManagerPane extends BasicPane { - private UITextField parameterTextField; private ParameterArrayPane parameterArrayPane; public ParameterManagerPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel parameterPathPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - this.add(parameterPathPane, BorderLayout.NORTH); - - - parameterPathPane.add(new UILabel(Inter.getLocText("FR-Designer_Save_Path") + ":"), BorderLayout.WEST); - this.parameterTextField = new UITextField(); - parameterPathPane.add(parameterTextField, BorderLayout.CENTER); - this.parameterTextField.setEditable(false); - parameterArrayPane = new ParameterArrayPane(); this.add(parameterArrayPane, BorderLayout.CENTER); } diff --git a/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java index e28e2fcca9..010c5f812f 100644 --- a/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -109,23 +109,23 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr private static ChartTypeInterfaceManager classManager = new ChartTypeInterfaceManager(); - + private static LinkedHashMap> chartTypeInterfaces = - new LinkedHashMap>(); + new LinkedHashMap>(); private static Map idAndPriorityMap = new HashMap(); public synchronized static ChartTypeInterfaceManager getInstance() { - + DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption()); return classManager; } - + static { readDefault(); readVanChart(); PluginModule.registerAgent(PluginModule.ExtraChartDesign, classManager); } - + static { GeneralContext.addEnvChangedListener(new EnvChangedListener() { @@ -138,7 +138,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } }); } - + private static WidgetOption[] initWidgetOption() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); @@ -153,7 +153,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); - + allCharts[i] = rowChart; } @@ -168,10 +168,10 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return child; } - + //加载所有图表图片 private static void initAllChartsDemoImage(Chart[][] allCharts) { - + for (Chart[] rowChart : allCharts) { if (rowChart == null) { continue; @@ -180,9 +180,9 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr initChartsDemoImage(rowChart); } } - + private static void initChartsDemoImage(Chart[] rowChart) { - + for (Chart aRowChart : rowChart) { //此时,为图片生成模型数据 aRowChart.createSlotImage(); @@ -214,10 +214,10 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr addChartTypeInterface(VAN_CHART_PRIORITY, VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface()); addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new StructureIndependentVanChartInterface()); } - - + + private static void readDefault() { - + if (chartTypeInterfaces.containsKey(CHART_PRIORITY)) { return; } @@ -240,14 +240,14 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr addChartTypeInterface(CHART_PRIORITY, ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); addChartTypeInterface(CHART_PRIORITY, ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); } - + private static void addChartTypeInterface(String priority, String plotID, IndependentChartUIProvider provider) { - + if (chartTypeInterfaces != null) { if (!chartTypeInterfaces.containsKey(priority)) { //新建一个具体图表列表 CloseableContainedMap chartUIList - = new CloseableContainedMap(LinkedHashMap.class); + = new CloseableContainedMap(LinkedHashMap.class); chartUIList.put(plotID, provider); chartTypeInterfaces.put(priority, chartUIList); } else { @@ -269,14 +269,14 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } return null; } - + /** * 把所有的pane加到list里 * * @param paneList pane容器 */ public void addPlotTypePaneList(List> paneList) { - + List priorityList = getPriorityInOrder(); for (Integer aPriorityList : priorityList) { String priority = String.valueOf(aPriorityList); @@ -335,17 +335,17 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return list.toArray(new String[list.size()]); } - + /** * 获取指定图表的标题 */ public String getTitle4PopupWindow(String priority, String plotID) { - + if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)) { IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID); return getChartName(plotID, provider); } - + //兼容老的插件 if (chartTypeInterfaces != null) { Iterator iterator = chartTypeInterfaces.entrySet().iterator(); @@ -359,9 +359,9 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } return StringUtils.EMPTY; } - + private List getPriorityInOrder() { - + List priorityList = new ArrayList(); if (chartTypeInterfaces != null) { Iterator iterator = chartTypeInterfaces.entrySet().iterator(); @@ -384,7 +384,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } return StringUtils.EMPTY; } - + public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) { IndependentChartUIProvider provider = getChartTypeInterface(plotID); if (provider != null) { @@ -393,19 +393,19 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return new ChartDataPane(listener); } - + /** * 获取对应ID的图表数量 * */ private int getChartSize(String key) { - + if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(key)) { return chartTypeInterfaces.get(key).size(); } return 0; } - + public AbstractChartAttrPane[] getAttrPaneArray(String plotID, AttributeChangeListener listener) { IndependentChartUIProvider provider = getChartTypeInterface(plotID); if (provider != null) { @@ -413,9 +413,9 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } return new AbstractChartAttrPane[0]; - + } - + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { IndependentChartUIProvider provider = getChartTypeInterface(plot.getPlotID()); @@ -425,7 +425,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return null; } - + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { IndependentChartUIProvider provider = getChartTypeInterface(plot.getPlotID()); @@ -435,15 +435,15 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return null; } - + private boolean plotInChart(String plotID, String priority) { - + return chartTypeInterfaces != null - && chartTypeInterfaces.containsKey(priority) - && chartTypeInterfaces.get(priority).containsKey(plotID); + && chartTypeInterfaces.containsKey(priority) + && chartTypeInterfaces.get(priority).containsKey(plotID); } - - + + public ConditionAttributesPane getPlotConditionPane(Plot plot) { IndependentChartUIProvider provider = getChartTypeInterface(plot.getPlotID()); @@ -453,7 +453,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return null; } - + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot) { IndependentChartUIProvider provider = getChartTypeInterface(plot.getPlotID()); @@ -463,7 +463,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return null; } - + /** * 是否使用默认的界面,为了避免界面来回切换 * @@ -476,7 +476,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr if (provider != null) { return provider.isUseDefaultPane(); } - + return true; } @@ -490,10 +490,10 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return true; } - + @Override public void mount(PluginSingleInjection injection) { - + if (isIndependentChartUIProvider(injection)) { String priority = injection.getAttribute("priority", CHART_PRIORITY); String plotID = injection.getAttribute("plotID"); @@ -501,20 +501,20 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr addChartTypeInterface(priority, plotID, instance); } } - - + + @Override public void demount(PluginSingleInjection injection) { - + if (isIndependentChartUIProvider(injection)) { String priority = injection.getAttribute("priority", CHART_PRIORITY); String plotID = injection.getAttribute("plotID"); removeChartTypeInterface(priority, plotID); } } - + private void removeChartTypeInterface(String priority, String plotID) { - + if (chartTypeInterfaces != null) { if (chartTypeInterfaces.containsKey(priority)) { Map chartUIList = chartTypeInterfaces.get(priority); @@ -522,10 +522,10 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } } } - - + + private boolean isIndependentChartUIProvider(PluginSingleInjection injection) { - + return !(injection == null || injection.getObject() == null) && IndependentChartUIProvider.XML_TAG.equals(injection.getName()) && injection.getObject() instanceof IndependentChartUIProvider; } diff --git a/designer-form/src/com/fr/design/mainframe/FormParaWidgetPane.java b/designer-form/src/com/fr/design/mainframe/FormParaWidgetPane.java index b3456e451f..0cb48eed8a 100644 --- a/designer-form/src/com/fr/design/mainframe/FormParaWidgetPane.java +++ b/designer-form/src/com/fr/design/mainframe/FormParaWidgetPane.java @@ -318,8 +318,8 @@ public class FormParaWidgetPane extends JPanel { public void mouseClicked(MouseEvent e) { initWidgetTypePopUp(); widgetTypePopupMenu.show(FormParaWidgetPane.this, - (int) jSeparatorChart.getLocation().getX() + BORDER, - (int) jSeparatorChart.getLocation().getY()); + (int) jSeparatorLayout.getLocation().getX() + BORDER, + (int) jSeparatorLayout.getLocation().getY()); } }); diff --git a/designer-realize/src/com/fr/design/actions/server/StyleManagerPane.java b/designer-realize/src/com/fr/design/actions/server/StyleManagerPane.java index 64b2961233..7332ed8a4b 100644 --- a/designer-realize/src/com/fr/design/actions/server/StyleManagerPane.java +++ b/designer-realize/src/com/fr/design/actions/server/StyleManagerPane.java @@ -12,20 +12,11 @@ import javax.swing.*; import java.awt.*; public class StyleManagerPane extends BasicPane { - private UITextField StyleTextField; private StyleArrayPane styleArrayPane; public StyleManagerPane(){ this.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel stylePathPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - this.add(stylePathPane, BorderLayout.NORTH); - - stylePathPane.add(new UILabel(Inter.getLocText("FR-Designer_Save_Path") + ":"), BorderLayout.WEST); - this.StyleTextField = new UITextField(); - stylePathPane.add(StyleTextField, BorderLayout.CENTER); - this.StyleTextField.setEditable(false); - styleArrayPane = new StyleArrayPane(); this.add(styleArrayPane, BorderLayout.CENTER); } diff --git a/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java b/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java index 00c2c7469d..e7200886a9 100644 --- a/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java +++ b/designer-realize/src/com/fr/design/webattr/EditReportServerParameterPane.java @@ -24,7 +24,6 @@ import java.awt.*; * Edit Report Server Parameter. */ public class EditReportServerParameterPane extends LoadingBasicPane { - private UITextField configFileTextField; private UITabbedPane tabbedPane; @@ -50,17 +49,6 @@ public class EditReportServerParameterPane extends LoadingBasicPane { JPanel defaultPane = container; defaultPane.setLayout(FRGUIPaneFactory.createBorderLayout()); - //path pane - JPanel datasourcePathPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - defaultPane.add(datasourcePathPane, BorderLayout.NORTH); - - datasourcePathPane.add(GUICoreUtils.createFlowPane(new Component[] { - new UILabel(Inter.getLocText( - "ReportServerP-Report_server_parameter") + ":"), - (this.configFileTextField = new UITextField(40)) - }, FlowLayout.LEFT), BorderLayout.WEST); - - this.configFileTextField.setEditable(false); //Tabbed Pane tabbedPane = new UITabbedPane(); defaultPane.add(tabbedPane, BorderLayout.CENTER); diff --git a/designer-realize/src/com/fr/design/webattr/WidgetManagerPane.java b/designer-realize/src/com/fr/design/webattr/WidgetManagerPane.java index 8c9997eb86..641cdc5786 100644 --- a/designer-realize/src/com/fr/design/webattr/WidgetManagerPane.java +++ b/designer-realize/src/com/fr/design/webattr/WidgetManagerPane.java @@ -15,22 +15,13 @@ import java.awt.*; import java.io.File; public class WidgetManagerPane extends LoadingBasicPane { - private UITextField widgetTextField; + private WidgetConfigPane widgetConfigPane; @Override protected void initComponents(JPanel container) { container.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel widgetPathPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - container.add(widgetPathPane, BorderLayout.NORTH); - - - widgetPathPane.add(new UILabel(Inter.getLocText("FR-Designer_Save_Path") + ":"), BorderLayout.WEST); - this.widgetTextField = new UITextField(); - widgetPathPane.add(widgetTextField, BorderLayout.CENTER); - this.widgetTextField.setEditable(false); - widgetConfigPane = new WidgetConfigPane(); container.add(widgetConfigPane, BorderLayout.CENTER); } From 024e2fb543c172a0828872777a9a74af042bbd1d Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 20 Jun 2018 16:13:41 +0800 Subject: [PATCH 2/7] REPORT-8709 and REPORT-8763 --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 1 - .../com/fr/design/mainframe/FormParaWidgetPane.java | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java index 010c5f812f..23d77a89bd 100644 --- a/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -116,7 +116,6 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr private static Map idAndPriorityMap = new HashMap(); public synchronized static ChartTypeInterfaceManager getInstance() { - DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption()); return classManager; } diff --git a/designer-form/src/com/fr/design/mainframe/FormParaWidgetPane.java b/designer-form/src/com/fr/design/mainframe/FormParaWidgetPane.java index 0cb48eed8a..d5c5972650 100644 --- a/designer-form/src/com/fr/design/mainframe/FormParaWidgetPane.java +++ b/designer-form/src/com/fr/design/mainframe/FormParaWidgetPane.java @@ -317,9 +317,15 @@ public class FormParaWidgetPane extends JPanel { @Override public void mouseClicked(MouseEvent e) { initWidgetTypePopUp(); - widgetTypePopupMenu.show(FormParaWidgetPane.this, - (int) jSeparatorLayout.getLocation().getX() + BORDER, - (int) jSeparatorLayout.getLocation().getY()); + if(jSeparatorChart != null) { + widgetTypePopupMenu.show(FormParaWidgetPane.this, + (int) jSeparatorChart.getLocation().getX() + BORDER, + (int) jSeparatorChart.getLocation().getY()); + }else{ + widgetTypePopupMenu.show(FormParaWidgetPane.this, + (int) jSeparatorLayout.getLocation().getX() + BORDER, + (int) jSeparatorLayout.getLocation().getY()); + } } }); From 382ddcc505b87746d96de0eab505f5962299b350 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 20 Jun 2018 18:24:43 +0800 Subject: [PATCH 3/7] REPORT-8860 and REPORT-6379 --- .../com/fr/design/hyperlink/WebHyperNorthPane.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java b/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java index 910701df4b..1823c53530 100644 --- a/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java +++ b/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java @@ -2,6 +2,7 @@ package com.fr.design.hyperlink; import com.fr.config.ServerPreferenceConfig; import com.fr.design.constants.LayoutConstants; +import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; @@ -21,7 +22,7 @@ import java.awt.*; public class WebHyperNorthPane extends AbstractHyperNorthPane { private UITextField itemNameTextField; private boolean needRenamePane = false; - private UITextField urlTextField; + private UITextArea urlTextField; public WebHyperNorthPane(boolean needRenamePane) { this.needRenamePane = needRenamePane; @@ -45,15 +46,10 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane { protected JPanel setHeaderPanel() { JPanel headerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - JPanel urlPane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane(); - urlTextField = new UITextField(24); - urlPane.add(urlTextField); + urlTextField = new UITextArea(1,headerPane.getWidth()); urlTextField.setText(ProductConstants.WEBSITE_URL); - //UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"})); - JPanel urlWithHelp = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2); - urlWithHelp.add(GUICoreUtils.createNamedPane(urlPane, "URL:")); - //urlWithHelp.add(label); + JPanel urlWithHelp = GUICoreUtils.createNamedPane(urlTextField, "URL:"); if (this.needRenamePane) { headerPane.setLayout(new BorderLayout(LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_SMALL)); From 4892537c19827c272b6f0ae3e38910ff71a5835b Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 20 Jun 2018 20:31:07 +0800 Subject: [PATCH 4/7] fix conflict --- .../design/hyperlink/WebHyperNorthPane.java | 13 ++- .../fr/design/ChartTypeInterfaceManager.java | 106 +++++++++--------- 2 files changed, 59 insertions(+), 60 deletions(-) diff --git a/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java b/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java index 1823c53530..a7a0a8077a 100644 --- a/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java +++ b/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java @@ -2,7 +2,7 @@ package com.fr.design.hyperlink; import com.fr.config.ServerPreferenceConfig; import com.fr.design.constants.LayoutConstants; -import com.fr.design.gui.itextarea.UITextArea; + import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; @@ -11,8 +11,9 @@ import com.fr.js.WebHyperlink; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import java.awt.BorderLayout; + /** * chart 网页链接 定义属性 target url 特征的 界面 @@ -22,7 +23,7 @@ import java.awt.*; public class WebHyperNorthPane extends AbstractHyperNorthPane { private UITextField itemNameTextField; private boolean needRenamePane = false; - private UITextArea urlTextField; + private UITextField urlTextField; public WebHyperNorthPane(boolean needRenamePane) { this.needRenamePane = needRenamePane; @@ -46,9 +47,11 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane { protected JPanel setHeaderPanel() { JPanel headerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - urlTextField = new UITextArea(1,headerPane.getWidth()); + urlTextField = new UITextField(43); urlTextField.setText(ProductConstants.WEBSITE_URL); + + //UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"})); JPanel urlWithHelp = GUICoreUtils.createNamedPane(urlTextField, "URL:"); if (this.needRenamePane) { diff --git a/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java index 23d77a89bd..a2d06362a9 100644 --- a/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer-chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -27,7 +27,6 @@ import com.fr.design.chartinterface.RangeIndependentChartInterface; import com.fr.design.chartinterface.StockIndependentChartInterface; import com.fr.design.chartinterface.XYScatterIndependentChartInterface; import com.fr.design.condition.ConditionAttributesPane; -import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.mainframe.chart.AbstractChartAttrPane; @@ -60,7 +59,6 @@ import com.fr.plugin.chart.radar.VanChartRadarPlot; import com.fr.plugin.chart.scatter.VanChartScatterPlot; import com.fr.plugin.chart.structure.VanChartStructurePlot; import com.fr.plugin.chart.treemap.VanChartTreeMapPlot; -import com.fr.plugin.chart.vanchart.imgevent.design.DesignImageEvent; import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot; import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginSingleInjection; @@ -69,7 +67,6 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; -import com.fr.van.chart.DownloadOnlineSourcesHelper; import com.fr.van.chart.area.AreaIndependentVanChartInterface; import com.fr.van.chart.bar.BarIndependentVanChartInterface; import com.fr.van.chart.bubble.BubbleIndependentVanChartInterface; @@ -109,22 +106,23 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr private static ChartTypeInterfaceManager classManager = new ChartTypeInterfaceManager(); - + private static LinkedHashMap> chartTypeInterfaces = - new LinkedHashMap>(); + new LinkedHashMap>(); private static Map idAndPriorityMap = new HashMap(); public synchronized static ChartTypeInterfaceManager getInstance() { + return classManager; } - + static { readDefault(); readVanChart(); PluginModule.registerAgent(PluginModule.ExtraChartDesign, classManager); } - + static { GeneralContext.addEnvChangedListener(new EnvChangedListener() { @@ -132,13 +130,11 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr public void envChanged() { //重新注册designModuleFactory DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption()); - DesignImageEvent.registerDefaultCallbackEvent(HistoryTemplateListPane.getInstance()); - DesignImageEvent.registerDownloadSourcesEvent(new DownloadOnlineSourcesHelper()); } }); } - - private static WidgetOption[] initWidgetOption() { + + public static WidgetOption[] initWidgetOption() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; @@ -152,7 +148,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); - + allCharts[i] = rowChart; } @@ -167,10 +163,10 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return child; } - + //加载所有图表图片 private static void initAllChartsDemoImage(Chart[][] allCharts) { - + for (Chart[] rowChart : allCharts) { if (rowChart == null) { continue; @@ -179,9 +175,9 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr initChartsDemoImage(rowChart); } } - + private static void initChartsDemoImage(Chart[] rowChart) { - + for (Chart aRowChart : rowChart) { //此时,为图片生成模型数据 aRowChart.createSlotImage(); @@ -213,10 +209,10 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr addChartTypeInterface(VAN_CHART_PRIORITY, VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface()); addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new StructureIndependentVanChartInterface()); } - - + + private static void readDefault() { - + if (chartTypeInterfaces.containsKey(CHART_PRIORITY)) { return; } @@ -239,14 +235,14 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr addChartTypeInterface(CHART_PRIORITY, ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); addChartTypeInterface(CHART_PRIORITY, ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); } - + private static void addChartTypeInterface(String priority, String plotID, IndependentChartUIProvider provider) { - + if (chartTypeInterfaces != null) { if (!chartTypeInterfaces.containsKey(priority)) { //新建一个具体图表列表 CloseableContainedMap chartUIList - = new CloseableContainedMap(LinkedHashMap.class); + = new CloseableContainedMap(LinkedHashMap.class); chartUIList.put(plotID, provider); chartTypeInterfaces.put(priority, chartUIList); } else { @@ -268,14 +264,14 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } return null; } - + /** * 把所有的pane加到list里 * * @param paneList pane容器 */ public void addPlotTypePaneList(List> paneList) { - + List priorityList = getPriorityInOrder(); for (Integer aPriorityList : priorityList) { String priority = String.valueOf(aPriorityList); @@ -334,17 +330,17 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return list.toArray(new String[list.size()]); } - + /** * 获取指定图表的标题 */ public String getTitle4PopupWindow(String priority, String plotID) { - + if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)) { IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID); return getChartName(plotID, provider); } - + //兼容老的插件 if (chartTypeInterfaces != null) { Iterator iterator = chartTypeInterfaces.entrySet().iterator(); @@ -358,9 +354,9 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } return StringUtils.EMPTY; } - + private List getPriorityInOrder() { - + List priorityList = new ArrayList(); if (chartTypeInterfaces != null) { Iterator iterator = chartTypeInterfaces.entrySet().iterator(); @@ -383,7 +379,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } return StringUtils.EMPTY; } - + public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) { IndependentChartUIProvider provider = getChartTypeInterface(plotID); if (provider != null) { @@ -392,19 +388,19 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return new ChartDataPane(listener); } - + /** * 获取对应ID的图表数量 * */ private int getChartSize(String key) { - + if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(key)) { return chartTypeInterfaces.get(key).size(); } return 0; } - + public AbstractChartAttrPane[] getAttrPaneArray(String plotID, AttributeChangeListener listener) { IndependentChartUIProvider provider = getChartTypeInterface(plotID); if (provider != null) { @@ -412,9 +408,9 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } return new AbstractChartAttrPane[0]; - + } - + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { IndependentChartUIProvider provider = getChartTypeInterface(plot.getPlotID()); @@ -424,7 +420,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return null; } - + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { IndependentChartUIProvider provider = getChartTypeInterface(plot.getPlotID()); @@ -434,15 +430,15 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return null; } - + private boolean plotInChart(String plotID, String priority) { - + return chartTypeInterfaces != null - && chartTypeInterfaces.containsKey(priority) - && chartTypeInterfaces.get(priority).containsKey(plotID); + && chartTypeInterfaces.containsKey(priority) + && chartTypeInterfaces.get(priority).containsKey(plotID); } - - + + public ConditionAttributesPane getPlotConditionPane(Plot plot) { IndependentChartUIProvider provider = getChartTypeInterface(plot.getPlotID()); @@ -452,7 +448,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return null; } - + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot) { IndependentChartUIProvider provider = getChartTypeInterface(plot.getPlotID()); @@ -462,7 +458,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return null; } - + /** * 是否使用默认的界面,为了避免界面来回切换 * @@ -475,7 +471,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr if (provider != null) { return provider.isUseDefaultPane(); } - + return true; } @@ -489,10 +485,10 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return true; } - + @Override public void mount(PluginSingleInjection injection) { - + if (isIndependentChartUIProvider(injection)) { String priority = injection.getAttribute("priority", CHART_PRIORITY); String plotID = injection.getAttribute("plotID"); @@ -500,20 +496,20 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr addChartTypeInterface(priority, plotID, instance); } } - - + + @Override public void demount(PluginSingleInjection injection) { - + if (isIndependentChartUIProvider(injection)) { String priority = injection.getAttribute("priority", CHART_PRIORITY); String plotID = injection.getAttribute("plotID"); removeChartTypeInterface(priority, plotID); } } - + private void removeChartTypeInterface(String priority, String plotID) { - + if (chartTypeInterfaces != null) { if (chartTypeInterfaces.containsKey(priority)) { Map chartUIList = chartTypeInterfaces.get(priority); @@ -521,10 +517,10 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr } } } - - + + private boolean isIndependentChartUIProvider(PluginSingleInjection injection) { - + return !(injection == null || injection.getObject() == null) && IndependentChartUIProvider.XML_TAG.equals(injection.getName()) && injection.getObject() instanceof IndependentChartUIProvider; } From 79045dd77eada57ac82851289411f36485284d86 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 20 Jun 2018 20:33:27 +0800 Subject: [PATCH 5/7] fix conflict --- .gitignore | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitignore b/.gitignore index 548135b38f..417bed08c8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,5 @@ .classpath .project target/ -${web-inf-path}/ -assets/ -lib/ -logs/ From f72c8602891a12bb3a0d7959ff274a8e3e17fb74 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 20 Jun 2018 20:41:09 +0800 Subject: [PATCH 6/7] REPORT-8860 and REPORT-6379 --- .../src/com/fr/design/hyperlink/WebHyperNorthPane.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java b/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java index a7a0a8077a..1e38c8842c 100644 --- a/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java +++ b/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java @@ -2,7 +2,7 @@ package com.fr.design.hyperlink; import com.fr.config.ServerPreferenceConfig; import com.fr.design.constants.LayoutConstants; - +import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; @@ -23,7 +23,7 @@ import java.awt.BorderLayout; public class WebHyperNorthPane extends AbstractHyperNorthPane { private UITextField itemNameTextField; private boolean needRenamePane = false; - private UITextField urlTextField; + private UITextArea urlTextField; public WebHyperNorthPane(boolean needRenamePane) { this.needRenamePane = needRenamePane; @@ -47,11 +47,9 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane { protected JPanel setHeaderPanel() { JPanel headerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - urlTextField = new UITextField(43); + urlTextField = new UITextArea(1,headerPane.getWidth()); urlTextField.setText(ProductConstants.WEBSITE_URL); - - - //UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"})); + JPanel urlWithHelp = GUICoreUtils.createNamedPane(urlTextField, "URL:"); if (this.needRenamePane) { From f6114de21e2ee926a7484097a255631f36382dc2 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Wed, 20 Jun 2018 20:42:58 +0800 Subject: [PATCH 7/7] remote REPORT-8860 and REPORT-6379 --- .../src/com/fr/design/hyperlink/WebHyperNorthPane.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java b/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java index 1e38c8842c..a7a0a8077a 100644 --- a/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java +++ b/designer-base/src/com/fr/design/hyperlink/WebHyperNorthPane.java @@ -2,7 +2,7 @@ package com.fr.design.hyperlink; import com.fr.config.ServerPreferenceConfig; import com.fr.design.constants.LayoutConstants; -import com.fr.design.gui.itextarea.UITextArea; + import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; @@ -23,7 +23,7 @@ import java.awt.BorderLayout; public class WebHyperNorthPane extends AbstractHyperNorthPane { private UITextField itemNameTextField; private boolean needRenamePane = false; - private UITextArea urlTextField; + private UITextField urlTextField; public WebHyperNorthPane(boolean needRenamePane) { this.needRenamePane = needRenamePane; @@ -47,9 +47,11 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane { protected JPanel setHeaderPanel() { JPanel headerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - urlTextField = new UITextArea(1,headerPane.getWidth()); + urlTextField = new UITextField(43); urlTextField.setText(ProductConstants.WEBSITE_URL); - + + + //UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"})); JPanel urlWithHelp = GUICoreUtils.createNamedPane(urlTextField, "URL:"); if (this.needRenamePane) {