Browse Source

Pull request #14205: REPORT-70155 fix: fvs根据主题样式创建默认单元格 REPORT-77878 fix: fvs插件-表格默认字体颜色是白色,但是右键清除单元格格式,字体会变为黑色

Merge in DESIGN/design from ~ZHANYING/design:release/11.0 to release/11.0

* commit 'ad86fcdb91469123a734187bb38c99ade470e529':
  REPORT-77878 fix: fvs插件-表格默认字体颜色是白色,但是右键清除单元格格式,字体会变为黑色
  REPORT-70155 fix: fvs根据主题样式创建默认单元格
release/11.0
Zhanying-占盈 4 months ago
parent
commit
587ee033ec
  1. 17
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java
  2. 3
      designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java

17
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.FormECBackgroundAction;
import com.fr.design.actions.form.FormECColumnsAction; import com.fr.design.actions.form.FormECColumnsAction;
import com.fr.design.actions.form.FormECFrozenAction; 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.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fit.NewUIModeCellElementPainter; import com.fr.design.fit.NewUIModeCellElementPainter;
import com.fr.design.fit.common.FormDesignerUtil;
import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.mainframe.*; import com.fr.design.mainframe.*;
import com.fr.design.mainframe.cell.QuickEditorRegion; 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.KeySetUtils;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.present.ConditionAttributesGroupPane; import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils;
import com.fr.form.fit.common.LightTool; import com.fr.form.fit.common.LightTool;
import com.fr.form.main.Form; import com.fr.form.main.Form;
import com.fr.grid.Grid; import com.fr.grid.Grid;
@ -27,6 +28,7 @@ import com.fr.grid.GridColumn;
import com.fr.grid.GridCorner; import com.fr.grid.GridCorner;
import com.fr.grid.GridRow; import com.fr.grid.GridRow;
import com.fr.page.ReportSettingsProvider; import com.fr.page.ReportSettingsProvider;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.worksheet.FormElementCase; import com.fr.report.worksheet.FormElementCase;
import com.fr.design.selection.SelectionEvent; import com.fr.design.selection.SelectionEvent;
@ -34,7 +36,6 @@ import com.fr.design.selection.SelectionListener;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.Insets;
import java.awt.Rectangle; import java.awt.Rectangle;
/** /**
@ -69,6 +70,16 @@ public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase
} }
} }
}); });
// fvs根据主题样式创建默认单元格
if (DesignModeContext.isDuchampMode()) {
sheet.setDefaultCellElementSupplier(() -> {
DefaultTemplateCellElement defaultTemplateCellElement = DefaultThemedTemplateCellElementCase.createInstance();
// fvs调整单元格默认样式
AdjustWorkBookDefaultStyleUtils.adjustCellElement(defaultTemplateCellElement);
return defaultTemplateCellElement;
});
}
} }
private Rectangle getBoundsLineRect(TemplateElementCase elementCase) { private Rectangle getBoundsLineRect(TemplateElementCase elementCase) {

3
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.mainframe.theme.utils.DefaultThemedTemplateCellElementCase;
import com.fr.design.report.RowColumnPane; import com.fr.design.report.RowColumnPane;
import com.fr.design.selection.QuickEditor; import com.fr.design.selection.QuickEditor;
import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils;
import com.fr.grid.GridUtils; import com.fr.grid.GridUtils;
import com.fr.report.cell.CellElement; import com.fr.report.cell.CellElement;
import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.DefaultTemplateCellElement;
@ -562,6 +563,8 @@ public class CellSelection extends Selection {
for (int i = 0; i < removeElementList.size(); i++) { for (int i = 0; i < removeElementList.size(); i++) {
CellElement element = removeElementList.get(i); CellElement element = removeElementList.get(i);
element.setStyle(null); element.setStyle(null);
// fvs调整单元格默认样式
AdjustWorkBookDefaultStyleUtils.adjustCellElement(element);
} }
break; break;

Loading…
Cancel
Save