From 19ba11f8a4195a96bce01a8f52a3c1c1b8321136 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 19 Oct 2016 02:10:20 +0800 Subject: [PATCH 01/17] =?UTF-8?q?REPORT-364=20=E6=8A=A5=E8=A1=A8=E5=9D=97?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E6=8E=A5=E5=8F=A3=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...FormElementRefreshCaseEditorProcessor.java | 18 ++++++++++++ ...FormElementRefreshCaseEditorProcessor.java | 28 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 designer_base/src/com/fr/design/fun/FormElementRefreshCaseEditorProcessor.java create mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractFormElementRefreshCaseEditorProcessor.java diff --git a/designer_base/src/com/fr/design/fun/FormElementRefreshCaseEditorProcessor.java b/designer_base/src/com/fr/design/fun/FormElementRefreshCaseEditorProcessor.java new file mode 100644 index 000000000..ceb1881a2 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/FormElementRefreshCaseEditorProcessor.java @@ -0,0 +1,18 @@ +package com.fr.design.fun; + +import com.fr.stable.fun.ReportRefreshAttrProvider; +import com.fr.stable.fun.mark.Immutable; + +import java.beans.PropertyDescriptor; + +/** + * Created by Slpire on 16/10/12. + */ +public interface FormElementRefreshCaseEditorProcessor extends Immutable { + + String MARK_STRING = "PropertyEditor"; + + int CURRENT_LEVEL = 1; + + PropertyDescriptor[] createPropertyDescriptor(Class temp, ReportRefreshAttrProvider reportefreshAttr); +} diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractFormElementRefreshCaseEditorProcessor.java b/designer_base/src/com/fr/design/fun/impl/AbstractFormElementRefreshCaseEditorProcessor.java new file mode 100644 index 000000000..5bbf34bc7 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/impl/AbstractFormElementRefreshCaseEditorProcessor.java @@ -0,0 +1,28 @@ +package com.fr.design.fun.impl; + +import com.fr.design.fun.FormElementRefreshCaseEditorProcessor; +import com.fr.stable.fun.RefreshProvider; +import com.fr.stable.fun.ReportRefreshAttrProvider; +import com.fr.stable.fun.mark.API; + +import java.beans.PropertyDescriptor; + +/** + * Created by Slpire on 16/10/12. + */ +@API(level = FormElementRefreshCaseEditorProcessor.CURRENT_LEVEL) +public abstract class AbstractFormElementRefreshCaseEditorProcessor implements FormElementRefreshCaseEditorProcessor { + + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + public int layerIndex() { + return DEFAULT_LAYER_INDEX; + } + + @Override + public PropertyDescriptor[] createPropertyDescriptor(Class temp, ReportRefreshAttrProvider refreshAttrProvider) { + return new PropertyDescriptor[0]; + } +} From ccc9c645af7b7f5d8a437e4ff0af8fa2e3712927 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Thu, 20 Oct 2016 19:43:58 +0800 Subject: [PATCH 02/17] =?UTF-8?q?REPORT-364=20=E5=92=8C=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=9A=84=E5=90=8C=E4=B8=80=E4=B8=AA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ava => FormElementCaseEditorProvider.java} | 70 +++++++------- ...bstractFormElementCaseEditorProvider.java} | 93 ++++++++++--------- .../design/designer/creator/XElementCase.java | 34 +++---- 3 files changed, 101 insertions(+), 96 deletions(-) rename designer_base/src/com/fr/design/fun/{FormElementCaseEditorProcessor.java => FormElementCaseEditorProvider.java} (67%) rename designer_base/src/com/fr/design/fun/impl/{AbstractFormElementCaseEditorProcessor.java => AbstractFormElementCaseEditorProvider.java} (61%) diff --git a/designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java b/designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java similarity index 67% rename from designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java rename to designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java index e887d389b..5b7bd6fa2 100644 --- a/designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java +++ b/designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java @@ -1,34 +1,38 @@ -package com.fr.design.fun; - -import com.fr.stable.fun.ReportFitAttrProvider; -import com.fr.stable.fun.mark.Immutable; - -import java.beans.PropertyDescriptor; - -/** - * Created by zhouping on 2015/9/10. - */ -public interface FormElementCaseEditorProcessor extends Immutable { - - String MARK_STRING = "PropertyEditor"; - - int CURRENT_LEVEL = 1; - - - /** - * 生成属性表 - * @param temp 传入当前操作的class - * @param reportFitAttr 传入的自适应属性 - * @return 返回属性表 - */ - PropertyDescriptor[] createPropertyDescriptor(Class temp, ReportFitAttrProvider reportFitAttr); - - /** - * 返回pc自适应属性值 - * @param fitAttrProvider 传入的自适应属性 - * @return 返回pc自适应属性值 - */ - int getFitStateInPC(ReportFitAttrProvider fitAttrProvider); - - +package com.fr.design.fun; + +import com.fr.form.ui.ElementCaseEditor; +import com.fr.stable.fun.ReportFitAttrProvider; +import com.fr.form.main.Form; +import com.fr.stable.fun.mark.Mutable; + +import java.beans.PropertyDescriptor; + +/** + * Created by zhouping on 2015/9/10. + */ +public interface FormElementCaseEditorProvider extends Mutable { + + String MARK_STRING = "PropertyEditor"; + + int CURRENT_LEVEL = 1; + + + //加个provider返回tab的接口 + //design_base依赖了form + PropertyDescriptor[] createPropertyDescriptor (Class temp, Form reportAttr, ElementCaseEditor editor); + + /** + * 生成属性表 + * @param temp 传入当前操作的class + * @param reportFitAttr 传入的自适应属性 + * @return 返回属性表 + */ + PropertyDescriptor[] createPropertyDescriptor(Class temp, ReportFitAttrProvider reportFitAttr); + + /** + * 返回pc自适应属性值 + * @param fitAttrProvider 传入的自适应属性 + * @return 返回pc自适应属性值 + */ + int getFitStateInPC(ReportFitAttrProvider fitAttrProvider); } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java b/designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProvider.java similarity index 61% rename from designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java rename to designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProvider.java index caafda0b8..f65107e2e 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProvider.java @@ -1,44 +1,51 @@ -package com.fr.design.fun.impl; - -import com.fr.design.fun.FormElementCaseEditorProcessor; -import com.fr.stable.fun.ReportFitAttrProvider; -import com.fr.stable.fun.mark.API; - -import java.beans.PropertyDescriptor; - -/** - * Created by zhouping on 2015/9/10. - */ -@API(level = FormElementCaseEditorProcessor.CURRENT_LEVEL) -public abstract class AbstractFormElementCaseEditorProcessor implements FormElementCaseEditorProcessor { - - public int currentAPILevel() { - return CURRENT_LEVEL; - } - - public int layerIndex() { - return DEFAULT_LAYER_INDEX; - } - - - /** - * 生成属性表 - * @param temp 传入当前操作的class - * @param reportFitAttr 传入的自适应属性 - * @return 返回属性表 - */ - @Override - public PropertyDescriptor[] createPropertyDescriptor(Class temp, ReportFitAttrProvider reportFitAttr) { - return new PropertyDescriptor[0]; - } - - /** - * 返回pc自适应属性值 - * @param fitAttrProvider 传入的自适应属性 - * @return 返回pc自适应属性值 - */ - @Override - public int getFitStateInPC(ReportFitAttrProvider fitAttrProvider) { - return 0; - } +package com.fr.design.fun.impl; + +import com.fr.design.fun.FormElementCaseEditorProvider; +import com.fr.form.main.Form; +import com.fr.form.ui.ElementCaseEditor; +import com.fr.stable.fun.ReportFitAttrProvider; +import com.fr.stable.fun.mark.API; + +import java.beans.PropertyDescriptor; + +/** + * Created by zhouping on 2015/9/10. + */ +@API(level = FormElementCaseEditorProvider.CURRENT_LEVEL) +public abstract class AbstractFormElementCaseEditorProvider implements FormElementCaseEditorProvider { + + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + @Override + public String mark4Provider() { + return this.getClass().getName(); + } + + @Override + public PropertyDescriptor[] createPropertyDescriptor(Class temp, Form reportAttr, ElementCaseEditor editor) { + return new PropertyDescriptor[0]; + } + + /** + * 生成属性表 + * @param temp 传入当前操作的class + * @param reportFitAttr 传入的自适应属性 + * @return 返回属性表 + */ + @Override + public PropertyDescriptor[] createPropertyDescriptor(Class temp, ReportFitAttrProvider reportFitAttr) { + return new PropertyDescriptor[0]; + } + + /** + * 返回pc自适应属性值 + * @param fitAttrProvider 传入的自适应属性 + * @return 返回pc自适应属性值 + */ + @Override + public int getFitStateInPC(ReportFitAttrProvider fitAttrProvider) { + return 0; + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XElementCase.java b/designer_form/src/com/fr/design/designer/creator/XElementCase.java index 252ec35c7..f2f369595 100644 --- a/designer_form/src/com/fr/design/designer/creator/XElementCase.java +++ b/designer_form/src/com/fr/design/designer/creator/XElementCase.java @@ -4,8 +4,9 @@ import com.fr.base.BaseUtils; import com.fr.design.ExtraDesignClassManager; import com.fr.design.designer.properties.mobile.ElementCasePropertyUI; import com.fr.design.form.util.XCreatorConstants; -import com.fr.design.fun.FormElementCaseEditorProcessor; +import com.fr.design.fun.FormElementCaseEditorProvider; import com.fr.design.fun.WidgetPropertyUIProvider; +import com.fr.design.fun.impl.AbstractFormElementCaseEditorProvider; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.CoverReportPane; import com.fr.design.mainframe.EditingMouseListener; @@ -23,8 +24,7 @@ import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.CoreGraphHelper; import com.fr.stable.core.PropertyChangeAdapter; -import com.fr.stable.fun.FitProvider; -import com.fr.stable.fun.ReportFitAttrProvider; +import com.fr.form.main.Form; import javax.swing.*; import java.awt.*; @@ -32,6 +32,7 @@ import java.awt.event.MouseEvent; import java.awt.image.BufferedImage; import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; +import java.util.Set; public class XElementCase extends XBorderStyleWidgetCreator implements FormElementCaseContainerProvider{ private UILabel imageLable; @@ -100,25 +101,18 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme }; - FormElementCaseEditorProcessor processor = ExtraDesignClassManager.getInstance().getSingle(FormElementCaseEditorProcessor.MARK_STRING); - if (processor == null) { - return propertyTableEditor; - } - this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); - FitProvider wbTpl = (FitProvider) designer.getTarget(); - ReportFitAttrProvider fitAttr = wbTpl.getFitAttr(); - ElementCaseEditor editor = this.toData(); - //兼容之前报表块(之前三个选项为:默认 横向 双向 现在是:横向 双向 不自适应) - if (editor.getFitStateInPC() == 0) { - editor.setReportFitAttr(null); - } - ReportFitAttrProvider reportFitAttr = editor.getReportFitAttr() == null ? fitAttr : editor.getReportFitAttr(); - PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass(), reportFitAttr); + Set set = ExtraDesignClassManager.getInstance().getArray(AbstractFormElementCaseEditorProvider.MARK_STRING); + for (FormElementCaseEditorProvider processor : set) { + if (processor == null) { + return propertyTableEditor; + } + this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + Form attr = designer.getTarget(); - if (editor.getReportFitAttr() == null) { - editor.setReportFitInPc(processor.getFitStateInPC(fitAttr)); + PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass(), attr, this.toData()); + propertyTableEditor = (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor); } - return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor); + return propertyTableEditor; } @Override From a87cb4544dd754ed0575d24b128b89e61771731f Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Fri, 21 Oct 2016 10:38:36 +0800 Subject: [PATCH 03/17] =?UTF-8?q?REPORT-364=20=E6=9C=80=E5=88=9D=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E5=BF=98=E4=BA=86=E5=88=A0=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...FormElementRefreshCaseEditorProcessor.java | 18 ------------ ...FormElementRefreshCaseEditorProcessor.java | 28 ------------------- 2 files changed, 46 deletions(-) delete mode 100644 designer_base/src/com/fr/design/fun/FormElementRefreshCaseEditorProcessor.java delete mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractFormElementRefreshCaseEditorProcessor.java diff --git a/designer_base/src/com/fr/design/fun/FormElementRefreshCaseEditorProcessor.java b/designer_base/src/com/fr/design/fun/FormElementRefreshCaseEditorProcessor.java deleted file mode 100644 index ceb1881a2..000000000 --- a/designer_base/src/com/fr/design/fun/FormElementRefreshCaseEditorProcessor.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.fr.design.fun; - -import com.fr.stable.fun.ReportRefreshAttrProvider; -import com.fr.stable.fun.mark.Immutable; - -import java.beans.PropertyDescriptor; - -/** - * Created by Slpire on 16/10/12. - */ -public interface FormElementRefreshCaseEditorProcessor extends Immutable { - - String MARK_STRING = "PropertyEditor"; - - int CURRENT_LEVEL = 1; - - PropertyDescriptor[] createPropertyDescriptor(Class temp, ReportRefreshAttrProvider reportefreshAttr); -} diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractFormElementRefreshCaseEditorProcessor.java b/designer_base/src/com/fr/design/fun/impl/AbstractFormElementRefreshCaseEditorProcessor.java deleted file mode 100644 index 5bbf34bc7..000000000 --- a/designer_base/src/com/fr/design/fun/impl/AbstractFormElementRefreshCaseEditorProcessor.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.fr.design.fun.impl; - -import com.fr.design.fun.FormElementRefreshCaseEditorProcessor; -import com.fr.stable.fun.RefreshProvider; -import com.fr.stable.fun.ReportRefreshAttrProvider; -import com.fr.stable.fun.mark.API; - -import java.beans.PropertyDescriptor; - -/** - * Created by Slpire on 16/10/12. - */ -@API(level = FormElementRefreshCaseEditorProcessor.CURRENT_LEVEL) -public abstract class AbstractFormElementRefreshCaseEditorProcessor implements FormElementRefreshCaseEditorProcessor { - - public int currentAPILevel() { - return CURRENT_LEVEL; - } - - public int layerIndex() { - return DEFAULT_LAYER_INDEX; - } - - @Override - public PropertyDescriptor[] createPropertyDescriptor(Class temp, ReportRefreshAttrProvider refreshAttrProvider) { - return new PropertyDescriptor[0]; - } -} From a98dd7f2ca15fc3e46a9af2129933c1c1dc94f9d Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 25 Oct 2016 15:35:07 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E5=88=87=E6=8D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/ChartTypeInterfaceManager.java | 15 +++++++++++++++ .../mainframe/chart/gui/ChartTypeButtonPane.java | 4 ++-- .../design/mainframe/chart/gui/ChartTypePane.java | 13 ++++++++++--- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 1909c947c..6b280b398 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -249,6 +249,21 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh return new String[0]; } + /** + * 获取指定图表的标题 + * @param chartID + * @return + */ + public String getTitle4PopupWindow(String chartID, String plotID){ + if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(chartID) && chartTypeInterfaces.get(chartID).containsKey(plotID)){ + HashMap chartUIList = chartTypeInterfaces.get(chartID); + IndependentChartUIProvider provider = chartTypeInterfaces.get(chartID).get(plotID); + return provider.getPlotTypePane().title4PopupWindow(); + + } + return new String(); + } + private String[] getTitle4PopupWindow(){ int size = 0; if (chartTypeInterfaces != null){ diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java index 0fef00f31..f9c6e572c 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -158,8 +158,8 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen //获取图表收集器的状态 private void checkoutChange(){ - SwitchState state = editingCollection.calculateMultiChartMode(); - if (state.isDynamicState() && parent != null){ + editingCollection.calculateMultiChartMode(); + if (parent != null){ parent.reactorChartTypePane(editingCollection); } //检查是否可以配置切换 diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java index 84cfbd52b..01d47d4b7 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -8,6 +8,7 @@ import com.fr.chart.chartattr.SwitchState; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.chart.fun.IndependentChartUIProvider; import com.fr.design.dialog.BasicScrollPane; import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.icombobox.UIComboBox; @@ -37,6 +38,8 @@ public class ChartTypePane extends AbstractChartAttrPane{ private ChartTypeButtonPane buttonPane; private ChartEditPane editPane; private ChartCollection editingCollection; + //记录面板所处状态 + private SwitchState paneState = SwitchState.DEFAULT; @Override protected JPanel createContentPane() { @@ -161,11 +164,10 @@ public class ChartTypePane extends AbstractChartAttrPane{ } public void reactor(ChartCollection collection){ - //重构前存储所选择的下拉选项 - Object item = jcb.getSelectedItem(); //重构需要重构下拉框选项和cardNames Chart chart = collection.getSelectedChart(); String chartID = chart.getChartID(); + String plotID = chart.getPlot().getPlotID(); if (collection.getState() == SwitchState.DEFAULT){ chartID = StringUtils.EMPTY; } @@ -179,6 +181,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ fcb.addItem(cardNames[i]); } //重新选择选中的下拉项 + Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID); jcb.setSelectedItem(item); fcb.setItemEvenType(ItemEventType.DEFAULT); } @@ -220,7 +223,11 @@ public class ChartTypePane extends AbstractChartAttrPane{ public void reactorChartTypePane(ChartCollection collection){ - chartTypePane.reactor(collection); + if (paneState != collection.getState()) { + chartTypePane.reactor(collection); + //设置面板切换状态 + paneState = collection.getState(); + } } /** From 05b2e143d0b121b9b1283286b8fec69a9905f8cf Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 25 Oct 2016 16:05:29 +0800 Subject: [PATCH 05/17] update --- .../src/com/fr/design/mainframe/chart/gui/ChartTypePane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java index 01d47d4b7..85ca02832 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -167,7 +167,6 @@ public class ChartTypePane extends AbstractChartAttrPane{ //重构需要重构下拉框选项和cardNames Chart chart = collection.getSelectedChart(); String chartID = chart.getChartID(); - String plotID = chart.getPlot().getPlotID(); if (collection.getState() == SwitchState.DEFAULT){ chartID = StringUtils.EMPTY; } @@ -181,6 +180,8 @@ public class ChartTypePane extends AbstractChartAttrPane{ fcb.addItem(cardNames[i]); } //重新选择选中的下拉项 + chartID = chart.getChartID(); + String plotID = chart.getPlot().getPlotID(); Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID); jcb.setSelectedItem(item); fcb.setItemEvenType(ItemEventType.DEFAULT); From b21956c279a2bbbcd8c854c442e2584f715e38ed Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 25 Oct 2016 16:28:51 +0800 Subject: [PATCH 06/17] update --- .../mainframe/chart/gui/ChartTypePane.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java index 85ca02832..694a70476 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -173,17 +173,21 @@ public class ChartTypePane extends AbstractChartAttrPane{ //第一步就是重构cardNames cardNames = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID); //重构下拉框选项 + reactorComboBox(); + //重新选择选中的下拉项 + chartID = chart.getChartID(); + String plotID = chart.getPlot().getPlotID(); + Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID); + jcb.setSelectedItem(item); + } + + private void reactorComboBox() { FlexibleComboBox fcb = (FlexibleComboBox)jcb; fcb.setItemEvenType(ItemEventType.REACTOR); fcb.removeAllItems(); for (int i = 0; i < this.cardNames.length; i++) { fcb.addItem(cardNames[i]); } - //重新选择选中的下拉项 - chartID = chart.getChartID(); - String plotID = chart.getPlot().getPlotID(); - Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID); - jcb.setSelectedItem(item); fcb.setItemEvenType(ItemEventType.DEFAULT); } @@ -236,9 +240,8 @@ public class ChartTypePane extends AbstractChartAttrPane{ */ public void populate(ChartCollection collection) { Chart chart = collection.getSelectedChart(); - chartTypePane.populateBean(chart); - buttonPane.populateBean(collection); + chartTypePane.populateBean(chart); } /** From a519db2b8b22611e1eedb7f70bca03092b977a63 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 25 Oct 2016 17:02:33 +0800 Subject: [PATCH 07/17] update --- .../mainframe/chart/gui/ChartTypePane.java | 48 +++++++++++++++++-- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java index 694a70476..78f3f6271 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -38,9 +38,31 @@ public class ChartTypePane extends AbstractChartAttrPane{ private ChartTypeButtonPane buttonPane; private ChartEditPane editPane; private ChartCollection editingCollection; - //记录面板所处状态 - private SwitchState paneState = SwitchState.DEFAULT; - + private PaneState paneState = new PaneState(); + + private class PaneState{ + //记录面板所处状态 + private SwitchState paneState = SwitchState.DEFAULT; + //记录当前面板是谁在使用切换状态 + private String chartID = StringUtils.EMPTY; + + public SwitchState getPaneState() { + return paneState; + } + + public void setPaneState(SwitchState paneState) { + this.paneState = paneState; + } + + public String getChartID() { + return chartID; + } + + public void setChartID(String chartID) { + this.chartID = chartID; + } + } + @Override protected JPanel createContentPane() { JPanel content = new JPanel(new BorderLayout()); @@ -179,6 +201,13 @@ public class ChartTypePane extends AbstractChartAttrPane{ String plotID = chart.getPlot().getPlotID(); Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID); jcb.setSelectedItem(item); + //重新选中 + checkPlotPane(); + } + + private void checkPlotPane() { + CardLayout cl = (CardLayout)cardPane.getLayout(); + cl.show(cardPane, cardNames[jcb.getSelectedIndex()]); } private void reactorComboBox() { @@ -228,13 +257,22 @@ public class ChartTypePane extends AbstractChartAttrPane{ public void reactorChartTypePane(ChartCollection collection){ - if (paneState != collection.getState()) { + if (needReactor(collection)) { chartTypePane.reactor(collection); //设置面板切换状态 - paneState = collection.getState(); + updatePaneState(collection); } } + private void updatePaneState(ChartCollection collection) { + paneState.setChartID(collection.getRepresentChartID()); + paneState.setPaneState(collection.getState()); + } + + private boolean needReactor(ChartCollection collection) { + return paneState.getChartID() != collection.getRepresentChartID() || paneState.getPaneState() != collection.getState(); + } + /** * 更新界面属性 用于展示 */ From b3e1b3d24041cde2a253a88a193621186a0ceea1 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 26 Oct 2016 17:39:06 +0800 Subject: [PATCH 08/17] =?UTF-8?q?REPORT-585=20=E6=B7=BB=E5=8A=A0formletNam?= =?UTF-8?q?e=E5=8F=98=E9=87=8F=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/insert/formula/variable/cn/formletName.txt | 3 +++ .../com/fr/design/insert/formula/variable/en/formletName.txt | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt create mode 100644 designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt new file mode 100644 index 000000000..95c5feec3 --- /dev/null +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt @@ -0,0 +1,3 @@ + +ʣhttp://localhost:8080/WebReport/ReportServer?formlet=Form1.frm +formNameForm1.frm \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt new file mode 100644 index 000000000..320a270d6 --- /dev/null +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt @@ -0,0 +1,3 @@ +form name +http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm +formName is Form1.frm \ No newline at end of file From ad5d27457af1d83dc016cf14ad1d1a30739f07b2 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Thu, 27 Oct 2016 17:23:34 +0800 Subject: [PATCH 09/17] =?UTF-8?q?REPORT-364=20=E6=A0=BC=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/designer/creator/XElementCase.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XElementCase.java b/designer_form/src/com/fr/design/designer/creator/XElementCase.java index f2f369595..cef415fa2 100644 --- a/designer_form/src/com/fr/design/designer/creator/XElementCase.java +++ b/designer_form/src/com/fr/design/designer/creator/XElementCase.java @@ -98,18 +98,17 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme new CRPropertyDescriptor("showToolBar", this.data.getClass()).setEditorClass(BooleanEditor.class) .setI18NName(Inter.getLocText("Form-EC_toolbar")) .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), - }; + //这边有个插件兼容问题,之后还是要改回process才行 Set set = ExtraDesignClassManager.getInstance().getArray(AbstractFormElementCaseEditorProvider.MARK_STRING); - for (FormElementCaseEditorProvider processor : set) { - if (processor == null) { + for (FormElementCaseEditorProvider provider : set) { + if (provider == null) { return propertyTableEditor; } this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); Form attr = designer.getTarget(); - - PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass(), attr, this.toData()); + PropertyDescriptor[] extraEditor = provider.createPropertyDescriptor(this.data.getClass(), attr, this.toData()); propertyTableEditor = (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor); } return propertyTableEditor; From 1d91186058ba60d539da53ed3b17929a0b9a1bf5 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Fri, 28 Oct 2016 15:22:30 +0800 Subject: [PATCH 10/17] =?UTF-8?q?REPORT-364=20=E4=B9=8B=E5=89=8D=E7=9A=84p?= =?UTF-8?q?rocess=E5=8A=A0=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fun/FormElementCaseEditorProcessor.java | 31 +++++++++++++++++++ .../design/designer/creator/XElementCase.java | 6 ++-- 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java diff --git a/designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java b/designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java new file mode 100644 index 000000000..21866a2c3 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java @@ -0,0 +1,31 @@ +package com.fr.design.fun; + +import com.fr.stable.fun.ReportFitAttrProvider; +import com.fr.stable.fun.mark.Immutable; + +import java.beans.PropertyDescriptor; + +/** + * Created by Slpire on 2016/10/28. + */ +public interface FormElementCaseEditorProcessor extends Immutable { + String MARK_STRING = "PropertyEditor"; + + int CURRENT_LEVEL = 1; + + + /** + * 生成属性表 + * @param temp 传入当前操作的class + * @param reportFitAttr 传入的自适应属性 + * @return 返回属性表 + */ + PropertyDescriptor[] createPropertyDescriptor(Class temp, ReportFitAttrProvider reportFitAttr); + + /** + * 返回pc自适应属性值 + * @param fitAttrProvider 传入的自适应属性 + * @return 返回pc自适应属性值 + */ + int getFitStateInPC(ReportFitAttrProvider fitAttrProvider); +} diff --git a/designer_form/src/com/fr/design/designer/creator/XElementCase.java b/designer_form/src/com/fr/design/designer/creator/XElementCase.java index cef415fa2..f5412107a 100644 --- a/designer_form/src/com/fr/design/designer/creator/XElementCase.java +++ b/designer_form/src/com/fr/design/designer/creator/XElementCase.java @@ -104,11 +104,11 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme Set set = ExtraDesignClassManager.getInstance().getArray(AbstractFormElementCaseEditorProvider.MARK_STRING); for (FormElementCaseEditorProvider provider : set) { if (provider == null) { - return propertyTableEditor; + continue; } this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); - Form attr = designer.getTarget(); - PropertyDescriptor[] extraEditor = provider.createPropertyDescriptor(this.data.getClass(), attr, this.toData()); + Form formAttr = designer.getTarget(); + PropertyDescriptor[] extraEditor = provider.createPropertyDescriptor(this.data.getClass(), formAttr, this.toData()); propertyTableEditor = (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor); } return propertyTableEditor; From fe730b1fa0c27ad93b6c5b86ecdd2d6b3030869d Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 28 Oct 2016 16:15:12 +0800 Subject: [PATCH 11/17] =?UTF-8?q?REPORT-415=20=E5=A1=AB=E6=8A=A5=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=8F=90=E4=BE=9B=E5=A4=9Asheet=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/webattr/EditToolBar.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/webattr/EditToolBar.java b/designer/src/com/fr/design/webattr/EditToolBar.java index da5ebe2b0..58f455870 100644 --- a/designer/src/com/fr/design/webattr/EditToolBar.java +++ b/designer/src/com/fr/design/webattr/EditToolBar.java @@ -319,7 +319,7 @@ public class EditToolBar extends BasicPane { private CardLayout card; private JPanel centerPane; private UICheckBox icon, text, pdf, excelP, excelO, excelS, image, word, - flashPrint, pdfPrint, appletPrint, serverPrint, isPopup, isVerify, failSubmit; + flashPrint, pdfPrint, appletPrint, serverPrint, isPopup, isVerify, failSubmit, isCurSheet; private UIBasicSpinner count; private Widget widget; private UITextField nameField; @@ -469,10 +469,12 @@ public class EditToolBar extends BasicPane { private JPanel getSubmitPane() { isVerify = new UICheckBox(Inter.getLocText("Verify-Data_Verify")); failSubmit = new UICheckBox(Inter.getLocText(new String[]{"Verify_Fail", "Still", "Submit"})); + isCurSheet = new UICheckBox(Inter.getLocText("FR-Designer-Basic_Only_Submit_Current_Sheet")); JPanel submitPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); submitPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Form-Button", "Property", "Set"}), null)); submitPane.add(isVerify); submitPane.add(failSubmit); + submitPane.add(isCurSheet); isVerify.addChangeListener(changeListener); return submitPane; } @@ -562,6 +564,7 @@ public class EditToolBar extends BasicPane { Submit submit = ((Submit) widget); this.isVerify.setSelected(submit.isVerify()); this.failSubmit.setSelected(submit.isFailVerifySubmit()); + this.isCurSheet.setSelected(submit.isOnlySubmitSelect()); } private void populatePDFPrint(){ @@ -624,6 +627,7 @@ public class EditToolBar extends BasicPane { Submit submit = ((Submit) widget); submit.setVerify(this.isVerify.isSelected()); submit.setFailVerifySubmit(this.failSubmit.isSelected()); + submit.setOnlySubmitSelect(this.isCurSheet.isSelected()); } private void updatePrint(){ From f21e01b9a1fed73b4f254c6be96369aab3292801 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Fri, 28 Oct 2016 20:16:16 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 6b280b398..743cc5450 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -87,6 +87,20 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; + + //异步加载 + new Thread(new Runnable() { + @Override + public void run() { + getWidgetOption(typeName, child); + } + }).start(); + + + return child; + } + + private static void getWidgetOption(ChartInternationalNameContentBean[] typeName, ChartWidgetOption[] child){ for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); @@ -94,14 +108,15 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh continue; } - //初始化图表模型图片 + //加载初始化图表模型图片 initChartsDemoImage(rowChart); 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; + + DesignModuleFactory.registerExtraWidgetOptions(child); } private static void initChartsDemoImage(Chart[] rowChart) { From 77272c368780b5a985d589d5b3eb6107f88391c0 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Sat, 29 Oct 2016 21:12:55 +0800 Subject: [PATCH 13/17] =?UTF-8?q?REPORT-364=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fun/FormElementCaseEditorProvider.java | 2 +- ...bstractFormElementCaseEditorProcessor.java | 44 +++++++++++++++++++ .../design/designer/creator/XElementCase.java | 25 +++++++++-- 3 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java diff --git a/designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java b/designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java index 5b7bd6fa2..191f7fa99 100644 --- a/designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java +++ b/designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java @@ -19,7 +19,7 @@ public interface FormElementCaseEditorProvider extends Mutable { //加个provider返回tab的接口 //design_base依赖了form - PropertyDescriptor[] createPropertyDescriptor (Class temp, Form reportAttr, ElementCaseEditor editor); + PropertyDescriptor[] createPropertyDescriptor (Class temp, Form form, ElementCaseEditor editor); /** * 生成属性表 diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java b/designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java new file mode 100644 index 000000000..08a5a1606 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java @@ -0,0 +1,44 @@ +package com.fr.design.fun.impl; + +import com.fr.design.fun.FormElementCaseEditorProcessor; +import com.fr.stable.fun.ReportFitAttrProvider; +import com.fr.stable.fun.mark.API; + +import java.beans.PropertyDescriptor; + +/** + * Created by zhouping on 2015/9/10. + */ +@API(level = FormElementCaseEditorProcessor.CURRENT_LEVEL) +public abstract class AbstractFormElementCaseEditorProcessor implements FormElementCaseEditorProcessor { + + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + public int layerIndex() { + return DEFAULT_LAYER_INDEX; + } + + + /** + * 生成属性表 + * @param temp 传入当前操作的class + * @param reportFitAttr 传入的自适应属性 + * @return 返回属性表 + */ + @Override + public PropertyDescriptor[] createPropertyDescriptor(Class temp, ReportFitAttrProvider reportFitAttr) { + return new PropertyDescriptor[0]; + } + + /** + * 返回pc自适应属性值 + * @param fitAttrProvider 传入的自适应属性 + * @return 返回pc自适应属性值 + */ + @Override + public int getFitStateInPC(ReportFitAttrProvider fitAttrProvider) { + return 0; + } +} \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XElementCase.java b/designer_form/src/com/fr/design/designer/creator/XElementCase.java index f5412107a..f60ffaa0d 100644 --- a/designer_form/src/com/fr/design/designer/creator/XElementCase.java +++ b/designer_form/src/com/fr/design/designer/creator/XElementCase.java @@ -4,6 +4,7 @@ import com.fr.base.BaseUtils; import com.fr.design.ExtraDesignClassManager; import com.fr.design.designer.properties.mobile.ElementCasePropertyUI; import com.fr.design.form.util.XCreatorConstants; +import com.fr.design.fun.FormElementCaseEditorProcessor; import com.fr.design.fun.FormElementCaseEditorProvider; import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.fun.impl.AbstractFormElementCaseEditorProvider; @@ -25,6 +26,8 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.CoreGraphHelper; import com.fr.stable.core.PropertyChangeAdapter; import com.fr.form.main.Form; +import com.fr.stable.fun.FitProvider; +import com.fr.stable.fun.ReportFitAttrProvider; import javax.swing.*; import java.awt.*; @@ -107,11 +110,27 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme continue; } this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); - Form formAttr = designer.getTarget(); - PropertyDescriptor[] extraEditor = provider.createPropertyDescriptor(this.data.getClass(), formAttr, this.toData()); + Form form = designer.getTarget(); + PropertyDescriptor[] extraEditor = provider.createPropertyDescriptor(this.data.getClass(), form, this.toData()); propertyTableEditor = (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor); } - return propertyTableEditor; + + FormElementCaseEditorProcessor processor = ExtraDesignClassManager.getInstance().getSingle(FormElementCaseEditorProcessor.MARK_STRING); + if (processor == null) { + return propertyTableEditor; + } + this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + FitProvider wbTpl = (FitProvider) designer.getTarget(); + ReportFitAttrProvider fitAttr = wbTpl.getFitAttr(); + ElementCaseEditor editor = this.toData(); + //兼容之前报表块(之前三个选项为:默认 横向 双向 现在是:横向 双向 不自适应) + if (editor.getFitStateInPC() == 0) { + editor.setReportFitAttr(null); + } + ReportFitAttrProvider reportFitAttr = editor.getReportFitAttr() == null ? fitAttr : editor.getReportFitAttr(); + PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass(), reportFitAttr); + + return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor); } @Override From 74ce95640a9781b1c20cbb2b4c0ceb049a77ff07 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Sat, 29 Oct 2016 21:21:28 +0800 Subject: [PATCH 14/17] 1 1 --- .../src/com/fr/design/designer/creator/XElementCase.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer_form/src/com/fr/design/designer/creator/XElementCase.java b/designer_form/src/com/fr/design/designer/creator/XElementCase.java index f60ffaa0d..9f05e49fa 100644 --- a/designer_form/src/com/fr/design/designer/creator/XElementCase.java +++ b/designer_form/src/com/fr/design/designer/creator/XElementCase.java @@ -129,6 +129,9 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme } ReportFitAttrProvider reportFitAttr = editor.getReportFitAttr() == null ? fitAttr : editor.getReportFitAttr(); PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass(), reportFitAttr); + if (editor.getReportFitAttr() == null) { + editor.setReportFitInPc(processor.getFitStateInPC(fitAttr)); + } return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor); } From 425824c905486888032e742f1ad384150a56b885 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Mon, 31 Oct 2016 14:39:42 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BE=9D=E8=B5=96jar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/build.dev.gradle | 12 +++- designer_form/build.dev.gradle.bak | 90 ++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 designer_form/build.dev.gradle.bak diff --git a/designer_form/build.dev.gradle b/designer_form/build.dev.gradle index 57ebd74c2..24ee9430a 100644 --- a/designer_form/build.dev.gradle +++ b/designer_form/build.dev.gradle @@ -30,11 +30,17 @@ FileTree files =fileTree(dir:'./',include:'build.*.gradle') def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//显示依赖jar包 +FileTree f=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") +f.each{File file-> + println "----${f.path}" +} + //声明外部依赖 dependencies{ -compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") - + compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar') + compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_form/build.dev.gradle.bak b/designer_form/build.dev.gradle.bak new file mode 100644 index 000000000..c6dec88f9 --- /dev/null +++ b/designer_form/build.dev.gradle.bak @@ -0,0 +1,90 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.8 +//指定生成的jar包版本 +version='8.0' + +def srcDir="." + + +//指明生成jar包的名字 +jar{ + baseName='fr-designer-report' +} +//源码所在位置 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src", +"${srcDir}/../designer/src"] + } + } +} + +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//显示依赖jar包 +FileTree f=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") +f.each{File file-> + println "----${f.path}" + +} + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar') + compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") + testCompile 'junit:junit:4.12' +} + +//指明无法编译文件所在路径 +def dataContent ={def dir -> + copySpec{ + from ("${dir}"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + } +} + +//将非.java文件复制到classes文件夹下 参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + with dataContent.call("${srcDir}/src") + with dataContent.call("${srcDir}/../designer/src") + into ('build/classes/main') + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + + fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + + } + fileset (dir:"${srcDir}/../designer/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + From f5c51b1e85c9034c2d0bfbbf45f50751f79f03e7 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Mon, 31 Oct 2016 14:47:33 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/build.dev.gradle | 2 +- designer_form/build.dev.gradle.bak | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/designer_form/build.dev.gradle b/designer_form/build.dev.gradle index 24ee9430a..2b727caac 100644 --- a/designer_form/build.dev.gradle +++ b/designer_form/build.dev.gradle @@ -34,7 +34,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //显示依赖jar包 FileTree f=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") f.each{File file-> - println "----${f.path}" + println "----${file.path}" } //声明外部依赖 diff --git a/designer_form/build.dev.gradle.bak b/designer_form/build.dev.gradle.bak index c6dec88f9..24ee9430a 100644 --- a/designer_form/build.dev.gradle.bak +++ b/designer_form/build.dev.gradle.bak @@ -35,7 +35,6 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) FileTree f=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") f.each{File file-> println "----${f.path}" - } //声明外部依赖 From 4c993c74eea0fcbb4103023e4e0e90a4946cced2 Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 1 Nov 2016 10:55:49 +0800 Subject: [PATCH 17/17] =?UTF-8?q?REPORT-414=20=E5=90=8C=E6=AD=A5=E5=88=B0d?= =?UTF-8?q?ev=E4=B8=8A=E6=BC=94=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/constants/KeyWords.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_base/src/com/fr/design/constants/KeyWords.java b/designer_base/src/com/fr/design/constants/KeyWords.java index e4af62970..546195e62 100644 --- a/designer_base/src/com/fr/design/constants/KeyWords.java +++ b/designer_base/src/com/fr/design/constants/KeyWords.java @@ -117,6 +117,8 @@ public class KeyWords { "verifyReport()", "writeReportIgnoreVerify(true)", "writeReport(index)", + "loadSheetByIndex(index)", + "loadSheetByName(sheetName)", // curLGP "currentTDCell",