From b3401f978c49e475128e10492e0bf55af102d074 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Thu, 23 Jun 2016 17:35:29 +0800 Subject: [PATCH 01/39] =?UTF-8?q?=E8=BF=AD=E4=BB=A3-=E5=87=B8=E6=98=BE?= =?UTF-8?q?=E6=96=B0=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 9edac3e5f0..4f5db4b69d 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -1,5 +1,6 @@ package com.fr.design; +import com.fr.base.Utils; import com.fr.chart.base.ChartConstants; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; @@ -29,16 +30,15 @@ import com.fr.stable.plugin.PluginSimplify; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLableReader; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * Created by eason on 14/12/29. */ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraChartDesignClassManagerProvider { + private static final String OLD_CHART_PREFIX = "FineReport"; + private static ClassLoader loader = Thread.currentThread().getContextClassLoader(); private static ChartTypeInterfaceManager classManager = null; @@ -133,14 +133,32 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh * @param paneList pane容器 */ public void addPlotTypePaneList(List> paneList) { - + //先构建新旧图表数组 + List newChartList = new ArrayList(); + List oldChartList = new ArrayList(); Iterator iterator = chartTypeInterfaces.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); - IndependentChartUIProvider creator = (IndependentChartUIProvider) entry.getValue(); - paneList.add(creator.getPlotTypePane()); + if (isNewChart(entry.getKey())){ + newChartList.add((IndependentChartUIProvider) entry.getValue()); + }else { + oldChartList.add((IndependentChartUIProvider) entry.getValue()); + } + } + //新图表 + for (int i = 0; i < newChartList.size(); i++) { + paneList.add(newChartList.get(i).getPlotTypePane()); } + //老图表 + for (int i = 0; i < oldChartList.size(); i++) { + paneList.add(oldChartList.get(i).getPlotTypePane()); + } + + + } + private boolean isNewChart(Object key) { + return !Utils.objectToString(key).startsWith(OLD_CHART_PREFIX); } public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) { From 89f327f5fa9c19da5151483fea8dc815f67e5588 Mon Sep 17 00:00:00 2001 From: xiaxiang <1438003374@qq.com> Date: Fri, 1 Jul 2016 17:16:16 +0800 Subject: [PATCH 02/39] rt --- designer_form/src/com/fr/design/mainframe/JForm.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index 0ab170429b..848f0da4cf 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -25,7 +25,10 @@ import com.fr.design.mainframe.form.FormECCompositeProvider; import com.fr.design.mainframe.form.FormECDesignerProvider; import com.fr.design.mainframe.toolbar.ToolBarMenuDock; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; -import com.fr.design.menu.*; +import com.fr.design.menu.KeySetUtils; +import com.fr.design.menu.MenuDef; +import com.fr.design.menu.ShortCut; +import com.fr.design.menu.ToolBarDef; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.utils.gui.LayoutUtils; import com.fr.file.FILE; @@ -381,7 +384,9 @@ public class JForm extends JTemplate implements BaseJForm { new TemplateParameterAction(this) }, new ShortCut[0]); } else { - return this.elementCaseDesign.shortcut4TemplateMenu(); + return (ShortCut[]) ArrayUtils.addAll(new ShortCut[]{ + new TemplateParameterAction(this) + }, this.elementCaseDesign.shortcut4TemplateMenu()); } } @@ -750,4 +755,5 @@ public class JForm extends JTemplate implements BaseJForm { public boolean acceptToolbarItem(Class clazz) { return WorkBookSupportable.class.isAssignableFrom(clazz); } + } \ No newline at end of file From 6ae8a27ead76eb8b46ff60aee6deb3f1b7406cb9 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 4 Jul 2016 14:56:34 +0800 Subject: [PATCH 03/39] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 75 ++++++++----------- .../creator/cardlayout/XWCoverCardLayout.java | 7 ++ 2 files changed, 37 insertions(+), 45 deletions(-) create mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 4f5db4b69d..599263004f 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -1,6 +1,5 @@ package com.fr.design; -import com.fr.base.Utils; import com.fr.chart.base.ChartConstants; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; @@ -30,26 +29,29 @@ import com.fr.stable.plugin.PluginSimplify; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLableReader; -import java.util.*; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; /** * Created by eason on 14/12/29. */ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraChartDesignClassManagerProvider { - private static final String OLD_CHART_PREFIX = "FineReport"; - private static ClassLoader loader = Thread.currentThread().getContextClassLoader(); private static ChartTypeInterfaceManager classManager = null; + private static boolean isReadDefault = false; + private static LinkedHashMap chartTypeInterfaces = new LinkedHashMap(); public synchronized static ChartTypeInterfaceManager getInstance() { if (classManager == null) { classManager = new ChartTypeInterfaceManager(); chartTypeInterfaces.clear(); - classManager.readDefault(); + //默认图表类型在新图表类型后面读取 classManager.readXMLFile(); } return classManager; @@ -68,25 +70,26 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } private static void readDefault() { - - chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.PIE_CHART, new PieIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.AREA_CHART, new AreaIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.SCATTER_CHART, new XYScatterIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.BUBBLE_CHART, new BubbleIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.RADAR_CHART, new RadarIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.STOCK_CHART, new StockIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.METER_CHART, new MeterIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.RANGE_CHART, new RangeIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.CUSTOM_CHART, new CustomIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.GANTT_CHART, new GanttIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.DONUT_CHART, new DonutIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); - + if (!isReadDefault) { + chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.PIE_CHART, new PieIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.AREA_CHART, new AreaIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.SCATTER_CHART, new XYScatterIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.BUBBLE_CHART, new BubbleIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.RADAR_CHART, new RadarIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.STOCK_CHART, new StockIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.METER_CHART, new MeterIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.RANGE_CHART, new RangeIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.CUSTOM_CHART, new CustomIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.GANTT_CHART, new GanttIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.DONUT_CHART, new DonutIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); + } + isReadDefault = true; } @@ -133,32 +136,14 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh * @param paneList pane容器 */ public void addPlotTypePaneList(List> paneList) { - //先构建新旧图表数组 - List newChartList = new ArrayList(); - List oldChartList = new ArrayList(); + classManager.readDefault(); Iterator iterator = chartTypeInterfaces.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); - if (isNewChart(entry.getKey())){ - newChartList.add((IndependentChartUIProvider) entry.getValue()); - }else { - oldChartList.add((IndependentChartUIProvider) entry.getValue()); - } + IndependentChartUIProvider creator = (IndependentChartUIProvider) entry.getValue(); + paneList.add(creator.getPlotTypePane()); } - //新图表 - for (int i = 0; i < newChartList.size(); i++) { - paneList.add(newChartList.get(i).getPlotTypePane()); - } - //老图表 - for (int i = 0; i < oldChartList.size(); i++) { - paneList.add(oldChartList.get(i).getPlotTypePane()); - } - - - } - private boolean isNewChart(Object key) { - return !Utils.objectToString(key).startsWith(OLD_CHART_PREFIX); } public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) { diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java new file mode 100644 index 0000000000..12c8083829 --- /dev/null +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java @@ -0,0 +1,7 @@ +package com.fr.design.designer.creator.cardlayout; + +/** + * Created by Fangjie on 2016/6/30. + */ +public class XWCoverCardLayout { +} From b4d4f2eb4cd5f28fb7273467e5da378241e9a82c Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 4 Jul 2016 15:14:55 +0800 Subject: [PATCH 04/39] update --- .../fr/design/ChartTypeInterfaceManager.java | 44 ++++++++----------- .../creator/cardlayout/XWCoverCardLayout.java | 7 --- 2 files changed, 18 insertions(+), 33 deletions(-) delete mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 599263004f..d102a3fc00 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -38,20 +38,17 @@ import java.util.Map; * Created by eason on 14/12/29. */ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraChartDesignClassManagerProvider { - private static ClassLoader loader = Thread.currentThread().getContextClassLoader(); private static ChartTypeInterfaceManager classManager = null; - private static boolean isReadDefault = false; - private static LinkedHashMap chartTypeInterfaces = new LinkedHashMap(); public synchronized static ChartTypeInterfaceManager getInstance() { if (classManager == null) { classManager = new ChartTypeInterfaceManager(); chartTypeInterfaces.clear(); - //默认图表类型在新图表类型后面读取 + classManager.readDefault(); classManager.readXMLFile(); } return classManager; @@ -70,27 +67,23 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } private static void readDefault() { - if (!isReadDefault) { - chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.PIE_CHART, new PieIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.AREA_CHART, new AreaIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.SCATTER_CHART, new XYScatterIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.BUBBLE_CHART, new BubbleIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.RADAR_CHART, new RadarIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.STOCK_CHART, new StockIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.METER_CHART, new MeterIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.RANGE_CHART, new RangeIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.CUSTOM_CHART, new CustomIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.GANTT_CHART, new GanttIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.DONUT_CHART, new DonutIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); - } - isReadDefault = true; - + chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.PIE_CHART, new PieIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.AREA_CHART, new AreaIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.SCATTER_CHART, new XYScatterIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.BUBBLE_CHART, new BubbleIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.RADAR_CHART, new RadarIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.STOCK_CHART, new StockIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.METER_CHART, new MeterIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.RANGE_CHART, new RangeIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.CUSTOM_CHART, new CustomIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.GANTT_CHART, new GanttIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.DONUT_CHART, new DonutIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); } public String getIconPath(String plotID) { @@ -136,7 +129,6 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh * @param paneList pane容器 */ public void addPlotTypePaneList(List> paneList) { - classManager.readDefault(); Iterator iterator = chartTypeInterfaces.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java deleted file mode 100644 index 12c8083829..0000000000 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.fr.design.designer.creator.cardlayout; - -/** - * Created by Fangjie on 2016/6/30. - */ -public class XWCoverCardLayout { -} From 812007545655579dd2ab892eaeb60a6642adddfb Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 4 Jul 2016 15:42:13 +0800 Subject: [PATCH 05/39] update --- .../fr/design/ChartTypeInterfaceManager.java | 26 +++++--- .../creator/cardlayout/XWCoverCardLayout.java | 63 +++++++++++++++++++ 2 files changed, 80 insertions(+), 9 deletions(-) create mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index d102a3fc00..ae30cb25f0 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -1,9 +1,11 @@ package com.fr.design; import com.fr.chart.base.ChartConstants; +import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.charttypes.ChartTypeManager; +import com.fr.chart.fun.IndependentChartProvider; import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.chart.fun.IndependentChartUIProvider; @@ -29,10 +31,7 @@ import com.fr.stable.plugin.PluginSimplify; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLableReader; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * Created by eason on 14/12/29. @@ -43,6 +42,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private static ChartTypeInterfaceManager classManager = null; private static LinkedHashMap chartTypeInterfaces = new LinkedHashMap(); + private static List chartOrderList = new ArrayList(); public synchronized static ChartTypeInterfaceManager getInstance() { if (classManager == null) { @@ -84,6 +84,12 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface()); chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); + + for (String plotID :chartTypeInterfaces.keySet()){ + if (!chartOrderList.contains(plotID)){ + chartOrderList.add(plotID); + } + } } public String getIconPath(String plotID) { @@ -109,6 +115,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh PluginMessage.remindUpdate(className); } else if (!chartTypeInterfaces.containsKey(plotID)) { chartTypeInterfaces.put(plotID, provider); + //新图表类型插入到前面 + if (!chartOrderList.contains(plotID)) { + chartOrderList.add(0, plotID); + } } } catch (ClassNotFoundException e) { FRLogger.getLogger().error("class not found:" + e.getMessage()); @@ -129,13 +139,11 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh * @param paneList pane容器 */ public void addPlotTypePaneList(List> paneList) { - Iterator iterator = chartTypeInterfaces.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry entry = (Map.Entry) iterator.next(); - IndependentChartUIProvider creator = (IndependentChartUIProvider) entry.getValue(); + for (int i = 0; i < chartOrderList.size(); i++){ + String plotID = chartOrderList.get(i); + IndependentChartUIProvider creator = chartTypeInterfaces.get(plotID); paneList.add(creator.getPlotTypePane()); } - } public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) { diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java new file mode 100644 index 0000000000..8d0cb10890 --- /dev/null +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java @@ -0,0 +1,63 @@ +package com.fr.design.designer.creator.cardlayout; + +import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; + +import java.awt.*; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; + +/** + * Created by Fangjie on 2016/6/30. + */ +public class XWCoverCardLayout extends XWCardMainBorderLayout{ + + private boolean mouseEnter; + + public boolean isMouseEnter() { + return mouseEnter; + } + + public void setMouseEnter(boolean mouseEnter) { + this.mouseEnter = mouseEnter; + } + + /** + * 构造函数 + * + * @param border + * @param dimension + */ + public XWCoverCardLayout(WCardMainBorderLayout border, Dimension dimension) { + super(border, dimension); + } + + public void paint(Graphics g) { + super.paint(g); + + if (mouseEnter) { + Graphics2D g2d = (Graphics2D) g; + Composite oldComposite = g2d.getComposite(); + Paint old_paint = g2d.getPaint(); + + g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.2f)); + + g2d.setColor(Color.YELLOW); + + int x = 1; + int y = 1; + int w = getWidth(); + int h = getHeight(); + + g2d.fillRect(x, y, w, h); + + g2d.setColor(Color.BLACK); + + g2d.drawRect(getX(), getY(), getWidth(), getHeight()); + + g2d.setComposite(oldComposite); + + g2d.setPaint(old_paint); + } + } + +} From 4efeeb7d75ea11645abc9d11be579ae6285fcfcb Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 4 Jul 2016 15:46:45 +0800 Subject: [PATCH 06/39] updae --- .../creator/cardlayout/XWCoverCardLayout.java | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java deleted file mode 100644 index 8d0cb10890..0000000000 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.fr.design.designer.creator.cardlayout; - -import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; - -import java.awt.*; -import java.awt.event.ComponentAdapter; -import java.awt.event.ComponentEvent; - -/** - * Created by Fangjie on 2016/6/30. - */ -public class XWCoverCardLayout extends XWCardMainBorderLayout{ - - private boolean mouseEnter; - - public boolean isMouseEnter() { - return mouseEnter; - } - - public void setMouseEnter(boolean mouseEnter) { - this.mouseEnter = mouseEnter; - } - - /** - * 构造函数 - * - * @param border - * @param dimension - */ - public XWCoverCardLayout(WCardMainBorderLayout border, Dimension dimension) { - super(border, dimension); - } - - public void paint(Graphics g) { - super.paint(g); - - if (mouseEnter) { - Graphics2D g2d = (Graphics2D) g; - Composite oldComposite = g2d.getComposite(); - Paint old_paint = g2d.getPaint(); - - g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.2f)); - - g2d.setColor(Color.YELLOW); - - int x = 1; - int y = 1; - int w = getWidth(); - int h = getHeight(); - - g2d.fillRect(x, y, w, h); - - g2d.setColor(Color.BLACK); - - g2d.drawRect(getX(), getY(), getWidth(), getHeight()); - - g2d.setComposite(oldComposite); - - g2d.setPaint(old_paint); - } - } - -} From cb106878b5b40c9dfcc092b36b66bc7ef4162e69 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 4 Jul 2016 15:49:19 +0800 Subject: [PATCH 07/39] update --- designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index ae30cb25f0..3704db1244 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -1,11 +1,9 @@ package com.fr.design; import com.fr.chart.base.ChartConstants; -import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.charttypes.ChartTypeManager; -import com.fr.chart.fun.IndependentChartProvider; import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.chart.fun.IndependentChartUIProvider; From ef30f9e9d8711f9381b7a9f7363bd3e9073af94d Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 4 Jul 2016 19:49:07 +0800 Subject: [PATCH 08/39] update --- .../fr/design/ChartTypeInterfaceManager.java | 46 +++++++++----- .../creator/cardlayout/XWCoverCardLayout.java | 63 +++++++++++++++++++ 2 files changed, 93 insertions(+), 16 deletions(-) create mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 3704db1244..0d2b3ad683 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -25,28 +25,31 @@ import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; import com.fr.stable.fun.Authorize; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; +import com.fr.stable.plugin.PluginReadListener; import com.fr.stable.plugin.PluginSimplify; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLableReader; -import java.util.*; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; /** * Created by eason on 14/12/29. */ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraChartDesignClassManagerProvider { + private static ClassLoader loader = Thread.currentThread().getContextClassLoader(); private static ChartTypeInterfaceManager classManager = null; private static LinkedHashMap chartTypeInterfaces = new LinkedHashMap(); - private static List chartOrderList = new ArrayList(); public synchronized static ChartTypeInterfaceManager getInstance() { if (classManager == null) { classManager = new ChartTypeInterfaceManager(); chartTypeInterfaces.clear(); - classManager.readDefault(); classManager.readXMLFile(); } return classManager; @@ -60,11 +63,23 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh }); } + static { + GeneralContext.addPluginReadListener(new PluginReadListener() { + @Override + public void success() { + if (chartTypeInterfaces != null) { + readDefault(); + } + } + }); + } + private synchronized static void envChanged() { classManager = null; } private static void readDefault() { + chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); @@ -83,15 +98,15 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); - for (String plotID :chartTypeInterfaces.keySet()){ - if (!chartOrderList.contains(plotID)){ - chartOrderList.add(plotID); - } - } + } public String getIconPath(String plotID) { - return chartTypeInterfaces.get(plotID).getIconPath(); + if (chartTypeInterfaces.get(plotID) != null) { + return chartTypeInterfaces.get(plotID).getIconPath(); + }else { + return StringUtils.EMPTY; + } } /** @@ -113,10 +128,6 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh PluginMessage.remindUpdate(className); } else if (!chartTypeInterfaces.containsKey(plotID)) { chartTypeInterfaces.put(plotID, provider); - //新图表类型插入到前面 - if (!chartOrderList.contains(plotID)) { - chartOrderList.add(0, plotID); - } } } catch (ClassNotFoundException e) { FRLogger.getLogger().error("class not found:" + e.getMessage()); @@ -137,11 +148,14 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh * @param paneList pane容器 */ public void addPlotTypePaneList(List> paneList) { - for (int i = 0; i < chartOrderList.size(); i++){ - String plotID = chartOrderList.get(i); - IndependentChartUIProvider creator = chartTypeInterfaces.get(plotID); + + Iterator iterator = chartTypeInterfaces.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = (Map.Entry) iterator.next(); + IndependentChartUIProvider creator = (IndependentChartUIProvider) entry.getValue(); paneList.add(creator.getPlotTypePane()); } + } public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) { diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java new file mode 100644 index 0000000000..8d0cb10890 --- /dev/null +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java @@ -0,0 +1,63 @@ +package com.fr.design.designer.creator.cardlayout; + +import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; + +import java.awt.*; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; + +/** + * Created by Fangjie on 2016/6/30. + */ +public class XWCoverCardLayout extends XWCardMainBorderLayout{ + + private boolean mouseEnter; + + public boolean isMouseEnter() { + return mouseEnter; + } + + public void setMouseEnter(boolean mouseEnter) { + this.mouseEnter = mouseEnter; + } + + /** + * 构造函数 + * + * @param border + * @param dimension + */ + public XWCoverCardLayout(WCardMainBorderLayout border, Dimension dimension) { + super(border, dimension); + } + + public void paint(Graphics g) { + super.paint(g); + + if (mouseEnter) { + Graphics2D g2d = (Graphics2D) g; + Composite oldComposite = g2d.getComposite(); + Paint old_paint = g2d.getPaint(); + + g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.2f)); + + g2d.setColor(Color.YELLOW); + + int x = 1; + int y = 1; + int w = getWidth(); + int h = getHeight(); + + g2d.fillRect(x, y, w, h); + + g2d.setColor(Color.BLACK); + + g2d.drawRect(getX(), getY(), getWidth(), getHeight()); + + g2d.setComposite(oldComposite); + + g2d.setPaint(old_paint); + } + } + +} From 67e6c176153c129f3fa63b5ad45722eba9356228 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 4 Jul 2016 19:51:24 +0800 Subject: [PATCH 09/39] update --- .../creator/cardlayout/XWCoverCardLayout.java | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java deleted file mode 100644 index 8d0cb10890..0000000000 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCoverCardLayout.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.fr.design.designer.creator.cardlayout; - -import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; - -import java.awt.*; -import java.awt.event.ComponentAdapter; -import java.awt.event.ComponentEvent; - -/** - * Created by Fangjie on 2016/6/30. - */ -public class XWCoverCardLayout extends XWCardMainBorderLayout{ - - private boolean mouseEnter; - - public boolean isMouseEnter() { - return mouseEnter; - } - - public void setMouseEnter(boolean mouseEnter) { - this.mouseEnter = mouseEnter; - } - - /** - * 构造函数 - * - * @param border - * @param dimension - */ - public XWCoverCardLayout(WCardMainBorderLayout border, Dimension dimension) { - super(border, dimension); - } - - public void paint(Graphics g) { - super.paint(g); - - if (mouseEnter) { - Graphics2D g2d = (Graphics2D) g; - Composite oldComposite = g2d.getComposite(); - Paint old_paint = g2d.getPaint(); - - g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.2f)); - - g2d.setColor(Color.YELLOW); - - int x = 1; - int y = 1; - int w = getWidth(); - int h = getHeight(); - - g2d.fillRect(x, y, w, h); - - g2d.setColor(Color.BLACK); - - g2d.drawRect(getX(), getY(), getWidth(), getHeight()); - - g2d.setComposite(oldComposite); - - g2d.setPaint(old_paint); - } - } - -} From 81ebf05ac0b2974fc8f2a14275c21b59e0727f34 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 5 Jul 2016 09:53:22 +0800 Subject: [PATCH 10/39] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 47 ++++++++++--------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 0d2b3ad683..9002f4af79 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -44,6 +44,9 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private static ChartTypeInterfaceManager classManager = null; + //判断默认图表是否读取 + private static boolean isReadDefault = false; + private static LinkedHashMap chartTypeInterfaces = new LinkedHashMap(); public synchronized static ChartTypeInterfaceManager getInstance() { @@ -80,33 +83,35 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private static void readDefault() { - chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.PIE_CHART, new PieIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.AREA_CHART, new AreaIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.SCATTER_CHART, new XYScatterIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.BUBBLE_CHART, new BubbleIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.RADAR_CHART, new RadarIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.STOCK_CHART, new StockIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.METER_CHART, new MeterIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.RANGE_CHART, new RangeIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.CUSTOM_CHART, new CustomIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.GANTT_CHART, new GanttIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.DONUT_CHART, new DonutIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); + if (!isReadDefault) { + chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.PIE_CHART, new PieIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.AREA_CHART, new AreaIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.SCATTER_CHART, new XYScatterIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.BUBBLE_CHART, new BubbleIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.RADAR_CHART, new RadarIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.STOCK_CHART, new StockIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.METER_CHART, new MeterIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.RANGE_CHART, new RangeIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.CUSTOM_CHART, new CustomIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.GANTT_CHART, new GanttIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.DONUT_CHART, new DonutIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); + isReadDefault = true; + } } public String getIconPath(String plotID) { - if (chartTypeInterfaces.get(plotID) != null) { - return chartTypeInterfaces.get(plotID).getIconPath(); - }else { - return StringUtils.EMPTY; + if (!isReadDefault){ + readDefault(); } + return chartTypeInterfaces.get(plotID).getIconPath(); } /** From b5b3bc4c4c572a2cff2595814d571e6652280dfb Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 5 Jul 2016 14:49:37 +0800 Subject: [PATCH 11/39] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 73 ++++++++++++------- 1 file changed, 47 insertions(+), 26 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 9002f4af79..ae2164de90 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -1,23 +1,30 @@ package com.fr.design; import com.fr.chart.base.ChartConstants; +import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.chart.fun.IndependentChartUIProvider; +import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.chartinterface.*; import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.module.DesignModuleFactory; import com.fr.file.XMLFileManager; +import com.fr.form.ui.ChartEditor; import com.fr.general.FRLogger; import com.fr.general.GeneralContext; +import com.fr.general.IOUtils; +import com.fr.general.Inter; import com.fr.plugin.PluginCollector; import com.fr.plugin.PluginLicenseManager; import com.fr.plugin.PluginMessage; @@ -30,6 +37,7 @@ import com.fr.stable.plugin.PluginSimplify; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLableReader; +import javax.swing.*; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; @@ -72,46 +80,59 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh public void success() { if (chartTypeInterfaces != null) { readDefault(); + //重新注册designModuleFactory + DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption()); } } }); } + public static WidgetOption[] initWidgetOption(){ + ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); + ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; + for (int i = 0; i < typeName.length; i++) { + String plotID = typeName[i].getPlotID(); + Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); + if(rowChart == null) { + continue; + } + 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]); + } + return child; + } + private synchronized static void envChanged() { classManager = null; } private static void readDefault() { - - if (!isReadDefault) { - chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.PIE_CHART, new PieIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.AREA_CHART, new AreaIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.SCATTER_CHART, new XYScatterIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.BUBBLE_CHART, new BubbleIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.RADAR_CHART, new RadarIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.STOCK_CHART, new StockIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.METER_CHART, new MeterIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.RANGE_CHART, new RangeIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.CUSTOM_CHART, new CustomIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.GANTT_CHART, new GanttIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.DONUT_CHART, new DonutIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); - chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); - isReadDefault = true; - } - - + chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.PIE_CHART, new PieIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.AREA_CHART, new AreaIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.SCATTER_CHART, new XYScatterIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.BUBBLE_CHART, new BubbleIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.RADAR_CHART, new RadarIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.STOCK_CHART, new StockIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.METER_CHART, new MeterIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.RANGE_CHART, new RangeIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.CUSTOM_CHART, new CustomIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.GANTT_CHART, new GanttIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.DONUT_CHART, new DonutIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); } public String getIconPath(String plotID) { - if (!isReadDefault){ - readDefault(); + if (chartTypeInterfaces.get(plotID) != null) { + return chartTypeInterfaces.get(plotID).getIconPath(); + }else { + return StringUtils.EMPTY; } - return chartTypeInterfaces.get(plotID).getIconPath(); } /** From c48feaa687dee96b04c74d8e5d758a5ad53b4201 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 5 Jul 2016 15:27:05 +0800 Subject: [PATCH 12/39] =?UTF-8?q?=E5=88=AA=E9=99=A4=E8=A8=BB=E5=86=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/module/ChartDesignerModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java index fd90e3160e..4be736ca5d 100644 --- a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java +++ b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java @@ -1 +1 @@ -package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartAndWidgetPropertyPane; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); GeneralContext.addPluginReadListener(new PluginReadListener() { @Override public void success() { DesignModuleFactory.registerExtraWidgetOptions(options4Show()); } }); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartAndWidgetPropertyPane(ChartAndWidgetPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } 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]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file +package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartAndWidgetPropertyPane; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartAndWidgetPropertyPane(ChartAndWidgetPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } 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]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file From 407bae3a95e6c00a5776180c17d5959c55386859 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 5 Jul 2016 15:30:39 +0800 Subject: [PATCH 13/39] update --- .../src/com/fr/design/module/ChartDesignerModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java index 4be736ca5d..7d2b72cfd9 100644 --- a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java +++ b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java @@ -1 +1 @@ -package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartAndWidgetPropertyPane; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartAndWidgetPropertyPane(ChartAndWidgetPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } 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]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file +package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartAndWidgetPropertyPane; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartAndWidgetPropertyPane(ChartAndWidgetPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } 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]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file From de6dca775bfcd304c17b90ac6588940f4140169c Mon Sep 17 00:00:00 2001 From: fr_shine Date: Wed, 6 Jul 2016 14:26:10 +0800 Subject: [PATCH 14/39] =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 113 +++++++++++++++++--- 1 file changed, 96 insertions(+), 17 deletions(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 7cff11c37f..6c6be6bcf5 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -816,18 +816,23 @@ public class RemoteEnv implements Env { return sqlTableObjs; } - /** - * 在当前路径下新建文件夹 - * - * @param folderPath 文件名 - * @return 成功创建返回true - * @throws Exception - */ - @Override public boolean createFolder(String folderPath) throws Exception { + return createFolder(folderPath, false); + } + + /** + * 在当前路径下新建文件夹 + * + * @param folderPath 文件名 + * @return 成功创建返回true + * @throws Exception + */ + @Override + public boolean createFolder(String folderPath, boolean isWebReport) throws Exception { HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "design_create_folder"); + para.put("isWebReport", isWebReport ? "true" : "false"); para.put("folder_path", folderPath); HttpClient client = createHttpMethod(para); @@ -840,6 +845,11 @@ public class RemoteEnv implements Env { return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8)); } + @Override + public boolean createFile(String filePath) throws Exception { + return createFile(filePath, false); + } + /** * 新建一个文件 * @@ -847,11 +857,11 @@ public class RemoteEnv implements Env { * @return 成功新建返回true * @throws Exception */ - @Override - public boolean createFile(String filePath) throws Exception { + public boolean createFile(String filePath, boolean isWebReport) throws Exception { HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "design_create_file"); + para.put("isWebReport", isWebReport ? "true" : "false"); para.put("file_path", filePath); HttpClient client = createHttpMethod(para); @@ -864,6 +874,23 @@ public class RemoteEnv implements Env { return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8)); } + public boolean renameFile(String newPath, String oldPath) throws Exception { + HashMap para = new HashMap(); + para.put("op", "fr_remote_design"); + para.put("cmd", "design_rename_file"); + para.put("newPath", newPath); + para.put("oldPath", oldPath); + + HttpClient client = createHttpMethod(para); + InputStream input = execute4InputStream(client); + + if (input == null) { + return false; + } + + return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8)); + } + /** * 判断文件是否存在 * @@ -942,14 +969,18 @@ public class RemoteEnv implements Env { public void stopUserCheckTimer() { } - - /** - * 删除文件 - * - * @param filePath 文件地址 - * @return 删除成功返回true - */ public boolean deleteFile(String filePath) { + return deleteFile(filePath, false); + } + + + /** + * 删除文件 + * + * @param filePath 文件地址 + * @return 删除成功返回true + */ + public boolean deleteFile(String filePath, boolean isWebReport) { if (filePath == null) { return false; } @@ -957,6 +988,7 @@ public class RemoteEnv implements Env { HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "delete_file"); + para.put("isWebReport", isWebReport ? "true" : "false"); para.put("file_path", filePath); HttpClient client = createHttpMethod(para); @@ -1582,6 +1614,53 @@ public class RemoteEnv implements Env { return new Bytes2ServerOutputStream(para); } + /** + * 读取文件 + * + * @param path 文件名 从WebReport开始 + * @return 文件输入流 + */ + @Override + public String readWebReportFile(String path) throws Exception { + HashMap para = new HashMap(); + para.put("op", "fr_remote_design"); + para.put("cmd", "design_read_file"); + para.put("path", path); + + HttpClient client = createHttpMethod(para); + InputStream input = execute4InputStream(client); + + if (input == null) { + return null; + } + + return stream2String(input); + } + + /** + * 写文件 + * + * @param path 文件名 + * @return 文件输出流 + */ + @Override + public boolean writeWebReportFile(String path, String content) throws Exception { + HashMap para = new HashMap(); + para.put("op", "fr_remote_design"); + para.put("cmd", "design_write_file"); + para.put("path", path); + para.put("content", content); + + HttpClient client = createHttpMethod(para); + InputStream input = execute4InputStream(client); + + if (input == null) { + return false; + } + + return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8)); + } + /** * 返回数据库表的列名 * From b56f76777df12fb6a491136e8efc2ebf12287e73 Mon Sep 17 00:00:00 2001 From: fr_shine Date: Wed, 6 Jul 2016 16:10:51 +0800 Subject: [PATCH 15/39] update --- designer_base/src/com/fr/env/RemoteEnv.java | 94 ++++----------------- 1 file changed, 15 insertions(+), 79 deletions(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 6c6be6bcf5..a779026eab 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -816,23 +816,18 @@ public class RemoteEnv implements Env { return sqlTableObjs; } - public boolean createFolder(String folderPath) throws Exception { - return createFolder(folderPath, false); - } - - /** - * 在当前路径下新建文件夹 - * - * @param folderPath 文件名 - * @return 成功创建返回true - * @throws Exception - */ + /** + * 在当前路径下新建文件夹 + * + * @param folderPath 文件名 + * @return 成功创建返回true + * @throws Exception + */ @Override - public boolean createFolder(String folderPath, boolean isWebReport) throws Exception { + public boolean createFolder(String folderPath) throws Exception { HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "design_create_folder"); - para.put("isWebReport", isWebReport ? "true" : "false"); para.put("folder_path", folderPath); HttpClient client = createHttpMethod(para); @@ -845,11 +840,6 @@ public class RemoteEnv implements Env { return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8)); } - @Override - public boolean createFile(String filePath) throws Exception { - return createFile(filePath, false); - } - /** * 新建一个文件 * @@ -857,11 +847,10 @@ public class RemoteEnv implements Env { * @return 成功新建返回true * @throws Exception */ - public boolean createFile(String filePath, boolean isWebReport) throws Exception { + public boolean createFile(String filePath) throws Exception { HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "design_create_file"); - para.put("isWebReport", isWebReport ? "true" : "false"); para.put("file_path", filePath); HttpClient client = createHttpMethod(para); @@ -969,18 +958,13 @@ public class RemoteEnv implements Env { public void stopUserCheckTimer() { } + /** + * 删除文件 + * + * @param filePath 文件地址 + * @return 删除成功返回true + */ public boolean deleteFile(String filePath) { - return deleteFile(filePath, false); - } - - - /** - * 删除文件 - * - * @param filePath 文件地址 - * @return 删除成功返回true - */ - public boolean deleteFile(String filePath, boolean isWebReport) { if (filePath == null) { return false; } @@ -988,7 +972,6 @@ public class RemoteEnv implements Env { HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "delete_file"); - para.put("isWebReport", isWebReport ? "true" : "false"); para.put("file_path", filePath); HttpClient client = createHttpMethod(para); @@ -1614,53 +1597,6 @@ public class RemoteEnv implements Env { return new Bytes2ServerOutputStream(para); } - /** - * 读取文件 - * - * @param path 文件名 从WebReport开始 - * @return 文件输入流 - */ - @Override - public String readWebReportFile(String path) throws Exception { - HashMap para = new HashMap(); - para.put("op", "fr_remote_design"); - para.put("cmd", "design_read_file"); - para.put("path", path); - - HttpClient client = createHttpMethod(para); - InputStream input = execute4InputStream(client); - - if (input == null) { - return null; - } - - return stream2String(input); - } - - /** - * 写文件 - * - * @param path 文件名 - * @return 文件输出流 - */ - @Override - public boolean writeWebReportFile(String path, String content) throws Exception { - HashMap para = new HashMap(); - para.put("op", "fr_remote_design"); - para.put("cmd", "design_write_file"); - para.put("path", path); - para.put("content", content); - - HttpClient client = createHttpMethod(para); - InputStream input = execute4InputStream(client); - - if (input == null) { - return false; - } - - return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8)); - } - /** * 返回数据库表的列名 * From 74111f687f2c2a070d67af8c892c35ddc0dc3a55 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Thu, 7 Jul 2016 17:50:58 +0800 Subject: [PATCH 16/39] update --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index ae2164de90..9ad8680177 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -52,9 +52,6 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private static ChartTypeInterfaceManager classManager = null; - //判断默认图表是否读取 - private static boolean isReadDefault = false; - private static LinkedHashMap chartTypeInterfaces = new LinkedHashMap(); public synchronized static ChartTypeInterfaceManager getInstance() { From fae3c64892e0276b74035e93a4e1e3577059226b Mon Sep 17 00:00:00 2001 From: xiaohu Date: Thu, 7 Jul 2016 17:53:10 +0800 Subject: [PATCH 17/39] =?UTF-8?q?=E8=B6=85=E9=8F=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SeriesCondition/impl/ChartHyperPoplinkPane.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java index 6b9f1b0a84..7e882e37d1 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -5,6 +5,7 @@ import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartFactory; +import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.web.ChartHyperPoplink; import com.fr.design.beans.BasicBeanPane; import com.fr.design.chart.gui.ChartComponent; @@ -43,7 +44,13 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { this.add(hyperEditPane, BorderLayout.CENTER); ChartCollection cc = new ChartCollection(); - cc.addChart(new Chart(new Bar2DPlot())); + + Chart chart = ChartTypeManager.getFirstChart(); + if (chart != null){ + cc.addChart(chart); + }else { + cc.addChart(new Chart(new Bar2DPlot())); + } chartComponent = new ChartComponent(); chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小. From 3e970c6cf30ab3d30c5e51ffb5a8641fa39f9c9f Mon Sep 17 00:00:00 2001 From: xiaohu Date: Thu, 7 Jul 2016 19:40:26 +0800 Subject: [PATCH 18/39] update --- .../SeriesCondition/impl/ChartHyperPoplinkPane.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java index 7e882e37d1..308df92b2c 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -17,6 +17,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.chart.ChartEditPane; import com.fr.design.mainframe.chart.ChartHyperEditPane; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.FRLogger; import com.fr.general.Inter; import java.awt.*; @@ -47,7 +48,12 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { Chart chart = ChartTypeManager.getFirstChart(); if (chart != null){ - cc.addChart(chart); + try { + cc.addChart((Chart)chart.clone()); + } catch (CloneNotSupportedException e) { + FRLogger.getLogger().error(e.getMessage(), e); + } + }else { cc.addChart(new Chart(new Bar2DPlot())); } From 858ee92d4c8904edd5961cb3d83462baa9ea2d47 Mon Sep 17 00:00:00 2001 From: zhouping Date: Thu, 7 Jul 2016 23:21:46 +0800 Subject: [PATCH 19/39] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=201.=E5=9B=BE=E8=A1=A8=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E7=BC=96=E8=BE=91=E5=B1=82=202.tab=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=8A=A0=E4=B8=8A=E7=BC=96=E8=BE=91=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapters/layout/FRFitLayoutAdapter.java | 11 +- .../designer/beans/models/SelectionModel.java | 7 + .../design/designer/creator/XChartEditor.java | 101 ++++++++++--- .../fr/design/designer/creator/XCreator.java | 8 + .../creator/cardlayout/XCardAddButton.java | 8 + .../creator/cardlayout/XCardSwitchButton.java | 5 + .../creator/cardlayout/XWCardLayout.java | 5 + .../cardlayout/XWCardMainBorderLayout.java | 91 +++++++++++- .../creator/cardlayout/XWCardTagLayout.java | 6 + .../creator/cardlayout/XWCardTitleLayout.java | 6 + .../creator/cardlayout/XWTabFitLayout.java | 7 +- .../mainframe/EditingMouseListener.java | 138 +++++++++++++++--- 12 files changed, 342 insertions(+), 51 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java index 1e052ba6d8..840d3a7dbc 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java @@ -14,6 +14,7 @@ import com.fr.design.designer.beans.ConstraintsGroupModel; import com.fr.design.designer.beans.HoverPainter; import com.fr.design.designer.beans.painters.FRFitLayoutPainter; import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.cardlayout.XWCardLayout; @@ -163,7 +164,7 @@ public class FRFitLayoutAdapter extends AbstractLayoutAdapter { return false; } //如果当前处于边缘地带, 那么就把他贴到父容器上 - matchEdge(x, y); + boolean isMatchEdge = matchEdge(x, y); int componentHeight = comp.getHeight(); int componentWidth = comp.getWidth(); @@ -171,7 +172,13 @@ public class FRFitLayoutAdapter extends AbstractLayoutAdapter { int upHeight = (int) (componentHeight * TOP_HALF) + comp.getY(); //下半部分高度 int downHeight = (int) (componentHeight * BOTTOM_HALF) + comp.getY(); - + + //布局控件要先判断是不是可编辑 + XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator)comp).getTopLayout(); + if(topLayout != null && !isMatchEdge && !topLayout.isEditable()){ + return false; + } + if (isCrossPointArea(comp, x, y)) { return canAcceptWhileCrossPoint(comp, x, y); } diff --git a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java index fd2b48a73b..834b28d744 100644 --- a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java +++ b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java @@ -66,6 +66,13 @@ public class SelectionModel { // 获取e所在的组件 XCreator comp = designer.getComponentAt(e); + + //布局组件的顶层布局如不可编辑,要获取其顶层布局 + XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(comp).getTopLayout(); + if(topLayout != null && !topLayout.isEditable()){ + comp = topLayout; + } + // 如果父层是scale和title两个专属容器,返回其父层,组件本身是不让被选中的 if (comp != designer.getRootComponent() && comp != designer.getParaComponent()) { XCreator parentContainer = (XCreator) comp.getParent(); diff --git a/designer_form/src/com/fr/design/designer/creator/XChartEditor.java b/designer_form/src/com/fr/design/designer/creator/XChartEditor.java index 2087dda109..e477b7d7ad 100644 --- a/designer_form/src/com/fr/design/designer/creator/XChartEditor.java +++ b/designer_form/src/com/fr/design/designer/creator/XChartEditor.java @@ -1,20 +1,22 @@ package com.fr.design.designer.creator; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Graphics; +import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; import java.beans.IntrospectionException; -import javax.swing.BorderFactory; -import javax.swing.JComponent; -import javax.swing.SwingUtilities; +import javax.swing.*; +import com.fr.base.BaseUtils; import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChartCollection; +import com.fr.design.designer.beans.AdapterBus; +import com.fr.design.designer.beans.ComponentAdapter; +import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.MiddleChartComponent; -import com.fr.design.mainframe.BaseJForm; -import com.fr.design.mainframe.FormDesigner; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.*; import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor; import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer; import com.fr.design.module.DesignModuleFactory; @@ -41,6 +43,9 @@ public class XChartEditor extends XBorderStyleWidgetCreator { //marro:无奈的属性,暂时想不出好办法 private boolean isRefreshing = false; + private boolean isEditing = false; + private JPanel coverPanel; + public XChartEditor(BaseChartEditor editor) { this(editor, new Dimension(250, 150)); } @@ -142,17 +147,22 @@ public class XChartEditor extends XBorderStyleWidgetCreator { } }); - final BaseChartPropertyPane propertyPane = DesignModuleFactory.getChartWidgetPropertyPane(formDesigner); - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - if (getDesignerEditor().getEditorTarget() != null) { - propertyPane.setSupportCellData(true); - propertyPane.populateChartPropertyPane(getDesignerEditorTarget().update(), formDesigner); + if (isEditing){ + final BaseChartPropertyPane propertyPane = DesignModuleFactory.getChartPropertyPane(); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + if (getDesignerEditor().getEditorTarget() != null) { + propertyPane.setSupportCellData(true); + propertyPane.populateChartPropertyPane(getDesignerEditorTarget().update(), formDesigner); + } } - } - }); - return (JComponent)propertyPane; + }); + return (JComponent)propertyPane; + } + else{ + return (JComponent)DesignModuleFactory.getWidgetPropertyPane(formDesigner); + } } private MiddleChartComponent getDesignerEditorTarget() { @@ -167,8 +177,8 @@ public class XChartEditor extends XBorderStyleWidgetCreator { * 渲染Painter */ public void paint(Graphics g) { - super.paint(g); designerEditor.paintEditor(g, this.getSize()); + super.paint(g); } /** @@ -180,6 +190,27 @@ public class XChartEditor extends XBorderStyleWidgetCreator { return new Dimension(250, 100); } + /** + * 响应点击事件 + * + * @param editingMouseListener 鼠标点击,位置处理器 + * @param e 鼠标点击事件 + */ + public void respondClick(EditingMouseListener editingMouseListener,MouseEvent e){ + FormDesigner designer = editingMouseListener.getDesigner(); + SelectionModel selectionModel = editingMouseListener.getSelectionModel(); + isEditing = e.getClickCount() == 2 || designer.getCursor().getType() == Cursor.HAND_CURSOR; + displayCoverPane(!isEditing); + selectionModel.selectACreatorAtMouseEvent(e); + + if (editingMouseListener.stopEditing()) { + if (this != (XCreator)designer.getRootComponent()) { + ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this); + editingMouseListener.startEditing(this, isEditing ? adapter.getDesignerEditor() : null, adapter); + } + } + } + @Override protected JComponent initEditor() { if (designerEditor == null) { @@ -198,6 +229,36 @@ public class XChartEditor extends XBorderStyleWidgetCreator { }); } } - return null; + + if (editor == null) { + setBorder(DEFALUTBORDER); + editor = new JPanel(); + editor.setBackground(null); + editor.setLayout(null); + editor.setOpaque(false); + + coverPanel = new CoverReportPane(); + coverPanel.setPreferredSize(this.getPreferredSize()); + coverPanel.setBounds(this.getBounds()); + + editor.add(coverPanel); + coverPanel.setVisible(false); + } + return editor; + } + + /** + * 是否展现覆盖的pane + * @param display 是否 + */ + public void displayCoverPane(boolean display){ + coverPanel.setVisible(display); + coverPanel.setPreferredSize(editor.getPreferredSize()); + coverPanel.setBounds(editor.getBounds()); + editor.repaint(); + } + + public JComponent getCoverPane(){ + return coverPanel; } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XCreator.java b/designer_form/src/com/fr/design/designer/creator/XCreator.java index 518e9c27ae..c9b05f9b60 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreator.java @@ -105,6 +105,14 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo public void backupParent() { setBackupParent(XCreatorUtils.getParentXLayoutContainer(this)); } + + /** + * 获取当前布局控件的顶层布局框架,如tab布局、绝对布局 + * @return 封装的顶层布局 + */ + public XLayoutContainer getTopLayout(){ + return null; + } /** * 获取当前XCreator的一个封装父容器 diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index 652331d1f6..0c459b61cd 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -12,6 +12,7 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.XButton; +import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.mainframe.EditingMouseListener; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormHierarchyTreePane; @@ -149,6 +150,8 @@ public class XCardAddButton extends XButton{ XCardSwitchButton showButton = new XCardSwitchButton(titleButton,dimension,cardLayout,tagLayout); titleButton.setCustomStyle(true); titleButton.setShowButton(true); + showButton.setBackupParent(tagLayout); + this.tagLayout.setCurrentCard(titleButton); this.tagLayout.setTabFitIndex(index); @@ -180,4 +183,9 @@ public class XCardAddButton extends XButton{ } return newTextName; } + + @Override + public XLayoutContainer getTopLayout() { + return this.getBackupParent().getTopLayout(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index c10287d006..c75fc2542b 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -292,5 +292,10 @@ public class XCardSwitchButton extends XButton { FormHierarchyTreePane.getInstance().refreshRoot(); selectionModel.setSelectedCreator(designer.getRootComponent()); } + + @Override + public XLayoutContainer getTopLayout() { + return this.getBackupParent().getTopLayout(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 49eeb92117..621f4c5f5e 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -367,4 +367,9 @@ public class XWCardLayout extends XLayoutContainer { mainLayout.setBorder(border); } } + + @Override + public XLayoutContainer getTopLayout() { + return this.getBackupParent().getTopLayout(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java index 003bde4a4f..b9039b1d6e 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java @@ -3,18 +3,24 @@ */ package com.fr.design.designer.creator.cardlayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Dimension; +import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; import java.util.ArrayList; - - - +import com.fr.design.designer.beans.AdapterBus; +import com.fr.design.designer.beans.ComponentAdapter; +import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWBorderLayout; +import com.fr.design.icon.IconPathConstants; +import com.fr.design.mainframe.EditingMouseListener; +import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; +import com.fr.general.IOUtils; +import com.fr.general.Inter; /** * card布局主体框架 @@ -31,6 +37,9 @@ public class XWCardMainBorderLayout extends XWBorderLayout{ private static final int LAYOUT_INDEX = 0; private static final int TITLE_STYLE = 2; private static final int NORMAL_STYLE = 1; + + private static final int EDIT_BTN_WIDTH = 60; + private static final int EDIT_BTN_HEIGHT = 24; /** * 构造函数 @@ -124,7 +133,7 @@ public class XWCardMainBorderLayout extends XWBorderLayout{ /** * 重新调整子组件的宽度 - * @param 宽度 + * @param width 宽度 */ public void recalculateChildWidth(int width){ ArrayList childrenList = this.getTargetChildrenList(); @@ -188,4 +197,72 @@ public class XWCardMainBorderLayout extends XWBorderLayout{ } } + + public void paint(Graphics g) { + super.paint(g); + //如果鼠标移动到布局内且布局不可编辑,画出编辑蒙层 + if (isMouseEnter && !editable) { + int x = 0; + int y = 0; + int w = getWidth(); + int h = getHeight(); + + Graphics2D g2d = (Graphics2D) g; + Composite oldComposite = g2d.getComposite(); + //画白色的编辑层 + g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 60 / 100.0F)); + g2d.setColor(Color.WHITE); + g2d.fillRect(x, y, w, h); + //画编辑按钮所在框 + g2d.setComposite(oldComposite); + g2d.setColor(new Color(176, 196, 222)); + g2d.fillRect((x + w / 2 - EDIT_BTN_WIDTH / 2), (y + h / 2 - EDIT_BTN_HEIGHT / 2), EDIT_BTN_WIDTH, EDIT_BTN_HEIGHT); + //画编辑按钮图标 + BufferedImage image = IOUtils.readImage(IconPathConstants.TD_EDIT_ICON_PATH); + g2d.drawImage( + image, + (x + w / 2 - 23), + (y + h / 2 - image.getHeight() / 2), + image.getWidth(), + image.getHeight(), + null, + this + ); + g2d.setColor(Color.BLACK); + //画编辑文字 + g2d.drawString(Inter.getLocText("Edit"), x + w / 2 - 2, y + h / 2 + 5); + } + } + + /** + * 响应点击事件 + * + * @param editingMouseListener 鼠标点击,位置处理器 + * @param e 鼠标点击事件 + */ + public void respondClick(EditingMouseListener editingMouseListener,MouseEvent e){ + FormDesigner designer = editingMouseListener.getDesigner(); + SelectionModel selectionModel = editingMouseListener.getSelectionModel(); + boolean isEditing = designer.getCursor().getType() == Cursor.HAND_CURSOR || e.getClickCount() == 2; + setEditable(isEditing); + + selectionModel.selectACreatorAtMouseEvent(e); + designer.repaint(); + + if (editingMouseListener.stopEditing()) { + if (this != designer.getRootComponent()) { + ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this); + editingMouseListener.startEditing(this, isEditing ? adapter.getDesignerEditor() : null, adapter); + } + } + } + + /** + * XWCardMainBorderLayout是card布局主体框架,tab的顶层布局 + * @return + */ + @Override + public XLayoutContainer getTopLayout() { + return this; + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java index bd844b53eb..e40a7ca871 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java @@ -13,6 +13,7 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.XCreatorUtils; +import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWHorizontalBoxLayout; import com.fr.design.designer.creator.XWidgetCreator; import com.fr.design.mainframe.EditingMouseListener; @@ -214,4 +215,9 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout { } } } + + @Override + public XLayoutContainer getTopLayout() { + return this.getBackupParent().getTopLayout(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTitleLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTitleLayout.java index 8f83a1fab7..1514ed4034 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTitleLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTitleLayout.java @@ -12,6 +12,7 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.XCreatorUtils; +import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWBorderLayout; import com.fr.design.designer.creator.XWidgetCreator; import com.fr.design.mainframe.EditingMouseListener; @@ -146,4 +147,9 @@ public class XWCardTitleLayout extends XWBorderLayout { } } } + + @Override + public XLayoutContainer getTopLayout() { + return this.getBackupParent().getTopLayout(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index d8a5e0b431..b247d0bfcf 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -188,7 +188,7 @@ public class XWTabFitLayout extends XWFitLayout { /** * 该布局需要隐藏,无需对边框进行操作 - * @param 边框 + * @param border 边框 * */ public void setBorder(Border border) { @@ -362,4 +362,9 @@ public class XWTabFitLayout extends XWFitLayout { this.hasCalGap = true; } + + @Override + public XLayoutContainer getTopLayout() { + return this.getBackupParent().getTopLayout(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java b/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java index 00dd905b15..e66b37552a 100644 --- a/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java @@ -18,12 +18,7 @@ import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.location.Location; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.beans.models.StateModel; -import com.fr.design.designer.creator.XCreator; -import com.fr.design.designer.creator.XCreatorUtils; -import com.fr.design.designer.creator.XEditorHolder; -import com.fr.design.designer.creator.XElementCase; -import com.fr.design.designer.creator.XLayoutContainer; -import com.fr.design.designer.creator.XWFitLayout; +import com.fr.design.designer.creator.*; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.xpane.ToolTipEditor; @@ -45,6 +40,10 @@ public class EditingMouseListener extends MouseInputAdapter { * 普通模式下对应的model */ private StateModel stateModel; + + + private XLayoutContainer xTopLayoutContainer; + private XLayoutContainer clickTopLayout; /** * 获取表单设计器 @@ -84,10 +83,14 @@ public class EditingMouseListener extends MouseInputAdapter { private int minDragSize = 5; private int minMoveSize = 8; + + private static final int EDIT_BTN_WIDTH = 60; + private static final int EDIT_BTN_HEIGHT = 24; //报表块的编辑按钮不灵敏,范围扩大一点 private static final int GAP = 10; private XElementCase xElementCase; + private XChartEditor xChartEditor; private JWindow promptWindow = new JWindow(); @@ -244,6 +247,12 @@ public class EditingMouseListener extends MouseInputAdapter { */ public void mouseMoved(MouseEvent e) { XCreator component = designer.getComponentAt(e); + + setCoverPaneNotDisplay(); + + if(processTopLayoutMouseMove(component, e)){ + return; + } if (component instanceof XEditorHolder) { XEditorHolder xcreator = (XEditorHolder) component; Rectangle rect = xcreator.getBounds(); @@ -267,17 +276,15 @@ public class EditingMouseListener extends MouseInputAdapter { if (!BaseUtils.isAuthorityEditing()) { stateModel.setDirection(dir); } - if(xElementCase != null){ - xElementCase.displayCoverPane(false); - } + if (component.isReport()) { xElementCase = (XElementCase)component; UIButton button = (UIButton)xElementCase.getCoverPane().getComponent(0); if(designer.getCursor().getType() ==Cursor.HAND_CURSOR) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } // component.getParent() 是报表块所在的XWTitleLayout - int minX = button.getX() + component.getX() + component.getParent().getX() - designer.getArea().getHorizontalValue(); - int minY = button.getY() + component.getY() + component.getParent().getY() + designer.getParaHeight() - designer.getArea().getVerticalValue(); + int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); + int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); if(e.getX() + GAP > minX && e.getX() - GAP < minX + button.getWidth()){ if( e.getY() + GAP > minY && e.getY() - GAP < minY + button.getHeight()){ designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); @@ -285,16 +292,84 @@ public class EditingMouseListener extends MouseInputAdapter { } xElementCase.displayCoverPane(true); xElementCase.setDirections(Direction.TOP_BOTTOM_LEFT_RIGHT); + designer.repaint(); - } else { - if(xElementCase != null){ - xElementCase.displayCoverPane(false); - designer.repaint(); - } + return; } + + processChartEditorMouseMove(component, e); + + designer.repaint(); } - /** + private void setCoverPaneNotDisplay(){ + if (xElementCase != null){ + xElementCase.displayCoverPane(false); + } + if (xChartEditor != null){ + xChartEditor.displayCoverPane(false); + } + + if (xTopLayoutContainer != null) { + xTopLayoutContainer.setMouseEnter(false); + } + designer.repaint(); + } + + private boolean processTopLayoutMouseMove(XCreator component, MouseEvent e){ + XLayoutContainer parent = XCreatorUtils.getHotspotContainer(component).getTopLayout(); + if (parent != null){ + xTopLayoutContainer = parent; + xTopLayoutContainer.setMouseEnter(true); + designer.repaint(); + if(!xTopLayoutContainer.isEditable()) { + if (designer.getCursor().getType() == Cursor.HAND_CURSOR) { + designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } + if (e.getX() > (parent.getX() + parent.getWidth() / 2 - EDIT_BTN_WIDTH / 2 - GAP) + && e.getX() < (parent.getX() + parent.getWidth() / 2 + EDIT_BTN_WIDTH / 2 + GAP)) { + if (e.getY() > (parent.getY() + parent.getHeight() / 2 - EDIT_BTN_HEIGHT / 2 - GAP) + && e.getY() < (parent.getY() + parent.getHeight() / 2 + EDIT_BTN_HEIGHT / 2 + GAP + designer.getParaHeight())) { + designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + } + } + return true; + } + } + return false; + } + + private void processChartEditorMouseMove(XCreator component, MouseEvent e){ + if (component instanceof XChartEditor) { + xChartEditor = (XChartEditor)component; + UIButton button = (UIButton)xChartEditor.getCoverPane().getComponent(0); + if(designer.getCursor().getType() ==Cursor.HAND_CURSOR) { + designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } + int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); + int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + if(e.getX() + GAP > minX && e.getX() - GAP < minX + button.getWidth()){ + if( e.getY() + GAP > minY && e.getY() - GAP < minY + button.getHeight()){ + designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + } + } + xChartEditor.displayCoverPane(true); + xChartEditor.setDirections(Direction.TOP_BOTTOM_LEFT_RIGHT); + designer.repaint(); + } + } + + private int getParentPositionX(XCreator comp, int x){ + return comp.getParent() == null ? + x : getParentPositionX((XCreator)comp.getParent(), comp.getParent().getX() + x); + } + + private int getParentPositionY(XCreator comp, int y) { + return comp.getParent() == null ? + y : getParentPositionY((XCreator) comp.getParent(), comp.getParent().getY() + y); + } + + /** * 拖拽 * @param e 鼠标事件 */ @@ -342,6 +417,25 @@ public class EditingMouseListener extends MouseInputAdapter { designer.repaint(); } + private XCreator processTopLayoutMouseClick(XCreator creator){ + XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(creator).getTopLayout(); + if(topLayout != null){ + if (clickTopLayout != null && clickTopLayout != topLayout){ + clickTopLayout.setEditable(false); + } + clickTopLayout = topLayout; + if(!topLayout.isEditable()) { + creator = topLayout; + } + } + else{ + if(clickTopLayout != null){ + clickTopLayout.setEditable(false); + } + } + + return creator; + } /** * 点击 * @param e 鼠标事件 @@ -351,6 +445,9 @@ public class EditingMouseListener extends MouseInputAdapter { return; } XCreator creator = designer.getComponentAt(e); + + creator = processTopLayoutMouseClick(creator); + if(creator != null){ creator.respondClick(this, e); } @@ -368,10 +465,9 @@ public class EditingMouseListener extends MouseInputAdapter { if (designer.getCursor().getType() != Cursor.DEFAULT_CURSOR) { designer.setCursor(Cursor.getDefaultCursor()); } - if (xElementCase != null){ - xElementCase.displayCoverPane(false); - designer.repaint(); - } + + setCoverPaneNotDisplay(); + cancelPromptWidgetForbidEnter(); } From faab7246067d67e937aa7cce9151cf811f665f34 Mon Sep 17 00:00:00 2001 From: zhouping Date: Fri, 8 Jul 2016 10:07:37 +0800 Subject: [PATCH 20/39] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=EF=BC=8C=E6=BC=8F=E4=BC=A0=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/XLayoutContainer.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java index fec4899a85..ea27490fa7 100644 --- a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java +++ b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java @@ -41,6 +41,16 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme protected boolean isRefreshing; protected int default_Length = 5; // 取指定点坐在的组件,默认为5保证取四侧相邻的组件时x、y在组件内非边框上 + /** + * 布局是否可编辑,不可则显示编辑层 + */ + protected boolean editable = false; + //鼠标移动到布局画出编辑层 + protected boolean isMouseEnter = false; + public void setMouseEnter(boolean mouseEnter) { + isMouseEnter = mouseEnter; + } + public XLayoutContainer(WLayout widget, Dimension initSize) { super(widget, initSize); this.addContainerListener(this); @@ -446,4 +456,20 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme public void setBackground(Background background){ } + + /** + * 布局是否可编辑,不可则显示编辑蒙层 + * @return 可否编辑 + */ + public boolean isEditable(){ + return this.editable; + } + + /** + * 设置布局是否可编辑,不可则显示编辑蒙层 + * @param isEditable 可否编辑 + */ + public void setEditable(boolean isEditable){ + this.editable = isEditable; + } } \ No newline at end of file From c3f6a780d6b36a4545cb1ceb8a9e6500db16ad05 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Fri, 8 Jul 2016 15:24:56 +0800 Subject: [PATCH 21/39] =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_chart/src/com/fr/design/chart/ChartTypePane.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/chart/ChartTypePane.java b/designer_chart/src/com/fr/design/chart/ChartTypePane.java index 5a1e0ead4f..5cc09a3b4e 100644 --- a/designer_chart/src/com/fr/design/chart/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/chart/ChartTypePane.java @@ -31,8 +31,9 @@ public class ChartTypePane extends ChartCommonWizardPane { charts4Icon = new Chart[this.typeName.length][]; for (int i = 0; i < this.typeName.length; i++) { Chart[] rowCharts = ChartTypeManager.getInstance().getChartTypes(this.typeName[i].getPlotID()); - charts4Icon[i] = new Chart[1]; - for (int j = 0; j < 1; j++) { + int rowChartsCount = rowCharts.length; + charts4Icon[i] = new Chart[rowChartsCount]; + for (int j = 0; j < rowChartsCount; j++) { try { charts4Icon[i][j] = (Chart) rowCharts[j].clone(); charts4Icon[i][j].setTitle(null); From 69ab5a54ce5c1309d31232d13c6d6a11ddb36594 Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 11 Jul 2016 10:52:10 +0800 Subject: [PATCH 22/39] npe --- designer_base/src/com/fr/design/module/DesignModuleFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/module/DesignModuleFactory.java b/designer_base/src/com/fr/design/module/DesignModuleFactory.java index 1cd8c13b80..b21d206c99 100644 --- a/designer_base/src/com/fr/design/module/DesignModuleFactory.java +++ b/designer_base/src/com/fr/design/module/DesignModuleFactory.java @@ -1 +1 @@ -package com.fr.design.module; import com.fr.base.FRContext; import com.fr.base.chart.BaseChartCollection; import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.gui.chart.MiddleChartDialog; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.frpane.BaseHyperlinkGroup; import com.fr.design.gui.frpane.HyperlinkGroupType; import com.fr.design.mainframe.BaseFormDesigner; import com.fr.design.mainframe.BaseWidgetPropertyPane; import com.fr.design.parameter.HierarchyTreePane; import com.fr.design.parameter.ParameterDesignerProvider; import com.fr.design.parameter.ParameterReader; import com.fr.form.ui.Widget; import com.fr.stable.StableUtils; import java.awt.*; import java.lang.reflect.Constructor; import java.util.ArrayList; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 下午1:57 */ public class DesignModuleFactory { private static DesignModuleFactory instance = new DesignModuleFactory(); private DesignModuleFactory() { } private HyperlinkGroupType hyperlinkGroupType = new BaseHyperlinkGroup(); private NameableCreator[] creators4Hyperlink; private WidgetOption[] extraOptions; private Class chartEditorClass; private Class chartComponentClass; private Class chartDialogClass; private Class chartPropertyPaneClass; private Class newFormAction; private Class formParaDesigner; private Class paraPropertyPane; private Class formHierarchyPaneCls; private Class chartWidgetPropertyPaneCls; private Class widgetPropertyPane; private Class buttonDetailPaneClass; private java.util.List parameterReaderList; public static void registerHyperlinkGroupType(HyperlinkGroupType hyperlinkGroupType) { instance.hyperlinkGroupType = hyperlinkGroupType; } public static HyperlinkGroupType getHyperlinkGroupType() { return instance.hyperlinkGroupType; } public static void registerCreators4Hyperlink(NameableCreator[] nameableCreators) { instance.creators4Hyperlink = nameableCreators; } public static NameableCreator[] getCreators4Hyperlink() { return instance.creators4Hyperlink; } public static void registerExtraWidgetOptions(WidgetOption[] options) { instance.extraOptions = options; } public static WidgetOption[] getExtraWidgetOptions() { return instance.extraOptions; } public static void registerChartEditorClass(Class cls) { instance.chartEditorClass = cls; } public static Class getChartEditorClass() { return instance.chartEditorClass; } public static void registerChartComponentClass(Class bcc) { instance.chartComponentClass = bcc; } public static void registerChartDialogClass(Class cd) { instance.chartDialogClass = cd; } public static void registerChartAndWidgetPropertyPane(Class p) { instance.chartWidgetPropertyPaneCls = p; } public static void registerChartPropertyPaneClass(Class p) { instance.chartPropertyPaneClass = p; } public static BaseChartPropertyPane getChartWidgetPropertyPane(BaseFormDesigner fd) { BaseChartPropertyPane p = null; if (instance.chartWidgetPropertyPaneCls != null) { p = StableUtils.getInstance(instance.chartWidgetPropertyPaneCls); p.setWidgetPropertyPane(DesignModuleFactory.getWidgetPropertyPane(fd)); p.setSureProperty(); } return p; } public static void registerNewFormActionClass(Class f) { instance.newFormAction = f; } public static Class getNewFormAction() { return instance.newFormAction; } public static void registerParaPropertyPaneClass(Class p) { instance.paraPropertyPane = p; } /** * 获取参数属性界面 * * @return 参数属性界面. */ public static Object getParaPropertyPane() { if (instance.paraPropertyPane != null) { try { return instance.paraPropertyPane.newInstance(); } catch (Exception e) { FRContext.getLogger().error("Error in Para PropertyPane"); } } return null; } public static void registerFormParaDesignerClass(Class f) { instance.formParaDesigner = f; } public static ParameterDesignerProvider getFormParaDesigner() { if (instance.formParaDesigner != null) { try { return (ParameterDesignerProvider) instance.formParaDesigner.newInstance(); } catch (Exception e) { FRContext.getLogger().error("error in form para designer"); } } return null; } public static void registerFormHierarchyPaneClass(Class fClass) { instance.formHierarchyPaneCls = fClass; } public static HierarchyTreePane getFormHierarchyPane() { return StableUtils.getInstance(instance.formHierarchyPaneCls); } public static void registerWidgetPropertyPaneClass(Class wp) { instance.widgetPropertyPane = wp; } public static BaseWidgetPropertyPane getWidgetPropertyPane(BaseFormDesigner fd) { BaseWidgetPropertyPane wp = null; if (instance.widgetPropertyPane != null) { wp = StableUtils.getInstance(instance.widgetPropertyPane); wp.setEditingFormDesigner(fd); wp.refreshDockingView(); } return wp; } public static MiddleChartComponent getChartComponent(BaseChartCollection collection) { MiddleChartComponent bcc = null; if (instance.chartComponentClass != null) { try { bcc = instance.chartComponentClass.newInstance(); bcc.populate(collection); } catch (InstantiationException e) { FRContext.getLogger().error("Error in ChartComponent instant", e); } catch (IllegalAccessException e) { FRContext.getLogger().error("Error in Access", e); } } return bcc; } /** * kunsnat: 初始化图表向导对话框, 调用静态方法showWindow, 参数window. * * @return 返回调出的ChartDailog */ public static MiddleChartDialog getChartDialog(Window window) { try { Constructor c; if (window instanceof Frame) { c = instance.chartDialogClass.getConstructor(Frame.class); } else { c = instance.chartDialogClass.getConstructor(Dialog.class); } return c.newInstance(window); } catch (Exception e) { FRContext.getLogger().error(e.getMessage(), e); } return null; } /** * kunsnat: 获取图表属性界面 * * @return 返回界面. */ public static BaseChartPropertyPane getChartPropertyPane() { BaseChartPropertyPane bp = null; if (instance.chartPropertyPaneClass != null) { bp = StableUtils.getInstance(instance.chartPropertyPaneClass); bp.setSureProperty(); } return bp; } public static void registerButtonDetailPaneClass(Class clazz) { instance.buttonDetailPaneClass = clazz; } public static Class getButtonDetailPaneClass() { return instance.buttonDetailPaneClass; } public static void registerParameterReader(ParameterReader reader) { if (instance.parameterReaderList == null) { instance.parameterReaderList = new ArrayList(); } instance.parameterReaderList.add(reader); } public static ParameterReader[] getParameterReaders() { if (instance.parameterReaderList == null) { return new ParameterReader[0]; } return instance.parameterReaderList.toArray(new ParameterReader[instance.parameterReaderList.size()]); } } \ No newline at end of file +package com.fr.design.module; import com.fr.base.FRContext; import com.fr.base.chart.BaseChartCollection; import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.gui.chart.MiddleChartDialog; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.frpane.BaseHyperlinkGroup; import com.fr.design.gui.frpane.HyperlinkGroupType; import com.fr.design.mainframe.BaseFormDesigner; import com.fr.design.mainframe.BaseWidgetPropertyPane; import com.fr.design.parameter.HierarchyTreePane; import com.fr.design.parameter.ParameterDesignerProvider; import com.fr.design.parameter.ParameterReader; import com.fr.form.ui.Widget; import com.fr.stable.StableUtils; import java.awt.*; import java.lang.reflect.Constructor; import java.util.ArrayList; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 下午1:57 */ public class DesignModuleFactory { private static DesignModuleFactory instance = new DesignModuleFactory(); private DesignModuleFactory() { } private HyperlinkGroupType hyperlinkGroupType = new BaseHyperlinkGroup(); private NameableCreator[] creators4Hyperlink; private WidgetOption[] extraOptions; private Class chartEditorClass; private Class chartComponentClass; private Class chartDialogClass; private Class chartPropertyPaneClass; private Class newFormAction; private Class formParaDesigner; private Class paraPropertyPane; private Class formHierarchyPaneCls; private Class chartWidgetPropertyPaneCls; private Class widgetPropertyPane; private Class buttonDetailPaneClass; private java.util.List parameterReaderList; public static void registerHyperlinkGroupType(HyperlinkGroupType hyperlinkGroupType) { instance.hyperlinkGroupType = hyperlinkGroupType; } public static HyperlinkGroupType getHyperlinkGroupType() { return instance.hyperlinkGroupType; } public static void registerCreators4Hyperlink(NameableCreator[] nameableCreators) { instance.creators4Hyperlink = nameableCreators; } public static NameableCreator[] getCreators4Hyperlink() { return instance.creators4Hyperlink; } public static void registerExtraWidgetOptions(WidgetOption[] options) { instance.extraOptions = options; } public static WidgetOption[] getExtraWidgetOptions() { if (instance.extraOptions == null) { instance.extraOptions = new WidgetOption[0]; } return instance.extraOptions; } public static void registerChartEditorClass(Class cls) { instance.chartEditorClass = cls; } public static Class getChartEditorClass() { return instance.chartEditorClass; } public static void registerChartComponentClass(Class bcc) { instance.chartComponentClass = bcc; } public static void registerChartDialogClass(Class cd) { instance.chartDialogClass = cd; } public static void registerChartAndWidgetPropertyPane(Class p) { instance.chartWidgetPropertyPaneCls = p; } public static void registerChartPropertyPaneClass(Class p) { instance.chartPropertyPaneClass = p; } public static BaseChartPropertyPane getChartWidgetPropertyPane(BaseFormDesigner fd) { BaseChartPropertyPane p = null; if (instance.chartWidgetPropertyPaneCls != null) { p = StableUtils.getInstance(instance.chartWidgetPropertyPaneCls); p.setWidgetPropertyPane(DesignModuleFactory.getWidgetPropertyPane(fd)); p.setSureProperty(); } return p; } public static void registerNewFormActionClass(Class f) { instance.newFormAction = f; } public static Class getNewFormAction() { return instance.newFormAction; } public static void registerParaPropertyPaneClass(Class p) { instance.paraPropertyPane = p; } /** * 获取参数属性界面 * * @return 参数属性界面. */ public static Object getParaPropertyPane() { if (instance.paraPropertyPane != null) { try { return instance.paraPropertyPane.newInstance(); } catch (Exception e) { FRContext.getLogger().error("Error in Para PropertyPane"); } } return null; } public static void registerFormParaDesignerClass(Class f) { instance.formParaDesigner = f; } public static ParameterDesignerProvider getFormParaDesigner() { if (instance.formParaDesigner != null) { try { return (ParameterDesignerProvider) instance.formParaDesigner.newInstance(); } catch (Exception e) { FRContext.getLogger().error("error in form para designer"); } } return null; } public static void registerFormHierarchyPaneClass(Class fClass) { instance.formHierarchyPaneCls = fClass; } public static HierarchyTreePane getFormHierarchyPane() { return StableUtils.getInstance(instance.formHierarchyPaneCls); } public static void registerWidgetPropertyPaneClass(Class wp) { instance.widgetPropertyPane = wp; } public static BaseWidgetPropertyPane getWidgetPropertyPane(BaseFormDesigner fd) { BaseWidgetPropertyPane wp = null; if (instance.widgetPropertyPane != null) { wp = StableUtils.getInstance(instance.widgetPropertyPane); wp.setEditingFormDesigner(fd); wp.refreshDockingView(); } return wp; } public static MiddleChartComponent getChartComponent(BaseChartCollection collection) { MiddleChartComponent bcc = null; if (instance.chartComponentClass != null) { try { bcc = instance.chartComponentClass.newInstance(); bcc.populate(collection); } catch (InstantiationException e) { FRContext.getLogger().error("Error in ChartComponent instant", e); } catch (IllegalAccessException e) { FRContext.getLogger().error("Error in Access", e); } } return bcc; } /** * kunsnat: 初始化图表向导对话框, 调用静态方法showWindow, 参数window. * * @return 返回调出的ChartDailog */ public static MiddleChartDialog getChartDialog(Window window) { try { Constructor c; if (window instanceof Frame) { c = instance.chartDialogClass.getConstructor(Frame.class); } else { c = instance.chartDialogClass.getConstructor(Dialog.class); } return c.newInstance(window); } catch (Exception e) { FRContext.getLogger().error(e.getMessage(), e); } return null; } /** * kunsnat: 获取图表属性界面 * * @return 返回界面. */ public static BaseChartPropertyPane getChartPropertyPane() { BaseChartPropertyPane bp = null; if (instance.chartPropertyPaneClass != null) { bp = StableUtils.getInstance(instance.chartPropertyPaneClass); bp.setSureProperty(); } return bp; } public static void registerButtonDetailPaneClass(Class clazz) { instance.buttonDetailPaneClass = clazz; } public static Class getButtonDetailPaneClass() { return instance.buttonDetailPaneClass; } public static void registerParameterReader(ParameterReader reader) { if (instance.parameterReaderList == null) { instance.parameterReaderList = new ArrayList(); } instance.parameterReaderList.add(reader); } public static ParameterReader[] getParameterReaders() { if (instance.parameterReaderList == null) { return new ParameterReader[0]; } return instance.parameterReaderList.toArray(new ParameterReader[instance.parameterReaderList.size()]); } } \ No newline at end of file From 5919a82e42d17c229764cc69d5ccdd38729f78bc Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 11 Jul 2016 11:27:47 +0800 Subject: [PATCH 23/39] =?UTF-8?q?=E8=81=9A=E5=90=88=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../images/form/toolbar/ChartF-MultiPie.png | Bin 0 -> 861 bytes .../poly/toolbar/Plugin-ChartF_NewMultiPie.png | Bin 0 -> 861 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 designer_base/src/com/fr/design/images/form/toolbar/ChartF-MultiPie.png create mode 100644 designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMultiPie.png diff --git a/designer_base/src/com/fr/design/images/form/toolbar/ChartF-MultiPie.png b/designer_base/src/com/fr/design/images/form/toolbar/ChartF-MultiPie.png new file mode 100644 index 0000000000000000000000000000000000000000..b6bca9a3ebe316d1f83cbcd8357652531cdf02fb GIT binary patch literal 861 zcmV-j1ETziP)vCP|^=Aq{$;pU{n0m+>E3`b|ebZaBoG} z@Ci)a)eJ=Dl7(BgtpN+c5)^!kE3hQ$TpHzOe!B`7(gIHBJrvDIM6fn%bz+p*tCnZ( zY*a*Io!qdA;MmJ6X$^#t3^g$fiHjQ3Dwjk=U{rD)L?g&SDG0Bw8r&|mrjw?SO_+{c zWMdI%$EegXB0QgiY%i*L49aVas zXZ&Ijb(b7^&XN*;bR n-0O_nDgF5CfAqihM}PqUQ)GI6k}nhj00000NkvXXu0mjft-O5f literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMultiPie.png b/designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMultiPie.png new file mode 100644 index 0000000000000000000000000000000000000000..b6bca9a3ebe316d1f83cbcd8357652531cdf02fb GIT binary patch literal 861 zcmV-j1ETziP)vCP|^=Aq{$;pU{n0m+>E3`b|ebZaBoG} z@Ci)a)eJ=Dl7(BgtpN+c5)^!kE3hQ$TpHzOe!B`7(gIHBJrvDIM6fn%bz+p*tCnZ( zY*a*Io!qdA;MmJ6X$^#t3^g$fiHjQ3Dwjk=U{rD)L?g&SDG0Bw8r&|mrjw?SO_+{c zWMdI%$EegXB0QgiY%i*L49aVas zXZ&Ijb(b7^&XN*;bR n-0O_nDgF5CfAqihM}PqUQ)GI6k}nhj00000NkvXXu0mjft-O5f literal 0 HcmV?d00001 From 6f0d0880d271ce39cf2d05fa3fb38450a44a6f86 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 11 Jul 2016 13:35:39 +0800 Subject: [PATCH 24/39] =?UTF-8?q?=E8=81=9A=E5=90=88=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/PolyComponetsBar.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/poly/PolyComponetsBar.java b/designer/src/com/fr/poly/PolyComponetsBar.java index 347063d9d9..41f9e6562e 100644 --- a/designer/src/com/fr/poly/PolyComponetsBar.java +++ b/designer/src/com/fr/poly/PolyComponetsBar.java @@ -28,6 +28,7 @@ public class PolyComponetsBar extends JToolBar { private static Color FOLDER_PANE_BACKGROUND = new Color(214, 223, 247); private BaseChartNameID[] typeName = BaseChartGetter.getStaticAllChartBaseNames(); private SerIcon[] serIcons; + private static final int MAX_BAR_NUM = 15; public PolyComponetsBar() { setOrientation(SwingConstants.VERTICAL); @@ -35,10 +36,10 @@ public class PolyComponetsBar extends JToolBar { setFloatable(false); setBackground(UIConstants.NORMAL_BACKGROUND); setLayout(FRGUIPaneFactory.create1ColumnGridLayout()); - serIcons = new SerIcon[typeName.length + 1]; + serIcons = new SerIcon[typeName.length < MAX_BAR_NUM ? typeName.length : MAX_BAR_NUM + 1]; serIcons[0] = new SerIcon(PolyECBlock.class, Inter.getLocText("Poly-Report_Block"), "Poly-Report_Block"); this.add(serIcons[0]); - for (int i = 0, len = typeName.length; i < len; i++) { + for (int i = 0, len = typeName.length; i < len && i < MAX_BAR_NUM; i++) { BaseChart[] rowChart = BaseChartGetter.getStaticChartTypes(typeName[i].getPlotID()); serIcons[i + 1] = new SerIcon(rowChart[0], Inter.getLocText(typeName[i].getName()), typeName[i].getName()); this.add(serIcons[i + 1]); From 7fbcfc0179161c714147a7e454fd5a99df4ab71c Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 11 Jul 2016 13:37:16 +0800 Subject: [PATCH 25/39] =?UTF-8?q?=E8=81=9A=E5=90=88=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/PolyComponetsBar.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/poly/PolyComponetsBar.java b/designer/src/com/fr/poly/PolyComponetsBar.java index 41f9e6562e..b4625080e8 100644 --- a/designer/src/com/fr/poly/PolyComponetsBar.java +++ b/designer/src/com/fr/poly/PolyComponetsBar.java @@ -36,7 +36,7 @@ public class PolyComponetsBar extends JToolBar { setFloatable(false); setBackground(UIConstants.NORMAL_BACKGROUND); setLayout(FRGUIPaneFactory.create1ColumnGridLayout()); - serIcons = new SerIcon[typeName.length < MAX_BAR_NUM ? typeName.length : MAX_BAR_NUM + 1]; + serIcons = new SerIcon[(typeName.length < MAX_BAR_NUM ? typeName.length : MAX_BAR_NUM) + 1]; serIcons[0] = new SerIcon(PolyECBlock.class, Inter.getLocText("Poly-Report_Block"), "Poly-Report_Block"); this.add(serIcons[0]); for (int i = 0, len = typeName.length; i < len && i < MAX_BAR_NUM; i++) { From 652fc735e7e2594f66f74d5add89fd8eb0b45f79 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 11 Jul 2016 14:52:45 +0800 Subject: [PATCH 26/39] update --- designer/src/com/fr/poly/PolyComponetsBar.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/poly/PolyComponetsBar.java b/designer/src/com/fr/poly/PolyComponetsBar.java index b4625080e8..1413a26e1c 100644 --- a/designer/src/com/fr/poly/PolyComponetsBar.java +++ b/designer/src/com/fr/poly/PolyComponetsBar.java @@ -36,10 +36,11 @@ public class PolyComponetsBar extends JToolBar { setFloatable(false); setBackground(UIConstants.NORMAL_BACKGROUND); setLayout(FRGUIPaneFactory.create1ColumnGridLayout()); - serIcons = new SerIcon[(typeName.length < MAX_BAR_NUM ? typeName.length : MAX_BAR_NUM) + 1]; + int typeLen = typeName.length < MAX_BAR_NUM ? typeName.length : MAX_BAR_NUM; + serIcons = new SerIcon[typeLen + 1]; serIcons[0] = new SerIcon(PolyECBlock.class, Inter.getLocText("Poly-Report_Block"), "Poly-Report_Block"); this.add(serIcons[0]); - for (int i = 0, len = typeName.length; i < len && i < MAX_BAR_NUM; i++) { + for (int i = 0; i < typeLen; i++) { BaseChart[] rowChart = BaseChartGetter.getStaticChartTypes(typeName[i].getPlotID()); serIcons[i + 1] = new SerIcon(rowChart[0], Inter.getLocText(typeName[i].getName()), typeName[i].getName()); this.add(serIcons[i + 1]); From b67c6b7df64aaf00d9841dfd8d7eb929d9ddb985 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Mon, 11 Jul 2016 20:04:12 +0800 Subject: [PATCH 27/39] =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/images/form/toolbar/ChartF-TreeMap.png | Bin 0 -> 269 bytes .../poly/toolbar/Plugin-ChartF_NewTreeMap.png | Bin 0 -> 269 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 designer_base/src/com/fr/design/images/form/toolbar/ChartF-TreeMap.png create mode 100644 designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewTreeMap.png diff --git a/designer_base/src/com/fr/design/images/form/toolbar/ChartF-TreeMap.png b/designer_base/src/com/fr/design/images/form/toolbar/ChartF-TreeMap.png new file mode 100644 index 0000000000000000000000000000000000000000..09edd2b77ec413c2eead3db6bcddafc3ecafbc74 GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|&H|6fVg?3oVGw3ym^DWNC@5Lt z8c`CQpH@+2u$DqB_b`ZBbhKY7Yyk0WJBDTtpeq?X MUHx3vIVCg!01hT#rT_o{ literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewTreeMap.png b/designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewTreeMap.png new file mode 100644 index 0000000000000000000000000000000000000000..09edd2b77ec413c2eead3db6bcddafc3ecafbc74 GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|&H|6fVg?3oVGw3ym^DWNC@5Lt z8c`CQpH@+2u$DqB_b`ZBbhKY7Yyk0WJBDTtpeq?X MUHx3vIVCg!01hT#rT_o{ literal 0 HcmV?d00001 From 2b1d0782e4793a31ddf56c1c33aff8475f36bf75 Mon Sep 17 00:00:00 2001 From: fr_shine Date: Mon, 11 Jul 2016 20:15:53 +0800 Subject: [PATCH 28/39] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E7=B1=BB=E5=9E=8B=E5=A2=9E=E5=8A=A0=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/FormParaWidgetPane.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java b/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java index a1f8067b42..78af66a84d 100644 --- a/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java @@ -46,7 +46,7 @@ public class FormParaWidgetPane extends JPanel{ //预定义控件最多显示20行 private int preWidgetShowMaxRow = 20; //显示8个图表组件 - private int commonChartNum = 8; + private static final int commonChartNum = 8; //显示10个普通控件 private int commonWidgetNum = 10; private JSeparator jSeparatorPara; @@ -118,7 +118,6 @@ public class FormParaWidgetPane extends JPanel{ // 初始化的时候根据图表的总个数获得单行显示图表的个数 int totalChartNums = loadChartOptions().length; if (totalChartNums > 0) { - commonChartNum = ++totalChartNums/2; JPanel chartTypePane = new JPanel(new FlowLayout()); for (int i = 0;i < commonChartNum ;i++) { chartTypePane.add( new ToolBarButton(loadChartOptions()[i])); @@ -209,11 +208,12 @@ public class FormParaWidgetPane extends JPanel{ public void mouseClicked(MouseEvent e) { if(chartTypeWindow == null) { JPanel componentsPara = new JPanel(new FlowLayout(FlowLayout.LEFT)); - for (WidgetOption chartOption : loadChartOptions()) { + WidgetOption[] chartOptions = loadChartOptions(); + for (WidgetOption chartOption : chartOptions) { componentsPara.add( new ToolBarButton(chartOption)); } int x = commonChartNum * (widgetButtonWidth + smallGAP); - int y = (int)Math.ceil(((double)loadWidgetOptions().length/(double)commonChartNum)) * (widgetButtonHeight + smallGAP); + int y = (int)Math.ceil(chartOptions.length/((double)commonChartNum)) * (widgetButtonHeight + smallGAP); componentsPara.setPreferredSize(new Dimension(x,y)); chartTypeWindow = new PopUpWindow(componentsPara, Inter.getLocText("FR-Designer-Form-ToolBar_Chart")); chartTypeWindow.setLocation((int)jSeparatorLayout.getLocationOnScreen().getX() + 1, (int)jSeparatorLayout.getLocationOnScreen().getY()); From 58a57de24e1a591f26a4759aa267cd82536fb536 Mon Sep 17 00:00:00 2001 From: eason-skx Date: Tue, 12 Jul 2016 09:32:00 +0800 Subject: [PATCH 29/39] =?UTF-8?q?=E5=AE=9E=E4=BE=8B=E5=8C=96manager?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/module/ChartDesignerModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java index 7d2b72cfd9..92a0d4f112 100644 --- a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java +++ b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java @@ -1 +1 @@ -package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartAndWidgetPropertyPane; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartAndWidgetPropertyPane(ChartAndWidgetPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } 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]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file +package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartAndWidgetPropertyPane; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartAndWidgetPropertyPane(ChartAndWidgetPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } 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]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file From 16aa210afb776f7621e3e1cb7b4b77597642da05 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 12 Jul 2016 10:23:14 +0800 Subject: [PATCH 30/39] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 6 ++++++ .../src/com/fr/design/module/ChartDesignerModule.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 9ad8680177..546ccbb0bf 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -76,6 +76,12 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh @Override public void success() { if (chartTypeInterfaces != null) { + //这边需要处理一下,如果classManager为空,则读取的东西最终都会被clear掉 + if (classManager == null){ + classManager = new ChartTypeInterfaceManager(); + chartTypeInterfaces.clear(); + classManager.readXMLFile(); + } readDefault(); //重新注册designModuleFactory DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption()); diff --git a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java index 7d2b72cfd9..8fcf07388e 100644 --- a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java +++ b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java @@ -1 +1 @@ -package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartAndWidgetPropertyPane; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartAndWidgetPropertyPane(ChartAndWidgetPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } 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]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file +package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartAndWidgetPropertyPane; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.ExtraChartTypeClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartAndWidgetPropertyPane(ChartAndWidgetPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } 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]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file From 00cc0ec45a0204dc99825444ebf886f1a4f047a3 Mon Sep 17 00:00:00 2001 From: xiaxiang <1438003374@qq.com> Date: Tue, 12 Jul 2016 10:45:04 +0800 Subject: [PATCH 31/39] rt --- .../com/fr/{plugin => }/PluginManager.java | 254 +++++++++--------- .../mainframe/toolbar/ToolBarMenuDock.java | 39 +-- 2 files changed, 138 insertions(+), 155 deletions(-) rename designer_base/src/com/fr/{plugin => }/PluginManager.java (95%) diff --git a/designer_base/src/com/fr/plugin/PluginManager.java b/designer_base/src/com/fr/PluginManager.java similarity index 95% rename from designer_base/src/com/fr/plugin/PluginManager.java rename to designer_base/src/com/fr/PluginManager.java index c539db874f..d2bdd20a7f 100644 --- a/designer_base/src/com/fr/plugin/PluginManager.java +++ b/designer_base/src/com/fr/PluginManager.java @@ -1,128 +1,128 @@ -package com.fr.plugin; - -import com.fr.design.actions.UpdateAction; -import com.fr.file.XMLFileManager; -import com.fr.general.ComparatorUtils; -import com.fr.general.FRLogger; -import com.fr.general.GeneralUtils; -import com.fr.stable.StringUtils; -import com.fr.stable.xml.XMLPrintWriter; -import com.fr.stable.xml.XMLReadable; -import com.fr.stable.xml.XMLableReader; - -import java.util.ArrayList; - -/** - * Created by IntelliJ IDEA. - * Author : daisy - * Version: 6.5.6 - * Date: 13-12-20 - * Time: 下午5:05 - */ -public class PluginManager extends XMLFileManager { - - private static PluginManager pluginManager = null; - - private String extensionPoint = StringUtils.EMPTY; - - private ArrayList resultList = new ArrayList(); - - - public synchronized static PluginManager getInstance() { - if (pluginManager == null) { - pluginManager = new PluginManager(); - } - return pluginManager; - } - - - public PluginManager() { - - } - - /** - * 文件名 - * @return 文件名 - */ - public String fileName() { - return "plugin.xml"; - } - - - public void setExtensionPoint(String point) { - extensionPoint = point; - resultList.clear(); - pluginManager.readXMLFile(); - } - - - @Override - public void readXML(XMLableReader reader) { - if (extensionPoint == StringUtils.EMPTY) { - return; - } - if (reader.getTagName().equals("PluginManager")) { - reader.readXMLObject(new XMLReadable() { - @Override - public void readXML(XMLableReader reader) { - readExtension(reader); - } - }); - } - - - } - - private void readExtension(XMLableReader reader) { - if (reader.isChildNode()) { - if (reader.getTagName().equals("Extension")) { - String name = null, tmpVal = null; - if ((tmpVal = reader.getAttrAsString("position", null)) != null) { - name = tmpVal; - } - if (!ComparatorUtils.equals(name, extensionPoint)) { - return; - } - reader.readXMLObject(new XMLReadable() { - @Override - public void readXML(XMLableReader reader) { - readActions(reader); - } - }); - - } - } - } - - private void readActions(XMLableReader reader) { - if (reader.isChildNode()) { - if (reader.getTagName().equals("Action")) { - String name = null, tmpVal = null; - if ((tmpVal = reader.getAttrAsString("class", null)) != null) { - name = tmpVal; - } - //读取模板数据集菜单 - if (name.isEmpty()) { - return; - } - try { - UpdateAction action = (UpdateAction) GeneralUtils.classForName(name).newInstance(); - PluginManager.this.resultList.add(action); - } catch (Exception exp) { - FRLogger.getLogger().error(exp.getMessage(), exp); - } - } - } - - } - - - public ArrayList getResultList() { - return resultList; - } - - @Override - public void writeXML(XMLPrintWriter writer) { - } - +package com.fr; + +import com.fr.design.actions.UpdateAction; +import com.fr.file.XMLFileManager; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.GeneralUtils; +import com.fr.stable.StringUtils; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLReadable; +import com.fr.stable.xml.XMLableReader; + +import java.util.ArrayList; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 13-12-20 + * Time: 下午5:05 + */ +public class PluginManager extends XMLFileManager { + + private static PluginManager pluginManager = null; + + private String extensionPoint = StringUtils.EMPTY; + + private ArrayList resultList = new ArrayList(); + + + public synchronized static PluginManager getInstance() { + if (pluginManager == null) { + pluginManager = new PluginManager(); + } + return pluginManager; + } + + + public PluginManager() { + + } + + /** + * 文件名 + * @return 文件名 + */ + public String fileName() { + return "plugin.xml"; + } + + + public void setExtensionPoint(String point) { + extensionPoint = point; + resultList.clear(); + pluginManager.readXMLFile(); + } + + + @Override + public void readXML(XMLableReader reader) { + if (extensionPoint == StringUtils.EMPTY) { + return; + } + if (reader.getTagName().equals("PluginManager")) { + reader.readXMLObject(new XMLReadable() { + @Override + public void readXML(XMLableReader reader) { + readExtension(reader); + } + }); + } + + + } + + private void readExtension(XMLableReader reader) { + if (reader.isChildNode()) { + if (reader.getTagName().equals("Extension")) { + String name = null, tmpVal = null; + if ((tmpVal = reader.getAttrAsString("position", null)) != null) { + name = tmpVal; + } + if (!ComparatorUtils.equals(name, extensionPoint)) { + return; + } + reader.readXMLObject(new XMLReadable() { + @Override + public void readXML(XMLableReader reader) { + readActions(reader); + } + }); + + } + } + } + + private void readActions(XMLableReader reader) { + if (reader.isChildNode()) { + if (reader.getTagName().equals("Action")) { + String name = null, tmpVal = null; + if ((tmpVal = reader.getAttrAsString("class", null)) != null) { + name = tmpVal; + } + //读取模板数据集菜单 + if (name.isEmpty()) { + return; + } + try { + UpdateAction action = (UpdateAction) GeneralUtils.classForName(name).newInstance(); + PluginManager.this.resultList.add(action); + } catch (Exception exp) { + FRLogger.getLogger().error(exp.getMessage(), exp); + } + } + } + + } + + + public ArrayList getResultList() { + return resultList; + } + + @Override + public void writeXML(XMLPrintWriter writer) { + } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index b372156d7f..f0b1eac9fb 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -8,31 +8,10 @@ import com.fr.base.FRContext; import com.fr.design.DesignState; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; -import com.fr.design.actions.community.BBSAction; -import com.fr.design.actions.community.BugAction; -import com.fr.design.actions.community.NeedAction; -import com.fr.design.actions.community.QuestionAction; -import com.fr.design.actions.community.SignAction; -import com.fr.design.actions.community.UpAction; -import com.fr.design.actions.community.VideoAction; -import com.fr.design.actions.file.CloseCurrentTemplateAction; -import com.fr.design.actions.file.ExitDesignerAction; -import com.fr.design.actions.file.OpenRecentReportMenuDef; -import com.fr.design.actions.file.OpenTemplateAction; -import com.fr.design.actions.file.PreferenceAction; -import com.fr.design.actions.file.SwitchExistEnv; -import com.fr.design.actions.help.AboutAction; -import com.fr.design.actions.help.FeedBackAction; -import com.fr.design.actions.help.ForumAction; -import com.fr.design.actions.help.SupportQQAction; -import com.fr.design.actions.help.TutorialAction; -import com.fr.design.actions.help.WebDemoAction; -import com.fr.design.actions.server.ConnectionListAction; -import com.fr.design.actions.server.FunctionManagerAction; -import com.fr.design.actions.server.GlobalParameterAction; -import com.fr.design.actions.server.GlobalTableDataAction; -import com.fr.design.actions.server.PlatformManagerAction; -import com.fr.design.actions.server.PluginManagerAction; +import com.fr.design.actions.community.*; +import com.fr.design.actions.file.*; +import com.fr.design.actions.help.*; +import com.fr.design.actions.server.*; import com.fr.design.file.NewTemplatePane; import com.fr.design.fun.MenuHandler; import com.fr.design.fun.TableDataPaneProcessor; @@ -55,7 +34,10 @@ import com.fr.stable.ProductConstants; import javax.swing.*; import java.awt.*; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Locale; +import java.util.Set; /** * @author richer @@ -151,10 +133,11 @@ public abstract class ToolBarMenuDock { // 添加服务器菜单 menuList.add(createServerMenuDef(plus)); + // 添加帮助菜单 menuList.add(createHelpMenuDef()); - // 添加社区菜单 + // 添加社区菜单 menuList.add(createCommunityMenuDef()); return menuList.toArray(new MenuDef[menuList.size()]); } @@ -359,7 +342,7 @@ public abstract class ToolBarMenuDock { for (ShortCut shortCut : otherCommunityShortCuts) { menuDef.addShortCut(shortCut); } - insertMenu(menuDef, MenuHandler.HELP); + insertMenu(menuDef, MenuHandler.BBS); return menuDef; } /** From 7a0ee1d55566a5cc5228a3772d47fd1fce6f4869 Mon Sep 17 00:00:00 2001 From: xiaxiang <1438003374@qq.com> Date: Tue, 12 Jul 2016 10:46:09 +0800 Subject: [PATCH 32/39] rt --- designer_base/src/com/fr/design/fun/MenuHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer_base/src/com/fr/design/fun/MenuHandler.java b/designer_base/src/com/fr/design/fun/MenuHandler.java index 740a7f6e8c..9573b11ddf 100644 --- a/designer_base/src/com/fr/design/fun/MenuHandler.java +++ b/designer_base/src/com/fr/design/fun/MenuHandler.java @@ -25,6 +25,7 @@ public interface MenuHandler extends Mutable { String TEMPLATE = "template"; String INSERT = "insert"; String CELL = "cell"; + String BBS = "bbs"; /** * 插入菜单的位置 From d3fbca4592f6c18c43e12638a5bfc4bdcb1dc4bc Mon Sep 17 00:00:00 2001 From: xiaxiang <1438003374@qq.com> Date: Tue, 12 Jul 2016 10:48:53 +0800 Subject: [PATCH 33/39] rt --- designer_base/src/com/fr/PluginManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/PluginManager.java b/designer_base/src/com/fr/PluginManager.java index d2bdd20a7f..271002aa12 100644 --- a/designer_base/src/com/fr/PluginManager.java +++ b/designer_base/src/com/fr/PluginManager.java @@ -1,4 +1,4 @@ -package com.fr; +package com.fr.plugin; import com.fr.design.actions.UpdateAction; import com.fr.file.XMLFileManager; From e36eae4227435da75b8268f0bfad886a1203df1c Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 12 Jul 2016 11:02:59 +0800 Subject: [PATCH 34/39] update --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 546ccbb0bf..500ece8b45 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -76,12 +76,6 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh @Override public void success() { if (chartTypeInterfaces != null) { - //这边需要处理一下,如果classManager为空,则读取的东西最终都会被clear掉 - if (classManager == null){ - classManager = new ChartTypeInterfaceManager(); - chartTypeInterfaces.clear(); - classManager.readXMLFile(); - } readDefault(); //重新注册designModuleFactory DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption()); @@ -107,7 +101,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } private synchronized static void envChanged() { - classManager = null; + chartTypeInterfaces.clear(); } private static void readDefault() { From d77d991667f57ad35070d09936810a21ca66174e Mon Sep 17 00:00:00 2001 From: xiaxiang <1438003374@qq.com> Date: Tue, 12 Jul 2016 11:15:43 +0800 Subject: [PATCH 35/39] rt --- .../com/fr/{ => plugin}/PluginManager.java | 254 +++++++++--------- 1 file changed, 127 insertions(+), 127 deletions(-) rename designer_base/src/com/fr/{ => plugin}/PluginManager.java (96%) diff --git a/designer_base/src/com/fr/PluginManager.java b/designer_base/src/com/fr/plugin/PluginManager.java similarity index 96% rename from designer_base/src/com/fr/PluginManager.java rename to designer_base/src/com/fr/plugin/PluginManager.java index 271002aa12..c539db874f 100644 --- a/designer_base/src/com/fr/PluginManager.java +++ b/designer_base/src/com/fr/plugin/PluginManager.java @@ -1,128 +1,128 @@ -package com.fr.plugin; - -import com.fr.design.actions.UpdateAction; -import com.fr.file.XMLFileManager; -import com.fr.general.ComparatorUtils; -import com.fr.general.FRLogger; -import com.fr.general.GeneralUtils; -import com.fr.stable.StringUtils; -import com.fr.stable.xml.XMLPrintWriter; -import com.fr.stable.xml.XMLReadable; -import com.fr.stable.xml.XMLableReader; - -import java.util.ArrayList; - -/** - * Created by IntelliJ IDEA. - * Author : daisy - * Version: 6.5.6 - * Date: 13-12-20 - * Time: 下午5:05 - */ -public class PluginManager extends XMLFileManager { - - private static PluginManager pluginManager = null; - - private String extensionPoint = StringUtils.EMPTY; - - private ArrayList resultList = new ArrayList(); - - - public synchronized static PluginManager getInstance() { - if (pluginManager == null) { - pluginManager = new PluginManager(); - } - return pluginManager; - } - - - public PluginManager() { - - } - - /** - * 文件名 - * @return 文件名 - */ - public String fileName() { - return "plugin.xml"; - } - - - public void setExtensionPoint(String point) { - extensionPoint = point; - resultList.clear(); - pluginManager.readXMLFile(); - } - - - @Override - public void readXML(XMLableReader reader) { - if (extensionPoint == StringUtils.EMPTY) { - return; - } - if (reader.getTagName().equals("PluginManager")) { - reader.readXMLObject(new XMLReadable() { - @Override - public void readXML(XMLableReader reader) { - readExtension(reader); - } - }); - } - - - } - - private void readExtension(XMLableReader reader) { - if (reader.isChildNode()) { - if (reader.getTagName().equals("Extension")) { - String name = null, tmpVal = null; - if ((tmpVal = reader.getAttrAsString("position", null)) != null) { - name = tmpVal; - } - if (!ComparatorUtils.equals(name, extensionPoint)) { - return; - } - reader.readXMLObject(new XMLReadable() { - @Override - public void readXML(XMLableReader reader) { - readActions(reader); - } - }); - - } - } - } - - private void readActions(XMLableReader reader) { - if (reader.isChildNode()) { - if (reader.getTagName().equals("Action")) { - String name = null, tmpVal = null; - if ((tmpVal = reader.getAttrAsString("class", null)) != null) { - name = tmpVal; - } - //读取模板数据集菜单 - if (name.isEmpty()) { - return; - } - try { - UpdateAction action = (UpdateAction) GeneralUtils.classForName(name).newInstance(); - PluginManager.this.resultList.add(action); - } catch (Exception exp) { - FRLogger.getLogger().error(exp.getMessage(), exp); - } - } - } - - } - - - public ArrayList getResultList() { - return resultList; - } - - @Override - public void writeXML(XMLPrintWriter writer) { - } - +package com.fr.plugin; + +import com.fr.design.actions.UpdateAction; +import com.fr.file.XMLFileManager; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.GeneralUtils; +import com.fr.stable.StringUtils; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLReadable; +import com.fr.stable.xml.XMLableReader; + +import java.util.ArrayList; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 13-12-20 + * Time: 下午5:05 + */ +public class PluginManager extends XMLFileManager { + + private static PluginManager pluginManager = null; + + private String extensionPoint = StringUtils.EMPTY; + + private ArrayList resultList = new ArrayList(); + + + public synchronized static PluginManager getInstance() { + if (pluginManager == null) { + pluginManager = new PluginManager(); + } + return pluginManager; + } + + + public PluginManager() { + + } + + /** + * 文件名 + * @return 文件名 + */ + public String fileName() { + return "plugin.xml"; + } + + + public void setExtensionPoint(String point) { + extensionPoint = point; + resultList.clear(); + pluginManager.readXMLFile(); + } + + + @Override + public void readXML(XMLableReader reader) { + if (extensionPoint == StringUtils.EMPTY) { + return; + } + if (reader.getTagName().equals("PluginManager")) { + reader.readXMLObject(new XMLReadable() { + @Override + public void readXML(XMLableReader reader) { + readExtension(reader); + } + }); + } + + + } + + private void readExtension(XMLableReader reader) { + if (reader.isChildNode()) { + if (reader.getTagName().equals("Extension")) { + String name = null, tmpVal = null; + if ((tmpVal = reader.getAttrAsString("position", null)) != null) { + name = tmpVal; + } + if (!ComparatorUtils.equals(name, extensionPoint)) { + return; + } + reader.readXMLObject(new XMLReadable() { + @Override + public void readXML(XMLableReader reader) { + readActions(reader); + } + }); + + } + } + } + + private void readActions(XMLableReader reader) { + if (reader.isChildNode()) { + if (reader.getTagName().equals("Action")) { + String name = null, tmpVal = null; + if ((tmpVal = reader.getAttrAsString("class", null)) != null) { + name = tmpVal; + } + //读取模板数据集菜单 + if (name.isEmpty()) { + return; + } + try { + UpdateAction action = (UpdateAction) GeneralUtils.classForName(name).newInstance(); + PluginManager.this.resultList.add(action); + } catch (Exception exp) { + FRLogger.getLogger().error(exp.getMessage(), exp); + } + } + } + + } + + + public ArrayList getResultList() { + return resultList; + } + + @Override + public void writeXML(XMLPrintWriter writer) { + } + } \ No newline at end of file From d0a3e2b95b09611380122b708339c7d54b4bed5f Mon Sep 17 00:00:00 2001 From: fr_shine Date: Tue, 12 Jul 2016 20:06:51 +0800 Subject: [PATCH 36/39] bug --- .../chart/gui/data/DatabaseTableDataPane.java | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java index 0a22b96649..4cb51f8f49 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java @@ -1,32 +1,33 @@ package com.fr.design.mainframe.chart.gui.data; -import java.awt.BorderLayout; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; - -import javax.swing.JPanel; -import javax.swing.border.LineBorder; - import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.base.TableData; -import com.fr.design.constants.UIConstants; +import com.fr.data.impl.NameTableData; import com.fr.design.constants.LayoutConstants; +import com.fr.design.constants.UIConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.TableDataComboBox; -import com.fr.data.impl.NameTableData; import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.dialog.BasicPane; + +import javax.swing.*; +import javax.swing.border.LineBorder; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; public class DatabaseTableDataPane extends BasicPane{ private static final long serialVersionUID = 5316016202202932242L; private TableDataComboBox tableNameCombox; private UIButton reviewButton; + private Object lastSelectObject; + public DatabaseTableDataPane(UILabel label) { initTableCombox(); initReviewButton(); @@ -74,9 +75,11 @@ public class DatabaseTableDataPane extends BasicPane{ tableNameCombox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { - if(e.getStateChange() == ItemEvent.DESELECTED){ + if(e.getStateChange() == ItemEvent.DESELECTED + || (lastSelectObject == null && e.getStateChange() == ItemEvent.SELECTED)){ userEvent(); } + lastSelectObject = tableNameCombox.getSelectedItem(); } }); } From 6ccd8301703b7f6655ae3b741ce0f9eaf21ab3f5 Mon Sep 17 00:00:00 2001 From: zhouping Date: Wed, 13 Jul 2016 10:36:58 +0800 Subject: [PATCH 37/39] =?UTF-8?q?=E4=BB=8A=E5=A4=A9=E8=A6=81=E5=90=88?= =?UTF-8?q?=E5=88=B0master=E4=BB=A3=E7=A0=81=EF=BC=8C=E6=96=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=9D=A5=E4=B8=8D=E5=8F=8A=E6=B5=8B=E8=AF=95=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E5=85=88=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapters/layout/FRFitLayoutAdapter.java | 11 +- .../designer/beans/models/SelectionModel.java | 7 - .../design/designer/creator/XChartEditor.java | 101 +++---------- .../fr/design/designer/creator/XCreator.java | 8 - .../designer/creator/XLayoutContainer.java | 26 ---- .../creator/cardlayout/XCardAddButton.java | 8 - .../creator/cardlayout/XCardSwitchButton.java | 5 - .../creator/cardlayout/XWCardLayout.java | 5 - .../cardlayout/XWCardMainBorderLayout.java | 91 +----------- .../creator/cardlayout/XWCardTagLayout.java | 6 - .../creator/cardlayout/XWCardTitleLayout.java | 6 - .../creator/cardlayout/XWTabFitLayout.java | 7 +- .../mainframe/EditingMouseListener.java | 138 +++--------------- 13 files changed, 51 insertions(+), 368 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java index 840d3a7dbc..1e052ba6d8 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java @@ -14,7 +14,6 @@ import com.fr.design.designer.beans.ConstraintsGroupModel; import com.fr.design.designer.beans.HoverPainter; import com.fr.design.designer.beans.painters.FRFitLayoutPainter; import com.fr.design.designer.creator.XCreator; -import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.cardlayout.XWCardLayout; @@ -164,7 +163,7 @@ public class FRFitLayoutAdapter extends AbstractLayoutAdapter { return false; } //如果当前处于边缘地带, 那么就把他贴到父容器上 - boolean isMatchEdge = matchEdge(x, y); + matchEdge(x, y); int componentHeight = comp.getHeight(); int componentWidth = comp.getWidth(); @@ -172,13 +171,7 @@ public class FRFitLayoutAdapter extends AbstractLayoutAdapter { int upHeight = (int) (componentHeight * TOP_HALF) + comp.getY(); //下半部分高度 int downHeight = (int) (componentHeight * BOTTOM_HALF) + comp.getY(); - - //布局控件要先判断是不是可编辑 - XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator)comp).getTopLayout(); - if(topLayout != null && !isMatchEdge && !topLayout.isEditable()){ - return false; - } - + if (isCrossPointArea(comp, x, y)) { return canAcceptWhileCrossPoint(comp, x, y); } diff --git a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java index 834b28d744..fd2b48a73b 100644 --- a/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java +++ b/designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java @@ -66,13 +66,6 @@ public class SelectionModel { // 获取e所在的组件 XCreator comp = designer.getComponentAt(e); - - //布局组件的顶层布局如不可编辑,要获取其顶层布局 - XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(comp).getTopLayout(); - if(topLayout != null && !topLayout.isEditable()){ - comp = topLayout; - } - // 如果父层是scale和title两个专属容器,返回其父层,组件本身是不让被选中的 if (comp != designer.getRootComponent() && comp != designer.getParaComponent()) { XCreator parentContainer = (XCreator) comp.getParent(); diff --git a/designer_form/src/com/fr/design/designer/creator/XChartEditor.java b/designer_form/src/com/fr/design/designer/creator/XChartEditor.java index e477b7d7ad..2087dda109 100644 --- a/designer_form/src/com/fr/design/designer/creator/XChartEditor.java +++ b/designer_form/src/com/fr/design/designer/creator/XChartEditor.java @@ -1,22 +1,20 @@ package com.fr.design.designer.creator; -import java.awt.*; -import java.awt.event.MouseEvent; -import java.awt.image.BufferedImage; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; import java.beans.IntrospectionException; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JComponent; +import javax.swing.SwingUtilities; -import com.fr.base.BaseUtils; import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChartCollection; -import com.fr.design.designer.beans.AdapterBus; -import com.fr.design.designer.beans.ComponentAdapter; -import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.MiddleChartComponent; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.mainframe.*; +import com.fr.design.mainframe.BaseJForm; +import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor; import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer; import com.fr.design.module.DesignModuleFactory; @@ -43,9 +41,6 @@ public class XChartEditor extends XBorderStyleWidgetCreator { //marro:无奈的属性,暂时想不出好办法 private boolean isRefreshing = false; - private boolean isEditing = false; - private JPanel coverPanel; - public XChartEditor(BaseChartEditor editor) { this(editor, new Dimension(250, 150)); } @@ -147,22 +142,17 @@ public class XChartEditor extends XBorderStyleWidgetCreator { } }); - if (isEditing){ - final BaseChartPropertyPane propertyPane = DesignModuleFactory.getChartPropertyPane(); - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - if (getDesignerEditor().getEditorTarget() != null) { - propertyPane.setSupportCellData(true); - propertyPane.populateChartPropertyPane(getDesignerEditorTarget().update(), formDesigner); - } + final BaseChartPropertyPane propertyPane = DesignModuleFactory.getChartWidgetPropertyPane(formDesigner); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + if (getDesignerEditor().getEditorTarget() != null) { + propertyPane.setSupportCellData(true); + propertyPane.populateChartPropertyPane(getDesignerEditorTarget().update(), formDesigner); } - }); - return (JComponent)propertyPane; - } - else{ - return (JComponent)DesignModuleFactory.getWidgetPropertyPane(formDesigner); - } + } + }); + return (JComponent)propertyPane; } private MiddleChartComponent getDesignerEditorTarget() { @@ -177,8 +167,8 @@ public class XChartEditor extends XBorderStyleWidgetCreator { * 渲染Painter */ public void paint(Graphics g) { - designerEditor.paintEditor(g, this.getSize()); super.paint(g); + designerEditor.paintEditor(g, this.getSize()); } /** @@ -190,27 +180,6 @@ public class XChartEditor extends XBorderStyleWidgetCreator { return new Dimension(250, 100); } - /** - * 响应点击事件 - * - * @param editingMouseListener 鼠标点击,位置处理器 - * @param e 鼠标点击事件 - */ - public void respondClick(EditingMouseListener editingMouseListener,MouseEvent e){ - FormDesigner designer = editingMouseListener.getDesigner(); - SelectionModel selectionModel = editingMouseListener.getSelectionModel(); - isEditing = e.getClickCount() == 2 || designer.getCursor().getType() == Cursor.HAND_CURSOR; - displayCoverPane(!isEditing); - selectionModel.selectACreatorAtMouseEvent(e); - - if (editingMouseListener.stopEditing()) { - if (this != (XCreator)designer.getRootComponent()) { - ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this); - editingMouseListener.startEditing(this, isEditing ? adapter.getDesignerEditor() : null, adapter); - } - } - } - @Override protected JComponent initEditor() { if (designerEditor == null) { @@ -229,36 +198,6 @@ public class XChartEditor extends XBorderStyleWidgetCreator { }); } } - - if (editor == null) { - setBorder(DEFALUTBORDER); - editor = new JPanel(); - editor.setBackground(null); - editor.setLayout(null); - editor.setOpaque(false); - - coverPanel = new CoverReportPane(); - coverPanel.setPreferredSize(this.getPreferredSize()); - coverPanel.setBounds(this.getBounds()); - - editor.add(coverPanel); - coverPanel.setVisible(false); - } - return editor; - } - - /** - * 是否展现覆盖的pane - * @param display 是否 - */ - public void displayCoverPane(boolean display){ - coverPanel.setVisible(display); - coverPanel.setPreferredSize(editor.getPreferredSize()); - coverPanel.setBounds(editor.getBounds()); - editor.repaint(); - } - - public JComponent getCoverPane(){ - return coverPanel; + return null; } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XCreator.java b/designer_form/src/com/fr/design/designer/creator/XCreator.java index c9b05f9b60..518e9c27ae 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreator.java @@ -105,14 +105,6 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo public void backupParent() { setBackupParent(XCreatorUtils.getParentXLayoutContainer(this)); } - - /** - * 获取当前布局控件的顶层布局框架,如tab布局、绝对布局 - * @return 封装的顶层布局 - */ - public XLayoutContainer getTopLayout(){ - return null; - } /** * 获取当前XCreator的一个封装父容器 diff --git a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java index ea27490fa7..fec4899a85 100644 --- a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java +++ b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java @@ -41,16 +41,6 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme protected boolean isRefreshing; protected int default_Length = 5; // 取指定点坐在的组件,默认为5保证取四侧相邻的组件时x、y在组件内非边框上 - /** - * 布局是否可编辑,不可则显示编辑层 - */ - protected boolean editable = false; - //鼠标移动到布局画出编辑层 - protected boolean isMouseEnter = false; - public void setMouseEnter(boolean mouseEnter) { - isMouseEnter = mouseEnter; - } - public XLayoutContainer(WLayout widget, Dimension initSize) { super(widget, initSize); this.addContainerListener(this); @@ -456,20 +446,4 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme public void setBackground(Background background){ } - - /** - * 布局是否可编辑,不可则显示编辑蒙层 - * @return 可否编辑 - */ - public boolean isEditable(){ - return this.editable; - } - - /** - * 设置布局是否可编辑,不可则显示编辑蒙层 - * @param isEditable 可否编辑 - */ - public void setEditable(boolean isEditable){ - this.editable = isEditable; - } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index 0c459b61cd..652331d1f6 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -12,7 +12,6 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.XButton; -import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.mainframe.EditingMouseListener; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormHierarchyTreePane; @@ -150,8 +149,6 @@ public class XCardAddButton extends XButton{ XCardSwitchButton showButton = new XCardSwitchButton(titleButton,dimension,cardLayout,tagLayout); titleButton.setCustomStyle(true); titleButton.setShowButton(true); - showButton.setBackupParent(tagLayout); - this.tagLayout.setCurrentCard(titleButton); this.tagLayout.setTabFitIndex(index); @@ -183,9 +180,4 @@ public class XCardAddButton extends XButton{ } return newTextName; } - - @Override - public XLayoutContainer getTopLayout() { - return this.getBackupParent().getTopLayout(); - } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index c75fc2542b..c10287d006 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -292,10 +292,5 @@ public class XCardSwitchButton extends XButton { FormHierarchyTreePane.getInstance().refreshRoot(); selectionModel.setSelectedCreator(designer.getRootComponent()); } - - @Override - public XLayoutContainer getTopLayout() { - return this.getBackupParent().getTopLayout(); - } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 621f4c5f5e..49eeb92117 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -367,9 +367,4 @@ public class XWCardLayout extends XLayoutContainer { mainLayout.setBorder(border); } } - - @Override - public XLayoutContainer getTopLayout() { - return this.getBackupParent().getTopLayout(); - } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java index b9039b1d6e..003bde4a4f 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java @@ -3,24 +3,18 @@ */ package com.fr.design.designer.creator.cardlayout; -import java.awt.*; -import java.awt.event.MouseEvent; -import java.awt.image.BufferedImage; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; import java.util.ArrayList; -import com.fr.design.designer.beans.AdapterBus; -import com.fr.design.designer.beans.ComponentAdapter; -import com.fr.design.designer.beans.models.SelectionModel; + + + import com.fr.design.designer.creator.XCreator; -import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWBorderLayout; -import com.fr.design.icon.IconPathConstants; -import com.fr.design.mainframe.EditingMouseListener; -import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; -import com.fr.general.IOUtils; -import com.fr.general.Inter; /** * card布局主体框架 @@ -37,9 +31,6 @@ public class XWCardMainBorderLayout extends XWBorderLayout{ private static final int LAYOUT_INDEX = 0; private static final int TITLE_STYLE = 2; private static final int NORMAL_STYLE = 1; - - private static final int EDIT_BTN_WIDTH = 60; - private static final int EDIT_BTN_HEIGHT = 24; /** * 构造函数 @@ -133,7 +124,7 @@ public class XWCardMainBorderLayout extends XWBorderLayout{ /** * 重新调整子组件的宽度 - * @param width 宽度 + * @param 宽度 */ public void recalculateChildWidth(int width){ ArrayList childrenList = this.getTargetChildrenList(); @@ -197,72 +188,4 @@ public class XWCardMainBorderLayout extends XWBorderLayout{ } } - - public void paint(Graphics g) { - super.paint(g); - //如果鼠标移动到布局内且布局不可编辑,画出编辑蒙层 - if (isMouseEnter && !editable) { - int x = 0; - int y = 0; - int w = getWidth(); - int h = getHeight(); - - Graphics2D g2d = (Graphics2D) g; - Composite oldComposite = g2d.getComposite(); - //画白色的编辑层 - g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 60 / 100.0F)); - g2d.setColor(Color.WHITE); - g2d.fillRect(x, y, w, h); - //画编辑按钮所在框 - g2d.setComposite(oldComposite); - g2d.setColor(new Color(176, 196, 222)); - g2d.fillRect((x + w / 2 - EDIT_BTN_WIDTH / 2), (y + h / 2 - EDIT_BTN_HEIGHT / 2), EDIT_BTN_WIDTH, EDIT_BTN_HEIGHT); - //画编辑按钮图标 - BufferedImage image = IOUtils.readImage(IconPathConstants.TD_EDIT_ICON_PATH); - g2d.drawImage( - image, - (x + w / 2 - 23), - (y + h / 2 - image.getHeight() / 2), - image.getWidth(), - image.getHeight(), - null, - this - ); - g2d.setColor(Color.BLACK); - //画编辑文字 - g2d.drawString(Inter.getLocText("Edit"), x + w / 2 - 2, y + h / 2 + 5); - } - } - - /** - * 响应点击事件 - * - * @param editingMouseListener 鼠标点击,位置处理器 - * @param e 鼠标点击事件 - */ - public void respondClick(EditingMouseListener editingMouseListener,MouseEvent e){ - FormDesigner designer = editingMouseListener.getDesigner(); - SelectionModel selectionModel = editingMouseListener.getSelectionModel(); - boolean isEditing = designer.getCursor().getType() == Cursor.HAND_CURSOR || e.getClickCount() == 2; - setEditable(isEditing); - - selectionModel.selectACreatorAtMouseEvent(e); - designer.repaint(); - - if (editingMouseListener.stopEditing()) { - if (this != designer.getRootComponent()) { - ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this); - editingMouseListener.startEditing(this, isEditing ? adapter.getDesignerEditor() : null, adapter); - } - } - } - - /** - * XWCardMainBorderLayout是card布局主体框架,tab的顶层布局 - * @return - */ - @Override - public XLayoutContainer getTopLayout() { - return this; - } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java index e40a7ca871..bd844b53eb 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java @@ -13,7 +13,6 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.XCreatorUtils; -import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWHorizontalBoxLayout; import com.fr.design.designer.creator.XWidgetCreator; import com.fr.design.mainframe.EditingMouseListener; @@ -215,9 +214,4 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout { } } } - - @Override - public XLayoutContainer getTopLayout() { - return this.getBackupParent().getTopLayout(); - } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTitleLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTitleLayout.java index 1514ed4034..8f83a1fab7 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTitleLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTitleLayout.java @@ -12,7 +12,6 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.XCreatorUtils; -import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWBorderLayout; import com.fr.design.designer.creator.XWidgetCreator; import com.fr.design.mainframe.EditingMouseListener; @@ -147,9 +146,4 @@ public class XWCardTitleLayout extends XWBorderLayout { } } } - - @Override - public XLayoutContainer getTopLayout() { - return this.getBackupParent().getTopLayout(); - } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index b247d0bfcf..d8a5e0b431 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -188,7 +188,7 @@ public class XWTabFitLayout extends XWFitLayout { /** * 该布局需要隐藏,无需对边框进行操作 - * @param border 边框 + * @param 边框 * */ public void setBorder(Border border) { @@ -362,9 +362,4 @@ public class XWTabFitLayout extends XWFitLayout { this.hasCalGap = true; } - - @Override - public XLayoutContainer getTopLayout() { - return this.getBackupParent().getTopLayout(); - } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java b/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java index e66b37552a..00dd905b15 100644 --- a/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java @@ -18,7 +18,12 @@ import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.location.Location; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.beans.models.StateModel; -import com.fr.design.designer.creator.*; +import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XCreatorUtils; +import com.fr.design.designer.creator.XEditorHolder; +import com.fr.design.designer.creator.XElementCase; +import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.xpane.ToolTipEditor; @@ -40,10 +45,6 @@ public class EditingMouseListener extends MouseInputAdapter { * 普通模式下对应的model */ private StateModel stateModel; - - - private XLayoutContainer xTopLayoutContainer; - private XLayoutContainer clickTopLayout; /** * 获取表单设计器 @@ -83,14 +84,10 @@ public class EditingMouseListener extends MouseInputAdapter { private int minDragSize = 5; private int minMoveSize = 8; - - private static final int EDIT_BTN_WIDTH = 60; - private static final int EDIT_BTN_HEIGHT = 24; //报表块的编辑按钮不灵敏,范围扩大一点 private static final int GAP = 10; private XElementCase xElementCase; - private XChartEditor xChartEditor; private JWindow promptWindow = new JWindow(); @@ -247,12 +244,6 @@ public class EditingMouseListener extends MouseInputAdapter { */ public void mouseMoved(MouseEvent e) { XCreator component = designer.getComponentAt(e); - - setCoverPaneNotDisplay(); - - if(processTopLayoutMouseMove(component, e)){ - return; - } if (component instanceof XEditorHolder) { XEditorHolder xcreator = (XEditorHolder) component; Rectangle rect = xcreator.getBounds(); @@ -276,15 +267,17 @@ public class EditingMouseListener extends MouseInputAdapter { if (!BaseUtils.isAuthorityEditing()) { stateModel.setDirection(dir); } - + if(xElementCase != null){ + xElementCase.displayCoverPane(false); + } if (component.isReport()) { xElementCase = (XElementCase)component; UIButton button = (UIButton)xElementCase.getCoverPane().getComponent(0); if(designer.getCursor().getType() ==Cursor.HAND_CURSOR) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } // component.getParent() 是报表块所在的XWTitleLayout - int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + int minX = button.getX() + component.getX() + component.getParent().getX() - designer.getArea().getHorizontalValue(); + int minY = button.getY() + component.getY() + component.getParent().getY() + designer.getParaHeight() - designer.getArea().getVerticalValue(); if(e.getX() + GAP > minX && e.getX() - GAP < minX + button.getWidth()){ if( e.getY() + GAP > minY && e.getY() - GAP < minY + button.getHeight()){ designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); @@ -292,84 +285,16 @@ public class EditingMouseListener extends MouseInputAdapter { } xElementCase.displayCoverPane(true); xElementCase.setDirections(Direction.TOP_BOTTOM_LEFT_RIGHT); - designer.repaint(); - return; + } else { + if(xElementCase != null){ + xElementCase.displayCoverPane(false); + designer.repaint(); + } } - - processChartEditorMouseMove(component, e); - - designer.repaint(); - } - - private void setCoverPaneNotDisplay(){ - if (xElementCase != null){ - xElementCase.displayCoverPane(false); - } - if (xChartEditor != null){ - xChartEditor.displayCoverPane(false); - } - - if (xTopLayoutContainer != null) { - xTopLayoutContainer.setMouseEnter(false); - } - designer.repaint(); - } - - private boolean processTopLayoutMouseMove(XCreator component, MouseEvent e){ - XLayoutContainer parent = XCreatorUtils.getHotspotContainer(component).getTopLayout(); - if (parent != null){ - xTopLayoutContainer = parent; - xTopLayoutContainer.setMouseEnter(true); - designer.repaint(); - if(!xTopLayoutContainer.isEditable()) { - if (designer.getCursor().getType() == Cursor.HAND_CURSOR) { - designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - } - if (e.getX() > (parent.getX() + parent.getWidth() / 2 - EDIT_BTN_WIDTH / 2 - GAP) - && e.getX() < (parent.getX() + parent.getWidth() / 2 + EDIT_BTN_WIDTH / 2 + GAP)) { - if (e.getY() > (parent.getY() + parent.getHeight() / 2 - EDIT_BTN_HEIGHT / 2 - GAP) - && e.getY() < (parent.getY() + parent.getHeight() / 2 + EDIT_BTN_HEIGHT / 2 + GAP + designer.getParaHeight())) { - designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - } - } - return true; - } - } - return false; - } - - private void processChartEditorMouseMove(XCreator component, MouseEvent e){ - if (component instanceof XChartEditor) { - xChartEditor = (XChartEditor)component; - UIButton button = (UIButton)xChartEditor.getCoverPane().getComponent(0); - if(designer.getCursor().getType() ==Cursor.HAND_CURSOR) { - designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - } - int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); - if(e.getX() + GAP > minX && e.getX() - GAP < minX + button.getWidth()){ - if( e.getY() + GAP > minY && e.getY() - GAP < minY + button.getHeight()){ - designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - } - } - xChartEditor.displayCoverPane(true); - xChartEditor.setDirections(Direction.TOP_BOTTOM_LEFT_RIGHT); - designer.repaint(); - } - } - - private int getParentPositionX(XCreator comp, int x){ - return comp.getParent() == null ? - x : getParentPositionX((XCreator)comp.getParent(), comp.getParent().getX() + x); - } - - private int getParentPositionY(XCreator comp, int y) { - return comp.getParent() == null ? - y : getParentPositionY((XCreator) comp.getParent(), comp.getParent().getY() + y); } - /** + /** * 拖拽 * @param e 鼠标事件 */ @@ -417,25 +342,6 @@ public class EditingMouseListener extends MouseInputAdapter { designer.repaint(); } - private XCreator processTopLayoutMouseClick(XCreator creator){ - XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(creator).getTopLayout(); - if(topLayout != null){ - if (clickTopLayout != null && clickTopLayout != topLayout){ - clickTopLayout.setEditable(false); - } - clickTopLayout = topLayout; - if(!topLayout.isEditable()) { - creator = topLayout; - } - } - else{ - if(clickTopLayout != null){ - clickTopLayout.setEditable(false); - } - } - - return creator; - } /** * 点击 * @param e 鼠标事件 @@ -445,9 +351,6 @@ public class EditingMouseListener extends MouseInputAdapter { return; } XCreator creator = designer.getComponentAt(e); - - creator = processTopLayoutMouseClick(creator); - if(creator != null){ creator.respondClick(this, e); } @@ -465,9 +368,10 @@ public class EditingMouseListener extends MouseInputAdapter { if (designer.getCursor().getType() != Cursor.DEFAULT_CURSOR) { designer.setCursor(Cursor.getDefaultCursor()); } - - setCoverPaneNotDisplay(); - + if (xElementCase != null){ + xElementCase.displayCoverPane(false); + designer.repaint(); + } cancelPromptWidgetForbidEnter(); } From 69483fcc2fa04533f22bf12667c6c63e2ee64a67 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Thu, 14 Jul 2016 16:27:09 +0800 Subject: [PATCH 38/39] update --- .../impl/ChartHyperPoplinkPane.java | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java index 308df92b2c..614cbd3502 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -43,8 +43,22 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { hyperEditPane = new ChartHyperEditPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); this.add(hyperEditPane, BorderLayout.CENTER); + ChartCollection cc = createChartCollection(); - ChartCollection cc = new ChartCollection(); + chartComponent = new ChartComponent(); + chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小. + chartComponent.setSupportEdit(false); + chartComponent.populate(cc); + + this.add(chartComponent, BorderLayout.EAST); + + hyperEditPane.populate(cc); + + hyperEditPane.useChartComponent(chartComponent); + } + + private ChartCollection createChartCollection() { + ChartCollection cc = new ChartCollection(); Chart chart = ChartTypeManager.getFirstChart(); if (chart != null){ @@ -57,20 +71,10 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { }else { cc.addChart(new Chart(new Bar2DPlot())); } - - chartComponent = new ChartComponent(); - chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小. - chartComponent.setSupportEdit(false); - chartComponent.populate(cc); - - this.add(chartComponent, BorderLayout.EAST); - - hyperEditPane.populate(cc); - - hyperEditPane.useChartComponent(chartComponent); - } - - protected int getChartParaType() { + return cc; + } + + protected int getChartParaType() { return ParameterTableModel.CHART_NORMAL_USE; } @@ -99,8 +103,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { BaseChartCollection cc = chartHyperlink.getChartCollection(); if (cc == null || cc.getChartCount() < 1) { - cc = new ChartCollection(); - cc.addChart(new Chart(ChartFactory.createBar2DPlot())); + cc = createChartCollection(); chartHyperlink.setChartCollection(cc); } From db4e6bfe47cdea73295315bc3ef5657e094aa0ba Mon Sep 17 00:00:00 2001 From: xiaohu Date: Fri, 15 Jul 2016 09:35:14 +0800 Subject: [PATCH 39/39] =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/beans/BasicBeanPane.java | 1 + .../images/form/toolbar/ChartF-MultiPie.png | Bin 861 -> 0 bytes .../design/images/form/toolbar/ChartF-TreeMap.png | Bin 269 -> 0 bytes .../poly/toolbar/Plugin-ChartF_NewMultiPie.png | Bin 861 -> 0 bytes .../poly/toolbar/Plugin-ChartF_NewTreeMap.png | Bin 269 -> 0 bytes 5 files changed, 1 insertion(+) delete mode 100644 designer_base/src/com/fr/design/images/form/toolbar/ChartF-MultiPie.png delete mode 100644 designer_base/src/com/fr/design/images/form/toolbar/ChartF-TreeMap.png delete mode 100644 designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMultiPie.png delete mode 100644 designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewTreeMap.png diff --git a/designer_base/src/com/fr/design/beans/BasicBeanPane.java b/designer_base/src/com/fr/design/beans/BasicBeanPane.java index ac0ab63d89..73209de082 100644 --- a/designer_base/src/com/fr/design/beans/BasicBeanPane.java +++ b/designer_base/src/com/fr/design/beans/BasicBeanPane.java @@ -7,6 +7,7 @@ import com.fr.design.dialog.BasicPane; */ public abstract class BasicBeanPane extends BasicPane { + /** * Populate. */ diff --git a/designer_base/src/com/fr/design/images/form/toolbar/ChartF-MultiPie.png b/designer_base/src/com/fr/design/images/form/toolbar/ChartF-MultiPie.png deleted file mode 100644 index b6bca9a3ebe316d1f83cbcd8357652531cdf02fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 861 zcmV-j1ETziP)vCP|^=Aq{$;pU{n0m+>E3`b|ebZaBoG} z@Ci)a)eJ=Dl7(BgtpN+c5)^!kE3hQ$TpHzOe!B`7(gIHBJrvDIM6fn%bz+p*tCnZ( zY*a*Io!qdA;MmJ6X$^#t3^g$fiHjQ3Dwjk=U{rD)L?g&SDG0Bw8r&|mrjw?SO_+{c zWMdI%$EegXB0QgiY%i*L49aVas zXZ&Ijb(b7^&XN*;bR n-0O_nDgF5CfAqihM}PqUQ)GI6k}nhj00000NkvXXu0mjft-O5f diff --git a/designer_base/src/com/fr/design/images/form/toolbar/ChartF-TreeMap.png b/designer_base/src/com/fr/design/images/form/toolbar/ChartF-TreeMap.png deleted file mode 100644 index 09edd2b77ec413c2eead3db6bcddafc3ecafbc74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|&H|6fVg?3oVGw3ym^DWNC@5Lt z8c`CQpH@+2u$DqB_b`ZBbhKY7Yyk0WJBDTtpeq?X MUHx3vIVCg!01hT#rT_o{ diff --git a/designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMultiPie.png b/designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMultiPie.png deleted file mode 100644 index b6bca9a3ebe316d1f83cbcd8357652531cdf02fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 861 zcmV-j1ETziP)vCP|^=Aq{$;pU{n0m+>E3`b|ebZaBoG} z@Ci)a)eJ=Dl7(BgtpN+c5)^!kE3hQ$TpHzOe!B`7(gIHBJrvDIM6fn%bz+p*tCnZ( zY*a*Io!qdA;MmJ6X$^#t3^g$fiHjQ3Dwjk=U{rD)L?g&SDG0Bw8r&|mrjw?SO_+{c zWMdI%$EegXB0QgiY%i*L49aVas zXZ&Ijb(b7^&XN*;bR n-0O_nDgF5CfAqihM}PqUQ)GI6k}nhj00000NkvXXu0mjft-O5f diff --git a/designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewTreeMap.png b/designer_base/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewTreeMap.png deleted file mode 100644 index 09edd2b77ec413c2eead3db6bcddafc3ecafbc74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|&H|6fVg?3oVGw3ym^DWNC@5Lt z8c`CQpH@+2u$DqB_b`ZBbhKY7Yyk0WJBDTtpeq?X MUHx3vIVCg!01hT#rT_o{