diff --git a/designer-base/src/main/java/com/fr/design/base/mode/DesignModeContext.java b/designer-base/src/main/java/com/fr/design/base/mode/DesignModeContext.java index 9c43f7f50a..1352833e6c 100644 --- a/designer-base/src/main/java/com/fr/design/base/mode/DesignModeContext.java +++ b/designer-base/src/main/java/com/fr/design/base/mode/DesignModeContext.java @@ -3,6 +3,7 @@ package com.fr.design.base.mode; import com.fr.design.designer.TargetComponent; import static com.fr.design.base.mode.DesignerMode.AUTHORITY; +import static com.fr.design.base.mode.DesignerMode.DUCHAMP; public class DesignModeContext { @@ -42,6 +43,9 @@ public class DesignModeContext { return mode == AUTHORITY; } + public static boolean isDuchampMode() { + return mode == DUCHAMP; + } public static void doCopy(TargetComponent principal) { if (isBanCopyAndCut() || principal == null) { diff --git a/designer-base/src/main/java/com/fr/design/base/mode/DesignerMode.java b/designer-base/src/main/java/com/fr/design/base/mode/DesignerMode.java index b0dd4baafc..d3dc1e5f4a 100644 --- a/designer-base/src/main/java/com/fr/design/base/mode/DesignerMode.java +++ b/designer-base/src/main/java/com/fr/design/base/mode/DesignerMode.java @@ -4,5 +4,6 @@ public enum DesignerMode { NORMAL, BAN_COPY_AND_CUT, VCS, - AUTHORITY + AUTHORITY, + DUCHAMP } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java index d6e55cd649..36507cf37d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java @@ -8,6 +8,7 @@ import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.NewTemplatePane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.imenu.UIMenuHighLight; +import com.fr.design.gui.itoolbar.UILargeToolbar; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.toolbar.ToolBarMenuDock; @@ -40,11 +41,15 @@ public class CenterRegionContainerPane extends JPanel { private JComponent toolbarComponent;//cpt 字体 等工具栏 - private JPanel eastCenterPane; + private JPanel eastPane;//=largeToolbar+eastCenterPane + private UILargeToolbar largeToolbar;//预览 + + private JPanel eastCenterPane;//=combineUp + templateTabPane private UIToolbar combineUp;//撤销重做 等工具栏 - private NewTemplatePane newWorkBookPane;//模板tab标签 + private JPanel templateTabPane;//新建模板 + 模板tab标签 + private NewTemplatePane newWorkBookPane;//新建模板button public static CenterRegionContainerPane getInstance() { @@ -71,15 +76,15 @@ public class CenterRegionContainerPane extends JPanel { } }; toolbarPane.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel eastPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - eastPane.add(getToolBarMenuDock().createLargeToolbar(), BorderLayout.WEST); + eastPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + eastPane.add(largeToolbar = getToolBarMenuDock().createLargeToolbar(), BorderLayout.WEST); eastCenterPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); combineUpTooBar(); eastCenterPane.add(combineUp, BorderLayout.NORTH); - JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - panel.add(newWorkBookPane = getToolBarMenuDock().getNewTemplatePane(), BorderLayout.WEST); - panel.add(MutilTempalteTabPane.getInstance(), BorderLayout.CENTER); - eastCenterPane.add(panel, BorderLayout.CENTER); + templateTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + templateTabPane.add(newWorkBookPane = getToolBarMenuDock().getNewTemplatePane(), BorderLayout.WEST); + templateTabPane.add(MutilTempalteTabPane.getInstance(), BorderLayout.CENTER); + eastCenterPane.add(templateTabPane, BorderLayout.CENTER); eastPane.add(eastCenterPane, BorderLayout.CENTER); toolbarPane.add(eastPane, BorderLayout.NORTH); @@ -110,9 +115,10 @@ public class CenterRegionContainerPane extends JPanel { /** * 重置上工具栏 */ - private void resetCombineUpTooBar(JComponent[] toolbar4Form) { + private void resetCombineUpTooBar(JComponent[] toolbar4Form, ToolBarMenuDockPlus plus) { combineUp.removeAll(); setUpUpToolBar(toolbar4Form); + plus.insertToCombineUpToolbar(combineUp); } @@ -212,7 +218,7 @@ public class CenterRegionContainerPane extends JPanel { */ protected void resetToolkitByPlus(ToolBarMenuDockPlus plus, ToolBarMenuDock ad) { - resetCombineUpTooBar(ad.resetUpToolBar(plus)); + resetCombineUpTooBar(ad.resetUpToolBar(plus), plus); if (toolbarComponent != null) { toolbarPane.remove(toolbarComponent); @@ -220,6 +226,26 @@ public class CenterRegionContainerPane extends JPanel { // 颜色,字体那些按钮的工具栏 toolbarPane.add(toolbarComponent = ad.resetToolBar(toolbarComponent, plus), BorderLayout.CENTER); + + if (plus.hasToolBarPane()) { + this.add(toolbarPane, BorderLayout.NORTH); + } else { + this.remove(toolbarPane); + } + + resetByDesignMode(); + } + + private void resetByDesignMode() { + if (DesignModeContext.isDuchampMode()) { + eastPane.remove(largeToolbar); + eastCenterPane.remove(templateTabPane); + centerTemplateCardPane.refresh(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate()); + } else { + eastPane.add(largeToolbar, BorderLayout.WEST); + eastCenterPane.add(templateTabPane, BorderLayout.CENTER); + } + } JComponent getToolbarComponent() { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index e5d88ee8cf..3cc4fba622 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -820,7 +820,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta * * @param jTemplate 当前模板 */ - private void refreshBaseContentPane(JTemplate jTemplate) { + public void refreshBaseContentPane(JTemplate jTemplate) { JComponent north = jTemplate.north4DesignerFrame(), center = jTemplate.center4DesignerFrame(), diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java index f540832d0d..abd5f6c6f9 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java @@ -53,10 +53,15 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener // 判断是否切换设计器状态到禁止拷贝剪切 if (jt.getTarget().getAttrMark(DesignBanCopyAttrMark.XML_TAG) != null) { DesignModeContext.switchTo(DesignerMode.BAN_COPY_AND_CUT); - } else if (!DesignModeContext.isVcsMode() && !DesignModeContext.isAuthorityEditing()) { + } else if (!DesignModeContext.isVcsMode() && !DesignModeContext.isAuthorityEditing() && !DesignModeContext.isDuchampMode()) { DesignModeContext.switchTo(DesignerMode.NORMAL); } DesignerFrameFileDealerPane.getInstance().setCurrentEditingTemplate(jt); + + refresh(jt); + } + + protected void refresh(final JTemplate jt) { if (component != null) { layeredPane.remove(component); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 847a2dcba3..84993411e5 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -16,7 +16,6 @@ import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.mainframe.reuse.ReuseGuideDialog; import com.fr.design.mainframe.reuse.SnapChatKeys; import com.fr.design.mainframe.share.collect.ComponentCollector; -import com.fr.design.menu.SnapChatUtil; import com.fr.design.notification.SnapChat; import com.fr.design.notification.SnapChatFactory; import com.fr.design.ui.util.UIUtil; @@ -114,7 +113,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { POLY_REPORT, // 聚合报表-报表块 POLY_CHART(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings")), // 聚合报表-图表块 AUTHORITY_EDITION, // 权限编辑 - AUTHORITY_EDITION_DISABLED; // 权限编辑 + AUTHORITY_EDITION_DISABLED, // 权限编辑 + DUCHAMP_REPORT; private String title; @@ -280,15 +280,15 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // 单元格元素 PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell_Element"), "cellelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, - new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT, PropertyMode.DUCHAMP_REPORT}); // 单元格属性 PropertyItem cellAttr = new PropertyItem(KEY_CELL_ATTR, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell_Attributes"), "cellattr", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, - new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT, PropertyMode.DUCHAMP_REPORT}); // 悬浮元素 PropertyItem floatElement = new PropertyItem(KEY_FLOAT_ELEMENT, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Float_Element"), "floatelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, - new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.POLY_REPORT}); + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.POLY_REPORT, PropertyMode.DUCHAMP_REPORT}); // 控件设置 PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings"), "widgetsettings", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY}, @@ -296,11 +296,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // 条件属性 PropertyItem conditionAttr = new PropertyItem(KEY_CONDITION_ATTR, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Condition_Attributes"), "conditionattr", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, - new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT, PropertyMode.DUCHAMP_REPORT}); // 超级链接 PropertyItem hyperlink = new PropertyItem(KEY_HYPERLINK, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Hyperlink"), "hyperlink", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, - new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); + new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT, PropertyMode.DUCHAMP_REPORT}); // 组件库 widgetLibSnapChat = SnapChatFactory.createSnapChat(false, SnapChatKeys.COMPONENT); PropertyItem widgetLib = new PropertyItem( diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 24c0195bc2..c70bf22b82 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -156,7 +156,7 @@ public abstract class JTemplate> // 判断是否切换设计器状态到禁止拷贝剪切 if (t.getAttrMark(DesignBanCopyAttrMark.XML_TAG) != null) { DesignModeContext.switchTo(com.fr.design.base.mode.DesignerMode.BAN_COPY_AND_CUT); - } else if (!DesignModeContext.isVcsMode() && !DesignModeContext.isAuthorityEditing()) { + } else if (!DesignModeContext.isVcsMode() && !DesignModeContext.isAuthorityEditing() && !DesignModeContext.isDuchampMode()) { DesignModeContext.switchTo(com.fr.design.base.mode.DesignerMode.NORMAL); } this.template = t; @@ -640,8 +640,6 @@ public abstract class JTemplate> /** * 添加图片到格子中 - * - * @return 返回图片URI */ public void setPictureElem(Elem elem, CellImage cellImage) { // 子类实现 diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDockPlus.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDockPlus.java index ed9b9d7871..4de9018ace 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDockPlus.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDockPlus.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.toolbar; +import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.menu.MenuDef; import com.fr.design.menu.ShortCut; import com.fr.design.menu.ToolBarDef; @@ -54,5 +55,20 @@ public interface ToolBarMenuDockPlus { int getToolBarHeight(); + /** + * 是否含有工具栏 包含:预览按钮 复制粘贴那一行 模板标签页那一行 字体颜色那一行 + * + * @return 默认返回true + */ + default boolean hasToolBarPane() { + return true; + } + + /** + * 往 复制粘贴那一行工具栏 插入 工具栏按钮 + */ + default void insertToCombineUpToolbar(UIToolbar combineUp) { + } + } \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java b/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java index 1c4d927523..728ebbe057 100644 --- a/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java +++ b/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java @@ -3,6 +3,7 @@ package com.fr.design.module; import com.fr.chart.web.ChartHyperPoplink; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateFloatLink; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane; import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateCellLinkPane; import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateFloatLinkPane; @@ -58,7 +59,7 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup { return false; } - if (template.isJWorkBook()) { + if (template.isJWorkBook() || DesignModeContext.isDuchampMode()) { // 如果是普通报表单元格,那么没有 FormHyperlink 选项 FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); //返回true表示可用,返回false表示不可用 @@ -93,7 +94,7 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup { if (template == null) { return false; } - if (template.isJWorkBook()) { + if (template.isJWorkBook() || DesignModeContext.isDuchampMode()) { // 如果是普通报表单元格,那么没有 FormHyperlink 选项 FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); //返回true表示可用,返回false表示不可用 diff --git a/designer-realize/src/main/java/com/fr/design/actions/utils/DeprecatedActionManager.java b/designer-realize/src/main/java/com/fr/design/actions/utils/DeprecatedActionManager.java index 47d19a3a7a..d12e88cf50 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/utils/DeprecatedActionManager.java +++ b/designer-realize/src/main/java/com/fr/design/actions/utils/DeprecatedActionManager.java @@ -7,24 +7,27 @@ import com.fr.base.present.FormulaPresent; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; import com.fr.design.actions.cell.NewPresentAction; -import com.fr.design.actions.core.ActionFactory; -import com.fr.design.actions.edit.clear.*; import com.fr.design.actions.columnrow.DeleteColumnAction; import com.fr.design.actions.columnrow.DeleteRowAction; import com.fr.design.actions.columnrow.InsertColumnAction; import com.fr.design.actions.columnrow.InsertRowAction; +import com.fr.design.actions.core.ActionFactory; +import com.fr.design.actions.edit.clear.ClearAction; +import com.fr.design.actions.edit.clear.ClearAllAction; +import com.fr.design.actions.edit.clear.ClearContentsAction; +import com.fr.design.actions.edit.clear.ClearFormatsAction; +import com.fr.design.actions.edit.clear.ClearWidgetAction; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.fun.PresentKindProvider; import com.fr.design.gui.imenu.UIMenu; +import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; - -import com.fr.design.mainframe.ElementCasePane; -import com.fr.grid.selection.CellSelection; -import com.fr.grid.selection.Selection; import com.fr.design.selection.SelectionEvent; import com.fr.design.selection.SelectionListener; +import com.fr.grid.selection.CellSelection; +import com.fr.grid.selection.Selection; import com.fr.report.cell.cellattr.BarcodePresent; import com.fr.report.cell.cellattr.CurrencyLinePresent; 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 324c21ed49..306aaf4ede 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 @@ -118,8 +118,6 @@ import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.JScrollBar; import javax.swing.KeyStroke; -import java.lang.reflect.Constructor; -import java.util.Set; import java.awt.AWTEvent; import java.awt.Adjustable; import java.awt.Dimension; @@ -133,6 +131,8 @@ import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.lang.reflect.Constructor; +import java.util.Set; import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; @@ -181,7 +181,7 @@ public abstract class ElementCasePane extends Tar DesignerContext.setFormatState(DesignerContext.FORMAT_STATE_ONCE); DesignerContext.setReferencedElementCasePane(ElementCasePane.this); DesignerContext.setReferencedIndex( - ((JWorkBook) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()).getEditingReportIndex()); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getEditingReportIndex()); formatBrush.setSelected(true); formatBrushAction.executeActionReturnUndoRecordNeeded(); } else { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java index 44992a84b2..79b5c8dc5d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -15,6 +15,7 @@ import com.fr.design.actions.edit.HyperlinkAction; import com.fr.design.actions.edit.merge.MergeCellAction; import com.fr.design.actions.edit.merge.UnmergeCellAction; import com.fr.design.actions.utils.DeprecatedActionManager; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; import com.fr.design.file.HistoryTemplateListPane; @@ -101,7 +102,9 @@ public class ElementCasePaneDelegate extends ElementCasePane { conditionAttributesGroupPane.populate(ElementCasePaneDelegate.this); EastRegionContainerPane.getInstance().replaceFloatElementPane(ReportFloatPane.getInstance()); - EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); + EastRegionContainerPane.getInstance().switchMode(DesignModeContext.isDuchampMode() ? + EastRegionContainerPane.PropertyMode.DUCHAMP_REPORT : + EastRegionContainerPane.PropertyMode.REPORT); EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); EastRegionContainerPane.getInstance().replaceConditionAttrPane(conditionAttributesGroupPane); @@ -201,7 +204,11 @@ public class ElementCasePaneDelegate extends ElementCasePane { menuDef.addShortCut(new GlobalStyleMenuDef(this)); // 单元格形态 menuDef.addShortCut(DeprecatedActionManager.getPresentMenu(this)); - menuDef.addShortCut(new CellWidgetAttrAction()); + + if (!DesignModeContext.isDuchampMode()) { + menuDef.addShortCut(new CellWidgetAttrAction()); + } + menuDef.addShortCut(new ConditionAttributesAction()); menuDef.addShortCut(new HyperlinkAction()); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index 0f1ced3797..c7497636bd 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -193,7 +193,7 @@ public class JWorkBook extends JTemplate { } @Override - protected UIModeControlContainer createCenterPane() { + protected JComponent createCenterPane() { parameterPane = ModuleContext.isModuleStarted(Module.FORM_MODULE) ? new ParameterDefinitePane() : null; centerPane = new UIModeControlContainer(parameterPane, reportComposite = new ReportComponentComposite(this)) { @Override @@ -213,7 +213,7 @@ public class JWorkBook extends JTemplate { reportComposite.addTargetModifiedListener(e -> JWorkBook.this.fireTargetModified()); reportComposite.setParentContainer(centerPane); - return centerPane; + return DesignModeContext.isDuchampMode() ? reportComposite : centerPane; } @Override @@ -312,7 +312,7 @@ public class JWorkBook extends JTemplate { } private boolean hasParameterPane() { - return parameterPane != null; + return parameterPane != null && !DesignModeContext.isDuchampMode(); } /** @@ -579,7 +579,8 @@ public class JWorkBook extends JTemplate { super.setTarget(book); } - private TargetComponent delegate4ToolbarMenuAdapter() { + + public ReportComponent delegate4ToolbarMenuAdapter() { return this.reportComposite.getEditingReportComponent(); } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java b/designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java index 9377c619a7..b412d724d0 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe; import com.fr.base.ScreenResolution; import com.fr.common.inputevent.InputEventBaseOnOS; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.designer.EditingState; import com.fr.design.event.RemoveListener; import com.fr.design.event.TargetModifiedListener; @@ -215,7 +216,9 @@ public class ReportComponentComposite extends JComponent implements RemoveListen jSliderContainer = JFormSliderPane.getInstance(); } southPane.add(hbarContainer, BorderLayout.NORTH); - southPane.add(sheetNameTab, BorderLayout.CENTER); + if (!DesignModeContext.isDuchampMode()) { + southPane.add(sheetNameTab, BorderLayout.CENTER); + } southPane.add(jSliderContainer, BorderLayout.EAST); return southPane; } 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 cbe37764de..1f0ebd7795 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 @@ -361,10 +361,11 @@ public class CellOtherSetPane extends AbstractCellAttrPane { cellGUIAttr = CellGUIAttr.DEFAULT_CELLGUIATTR; } - // 是否在编辑表单中的报表块 - boolean isInForm = EastRegionContainerPane.getInstance().getCurrentMode().equals(EastRegionContainerPane.PropertyMode.FORM_REPORT); + // 支持 跟随页面设置 选项 = 不在编辑表单中的报表块 && 不在大屏模板cpt组件中 + boolean supportFollowTplDefine = !EastRegionContainerPane.getInstance().getCurrentMode().equals(EastRegionContainerPane.PropertyMode.FORM_REPORT) + && !EastRegionContainerPane.getInstance().getCurrentMode().equals(EastRegionContainerPane.PropertyMode.DUCHAMP_REPORT); - defaultAutoRadioButton.setVisible(!isInForm); + defaultAutoRadioButton.setVisible(supportFollowTplDefine); switch (cellGUIAttr.getAdjustMode()) { case CellGUIAttr.ADJUST_MODE_NO_AUTO: noAutoRadioButton.setSelected(true); @@ -376,10 +377,10 @@ public class CellOtherSetPane extends AbstractCellAttrPane { autoWidthRadioButton.setSelected(true); break; case CellGUIAttr.ADJUST_MODE_DEFAULT: - if (isInForm) { - autoHeightRadioButton.setSelected(true); - } else { + if (supportFollowTplDefine) { defaultAutoRadioButton.setSelected(true); + } else { + autoHeightRadioButton.setSelected(true); } break; default: diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index fe24109ad7..4abab05ef3 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -39,7 +39,6 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.KeySetUtils; import com.fr.design.report.RowColumnPane; import com.fr.design.selection.QuickEditor; - import com.fr.grid.GridUtils; import com.fr.report.cell.CellElement; import com.fr.report.cell.DefaultTemplateCellElement;