From 6a69cd7bf41bb59b6a8aa088cde7b561bed48efd Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 31 Aug 2021 14:10:35 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-58411=20=E3=80=90FR11=E4=BA=8C?= =?UTF-8?q?=E8=BD=AE=E5=9B=9E=E5=BD=92=E3=80=91=E4=B8=BB=E9=A2=98=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F-body=E5=8F=B3=E4=BE=A7=E8=AE=BE=E7=BD=AE=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E6=8C=89=E4=BA=A4=E4=BA=92=E6=96=87=E6=A1=A3=E9=A2=84?= =?UTF-8?q?=E6=9C=9F=E6=98=AF=E6=8F=90=E7=A4=BA=E2=80=9C=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E2=80=9D=EF=BC=8C=E7=8E=B0=E5=9C=A8=E6=98=AF?= =?UTF-8?q?=E2=80=9C=E6=A0=B7=E5=BC=8F=E8=AE=BE=E7=BD=AE=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 修改表单Body控件背景设置标签的国际化文字 【改动思路】 同上 --- .../fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java | 2 +- .../com/fr/design/fit/attrpane/FRFitLayoutExtendDefinePane.java | 2 +- .../ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java | 2 +- .../design/widget/ui/designer/layout/FRFitLayoutDefinePane.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java b/designer-form/src/main/java/com/fr/design/fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java index e4863adf8a..5fafb8df8e 100644 --- a/designer-form/src/main/java/com/fr/design/fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java @@ -81,7 +81,7 @@ public class FRAbsoluteBodyLayoutExtendDefinePane extends FRAbsoluteLayoutDefine public JPanel createAdvancePane() { JPanel advancedContentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - themePane = new FollowingThemePane(Toolkit.i18nText("Fine-Design_Form_Widget_Style_Setting")); + themePane = new FollowingThemePane(Toolkit.i18nText("Fine-Design_Form_Body_Style_Setting")); stylePane = new LayoutStylePane(); themePane.addFollowThemePane(stylePane, new FollowingThemePane.FollowingThemeActionChangeListener() { @Override diff --git a/designer-form/src/main/java/com/fr/design/fit/attrpane/FRFitLayoutExtendDefinePane.java b/designer-form/src/main/java/com/fr/design/fit/attrpane/FRFitLayoutExtendDefinePane.java index 77e468cb4b..78e2c5c3a3 100644 --- a/designer-form/src/main/java/com/fr/design/fit/attrpane/FRFitLayoutExtendDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/fit/attrpane/FRFitLayoutExtendDefinePane.java @@ -92,7 +92,7 @@ public class FRFitLayoutExtendDefinePane extends AbstractFRLayoutDefinePane Date: Tue, 31 Aug 2021 14:19:58 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-58403=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E7=BB=84=E4=BB=B6=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A1=86=E6=A0=87=E9=A2=98=E9=83=A8=E5=88=86=EF=BC=8C?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=E6=9C=89=E7=82=B9=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 只在后续的容器上加间距 【改动思路】 同上 --- .../java/com/fr/design/gui/style/ComponentTitleStylePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java b/designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java index 33420ded77..b7499fc149 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java @@ -307,7 +307,7 @@ public class ComponentTitleStylePane extends AbstractBorderPackerPane { if (component != null) { container.add(component, BorderLayout.NORTH); JPanel nextContainer = new JPanel(FRGUIPaneFactory.createBorderLayout()); - component.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, 0, 0)); + nextContainer.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, 0, 0)); container.add(nextContainer, BorderLayout.CENTER); container = nextContainer; } From 44f27680309c7365fdd5afe291fb58b9cb1d2504 Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 31 Aug 2021 16:44:38 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-58536=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E6=96=B0=E5=BB=BAcpt=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0sheet=E9=A1=B5=EF=BC=8C=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E9=87=8C=E4=B8=BB=E9=A2=98=E9=85=8D=E7=BD=AE=E7=9A=84?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=8F=AA=E5=9C=A8=E7=AC=AC=E4=B8=80=E4=B8=AA?= =?UTF-8?q?sheet=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 补充新建sheet页时的主题处理逻辑,根据当前模版使用的主题重置sheet页内部的数据 【改动思路】 同上 --- .../com/fr/design/mainframe/SheetNameTabPane.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java index 7b6fbff6f8..f2bf5e5854 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java @@ -26,6 +26,9 @@ import com.fr.base.BaseUtils; import com.fr.base.GraphHelper; import com.fr.base.svg.IconUtils; +import com.fr.base.theme.ReportTheme; +import com.fr.base.theme.TemplateTheme; +import com.fr.base.theme.TemplateThemeCompatible; import com.fr.base.vcs.DesignerMode; import com.fr.design.actions.UpdateAction; import com.fr.design.constants.UIConstants; @@ -807,7 +810,15 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse scrollIndex++; } - reportComposite.getEditingWorkBook().addReport(insertPos, newTemplateReport()); + JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + TemplateTheme theme = template.getTemplateTheme(); + + TemplateReport templateReport = newTemplateReport(); + if (theme instanceof ReportTheme) { + templateReport.onTemplateUsingThemeChange((ReportTheme) theme, TemplateThemeCompatible.NONE); + } + + reportComposite.getEditingWorkBook().addReport(insertPos, templateReport); setSelectedIndex(insertPos); // sheet名字的公式也需要做相应的变化. From 5f17d510648b8a750807a9e9fc895d8ce2e6a734 Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 31 Aug 2021 18:37:08 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-58398=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E6=96=B0=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E7=9A=84=E9=BB=98=E8=AE=A4=E6=A0=B7=E5=BC=8F=E7=A1=AE=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 所有设计器层面交互创建新单元格/浮动元素的场景,新创建的单元格使用当前模版主题 的"默认"样式进行初始化,包括且不限于如下场景: 1. 复制粘贴 2. 新增行列 3. 选中空单元格后输入文本 4. 格式刷 【改动思路】 同上 --- .../DefaultThemedTemplateCellElementCase.java | 45 +++++++++++++++++++ .../template/info/JFormProcessInfoTest.java | 5 ++- .../cell/AbstractCellElementAction.java | 6 +-- .../design/actions/cell/NewPresentAction.java | 4 +- .../columnrow/DSColumnBasicAction.java | 4 +- .../actions/utils/ReportActionUtils.java | 6 +-- .../com/fr/design/dscolumn/DSColumnPane.java | 4 +- .../mainframe/CellElementPropertyPane.java | 4 +- .../mainframe/CellWidgetPropertyPane.java | 6 +-- .../fr/design/mainframe/ElementCasePane.java | 4 +- .../ElementCasePaneAuthorityEditPane.java | 9 ++-- .../design/mainframe/FormatBrushAction.java | 6 +-- .../mainframe/cell/CellElementEditPane.java | 5 +-- .../settingpane/AbstractCellAttrPane.java | 4 +- .../cell/settingpane/CellExpandAttrPane.java | 4 +- .../cell/settingpane/CellOtherSetPane.java | 4 +- .../cell/settingpane/CellPresentPane.java | 4 +- .../cell/settingpane/CellStylePane.java | 6 +-- .../fr/design/present/CellWriteAttrPane.java | 4 +- .../present/ConditionAttributesGroupPane.java | 4 +- .../com/fr/design/report/ReportStylePane.java | 4 +- .../java/com/fr/design/style/BorderUtils.java | 6 +-- .../java/com/fr/design/style/StylePane.java | 4 +- .../src/main/java/com/fr/grid/Grid.java | 6 +-- .../java/com/fr/grid/IntelliElements.java | 6 +-- .../grid/dnd/ElementCasePaneDropTarget.java | 7 ++- .../com/fr/grid/selection/CellSelection.java | 11 ++--- .../cellquick/CellFormulaQuickEditor.java | 4 +- .../cellquick/CellStringQuickEditor.java | 4 +- .../com.fr/design/mainframe/JFileTest.java | 7 ++- 30 files changed, 118 insertions(+), 79 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/mainframe/theme/utils/DefaultThemedTemplateCellElementCase.java diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/utils/DefaultThemedTemplateCellElementCase.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/utils/DefaultThemedTemplateCellElementCase.java new file mode 100644 index 0000000000..67d8c0b2a2 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/utils/DefaultThemedTemplateCellElementCase.java @@ -0,0 +1,45 @@ +package com.fr.design.mainframe.theme.utils; + +import com.fr.base.NameStyle; +import com.fr.base.theme.TemplateTheme; +import com.fr.base.theme.settings.ThemedCellStyle; +import com.fr.design.file.HistoryTemplateListCache; +import com.fr.design.mainframe.JTemplate; +import com.fr.report.cell.DefaultTemplateCellElement; + +/** + * @author Starryi + * @version 1.0 + * Created by Starryi on 2021/8/31 + */ +public class DefaultThemedTemplateCellElementCase { + + public static DefaultTemplateCellElement createInstance() { + return themingCellElement(new DefaultTemplateCellElement()); + } + + public static DefaultTemplateCellElement createInstance(int column, int row) { + return themingCellElement(new DefaultTemplateCellElement(column, row)); + } + + public static DefaultTemplateCellElement createInstance(int column, int row, Object value) { + return themingCellElement(new DefaultTemplateCellElement(column, row, value)); + } + + public static DefaultTemplateCellElement createInstance(int column, int row, int columnSpan, int rowSpan, Object value) { + return themingCellElement(new DefaultTemplateCellElement(column, row, columnSpan, rowSpan, value)); + } + + private static DefaultTemplateCellElement themingCellElement(DefaultTemplateCellElement cellElement) { + JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + if (template != null) { + TemplateTheme theme = template.getTemplateTheme(); + ThemedCellStyle themedCellStyle = theme.getCellStyleList().getDefaultCellStyle4New(); + if (themedCellStyle != null) { + NameStyle nameStyle = NameStyle.getPassiveInstance(themedCellStyle.getName(), themedCellStyle.getStyle()); + cellElement.setStyle(nameStyle); + } + } + return cellElement; + } +} diff --git a/designer-form/src/test/java/com/fr/design/mainframe/template/info/JFormProcessInfoTest.java b/designer-form/src/test/java/com/fr/design/mainframe/template/info/JFormProcessInfoTest.java index 04327d354b..be4c9cd7a3 100644 --- a/designer-form/src/test/java/com/fr/design/mainframe/template/info/JFormProcessInfoTest.java +++ b/designer-form/src/test/java/com/fr/design/mainframe/template/info/JFormProcessInfoTest.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.template.info; import com.fr.base.background.ColorBackground; import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.form.main.Form; import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.ChartEditor; @@ -41,11 +42,11 @@ public class JFormProcessInfoTest { boolean result = Reflect.on(jFormProcessInfo).call("hasTestECReport").get(); Assert.assertTrue(result); - elementCase.addCellElement(new DefaultTemplateCellElement()); + elementCase.addCellElement(DefaultThemedTemplateCellElementCase.createInstance()); result = Reflect.on(jFormProcessInfo).call("hasTestECReport").get(); Assert.assertTrue(result); - DefaultTemplateCellElement templateCellElement = new DefaultTemplateCellElement(); + DefaultTemplateCellElement templateCellElement = DefaultThemedTemplateCellElementCase.createInstance(); templateCellElement.setValue(123); elementCase.addCellElement(templateCellElement); diff --git a/designer-realize/src/main/java/com/fr/design/actions/cell/AbstractCellElementAction.java b/designer-realize/src/main/java/com/fr/design/actions/cell/AbstractCellElementAction.java index 87c423d999..e4108e6d2f 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/cell/AbstractCellElementAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/cell/AbstractCellElementAction.java @@ -6,9 +6,9 @@ import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.grid.GridUtils; import com.fr.grid.selection.CellSelection; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.core.SheetUtils; import com.fr.report.elementcase.TemplateElementCase; @@ -35,7 +35,7 @@ public abstract class AbstractCellElementAction extends CellSelectionAction { final TemplateElementCase tplEC = ePane.getEditingElementCase(); TemplateCellElement editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow()); if (editCellElement == null) { - editCellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow()); + editCellElement = DefaultThemedTemplateCellElementCase.createInstance(cs.getColumn(), cs.getRow()); tplEC.addCellElement(editCellElement); } SheetUtils.calculateDefaultParent(tplEC); @@ -52,7 +52,7 @@ public abstract class AbstractCellElementAction extends CellSelectionAction { int row = j + finalCS.getRow(); TemplateCellElement editCellElement = tplEC.getTemplateCellElement(column, row); if (editCellElement == null) { - editCellElement = new DefaultTemplateCellElement(column, row); + editCellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); tplEC.addCellElement(editCellElement); } // alex:不加这一句话会导致跨行跨列的格子被多次update diff --git a/designer-realize/src/main/java/com/fr/design/actions/cell/NewPresentAction.java b/designer-realize/src/main/java/com/fr/design/actions/cell/NewPresentAction.java index 66870ff6fe..786910a02f 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/cell/NewPresentAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/cell/NewPresentAction.java @@ -4,12 +4,12 @@ import com.fr.base.present.Present; import com.fr.design.actions.PresentCheckBoxAction; import com.fr.design.mainframe.CellElementPropertyPane; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralUtils; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.Selection; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.StableUtils; @@ -46,7 +46,7 @@ public class NewPresentAction extends PresentCheckBoxAction { int row = j + cellRectangle.y; TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(column, row); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); elementCase.addCellElement(cellElement); } else if (cellElement.getPresent() != null) { cellElement.setPresent(null); diff --git a/designer-realize/src/main/java/com/fr/design/actions/columnrow/DSColumnBasicAction.java b/designer-realize/src/main/java/com/fr/design/actions/columnrow/DSColumnBasicAction.java index ddd10ad55b..dda5faa86a 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/columnrow/DSColumnBasicAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/columnrow/DSColumnBasicAction.java @@ -9,8 +9,8 @@ import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.grid.selection.CellSelection; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.core.SheetUtils; import com.fr.report.elementcase.TemplateElementCase; @@ -61,7 +61,7 @@ public class DSColumnBasicAction extends CellSelectionAction { editCellElement = report.getTemplateCellElement(column, row); if (editCellElement == null) { - editCellElement = new DefaultTemplateCellElement(column, row); + editCellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); report.addCellElement(editCellElement); } // update cell attributes diff --git a/designer-realize/src/main/java/com/fr/design/actions/utils/ReportActionUtils.java b/designer-realize/src/main/java/com/fr/design/actions/utils/ReportActionUtils.java index 2c0b73fe95..4ea2ad6538 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/utils/ReportActionUtils.java +++ b/designer-realize/src/main/java/com/fr/design/actions/utils/ReportActionUtils.java @@ -4,12 +4,12 @@ import com.fr.base.Style; import com.fr.design.actions.cell.style.StyleActionInterface; import com.fr.design.mainframe.DesignOperationEvent; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.event.EventDispatcher; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.Selection; import com.fr.report.cell.CellElement; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.FloatElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.ElementCase; @@ -42,7 +42,7 @@ public class ReportActionUtils { TemplateElementCase report = reportPane.getEditingElementCase(); TemplateCellElement editCellElement = report.getTemplateCellElement(((CellSelection) sel).getColumn(), ((CellSelection) sel).getRow()); if (editCellElement == null) { - editCellElement = new DefaultTemplateCellElement(((CellSelection) sel).getColumn(), ((CellSelection) sel).getRow()); + editCellElement = DefaultThemedTemplateCellElementCase.createInstance(((CellSelection) sel).getColumn(), ((CellSelection) sel).getRow()); report.addCellElement(editCellElement); } @@ -75,7 +75,7 @@ public class ReportActionUtils { TemplateCellElement editCellElement = report.getTemplateCellElement(column, row); if (editCellElement == null) { - editCellElement = new DefaultTemplateCellElement(column, row); + editCellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); report.addCellElement(editCellElement); } else { // 对于合并的格子,我们不多次计算的Style. diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java index afade5626c..3f0add29ba 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java @@ -5,9 +5,9 @@ import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.log.FineLoggerFactory; import com.fr.report.cell.CellElement; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import javax.swing.JPanel; @@ -127,7 +127,7 @@ public class DSColumnPane extends BasicPane { if (tds == null || cellElement == null) { // _denny: 我不认为这种情况应该出现,以防万一 - this.cellElement = new DefaultTemplateCellElement(); + this.cellElement = DefaultThemedTemplateCellElementCase.createInstance(); return; } // _denny: 这边需要克隆一下,因为在设置时,可能改变字段cellElement,但改变真实值是不被期望的 diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java index 1716fb4765..9fd6027fb4 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java @@ -15,6 +15,7 @@ import com.fr.design.gui.frpane.UITitlePanel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itabpane.TitleChangeListener; import com.fr.design.mainframe.cell.CellElementEditPane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.general.GeneralContext; import com.fr.grid.selection.CellSelection; @@ -25,7 +26,6 @@ import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.manage.PluginFilter; import com.fr.plugin.observer.PluginEvent; import com.fr.plugin.observer.PluginEventListener; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.Elem; import com.fr.report.elementcase.TemplateElementCase; @@ -138,7 +138,7 @@ public class CellElementPropertyPane extends DockingView { } if (element == null) { - element = new DefaultTemplateCellElement(0, 0); + element = DefaultThemedTemplateCellElementCase.createInstance(0, 0); } return element; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java index 0ddfdd3d7d..370bcb49c2 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe; import com.fr.design.actions.utils.ReportActionUtils; import com.fr.design.dialog.BasicPane; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.widget.WidgetPane; import com.fr.form.ui.NoneWidget; import com.fr.form.ui.Widget; @@ -11,7 +12,6 @@ import com.fr.grid.selection.Selection; import com.fr.log.FineLoggerFactory; import com.fr.privilege.finegrain.WidgetPrivilegeControl; import com.fr.report.cell.CellElement; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; @@ -59,7 +59,7 @@ public class CellWidgetPropertyPane extends BasicPane { public void populate(TemplateCellElement cellElement) { if (cellElement == null) {// 利用默认的CellElement. - cellElement = new DefaultTemplateCellElement(0, 0, null); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(0, 0, null); } Widget cellWidget = cellElement.getWidget(); @@ -88,7 +88,7 @@ public class CellWidgetPropertyPane extends BasicPane { final TemplateElementCase tplEC = ePane.getEditingElementCase(); TemplateCellElement editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow()); if (editCellElement == null) { - editCellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow()); + editCellElement = DefaultThemedTemplateCellElementCase.createInstance(cs.getColumn(), cs.getRow()); } this.cellElement = editCellElement; this.populate(editCellElement); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java index c73d094c92..dbc4269d6a 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java @@ -72,6 +72,7 @@ import com.fr.design.fun.ElementUIProvider; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.mainframe.cell.QuickEditorRegion; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; import com.fr.design.menu.NameSeparator; @@ -96,7 +97,6 @@ import com.fr.page.PageAttributeGetter; import com.fr.page.ReportPageAttrProvider; import com.fr.poly.creator.PolyElementCasePane; import com.fr.report.ReportHelper; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.FloatElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.core.RichText; @@ -569,7 +569,7 @@ public abstract class ElementCasePane extends Tar int row = j + cellRectangle.y; TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(column, row); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); elementCase.addCellElement(cellElement); } Style style = cellElement.getStyle(); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneAuthorityEditPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneAuthorityEditPane.java index 58b778065e..54ba90ea9f 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneAuthorityEditPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneAuthorityEditPane.java @@ -11,6 +11,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.mainframe.toolbar.AuthorityEditToolBarComponent; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; @@ -291,7 +292,7 @@ public class ElementCasePaneAuthorityEditPane extends AuthorityEditPane { int row = j + cellRectangle.y; TemplateCellElement editCellElement = elementCase.getTemplateCellElement(column, row); if (editCellElement == null) { - editCellElement = new DefaultTemplateCellElement(column, row); + editCellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); elementCase.addCellElement(editCellElement); } else { // 对于合并的格子,我们不多次计算的权限. @@ -371,7 +372,7 @@ public class ElementCasePaneAuthorityEditPane extends AuthorityEditPane { Rectangle cellRectangle = cellSelection.getCellRectangle(0); DefaultTemplateCellElement cellElement = (DefaultTemplateCellElement) elementCase.getCellElement(cellRectangle.x, cellRectangle.y); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(cellRectangle.x, cellRectangle.y); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(cellRectangle.x, cellRectangle.y); } boolean firstCellDoneaAuthority = cellElement.isDoneAuthority( ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName()); @@ -507,7 +508,7 @@ public class ElementCasePaneAuthorityEditPane extends AuthorityEditPane { int row = j + cellRectangle.y; DefaultTemplateCellElement cellElement = (DefaultTemplateCellElement) elementCase.getCellElement(column, row); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(cellSelection.getColumn(), cellSelection.getRow()); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(cellSelection.getColumn(), cellSelection.getRow()); } if (cellElement.getCellWidgetAttr() == null) { isAllHasWidget = false; @@ -562,7 +563,7 @@ public class ElementCasePaneAuthorityEditPane extends AuthorityEditPane { final TemplateElementCase elementCase = elementCasePane.getEditingElementCase(); DefaultTemplateCellElement cellElement = (DefaultTemplateCellElement) elementCase.getCellElement(cellSelection.getColumn(), cellSelection.getRow()); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(cellSelection.getColumn(), cellSelection.getRow()); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(cellSelection.getColumn(), cellSelection.getRow()); } //单元格带控件 if (cellElement.getCellWidgetAttr() != null) { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/FormatBrushAction.java b/designer-realize/src/main/java/com/fr/design/mainframe/FormatBrushAction.java index 9b89864b67..1256c76644 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/FormatBrushAction.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/FormatBrushAction.java @@ -4,9 +4,9 @@ import com.fr.base.Style; import com.fr.design.actions.ElementCaseAction; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.Selection; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; @@ -129,7 +129,7 @@ public class FormatBrushAction extends ElementCaseAction { int row = j + cs.getRow(); TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(column, row); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); elementCase.addCellElement(cellElement); } cellElement.setStyle(referencedStyle[i % columnSpan][j % rowSpan]); @@ -152,7 +152,7 @@ public class FormatBrushAction extends ElementCaseAction { int row = j + cellRectangle.y; TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(column, row); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); elementCase.addCellElement(cellElement); } Style style = cellElement.getStyle(); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java index 487214a80e..e54d03443e 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/CellElementEditPane.java @@ -8,13 +8,12 @@ import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.itabpane.TitleChangeListener; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.cell.settingpane.*; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.utils.DesignUtils; import com.fr.general.ComparatorUtils; - import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.Selection; import com.fr.report.cell.CellElement; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; @@ -112,7 +111,7 @@ public class CellElementEditPane extends BasicPane { CellElement cellElement = elementCase.getCellElement(cs.getColumn(), cs.getRow()); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow()); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(cs.getColumn(), cs.getRow()); //默认选中的是A1单元格,所以若是A1单元格没有加到列表时要加上,否则在聚合报表时会出错 if (cs.isSelectedOneCell(elementCasePane) && (cs.getColumn() + cs.getRow() == 0)) { elementCase.addCellElement((TemplateCellElement) cellElement); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java index 83ef31eaa9..d9f8ed633f 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java @@ -2,9 +2,9 @@ package com.fr.design.mainframe.cell.settingpane; import com.fr.design.mainframe.AbstractAttrPane; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; @@ -52,7 +52,7 @@ public abstract class AbstractCellAttrPane extends AbstractAttrPane { TemplateElementCase elementCase = elementCasePane.getEditingElementCase(); TemplateCellElement cellElement = elementCase.getTemplateCellElement(cs.getColumn(), cs.getRow()); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow()); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(cs.getColumn(), cs.getRow()); } this.cellElement = cellElement; elementCase.addCellElement(this.cellElement); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java index 0f7466af09..cd454660df 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java @@ -12,9 +12,9 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.general.ComparatorUtils; import com.fr.general.IOUtils; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.CellExpandAttr; import com.fr.report.elementcase.TemplateElementCase; @@ -239,7 +239,7 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { int row = j + cellRectangle.y; TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(column, row); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); elementCase.addCellElement(cellElement); } updateBean(cellElement); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 1f0ebd7795..1d02fde9cb 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -17,10 +17,10 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.JTemplate; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.widget.FRWidgetFactory; import com.fr.general.ComparatorUtils; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.CellGUIAttr; import com.fr.report.cell.cellattr.CellInsertPolicyAttr; @@ -570,7 +570,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane { int row = j + cellRectangle.y; TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(column, row); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); elementCase.addCellElement(cellElement); } updateBean(cellElement); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java index 960e93eec5..881b8b0835 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java @@ -2,9 +2,9 @@ package com.fr.design.mainframe.cell.settingpane; import com.fr.base.present.Present; import com.fr.design.constants.UIConstants; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.present.PresentPane; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; @@ -67,7 +67,7 @@ public class CellPresentPane extends AbstractCellAttrPane { int row = j + cellRectangle.y; TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(column, row); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); elementCase.addCellElement(cellElement); } cellElement.setPresent(present); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java index bbb63a3917..a678c501ac 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java @@ -4,10 +4,10 @@ import com.fr.base.Style; import com.fr.design.actions.utils.ReportActionUtils; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.cell.settingpane.style.StylePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.style.BorderUtils; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; @@ -82,7 +82,7 @@ public class CellStylePane extends AbstractCellAttrPane { int row = j + cellRectangle.y; TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(column, row); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); elementCase.addCellElement(cellElement); } cellElement.setStyle(s); @@ -100,7 +100,7 @@ public class CellStylePane extends AbstractCellAttrPane { int row = j + cellRectangle.y; TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); if (cellElement == null) { - cellElement = new DefaultTemplateCellElement(column, row); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); elementCase.addCellElement(cellElement); } Style style = cellElement.getStyle(); diff --git a/designer-realize/src/main/java/com/fr/design/present/CellWriteAttrPane.java b/designer-realize/src/main/java/com/fr/design/present/CellWriteAttrPane.java index c1d4deaff0..1a3c25e95b 100644 --- a/designer-realize/src/main/java/com/fr/design/present/CellWriteAttrPane.java +++ b/designer-realize/src/main/java/com/fr/design/present/CellWriteAttrPane.java @@ -6,6 +6,7 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.widget.WidgetPane; import com.fr.form.ui.NoneWidget; import com.fr.form.ui.Widget; @@ -13,7 +14,6 @@ import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.Selection; import com.fr.log.FineLoggerFactory; import com.fr.privilege.finegrain.WidgetPrivilegeControl; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; @@ -67,7 +67,7 @@ public class CellWriteAttrPane extends BasicPane { public void populate(TemplateCellElement cellElement) { if (cellElement == null) {// 利用默认的CellElement. - cellElement = new DefaultTemplateCellElement(0, 0, null); + cellElement = DefaultThemedTemplateCellElementCase.createInstance(0, 0, null); } Widget cellWidget = cellElement.getWidget(); diff --git a/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java b/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java index ad0c57b51e..4e06c97713 100644 --- a/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java +++ b/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java @@ -7,12 +7,12 @@ import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.general.NameObject; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.Selection; import com.fr.log.FineLoggerFactory; import com.fr.report.cell.CellElement; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.highlight.DefaultHighlight; import com.fr.report.cell.cellattr.highlight.Highlight; @@ -82,7 +82,7 @@ public class ConditionAttributesGroupPane extends UIListControlPane { final TemplateElementCase tplEC = ePane.getEditingElementCase(); editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow()); if (editCellElement == null) { - editCellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow()); + editCellElement = DefaultThemedTemplateCellElementCase.createInstance(cs.getColumn(), cs.getRow()); } SheetUtils.calculateDefaultParent(tplEC); // 不知道这行代码的作用,怕去掉之后会出问题,先放在这里 diff --git a/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java b/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java index caf919b294..91b3641ff3 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java @@ -20,6 +20,7 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.cell.settingpane.style.ThemedCellStyleListPane; import com.fr.design.mainframe.theme.ui.NoEdgeTitleBorder; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.style.AlignmentPane; import com.fr.design.style.BorderPane; import com.fr.design.style.BorderUtils; @@ -33,7 +34,6 @@ import com.fr.grid.selection.Selection; import com.fr.log.FineLoggerFactory; import com.fr.plugin.solution.sandbox.collection.PluginSandboxCollections; import com.fr.report.cell.CellElement; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.FloatElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.ElementCase; @@ -282,7 +282,7 @@ public class ReportStylePane extends BasicPane { editCellElement = report.getTemplateCellElement(column, row); if (editCellElement == null) { - editCellElement = new DefaultTemplateCellElement(column, row); + editCellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row); report.addCellElement(editCellElement); } diff --git a/designer-realize/src/main/java/com/fr/design/style/BorderUtils.java b/designer-realize/src/main/java/com/fr/design/style/BorderUtils.java index 4f2fd61e99..828a2d435f 100644 --- a/designer-realize/src/main/java/com/fr/design/style/BorderUtils.java +++ b/designer-realize/src/main/java/com/fr/design/style/BorderUtils.java @@ -9,12 +9,12 @@ import java.util.List; import com.fr.base.CellBorderStyle; import com.fr.base.Style; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.general.ComparatorUtils; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.Selection; import com.fr.report.cell.CellElement; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.FloatElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.ElementCase; @@ -433,7 +433,7 @@ public abstract class BorderUtils { for (int j = row; j < row + rowSpan; j++) { TemplateCellElement tmpCellElement = report.getTemplateCellElement(i, j); if (tmpCellElement == null) { - tmpCellElement = new DefaultTemplateCellElement(i, j); + tmpCellElement = DefaultThemedTemplateCellElementCase.createInstance(i, j); report.addCellElement(tmpCellElement); } Style style = tmpCellElement.getStyle(); @@ -516,7 +516,7 @@ public abstract class BorderUtils { for (int j = row; j < row + rowSpan; j++) { TemplateCellElement tmpCellElement = report.getTemplateCellElement(i, j); if (tmpCellElement == null) { - tmpCellElement = new DefaultTemplateCellElement(i, j); + tmpCellElement = DefaultThemedTemplateCellElementCase.createInstance(i, j); report.addCellElement(tmpCellElement); } Style style = tmpCellElement.getStyle(); diff --git a/designer-realize/src/main/java/com/fr/design/style/StylePane.java b/designer-realize/src/main/java/com/fr/design/style/StylePane.java index 78b0b289cf..265f256969 100644 --- a/designer-realize/src/main/java/com/fr/design/style/StylePane.java +++ b/designer-realize/src/main/java/com/fr/design/style/StylePane.java @@ -16,6 +16,7 @@ import com.fr.design.fun.StyleUIConfigProvider; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.style.background.BackgroundPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.grid.selection.CellSelection; @@ -24,7 +25,6 @@ import com.fr.grid.selection.Selection; import com.fr.log.FineLoggerFactory; import com.fr.plugin.solution.sandbox.collection.PluginSandboxCollections; import com.fr.report.cell.CellElement; -import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.FloatElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.ElementCase; @@ -322,7 +322,7 @@ public class StylePane extends BasicBeanPane