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..93a690bb91 100644 --- a/designer/src/com/fr/design/report/ReportExportAttrPane.java +++ b/designer/src/com/fr/design/report/ReportExportAttrPane.java @@ -1,67 +1,89 @@ 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.ReportExportAttr; +import java.util.ArrayList; +import java.util.List; + 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; + private List paneList; + + 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(); + paneList = new ArrayList(); + for (ExportAttrTabProvider provider : providers) { + uiTabbedPane.addTab(provider.title(), provider.toSwingComponent()); + paneList.add(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()); + } + + for (AbstractExportPane exportpane : paneList) { + exportpane.populate(reportExportAttr); + } + } + + 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()); + } + + for (AbstractExportPane exportPane : paneList) { + exportPane.update(reportExportAttr); + } + 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/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(); - } } } }; 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..bb585a02d2 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/AbstractExportPane.java @@ -0,0 +1,13 @@ +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 void update(Object t); +} 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/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/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(); + } +} 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 64% 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 8471115e88..0c6b898084 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractWidgetPropertyUIProvider.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 AbstractWidgetPropertyUIProvider extends AbstractProvider implements WidgetPropertyUIProvider { @Override public int currentAPILevel() { 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); 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/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 是否使用默认的界面 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..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 @@ -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 new ChartDataPane(listener); + } + /** * 是否使用默认的界面,为了避免界面来回切换 * @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 204062e449..1de9921585 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,10 +149,13 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 } if(isDefault){ + paneList.add(dataPane4SupportCell); paneList.add(stylePane); 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); @@ -165,10 +168,8 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 } } - protected void addTypeAndDataPane() { + protected void addTypePane() { paneList.add(typePane); - paneList.add(dataPane4SupportCell); - } protected void setSelectedTab() { 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); - } 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));