From 2cf21f8842c7b91f5f8319e574dd35da36b4db1a Mon Sep 17 00:00:00 2001 From: xiaohu Date: Wed, 27 Apr 2016 18:06:21 +0800 Subject: [PATCH 01/18] update --- .../gui/data/table/BubblePlotTableDataContentPane.java | 8 ++++---- .../chart/gui/style/series/BubbleSeriesPane.java | 3 ++- .../chart/gui/style/series/CombinedBubbleSeriesPane.java | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java index 8e39c83981..73c5f1b180 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java @@ -52,10 +52,10 @@ public class BubblePlotTableDataContentPane extends AbstractTableDataContentPane double[] columnSize_north = {p, f}; double[] rowSize_north = {p, p, p, p}; Component[][] components_north = new Component[][]{ - new Component[]{new UILabel(" "+Inter.getLocText("Chart-Series_Name")+":"), seriesName}, - new Component[]{new UILabel(" " +"x :"), xCombox}, - new Component[]{new UILabel(" " +"y :"), yCombox}, - new Component[]{new UILabel(" "+Inter.getLocText("FR-Chart_Bubble_Size")+":"), bubbleSize}, + new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")+":", SwingConstants.RIGHT), seriesName}, + new Component[]{new UILabel("x :",SwingConstants.RIGHT), xCombox}, + new Component[]{new UILabel("y :",SwingConstants.RIGHT), yCombox}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), bubbleSize} }; JPanel north = TableLayoutHelper.createTableLayoutPane(components_north,rowSize_north,columnSize_north); north.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/BubbleSeriesPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/BubbleSeriesPane.java index 86f0cb280c..cbd0529743 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/BubbleSeriesPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/BubbleSeriesPane.java @@ -45,7 +45,8 @@ public class BubbleSeriesPane extends AbstractPlotSeriesPane{ super.updateBean(plot); BubblePlot bubblePlot = (BubblePlot) plot; bubblePlot.setSeriesEqualsBubbleInWidthOrArea(bubbleMean.getSelectedItem()); - bubblePlot.setMaxBubblePixel(Utils.string2Number(zoomTime.getText()).doubleValue()); + Number result = Utils.string2Number(zoomTime.getText()); + bubblePlot.setMaxBubblePixel(result == null ? 0 : result.doubleValue()); bubblePlot.setShowNegativeBubble(isMinus.isSelected()); } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CombinedBubbleSeriesPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CombinedBubbleSeriesPane.java index 2aec32a2eb..2225723256 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CombinedBubbleSeriesPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CombinedBubbleSeriesPane.java @@ -56,7 +56,8 @@ public class CombinedBubbleSeriesPane extends BubbleSeriesPane{ public void updateBean(Plot plot) { super.updateBean(plot); - plot.setCombinedSize(Utils.string2Number(zoomTime.getText()).doubleValue()); + Number result = Utils.string2Number(zoomTime.getText()); + plot.setCombinedSize(result == null ? 0 : result.doubleValue()); plot.setPlotFillStyle(fillColorPane.updateBean()); } } \ No newline at end of file From b85e64fa59224b75ad512e1420f2e9cf0933c46d Mon Sep 17 00:00:00 2001 From: zack Date: Thu, 28 Apr 2016 13:44:21 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=88=86?= =?UTF-8?q?=E7=BB=84=E6=8F=92=E4=BB=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/BasicTableDataTreePane.java | 17 ----------------- .../data/datapane/TableDataTreePane.java | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java b/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java index 92771cf3a8..32049380d5 100644 --- a/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java @@ -269,23 +269,6 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp } } - protected void initbuttonGroup(final TableDataSourceOP op) { - Icon[] iconArray = {BaseUtils.readIcon("/com/fr/design/images/data/datasource.png"), BaseUtils.readIcon("/com/fr/design/images/data/dock/serverdatabase.png")}; - final Integer[] modeArray = {TEMPLATE_TABLE_DATA, SERVER_TABLE_DATA}; - String[] textArray = {Inter.getLocText(new String[]{"Template", "DS-TableData"}), Inter.getLocText("DS-Server_TableData")}; - buttonGroup = new UIHeadGroup(iconArray, textArray) { - public void tabChanged(int index) { - if (op != null) { - op.setDataMode(modeArray[buttonGroup.getSelectedIndex()]); - addMenuDef.setEnabled(modeArray[buttonGroup.getSelectedIndex()] == TEMPLATE_TABLE_DATA ? true : false); - refreshDockingView(); - } - - } - }; - buttonGroup.setNeedLeftRightOutLine(false); - } - protected void createAddMenuDef() { TableDataNameObjectCreator[] creators = TableDataCreatorProducer.getInstance().createReportTableDataCreator(); for (final TableDataNameObjectCreator creator : creators) { diff --git a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java index e9f1074ff8..1065783624 100644 --- a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java @@ -15,6 +15,7 @@ import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.fun.TableDataTreePaneProcessor; +import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itoolbar.UIToolbar; @@ -102,7 +103,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { UIScrollPane scrollPane = new UIScrollPane(dataTree); scrollPane.setBorder(null); - initbuttonGroup(op); + initbuttonGroup(); JPanel jPanel = new JPanel(new BorderLayout(4, 4)); JPanel buttonPane = new JPanel(new GridLayout()); buttonPane.add(buttonGroup, BorderLayout.CENTER); @@ -137,6 +138,21 @@ public class TableDataTreePane extends BasicTableDataTreePane { populate(new TableDataSourceOP(tc)); this.checkButtonEnabled(); } + protected void initbuttonGroup() { + Icon[] iconArray = {BaseUtils.readIcon("/com/fr/design/images/data/datasource.png"), BaseUtils.readIcon("/com/fr/design/images/data/dock/serverdatabase.png")}; + final Integer[] modeArray = {TEMPLATE_TABLE_DATA, SERVER_TABLE_DATA}; + String[] textArray = {Inter.getLocText(new String[]{"Template", "DS-TableData"}), Inter.getLocText("DS-Server_TableData")}; + buttonGroup = new UIHeadGroup(iconArray, textArray) { + public void tabChanged(int index) { + if (op != null) { + op.setDataMode(modeArray[buttonGroup.getSelectedIndex()]); + addMenuDef.setEnabled(modeArray[buttonGroup.getSelectedIndex()] == TEMPLATE_TABLE_DATA ? true : false); + refreshDockingView(); + } + } + }; + buttonGroup.setNeedLeftRightOutLine(false); + } /** * 编辑面板 From 54b0ac13b7993d10b50f39a1e41303d46b74edc9 Mon Sep 17 00:00:00 2001 From: vito Date: Tue, 3 May 2016 11:29:53 +0800 Subject: [PATCH 03/18] =?UTF-8?q?1=E3=80=81=E6=9B=B4=E6=96=B0=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E6=A1=86=E5=9C=A8=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E8=83=8C=E9=9D=A2=E7=9A=84=E9=97=AE=E9=A2=98=202=E3=80=81?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=8F=92=E4=BB=B6=E5=92=8C=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=97=B6=E6=8F=90=E9=86=92=E7=99=BB=E9=99=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/extra/PluginManagerPane.java | 10 ++- .../extra/exe/InstallOnlineExecutor.java | 29 +++++--- .../extra/exe/UpdateOnlineExecutor.java | 71 ++++++++++--------- 3 files changed, 65 insertions(+), 45 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/PluginManagerPane.java b/designer_base/src/com/fr/design/extra/PluginManagerPane.java index ae64f58a67..36948fe365 100644 --- a/designer_base/src/com/fr/design/extra/PluginManagerPane.java +++ b/designer_base/src/com/fr/design/extra/PluginManagerPane.java @@ -42,6 +42,7 @@ public class PluginManagerPane extends BasicPane { if (StableUtils.isDebug()) { URL url = ClassLoader.getSystemResource(""); installHome = url.getPath(); + addPane(installHome); } else { installHome = StableUtils.getInstallHome(); File file = new File(StableUtils.pathJoin(installHome, "scripts")); @@ -57,16 +58,21 @@ public class PluginManagerPane extends BasicPane { downloadShopScripts(); } } else { + addPane(installHome); updateShopScripts(); } } - PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath()); - add(webPane, BorderLayout.CENTER); } else { initTraditionalStore(); } } + private void addPane(String installHome) { + PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath()); + add(webPane, BorderLayout.CENTER); + } + + private void initTraditionalStore() { UITabbedPane tabbedPane = new UITabbedPane(); add(tabbedPane, BorderLayout.CENTER); diff --git a/designer_base/src/com/fr/design/extra/exe/InstallOnlineExecutor.java b/designer_base/src/com/fr/design/extra/exe/InstallOnlineExecutor.java index d343ec590c..70509575de 100644 --- a/designer_base/src/com/fr/design/extra/exe/InstallOnlineExecutor.java +++ b/designer_base/src/com/fr/design/extra/exe/InstallOnlineExecutor.java @@ -4,10 +4,12 @@ import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.RestartHelper; import com.fr.design.extra.After; +import com.fr.design.extra.LoginCheckContext; import com.fr.design.extra.PluginHelper; import com.fr.design.extra.Process; import com.fr.general.Inter; import com.fr.plugin.PluginVerifyException; +import com.fr.stable.StringUtils; import javax.swing.*; @@ -38,17 +40,22 @@ public class InstallOnlineExecutor implements Executor { @Override public void run(final Process process) { - String username = DesignerEnvManager.getEnvManager().getBBSName(); - String password = DesignerEnvManager.getEnvManager().getBBSPassword(); - try { - PluginHelper.downloadPluginFile(pluginID, username, password, new Process() { - @Override - public void process(Double integer) { - process.process(Math.round(integer * 100) + "%"); - } - }); - } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + if(StringUtils.isBlank(DesignerEnvManager.getEnvManager().getBBSName())){ + LoginCheckContext.fireLoginCheckListener(); + } + if(StringUtils.isNotBlank(DesignerEnvManager.getEnvManager().getBBSName())) { + String username = DesignerEnvManager.getEnvManager().getBBSName(); + String password = DesignerEnvManager.getEnvManager().getBBSPassword(); + try { + PluginHelper.downloadPluginFile(pluginID, username, password, new Process() { + @Override + public void process(Double integer) { + process.process(Math.round(integer * 100) + "%"); + } + }); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } } } }, diff --git a/designer_base/src/com/fr/design/extra/exe/UpdateOnlineExecutor.java b/designer_base/src/com/fr/design/extra/exe/UpdateOnlineExecutor.java index f1c3b0f040..30fe078969 100644 --- a/designer_base/src/com/fr/design/extra/exe/UpdateOnlineExecutor.java +++ b/designer_base/src/com/fr/design/extra/exe/UpdateOnlineExecutor.java @@ -4,11 +4,13 @@ import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.RestartHelper; import com.fr.design.extra.After; +import com.fr.design.extra.LoginCheckContext; import com.fr.design.extra.PluginHelper; import com.fr.design.extra.Process; import com.fr.general.Inter; import com.fr.plugin.Plugin; import com.fr.plugin.PluginLoader; +import com.fr.stable.StringUtils; import javax.swing.*; import java.io.File; @@ -41,41 +43,46 @@ public class UpdateOnlineExecutor implements Executor { @Override public void run(Process process) { - for (int i = 0; i < pluginIDs.length; i++) { - Plugin plugin = PluginLoader.getLoader().getPluginById(pluginIDs[i]); - String id = null; - if (plugin != null) { - id = plugin.getId(); + if(StringUtils.isBlank(DesignerEnvManager.getEnvManager().getBBSName())){ + LoginCheckContext.fireLoginCheckListener(); + } + if(StringUtils.isNotBlank(DesignerEnvManager.getEnvManager().getBBSName())){ + for (int i = 0; i < pluginIDs.length; i++) { + Plugin plugin = PluginLoader.getLoader().getPluginById(pluginIDs[i]); + String id = null; + if (plugin != null) { + id = plugin.getId(); + } + String username = DesignerEnvManager.getEnvManager().getBBSName(); + String password = DesignerEnvManager.getEnvManager().getBBSPassword(); + try { + PluginHelper.downloadPluginFile(id, username, password, new Process() { + @Override + public void process(Double integer) { + } + }); + updateFileFromDisk(PluginHelper.getDownloadTempFile()); + process.process(PERCENT_100 / pluginIDs.length * (i + 1) + "%"); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } } - String username = DesignerEnvManager.getEnvManager().getBBSName(); - String password = DesignerEnvManager.getEnvManager().getBBSPassword(); - try { - PluginHelper.downloadPluginFile(id, username, password, new Process() { - @Override - public void process(Double integer) { - } - }); - updateFileFromDisk(PluginHelper.getDownloadTempFile()); - process.process(PERCENT_100 / pluginIDs.length * (i + 1) + "%"); - } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + int rv = JOptionPane.showOptionDialog( + null, + Inter.getLocText("FR-Designer-Plugin_Update_Successful"), + Inter.getLocText("FR-Designer-Plugin_Warning"), + JOptionPane.YES_NO_OPTION, + JOptionPane.INFORMATION_MESSAGE, + null, + new String[]{Inter.getLocText("FR-Designer-Basic_Restart_Designer"), + Inter.getLocText("FR-Designer-Basic_Restart_Designer_Later") + }, + null + ); + if (rv == JOptionPane.OK_OPTION) { + RestartHelper.restart(); } } - int rv = JOptionPane.showOptionDialog( - null, - Inter.getLocText("FR-Designer-Plugin_Update_Successful"), - Inter.getLocText("FR-Designer-Plugin_Warning"), - JOptionPane.YES_NO_OPTION, - JOptionPane.INFORMATION_MESSAGE, - null, - new String[]{Inter.getLocText("FR-Designer-Basic_Restart_Designer"), - Inter.getLocText("FR-Designer-Basic_Restart_Designer_Later") - }, - null - ); - if (rv == JOptionPane.OK_OPTION) { - RestartHelper.restart(); - } } } }; From 04598ff0a07acc02d5cb30bb0ea5fb6a112090c2 Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 6 May 2016 10:21:16 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/ExtraDesignClassManager.java | 16 ++++++++-------- ...ovider.java => WidgetPropertyUIProvider.java} | 4 ++-- .../fun/impl/AbstractWidgetAttrProvider.java | 4 ++-- .../fr/design/mainframe/WidgetPropertyPane.java | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) rename designer_base/src/com/fr/design/fun/{WidgetAttrProvider.java => WidgetPropertyUIProvider.java} (71%) diff --git a/designer_base/src/com/fr/design/ExtraDesignClassManager.java b/designer_base/src/com/fr/design/ExtraDesignClassManager.java index a861772c9a..1f99e6e455 100644 --- a/designer_base/src/com/fr/design/ExtraDesignClassManager.java +++ b/designer_base/src/com/fr/design/ExtraDesignClassManager.java @@ -130,7 +130,7 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi private Set elementUIProviders; - private Set widgetAttrProviders; + private Set widgetAttrProviders; public TableDataTreePaneProcessor getTableDataTreePaneProcessor() { return tableDataTreePaneProcessor; @@ -738,19 +738,19 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi elementUIProviders.add((ElementUIProvider) level); } - public WidgetAttrProvider[] getWidgetAttrProviders() { + public WidgetPropertyUIProvider[] getWidgetAttrProviders() { if (widgetAttrProviders == null) { - return new WidgetAttrProvider[0]; + return new WidgetPropertyUIProvider[0]; } - return widgetAttrProviders.toArray(new WidgetAttrProvider[widgetAttrProviders.size()]); + return widgetAttrProviders.toArray(new WidgetPropertyUIProvider[widgetAttrProviders.size()]); } public void addWidgetAttrProvider(Level level, PluginSimplify simplify) throws Exception { if (widgetAttrProviders == null) { - widgetAttrProviders = new HashSet(); + widgetAttrProviders = new HashSet(); } - validAPILevel(level, WidgetAttrProvider.CURRENT_LEVEL, simplify.getPluginName()); - widgetAttrProviders.add((WidgetAttrProvider) level); + validAPILevel(level, WidgetPropertyUIProvider.CURRENT_LEVEL, simplify.getPluginName()); + widgetAttrProviders.add((WidgetPropertyUIProvider) level); } /** @@ -845,7 +845,7 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi setTableDataSourceOPProcessor(impl, simplify); } else if (tagName.equals(ElementUIProvider.MARK_STRING)) { addElementUIProvider(impl, simplify); - } else if (tagName.equals(WidgetAttrProvider.XML_TAG)) { + } else if (tagName.equals(WidgetPropertyUIProvider.XML_TAG)) { addWidgetAttrProvider(impl, simplify); } } catch (PluginInvalidLevelException e) { diff --git a/designer_base/src/com/fr/design/fun/WidgetAttrProvider.java b/designer_base/src/com/fr/design/fun/WidgetPropertyUIProvider.java similarity index 71% rename from designer_base/src/com/fr/design/fun/WidgetAttrProvider.java rename to designer_base/src/com/fr/design/fun/WidgetPropertyUIProvider.java index 4d2c2e6245..c8a051315a 100644 --- a/designer_base/src/com/fr/design/fun/WidgetAttrProvider.java +++ b/designer_base/src/com/fr/design/fun/WidgetPropertyUIProvider.java @@ -7,8 +7,8 @@ import com.fr.stable.fun.Level; /** * Created by vito on 16/4/27. */ -public interface WidgetAttrProvider extends Level { - String XML_TAG = "WidgetAttrProvider"; +public interface WidgetPropertyUIProvider extends Level { + String XML_TAG = "WidgetPropertyUIProvider"; int CURRENT_LEVEL = 1; diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java index 8471115e88..51e2ca5cbd 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java @@ -1,13 +1,13 @@ package com.fr.design.fun.impl; -import com.fr.design.fun.WidgetAttrProvider; +import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.stable.fun.impl.AbstractProvider; /** * Created by vito on 16/4/27. */ -public abstract class AbstractWidgetAttrProvider extends AbstractProvider implements WidgetAttrProvider { +public abstract class AbstractWidgetAttrProvider extends AbstractProvider implements WidgetPropertyUIProvider { @Override public int currentAPILevel() { diff --git a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java index 68bb087013..d0d011328c 100644 --- a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java @@ -8,7 +8,7 @@ import javax.swing.*; import com.fr.base.BaseUtils; import com.fr.design.ExtraDesignClassManager; -import com.fr.design.fun.WidgetAttrProvider; +import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.general.Inter; import com.fr.design.gui.icontainer.UIScrollPane; @@ -88,8 +88,8 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper tabbedPane.addTab(Inter.getLocText("Form-Properties"), psp); tabbedPane.addTab(Inter.getLocText("Form-Events"), esp); - WidgetAttrProvider[] widgetAttrProviders = ExtraDesignClassManager.getInstance().getWidgetAttrProviders(); - for (WidgetAttrProvider widgetAttrProvider : widgetAttrProviders) { + WidgetPropertyUIProvider[] widgetAttrProviders = ExtraDesignClassManager.getInstance().getWidgetAttrProviders(); + for (WidgetPropertyUIProvider widgetAttrProvider : widgetAttrProviders) { AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable(); widgetPropertyTables.add(propertyTable); designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable)); From 24bac75f1533c7f67632669abcbbc3f52d33e7aa Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 6 May 2016 10:21:56 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tAttrProvider.java => AbstractWidgetPropertyUIProvider.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename designer_base/src/com/fr/design/fun/impl/{AbstractWidgetAttrProvider.java => AbstractWidgetPropertyUIProvider.java} (75%) diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractWidgetPropertyUIProvider.java similarity index 75% rename from designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java rename to designer_base/src/com/fr/design/fun/impl/AbstractWidgetPropertyUIProvider.java index 51e2ca5cbd..0c6b898084 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractWidgetPropertyUIProvider.java @@ -7,7 +7,7 @@ import com.fr.stable.fun.impl.AbstractProvider; /** * Created by vito on 16/4/27. */ -public abstract class AbstractWidgetAttrProvider extends AbstractProvider implements WidgetPropertyUIProvider { +public abstract class AbstractWidgetPropertyUIProvider extends AbstractProvider implements WidgetPropertyUIProvider { @Override public int currentAPILevel() { From aad1dfbf61ad0d0cb7e038536dd0b0e4236f1fab Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 6 May 2016 12:15:28 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=AE=BE=E7=BD=AEpart5=20in=205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/report/ExcelExportPane.java | 6 +- .../com/fr/design/report/PDFExportPane.java | 4 +- .../design/report/ReportExportAttrPane.java | 139 +++++++++++------- .../com/fr/design/report/WordExportPane.java | 4 +- .../fr/design/ExtraDesignClassManager.java | 19 +++ .../com/fr/design/fun/AbstractExportPane.java | 30 ++++ .../fr/design/fun/ExportAttrTabProvider.java | 22 +++ .../impl/AbstractExportAttrTabProvider.java | 19 +++ 8 files changed, 180 insertions(+), 63 deletions(-) create mode 100644 designer_base/src/com/fr/design/fun/AbstractExportPane.java create mode 100644 designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java create mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java diff --git a/designer/src/com/fr/design/report/ExcelExportPane.java b/designer/src/com/fr/design/report/ExcelExportPane.java index 9b97c2e8e0..f2b699f3b9 100644 --- a/designer/src/com/fr/design/report/ExcelExportPane.java +++ b/designer/src/com/fr/design/report/ExcelExportPane.java @@ -4,8 +4,10 @@ package com.fr.design.report; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import com.fr.design.fun.AbstractExportPane; import com.fr.design.gui.ilable.UILabel; -import javax.swing.JPanel; + +import javax.swing.*; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itextfield.UITextField; @@ -32,7 +34,7 @@ public class ExcelExportPane extends BasicPane { protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - + this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); JPanel outnorthPane =FRGUIPaneFactory.createTitledBorderPane("Excel" + Inter.getLocText("ReportD-Excel_Export")); JPanel northPane=FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); this.add(outnorthPane); diff --git a/designer/src/com/fr/design/report/PDFExportPane.java b/designer/src/com/fr/design/report/PDFExportPane.java index 8e5e7c64c1..d66ded01a3 100644 --- a/designer/src/com/fr/design/report/PDFExportPane.java +++ b/designer/src/com/fr/design/report/PDFExportPane.java @@ -4,7 +4,7 @@ package com.fr.design.report; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import javax.swing.JPanel; +import javax.swing.*; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; @@ -26,7 +26,7 @@ public class PDFExportPane extends BasicPane { protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - + this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); JPanel outnorthPane =FRGUIPaneFactory.createTitledBorderPane("PDF" + Inter.getLocText("ReportD-Excel_Export")); JPanel northPane=FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); this.add(outnorthPane); diff --git a/designer/src/com/fr/design/report/ReportExportAttrPane.java b/designer/src/com/fr/design/report/ReportExportAttrPane.java index 4819d9ff77..a3f114022f 100644 --- a/designer/src/com/fr/design/report/ReportExportAttrPane.java +++ b/designer/src/com/fr/design/report/ReportExportAttrPane.java @@ -1,67 +1,92 @@ package com.fr.design.report; -import javax.swing.BorderFactory; -import javax.swing.BoxLayout; +import javax.swing.*; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.dialog.BasicPane; +import com.fr.design.fun.AbstractExportPane; +import com.fr.design.fun.ExportAttrTabProvider; +import com.fr.design.gui.frpane.UITabbedPane; import com.fr.general.Inter; +import com.fr.io.attr.ImageExportAttr; import com.fr.io.attr.ReportExportAttr; +import java.util.HashMap; +import java.util.Map; + public class ReportExportAttrPane extends BasicPane { - private ExcelExportPane excelExportPane; - private PDFExportPane pdfExportPane; - private WordExportPane wordExportPane; - - public ReportExportAttrPane() { - this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); - this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - excelExportPane = new ExcelExportPane(); - this.add(excelExportPane); - pdfExportPane = new PDFExportPane(); - this.add(pdfExportPane); - wordExportPane = new WordExportPane(); - this.add(wordExportPane); - } - - @Override - protected String title4PopupWindow() { - return Inter.getLocText("ReportD-Excel_Export"); - } - - public void populate(ReportExportAttr reportExportAttr) { - if (reportExportAttr == null) { - reportExportAttr = new ReportExportAttr(); - } - - if (this.excelExportPane != null) { - this.excelExportPane.populate(reportExportAttr.getExcelExportAttr()); - } - - if (this.pdfExportPane != null) { - this.pdfExportPane.populate(reportExportAttr.getPDFExportAttr()); - } - - if (this.wordExportPane != null) { - this.wordExportPane.populate(reportExportAttr.getWordExportAttr()); - } - } - - public ReportExportAttr update() { - - ReportExportAttr reportExportAttr = new ReportExportAttr(); - if (this.excelExportPane != null) { - reportExportAttr.setExcelExportAttr(this.excelExportPane.update()); - } - - if (this.pdfExportPane != null) { - reportExportAttr.setPDFExportAttr(this.pdfExportPane.update()); - } - - if (this.wordExportPane != null) { - reportExportAttr.setWordExportAttr(this.wordExportPane.update()); - } - - return reportExportAttr; - } + private ExcelExportPane excelExportPane; + private PDFExportPane pdfExportPane; + private WordExportPane wordExportPane; + Map paneMap; + + public ReportExportAttrPane() { + UITabbedPane uiTabbedPane = new UITabbedPane(); + this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); + this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + excelExportPane = new ExcelExportPane(); + uiTabbedPane.addTab("Excel", excelExportPane); + pdfExportPane = new PDFExportPane(); + uiTabbedPane.addTab("PDF", pdfExportPane); + wordExportPane = new WordExportPane(); + uiTabbedPane.addTab("Word", wordExportPane); + ExportAttrTabProvider[] providers = ExtraDesignClassManager.getInstance().getExportAttrTabProviders(); + paneMap = new HashMap(); + for (ExportAttrTabProvider provider : providers) { + uiTabbedPane.addTab(provider.title(), provider.toSwingComponent()); + paneMap.put(provider.tag(), provider.toExportPane()); + } + this.add(uiTabbedPane); + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("ReportD-Excel_Export"); + } + + public void populate(ReportExportAttr reportExportAttr) { + if (reportExportAttr == null) { + reportExportAttr = new ReportExportAttr(); + } + + if (this.excelExportPane != null) { + this.excelExportPane.populate(reportExportAttr.getExcelExportAttr()); + } + + if (this.pdfExportPane != null) { + this.pdfExportPane.populate(reportExportAttr.getPDFExportAttr()); + } + + if (this.wordExportPane != null) { + this.wordExportPane.populate(reportExportAttr.getWordExportAttr()); + } + + AbstractExportPane exportPane = paneMap.get("Image"); + if(exportPane != null){ + exportPane.populate(reportExportAttr.getImageExportAttr()); + } + } + + public ReportExportAttr update() { + + ReportExportAttr reportExportAttr = new ReportExportAttr(); + if (this.excelExportPane != null) { + reportExportAttr.setExcelExportAttr(this.excelExportPane.update()); + } + + if (this.pdfExportPane != null) { + reportExportAttr.setPDFExportAttr(this.pdfExportPane.update()); + } + + if (this.wordExportPane != null) { + reportExportAttr.setWordExportAttr(this.wordExportPane.update()); + } + + AbstractExportPane exportPane = paneMap.get("Image"); + if(exportPane != null){ + reportExportAttr.setImageExportAttr(exportPane.update(ImageExportAttr.class)); + } + return reportExportAttr; + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/report/WordExportPane.java b/designer/src/com/fr/design/report/WordExportPane.java index e220583ea8..aa58795d26 100644 --- a/designer/src/com/fr/design/report/WordExportPane.java +++ b/designer/src/com/fr/design/report/WordExportPane.java @@ -4,7 +4,7 @@ package com.fr.design.report; import java.awt.Color; import java.awt.Dimension; -import javax.swing.JPanel; +import javax.swing.*; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.MultilineLabel; @@ -23,7 +23,7 @@ public class WordExportPane extends BasicPane { protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - + this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); JPanel outnorthPane =FRGUIPaneFactory.createTitledBorderPane("Word" + Inter.getLocText("ReportD-Excel_Export")); this.add(outnorthPane); diff --git a/designer_base/src/com/fr/design/ExtraDesignClassManager.java b/designer_base/src/com/fr/design/ExtraDesignClassManager.java index a861772c9a..7099bf3a03 100644 --- a/designer_base/src/com/fr/design/ExtraDesignClassManager.java +++ b/designer_base/src/com/fr/design/ExtraDesignClassManager.java @@ -132,6 +132,8 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi private Set widgetAttrProviders; + private Set exportAttrTabProviders; + public TableDataTreePaneProcessor getTableDataTreePaneProcessor() { return tableDataTreePaneProcessor; } @@ -753,6 +755,21 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi widgetAttrProviders.add((WidgetAttrProvider) level); } + public ExportAttrTabProvider[] getExportAttrTabProviders() { + if (exportAttrTabProviders == null) { + return new ExportAttrTabProvider[0]; + } + return exportAttrTabProviders.toArray(new ExportAttrTabProvider[exportAttrTabProviders.size()]); + } + + public void addExportAttrTabProvider(Level level, PluginSimplify simplify) throws Exception { + if (exportAttrTabProviders == null) { + exportAttrTabProviders = new HashSet(); + } + validAPILevel(level, ExportAttrTabProvider.CURRENT_LEVEL, simplify.getPluginName()); + exportAttrTabProviders.add((ExportAttrTabProvider) level); + } + /** * 文件名 * @@ -847,6 +864,8 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi addElementUIProvider(impl, simplify); } else if (tagName.equals(WidgetAttrProvider.XML_TAG)) { addWidgetAttrProvider(impl, simplify); + } else if (tagName.equals(ExportAttrTabProvider.XML_TAG)) { + addExportAttrTabProvider(impl, simplify); } } catch (PluginInvalidLevelException e) { PluginMessage.remindUpdate(e.getMessage()); diff --git a/designer_base/src/com/fr/design/fun/AbstractExportPane.java b/designer_base/src/com/fr/design/fun/AbstractExportPane.java new file mode 100644 index 0000000000..22d6ada018 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/AbstractExportPane.java @@ -0,0 +1,30 @@ +package com.fr.design.fun; + +import com.fr.design.dialog.BasicPane; + +/** + * Created by vito on 16/5/5. + */ +public abstract class AbstractExportPane extends BasicPane { + + public abstract void populate(Object t); + + public abstract Object update(); + +// public void populate(Object object,Class clazz){ +// if(object.getClass().isAssignableFrom(clazz)){ +// this.populate(clazz.cast(object)); +// } +// } + + public T update(Class clazz){ + Object object = this.update(); + if(object == null){ + return null; + } + if(object.getClass().isAssignableFrom(clazz)){ + return clazz.cast(object); + } + return null; + } +} diff --git a/designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java b/designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java new file mode 100644 index 0000000000..d16db4ea1b --- /dev/null +++ b/designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java @@ -0,0 +1,22 @@ +package com.fr.design.fun; + +import com.fr.stable.fun.Level; + +import javax.swing.*; + +/** + * Created by vito on 16/5/5. + */ +public interface ExportAttrTabProvider extends Level{ + String XML_TAG = "ExportAttrTabProvider"; + + int CURRENT_LEVEL = 1; + + JComponent toSwingComponent(); + + AbstractExportPane toExportPane(); + + String title(); + + String tag(); +} diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java new file mode 100644 index 0000000000..f1654ff6b5 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java @@ -0,0 +1,19 @@ +package com.fr.design.fun.impl; + +import com.fr.design.fun.ExportAttrTabProvider; +import com.fr.stable.fun.impl.AbstractProvider; + +/** + * Created by vito on 16/5/5. + */ +public abstract class AbstractExportAttrTabProvider extends AbstractProvider implements ExportAttrTabProvider { + @Override + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + @Override + public String mark4Provider() { + return this.getClass().getName(); + } +} From f7229f3608ef393695074b2a278f3ddbff14a43b Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 6 May 2016 14:41:20 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E6=94=B9=E6=88=90=E5=BE=AA=E7=8E=AF?= =?UTF-8?q?=E5=AD=98=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/report/ReportExportAttrPane.java | 24 +++++++++---------- .../com/fr/design/fun/AbstractExportPane.java | 12 +++------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/designer/src/com/fr/design/report/ReportExportAttrPane.java b/designer/src/com/fr/design/report/ReportExportAttrPane.java index a3f114022f..7e3f157e84 100644 --- a/designer/src/com/fr/design/report/ReportExportAttrPane.java +++ b/designer/src/com/fr/design/report/ReportExportAttrPane.java @@ -8,18 +8,17 @@ import com.fr.design.fun.AbstractExportPane; import com.fr.design.fun.ExportAttrTabProvider; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.general.Inter; -import com.fr.io.attr.ImageExportAttr; import com.fr.io.attr.ReportExportAttr; -import java.util.HashMap; -import java.util.Map; +import java.util.ArrayList; +import java.util.List; public class ReportExportAttrPane extends BasicPane { private ExcelExportPane excelExportPane; private PDFExportPane pdfExportPane; private WordExportPane wordExportPane; - Map paneMap; + List paneList; public ReportExportAttrPane() { UITabbedPane uiTabbedPane = new UITabbedPane(); @@ -32,10 +31,10 @@ public class ReportExportAttrPane extends BasicPane { wordExportPane = new WordExportPane(); uiTabbedPane.addTab("Word", wordExportPane); ExportAttrTabProvider[] providers = ExtraDesignClassManager.getInstance().getExportAttrTabProviders(); - paneMap = new HashMap(); + paneList = new ArrayList(); for (ExportAttrTabProvider provider : providers) { uiTabbedPane.addTab(provider.title(), provider.toSwingComponent()); - paneMap.put(provider.tag(), provider.toExportPane()); + paneList.add(provider.toExportPane()); } this.add(uiTabbedPane); } @@ -62,9 +61,8 @@ public class ReportExportAttrPane extends BasicPane { this.wordExportPane.populate(reportExportAttr.getWordExportAttr()); } - AbstractExportPane exportPane = paneMap.get("Image"); - if(exportPane != null){ - exportPane.populate(reportExportAttr.getImageExportAttr()); + for (AbstractExportPane exportpane : paneList) { + exportpane.populate(reportExportAttr); } } @@ -83,9 +81,11 @@ public class ReportExportAttrPane extends BasicPane { reportExportAttr.setWordExportAttr(this.wordExportPane.update()); } - AbstractExportPane exportPane = paneMap.get("Image"); - if(exportPane != null){ - reportExportAttr.setImageExportAttr(exportPane.update(ImageExportAttr.class)); + for (AbstractExportPane exportPane : paneList) { + ReportExportAttr exportAttr = exportPane.update(reportExportAttr, ReportExportAttr.class); + if (exportAttr != null) { + reportExportAttr = exportAttr; + } } return reportExportAttr; } diff --git a/designer_base/src/com/fr/design/fun/AbstractExportPane.java b/designer_base/src/com/fr/design/fun/AbstractExportPane.java index 22d6ada018..2986a7f7d4 100644 --- a/designer_base/src/com/fr/design/fun/AbstractExportPane.java +++ b/designer_base/src/com/fr/design/fun/AbstractExportPane.java @@ -9,16 +9,10 @@ public abstract class AbstractExportPane extends BasicPane { public abstract void populate(Object t); - public abstract Object update(); + public abstract Object update(Object t); -// public void populate(Object object,Class clazz){ -// if(object.getClass().isAssignableFrom(clazz)){ -// this.populate(clazz.cast(object)); -// } -// } - - public T update(Class clazz){ - Object object = this.update(); + public T update(Object t,Class clazz){ + Object object = this.update(t); if(object == null){ return null; } From 9e247b7337db2d4b9e4c0849819da30dc95e2b0f Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 6 May 2016 15:09:35 +0800 Subject: [PATCH 08/18] private --- designer/src/com/fr/design/report/ReportExportAttrPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/report/ReportExportAttrPane.java b/designer/src/com/fr/design/report/ReportExportAttrPane.java index 7e3f157e84..4dea276bdc 100644 --- a/designer/src/com/fr/design/report/ReportExportAttrPane.java +++ b/designer/src/com/fr/design/report/ReportExportAttrPane.java @@ -18,7 +18,7 @@ public class ReportExportAttrPane extends BasicPane { private ExcelExportPane excelExportPane; private PDFExportPane pdfExportPane; private WordExportPane wordExportPane; - List paneList; + private List paneList; public ReportExportAttrPane() { UITabbedPane uiTabbedPane = new UITabbedPane(); From d941231d760c72ad4861bd9146b884d88788b301 Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 6 May 2016 17:11:56 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/report/ReportExportAttrPane.java | 5 +---- .../src/com/fr/design/fun/AbstractExportPane.java | 13 +------------ 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/designer/src/com/fr/design/report/ReportExportAttrPane.java b/designer/src/com/fr/design/report/ReportExportAttrPane.java index 4dea276bdc..93a690bb91 100644 --- a/designer/src/com/fr/design/report/ReportExportAttrPane.java +++ b/designer/src/com/fr/design/report/ReportExportAttrPane.java @@ -82,10 +82,7 @@ public class ReportExportAttrPane extends BasicPane { } for (AbstractExportPane exportPane : paneList) { - ReportExportAttr exportAttr = exportPane.update(reportExportAttr, ReportExportAttr.class); - if (exportAttr != null) { - reportExportAttr = exportAttr; - } + exportPane.update(reportExportAttr); } return reportExportAttr; } diff --git a/designer_base/src/com/fr/design/fun/AbstractExportPane.java b/designer_base/src/com/fr/design/fun/AbstractExportPane.java index 2986a7f7d4..bb585a02d2 100644 --- a/designer_base/src/com/fr/design/fun/AbstractExportPane.java +++ b/designer_base/src/com/fr/design/fun/AbstractExportPane.java @@ -9,16 +9,5 @@ public abstract class AbstractExportPane extends BasicPane { public abstract void populate(Object t); - public abstract Object update(Object t); - - public T update(Object t,Class clazz){ - Object object = this.update(t); - if(object == null){ - return null; - } - if(object.getClass().isAssignableFrom(clazz)){ - return clazz.cast(object); - } - return null; - } + public abstract void update(Object t); } From 5bc3d4b83aad6c6ac36be2fa55375e3575e4f134 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 10 May 2016 12:03:38 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/chart/ChartEditPane.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java index 204062e449..7506d8c044 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java @@ -139,7 +139,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 this.removeAll(); this.setLayout(new BorderLayout()); paneList = new ArrayList(); - addTypeAndDataPane(); + addTypePane(); boolean isDefault = true; String plotID = ""; @@ -149,6 +149,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 } if(isDefault){ + paneList.add(dataPane4SupportCell); paneList.add(stylePane); paneList.add(otherPane); this.isDefaultPane = true; @@ -165,10 +166,8 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 } } - protected void addTypeAndDataPane() { + protected void addTypePane() { paneList.add(typePane); - paneList.add(dataPane4SupportCell); - } protected void setSelectedTab() { From 00060af9d7f74c89d4f98fc7b242a28ef62b132e Mon Sep 17 00:00:00 2001 From: xiaxiang <1438003374@qq.com> Date: Tue, 10 May 2016 14:21:10 +0800 Subject: [PATCH 11/18] rt --- .../src/com/fr/design/gui/icontainer/UIResizableContainer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index d4cc2f99f5..b436c4de53 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -100,6 +100,9 @@ public class UIResizableContainer extends JPanel { } public void setDownPane(JComponent downPane) { + if (this.downPane != null){ + return; + } this.verticalToolPane = new VerticalToolPane(); this.downPane = downPane; add(downPane); From 6d719b2aa131c8ad880552fc4903ac6f083da304 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 10 May 2016 14:37:14 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 4 ++++ .../com/fr/design/chart/fun/IndependentChartUIProvider.java | 2 ++ .../fun/impl/AbstractIndependentChartUIWithAPILevel.java | 5 +++++ .../src/com/fr/design/mainframe/chart/ChartEditPane.java | 2 ++ 4 files changed, 13 insertions(+) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index a4947058d3..9edac3e5f0 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -143,6 +143,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } + public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) { + return chartTypeInterfaces.get(plotID).getChartDataPane(listener); + } + public AbstractChartAttrPane[] getAttrPaneArray(String plotID, AttributeChangeListener listener) { return chartTypeInterfaces.get(plotID).getAttrPaneArray(listener); } diff --git a/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java b/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java index 7afcaa71fe..e2afed9948 100644 --- a/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java +++ b/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java @@ -68,6 +68,8 @@ public interface IndependentChartUIProvider extends Level { */ AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener); + ChartDataPane getChartDataPane(AttributeChangeListener listener); + /** * 是否使用默认的界面,为了避免界面来回切换 * diff --git a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java index e0e5e8f7d2..6025127f58 100644 --- a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java +++ b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java @@ -7,6 +7,7 @@ import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; import com.fr.design.condition.ConditionAttributesPane; 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.general.ComparatorUtils; @@ -23,6 +24,10 @@ public abstract class AbstractIndependentChartUIWithAPILevel implements Independ return new AbstractChartAttrPane[0]; } + public ChartDataPane getChartDataPane(AttributeChangeListener listener){ + return null; + } + /** * 是否使用默认的界面,为了避免界面来回切换 * @return 是否使用默认的界面 diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java index 7506d8c044..1de9921585 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java @@ -154,6 +154,8 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 paneList.add(otherPane); this.isDefaultPane = true; }else{ + ChartDataPane chartDataPane = ChartTypeInterfaceManager.getInstance().getChartDataPane(plotID, listener); + paneList.add(chartDataPane); AbstractChartAttrPane[] otherPaneList = ChartTypeInterfaceManager.getInstance().getAttrPaneArray(plotID, listener); for(int i = 0; i < otherPaneList.length; i++){ otherPaneList[i].addAttributeChangeListener(listener); From 26f291448c1167f5d9aa4c8379bb93e1ac55374f Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 10 May 2016 14:43:10 +0800 Subject: [PATCH 13/18] update --- .../chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java index 6025127f58..b1361b21f6 100644 --- a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java +++ b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java @@ -25,7 +25,7 @@ public abstract class AbstractIndependentChartUIWithAPILevel implements Independ } public ChartDataPane getChartDataPane(AttributeChangeListener listener){ - return null; + return new ChartDataPane(listener); } /** From fde0dd24123a63736c5a98f7969c59dbaf49132b Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 10 May 2016 14:53:59 +0800 Subject: [PATCH 14/18] update --- .../src/com/fr/design/mainframe/chart/ChartHyperEditPane.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java index b4544e6f96..99c6875a3b 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java @@ -39,11 +39,9 @@ public class ChartHyperEditPane extends ChartEditPane { } - protected void addTypeAndDataPane() { + protected void addTypePane() { paneList.add(attrPane); paneList.add(typePane); - paneList.add(dataPane4SupportCell); - } From a3707779f1130392fd777a3c939f23ccbc73ab43 Mon Sep 17 00:00:00 2001 From: xiaohu Date: Tue, 10 May 2016 15:03:40 +0800 Subject: [PATCH 15/18] update --- .../fr/design/chart/fun/impl/AbstractIndependentChartUI.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java index 8322bdba48..a44efb38c1 100644 --- a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java +++ b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java @@ -7,6 +7,7 @@ import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; import com.fr.design.condition.ConditionAttributesPane; 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.general.ComparatorUtils; @@ -26,6 +27,9 @@ public abstract class AbstractIndependentChartUI implements IndependentChartUIPr return new AbstractChartAttrPane[0]; } + public ChartDataPane getChartDataPane(AttributeChangeListener listener){ + return new ChartDataPane(listener); + } /** * 是否使用默认的界面,为了避免界面来回切换 * @return 是否使用默认的界面 From ed012834febadc4139d025c03e30a9da5610463f Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 13 May 2016 15:00:16 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ExtraDesignClassManager.java | 45 ++++++++----------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/designer_base/src/com/fr/design/ExtraDesignClassManager.java b/designer_base/src/com/fr/design/ExtraDesignClassManager.java index 76d5d88afb..81a2ed01dc 100644 --- a/designer_base/src/com/fr/design/ExtraDesignClassManager.java +++ b/designer_base/src/com/fr/design/ExtraDesignClassManager.java @@ -130,9 +130,17 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi private Set elementUIProviders; - private Set widgetAttrProviders; + private Set widgetAttrProviders; - private Set exportAttrTabProviders; + private WidgetDesignHandler widgetDesignHandler; + + public WidgetDesignHandler getWidgetDesignHandler() { + return widgetDesignHandler; + } + + public void setWidgetDesignHandler(Level level, PluginSimplify simplify) throws Exception { + widgetDesignHandler = (WidgetDesignHandler) level; + } public TableDataTreePaneProcessor getTableDataTreePaneProcessor() { return tableDataTreePaneProcessor; @@ -740,34 +748,19 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi elementUIProviders.add((ElementUIProvider) level); } - public WidgetPropertyUIProvider[] getWidgetAttrProviders() { + public WidgetAttrProvider[] getWidgetAttrProviders() { if (widgetAttrProviders == null) { - return new WidgetPropertyUIProvider[0]; + return new WidgetAttrProvider[0]; } - return widgetAttrProviders.toArray(new WidgetPropertyUIProvider[widgetAttrProviders.size()]); + return widgetAttrProviders.toArray(new WidgetAttrProvider[widgetAttrProviders.size()]); } public void addWidgetAttrProvider(Level level, PluginSimplify simplify) throws Exception { if (widgetAttrProviders == null) { - widgetAttrProviders = new HashSet(); - } - validAPILevel(level, WidgetPropertyUIProvider.CURRENT_LEVEL, simplify.getPluginName()); - widgetAttrProviders.add((WidgetPropertyUIProvider) level); - } - - public ExportAttrTabProvider[] getExportAttrTabProviders() { - if (exportAttrTabProviders == null) { - return new ExportAttrTabProvider[0]; - } - return exportAttrTabProviders.toArray(new ExportAttrTabProvider[exportAttrTabProviders.size()]); - } - - public void addExportAttrTabProvider(Level level, PluginSimplify simplify) throws Exception { - if (exportAttrTabProviders == null) { - exportAttrTabProviders = new HashSet(); + widgetAttrProviders = new HashSet(); } - validAPILevel(level, ExportAttrTabProvider.CURRENT_LEVEL, simplify.getPluginName()); - exportAttrTabProviders.add((ExportAttrTabProvider) level); + validAPILevel(level, WidgetAttrProvider.CURRENT_LEVEL, simplify.getPluginName()); + widgetAttrProviders.add((WidgetAttrProvider) level); } /** @@ -862,10 +855,10 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi setTableDataSourceOPProcessor(impl, simplify); } else if (tagName.equals(ElementUIProvider.MARK_STRING)) { addElementUIProvider(impl, simplify); - } else if (tagName.equals(WidgetPropertyUIProvider.XML_TAG)) { + } else if (tagName.equals(WidgetAttrProvider.XML_TAG)) { addWidgetAttrProvider(impl, simplify); - } else if (tagName.equals(ExportAttrTabProvider.XML_TAG)) { - addExportAttrTabProvider(impl, simplify); + } else if (tagName.equals(WidgetDesignHandler.XML_TAG)) { + setWidgetDesignHandler(impl, simplify); } } catch (PluginInvalidLevelException e) { PluginMessage.remindUpdate(e.getMessage()); From 73e45d17d224bf2619f28c90c9048255a693c12e Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 13 May 2016 15:00:37 +0800 Subject: [PATCH 17/18] 1 --- designer_base/src/com/fr/design/ExtraDesignClassManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/ExtraDesignClassManager.java b/designer_base/src/com/fr/design/ExtraDesignClassManager.java index 81a2ed01dc..07e64a3455 100644 --- a/designer_base/src/com/fr/design/ExtraDesignClassManager.java +++ b/designer_base/src/com/fr/design/ExtraDesignClassManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. */ package com.fr.design; From fe42842a54f30ae533289cb5ee88f724d37906a6 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 13 May 2016 15:00:52 +0800 Subject: [PATCH 18/18] 1 --- designer_base/src/com/fr/design/ExtraDesignClassManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/ExtraDesignClassManager.java b/designer_base/src/com/fr/design/ExtraDesignClassManager.java index 07e64a3455..81a2ed01dc 100644 --- a/designer_base/src/com/fr/design/ExtraDesignClassManager.java +++ b/designer_base/src/com/fr/design/ExtraDesignClassManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. */ package com.fr.design;