diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java index 525b3c0ca4..9a30b3266d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java @@ -6,20 +6,21 @@ import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.form.FormECBackgroundAction; import com.fr.design.actions.form.FormECColumnsAction; import com.fr.design.actions.form.FormECFrozenAction; -import com.fr.design.designer.creator.XElementCase; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.fit.NewUIModeCellElementPainter; -import com.fr.design.fit.common.FormDesignerUtil; import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.mainframe.*; 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.ShortCut; import com.fr.design.menu.ToolBarDef; import com.fr.design.present.ConditionAttributesGroupPane; +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.form.fit.common.LightTool; import com.fr.form.main.Form; import com.fr.grid.Grid; @@ -27,6 +28,7 @@ import com.fr.grid.GridColumn; import com.fr.grid.GridCorner; import com.fr.grid.GridRow; import com.fr.page.ReportSettingsProvider; +import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.worksheet.FormElementCase; import com.fr.design.selection.SelectionEvent; @@ -34,7 +36,6 @@ import com.fr.design.selection.SelectionListener; import javax.swing.JComponent; import javax.swing.JPanel; -import java.awt.Insets; import java.awt.Rectangle; /** @@ -69,6 +70,16 @@ public class FormElementCasePaneDelegate extends ElementCasePane { + DefaultTemplateCellElement defaultTemplateCellElement = DefaultThemedTemplateCellElementCase.createInstance(); + // fvs调整单元格默认样式 + AdjustWorkBookDefaultStyleUtils.adjustCellElement(defaultTemplateCellElement); + return defaultTemplateCellElement; + }); + } } private Rectangle getBoundsLineRect(TemplateElementCase elementCase) { 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 4d5fe8a62b..ca95a933df 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 @@ -32,6 +32,7 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase; import com.fr.design.report.RowColumnPane; import com.fr.design.selection.QuickEditor; +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.grid.GridUtils; import com.fr.report.cell.CellElement; import com.fr.report.cell.DefaultTemplateCellElement; @@ -562,6 +563,8 @@ public class CellSelection extends Selection { for (int i = 0; i < removeElementList.size(); i++) { CellElement element = removeElementList.get(i); element.setStyle(null); + // fvs调整单元格默认样式 + AdjustWorkBookDefaultStyleUtils.adjustCellElement(element); } break;