Browse Source

Pull request #5680: REPORT-58595 & REPORT-58597 & REPORT-58612 & REPORT-58486 & REPORT-58687

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

* commit 'a872d28607520b598522ec1f23d1db62e941d248':
  REPORT-58687 【主题切换】修改主题名称提示文字的位置
  REPORT-58486 FR11-二轮回归-新建模板的主题在撤销时未被锁定,连同撤销功能一起被撤销了
  REPORT-58612 【主题切换】单元格样式重命名,光标在名称框中时保存没有保存上
  REPORT-58597 【FR11二轮回归】组件复用&主题切换-拖入复用组件,组件默认选择的是跟随主题,这样的话复用组件原本的样式都没有了
  REPORT-58595【主题切换】主题色修改,模板预览的颜色没有更改
fix-lag
starryi 3 years ago
parent
commit
831e5fb6ba
  1. 8
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 17
      designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java
  3. 11
      designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java
  4. 85
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java
  5. 9
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java
  6. 58
      designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java
  7. 42
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  8. 2
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/ThemedCellStyleListPane.java

8
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -189,13 +189,13 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
designModel = createDesignModel(parameters);
}
addCenterPane();
this.undoState = createUndoState();
initAndStartPlugin();
if (isNewFile) {
// REPORT-58486: 必须在初始的UndoState创建前设置主题,使得初始的UndoState就包含了主题效果
setUpTheme4NewTemplate();
}
this.undoState = createUndoState();
initAndStartPlugin();
startListenThemeConfig();
}

17
designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java

@ -1,6 +1,5 @@
package com.fr.design.mainframe.theme;
import com.fr.base.theme.FineColorManager;
import com.fr.base.theme.FormTheme;
import com.fr.base.theme.TemplateThemeConfig;
import com.fr.base.theme.settings.ThemedComponentStyle;
@ -13,8 +12,6 @@ import com.fr.design.mainframe.theme.edit.FormBodyStyleEditPane;
import com.fr.design.mainframe.theme.preview.FormThemePreviewPane;
import javax.swing.JPanel;
import java.util.List;
import java.awt.Color;
import static com.fr.design.i18n.Toolkit.i18nText;
@ -61,20 +58,6 @@ public class FormThemeProfilePane extends TemplateThemeProfilePane<FormTheme> {
return container;
}
@Override
public void onColorSchemeChanged(List<Color> colors) {
super.onColorSchemeChanged(colors);
FineColorManager.FineColorReplaceByColorScheme replaceByColorScheme = new FineColorManager.FineColorReplaceByColorScheme(colors);
ThemedFormBodyStyle formBodyStyle = formBodyStyleSettingPane.updateBean();
FineColorManager.traverse(formBodyStyle, replaceByColorScheme);
formBodyStyleSettingPane.populateBean(formBodyStyle);
ThemedComponentStyle componentStyle = componentStyleSettingPane.updateBean();
FineColorManager.traverse(componentStyle, replaceByColorScheme);
componentStyleSettingPane.populateBean(componentStyle);
}
@Override
public void populateBean(FormTheme theme) {
super.populateBean(theme);

11
designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java

@ -39,17 +39,6 @@ public class ReportThemeProfilePane extends TemplateThemeProfilePane<ReportTheme
return container;
}
@Override
public void onColorSchemeChanged(List<Color> colors) {
super.onColorSchemeChanged(colors);
FineColorManager.FineColorReplaceByColorScheme replaceByColorScheme = new FineColorManager.FineColorReplaceByColorScheme(colors);
ThemedReportBodyStyle bodyStyle = reportBodyStyleSettingPane.updateBean();
FineColorManager.traverse(bodyStyle, replaceByColorScheme);
reportBodyStyleSettingPane.populateBean(bodyStyle);
}
@Override
public void populateBean(ReportTheme theme) {
super.populateBean(theme);

85
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java

@ -7,6 +7,7 @@ import com.fr.base.theme.settings.ThemeThumbnail;
import com.fr.base.theme.settings.ThemedCellStyleList;
import com.fr.base.theme.settings.ThemedChartStyle;
import com.fr.base.theme.settings.ThemedColorScheme;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
@ -26,6 +27,7 @@ import com.fr.design.mainframe.theme.edit.ui.ColorListPane;
import com.fr.design.mainframe.theme.edit.ui.LabelUtils;
import com.fr.design.mainframe.theme.ui.BorderUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.transaction.CallBackAdaptor;
@ -44,6 +46,7 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.event.ActionEvent;
@ -90,6 +93,8 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
private UIButton saveButton = new UIButton();
private UIButton saveAsButton = new UIButton();
private boolean refreshingThemedColor = false;
private boolean currentIsNewTheme;
private T theme;
@ -149,12 +154,12 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
return titleContainer;
}
private JPanel createRightPane() {
JPanel container = new JPanel(new BorderLayout(0, 12));
JPanel container = new JPanel(new BorderLayout(0, 0));
container.setPreferredSize(new Dimension(RIGHT_PANE_WIDTH, RIGHT_PANE_HEIGHT));
JPanel nameEditPane = createNameEditPane();
container.add(nameEditPane, BorderLayout.NORTH);
JPanel settingPane = new JPanel(new BorderLayout(0, 10));
JPanel settingPane = new JPanel(new BorderLayout(0, IntervalConstants.INTERVAL_L1));
container.add(settingPane, BorderLayout.CENTER);
settingPane.add(createColorSchemeEditPane(), BorderLayout.NORTH);
settingPane.add(createCustomEditorsPane(), BorderLayout.CENTER);
@ -170,13 +175,6 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
}
private JPanel createNameEditPane() {
JPanel container = new JPanel(new BorderLayout(30, 0));
container.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
container.add(LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Name")), BorderLayout.WEST);
JPanel settingContainer = new JPanel(new BorderLayout(10, 0));
container.add(settingContainer, BorderLayout.CENTER);
nameErrorLabel = LabelUtils.createLabel(StringUtils.EMPTY, Color.RED);
nameErrorLabel.setVisible(false);
@ -187,14 +185,14 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
@Override
public void insertUpdate(DocumentEvent e) {
if (isEnabled()) {
checkThemeCanBeSavedAndUpdateUI(currentIsNewTheme, nameTextField, nameErrorLabel, saveButton);
checkThemeCanBeSavedAndUpdateUI(currentIsNewTheme, false, currentIsNewTheme, true, nameTextField, nameErrorLabel, saveButton);
}
}
@Override
public void removeUpdate(DocumentEvent e) {
if (isEnabled()) {
checkThemeCanBeSavedAndUpdateUI(currentIsNewTheme, nameTextField, nameErrorLabel, saveButton);
checkThemeCanBeSavedAndUpdateUI(currentIsNewTheme, false, currentIsNewTheme, true, nameTextField, nameErrorLabel, saveButton);
}
}
@ -207,22 +205,26 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
@Override
public void focusGained(FocusEvent e) {
if (isEnabled()) {
checkThemeCanBeSavedAndUpdateUI(currentIsNewTheme, nameTextField, nameErrorLabel, saveButton);
checkThemeCanBeSavedAndUpdateUI(currentIsNewTheme, false, currentIsNewTheme, true, nameTextField, nameErrorLabel, saveButton);
}
}
@Override
public void focusLost(FocusEvent e) {
if (isEnabled()) {
checkThemeCanBeSavedAndUpdateUI(currentIsNewTheme, nameTextField, nameErrorLabel, saveButton);
checkThemeCanBeSavedAndUpdateUI(currentIsNewTheme, true, currentIsNewTheme, true, nameTextField, nameErrorLabel, saveButton);
}
}
});
settingContainer.add(nameTextField, BorderLayout.WEST);
double p = TableLayout.PREFERRED;
settingContainer.add(nameErrorLabel, BorderLayout.CENTER);
JPanel container = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[] { LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Name")), nameTextField },
new Component[] { null, nameErrorLabel },
}, new double[] { 20, 20}, new double[] { p, 165}, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_W0);
container.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
return container;
}
private JPanel createColorSchemeEditPane() {
@ -265,8 +267,13 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
colorListPane.addColorChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
if (refreshingThemedColor) {
return;
}
List<Color> colors = colorListPane.update();
refreshingThemedColor = true;
onColorSchemeChanged(colors);
refreshingThemedColor = false;
}
});
@ -310,13 +317,10 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
public void onColorSchemeChanged(List<Color> colors) {
colorListExtendedPane.populate(colors);
FineColorManager.FineColorReplaceByColorScheme replaceByColorScheme = new FineColorManager.FineColorReplaceByColorScheme(colors);
ThemedCellStyleList cellStyle = cellStyleSettingPane.updateBean();
FineColorManager.traverse(cellStyle, replaceByColorScheme);
T theme = updateBean();
ThemedChartStyle themedChartStyle = chartStyleSettingPane.updateBean();
FineColorManager.traverse(themedChartStyle, replaceByColorScheme);
chartStyleSettingPane.populateBean(themedChartStyle);
chartStyleSettingPane.populateGradientBar(colors);
FineColorManager.traverse(theme, replaceByColorScheme);
populateBean(theme);
}
public void populateBean(T theme) {
@ -389,7 +393,7 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
@Override
public void actionPerformed(ActionEvent e) {
T theme = updateBean();
boolean canBeSaved = checkThemeCanBeSavedAndUpdateUI(currentIsNewTheme, nameTextField, nameErrorLabel, saveButton);
boolean canBeSaved = checkThemeCanBeSavedAndUpdateUI(currentIsNewTheme, true, currentIsNewTheme, true, nameTextField, nameErrorLabel, saveButton);
if (canBeSaved && theme != null) {
theme.setName(nameTextField.getText());
config.addTheme(theme, true, new CallBackAdaptor() {
@ -474,14 +478,14 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
@Override
public void insertUpdate(DocumentEvent e) {
if (isEnabled()) {
checkThemeCanBeSavedAndUpdateUI(true, nameTextField, nameErrorLabel, confirmButton);
checkThemeCanBeSavedAndUpdateUI(true, false, true, true, nameTextField, nameErrorLabel, confirmButton);
}
}
@Override
public void removeUpdate(DocumentEvent e) {
if (isEnabled()) {
checkThemeCanBeSavedAndUpdateUI(true, nameTextField, nameErrorLabel, confirmButton);
checkThemeCanBeSavedAndUpdateUI(true, false, true, true, nameTextField, nameErrorLabel, confirmButton);
}
}
@ -494,14 +498,14 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
@Override
public void focusGained(FocusEvent e) {
if (isEnabled()) {
checkThemeCanBeSavedAndUpdateUI(true, nameTextField, nameErrorLabel, confirmButton);
checkThemeCanBeSavedAndUpdateUI(true, false, true, true, nameTextField, nameErrorLabel, confirmButton);
}
}
@Override
public void focusLost(FocusEvent e) {
if (isEnabled()) {
checkThemeCanBeSavedAndUpdateUI(true, nameTextField, nameErrorLabel, confirmButton);
checkThemeCanBeSavedAndUpdateUI(true, true, true, true, nameTextField, nameErrorLabel, confirmButton);
}
}
});
@ -547,7 +551,7 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
FineLoggerFactory.getLogger().error(ex.getMessage(), ex);
return;
}
boolean canBeSaved = checkThemeCanBeSavedAndUpdateUI(true, nameTextField, nameErrorLabel, confirmButton);
boolean canBeSaved = checkThemeCanBeSavedAndUpdateUI(true, true, true, true, nameTextField, nameErrorLabel, confirmButton);
if (canBeSaved && newThemeObject != null) {
newThemeObject.setName(name);
newThemeObject.setRemovable(true);
@ -583,17 +587,28 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
private boolean isThemeNameDuplicated(String name) {
return config.cachedFetch(name) != null;
}
private boolean checkThemeCanBeSavedAndUpdateUI(boolean checkDuplicated, UITextField textField, UILabel errorLabel, UIButton... actionButtons) {
String error = StringUtils.EMPTY;
private boolean checkThemeCanBeSavedAndUpdateUI(
boolean checkEmpty,
boolean displayEmptyTip,
boolean checkDuplicated,
boolean displayDuplicatedTip,
UITextField textField,
UILabel errorLabel, UIButton... actionButtons) {
String name = textField.getText();
if (isThemeNameEmpty(name)) {
error = Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Empty_Name_Error_Tip");
boolean valid = true;
errorLabel.setText(StringUtils.EMPTY);
if (checkEmpty && isThemeNameEmpty(name)) {
valid = false;
if (displayEmptyTip) {
errorLabel.setText(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Empty_Name_Error_Tip"));
}
} else if (checkDuplicated && isThemeNameDuplicated(name)) {
error = Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Duplicated_Name_Error_Tip");
valid = false;
if (displayDuplicatedTip) {
errorLabel.setText(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Duplicated_Name_Error_Tip"));
}
}
errorLabel.setText(error);
boolean valid = StringUtils.isEmpty(error);
errorLabel.setVisible(!valid);
if (actionButtons != null && actionButtons.length > 0) {

9
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java

@ -173,6 +173,8 @@ public class CellStyleListEditPane extends JListControlPane {
return;
}
int oldSelectedIndex = getSelectedIndex();
List<NameObject> nameObjectList = new ArrayList<>();
List<ThemedCellStyle> cellStyleList = ob.getCellStyleList();
@ -185,9 +187,16 @@ public class CellStyleListEditPane extends JListControlPane {
populate(nameObjectArray);
int newSelectedIndex = oldSelectedIndex;
if (newSelectedIndex >= nameObjectArray.length) {
newSelectedIndex = 0;
}
setSelectedIndex(newSelectedIndex);
}
public ThemedCellStyleList updateBean() {
nameableList.stopEditing();
Nameable[] nameables = this.update();
ThemedCellStyleList styleConfig = new ThemedCellStyleList();
for (Nameable nameable : nameables) {

58
designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

@ -2,12 +2,8 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.chart.BaseChartCollection;
import com.fr.base.theme.TemplateThemeAware;
import com.fr.base.theme.TemplateThemeCompatible;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.base.theme.FormTheme;
import com.fr.base.theme.TemplateTheme;
import com.fr.design.DesignModelAdapter;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane;
@ -22,7 +18,6 @@ import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.icon.IconPathConstants;
@ -32,24 +27,16 @@ import com.fr.design.mod.bean.ContentChangeItem;
import com.fr.design.mod.event.TableDataModifyEvent;
import com.fr.design.utils.ComponentUtils;
import com.fr.event.EventDispatcher;
import com.fr.form.main.Form;
import com.fr.form.main.WidgetGather;
import com.fr.form.share.editor.SharableEditorProvider;
import com.fr.form.share.SharableWidgetProvider;
import com.fr.form.share.ShareLoader;
import com.fr.form.ui.AbstractBorderStyleWidget;
import com.fr.form.ui.ChartEditor;
import com.fr.form.ui.ElementCaseEditor;
import com.fr.form.share.editor.SharableEditorProvider;
import com.fr.form.ui.Widget;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import java.util.Collections;
import java.util.HashMap;
import javax.swing.BorderFactory;
import javax.swing.JWindow;
import java.util.List;
import java.util.Map;
import javax.swing.SwingUtilities;
import java.awt.Color;
import java.awt.Component;
import java.awt.Point;
@ -59,7 +46,10 @@ import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetDragEvent;
import java.awt.dnd.DropTargetDropEvent;
import java.awt.dnd.DropTargetEvent;
import javax.swing.SwingUtilities;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 添加模式下鼠标事件处理器
@ -150,9 +140,6 @@ public class FormCreatorDropTarget extends DropTarget {
EventDispatcher.fire(TableDataModifyEvent.INSTANCE, new ContentChangeItem(tdNameMap, widget, ChangeItem.TABLE_DATA_NAME));
}
// 新疆的图表块和报表块默认主题化
addThemeToNewWidget(addingXCreator);
designer.getSelectionModel().setSelectedCreators(
FormSelectionUtils.rebuildSelection(xCreator, new Widget[]{widget}));
designer.getEditListenerTable().fireCreatorModified(addingModel.getXCreator(), DesignerEvent.CREATOR_ADDED);
@ -363,37 +350,4 @@ public class FormCreatorDropTarget extends DropTarget {
public TabDragInner getTabDragInner() {
return this.tabDragInner;
}
private void addThemeToNewWidget(XCreator addingXCreator) {
JTemplate<?,?> template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (template == null) {
return;
}
TemplateTheme theme = template.getTemplateTheme();
if (!(theme instanceof FormTheme)) {
return;
}
FormTheme formTheme = (FormTheme) theme;
Form.traversalWidget(addingXCreator.toData(), new WidgetGather() {
@Override
public void dealWith(Widget widget) {
if (widget instanceof AbstractBorderStyleWidget) {
AbstractBorderStyleWidget styleWidget = (AbstractBorderStyleWidget) widget;
if (!styleWidget.supportThemed()) {
return;
}
boolean followingTheme = (!addingXCreator.isShared()) || styleWidget.isBorderStyleFollowingTheme();
styleWidget.setBorderStyleFollowingTheme(followingTheme);
if (followingTheme) {
styleWidget.onTemplateUsingThemeChange(formTheme, TemplateThemeCompatible.NONE);
}
}
}
@Override
public boolean dealWithAllCards() { return true; }
}, AbstractBorderStyleWidget.class);
addingXCreator.rebuid();
}
}

42
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -2,6 +2,9 @@ package com.fr.design.mainframe;
import com.fr.base.Parameter;
import com.fr.base.ScreenResolution;
import com.fr.base.theme.FormTheme;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeCompatible;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignState;
@ -41,6 +44,7 @@ import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
import com.fr.design.designer.properties.FormWidgetAuthorityEditPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.event.DesignerOpenedListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.fit.DesignerUIModeConfig;
import com.fr.design.form.util.XCreatorConstants;
@ -57,7 +61,9 @@ import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.FormElementCaseContainerProvider;
import com.fr.form.FormElementCaseProvider;
import com.fr.form.main.Form;
import com.fr.form.main.WidgetGather;
import com.fr.form.parameter.FormSubmitButton;
import com.fr.form.ui.AbstractBorderStyleWidget;
import com.fr.form.ui.EditorHolder;
import com.fr.form.ui.PaddingMargin;
import com.fr.form.ui.Widget;
@ -1189,6 +1195,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
* @param xCreator 组件
*/
public void startDraggingBean(XCreator xCreator) {
// 新疆的图表块和报表块默认主题化
addThemeToDroppedNewWidget(xCreator);
// 根据所选择的组件的BeanInfo生成相应的AddingModel
// AddingModel和StateModel不一样,适合当前选择的组件相关的
addingModel = new AddingModel(this, xCreator);
@ -1853,4 +1862,37 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
public FormSpacingLineDrawer getSpacingLineDrawer() {
return spacingLineDrawer;
}
private void addThemeToDroppedNewWidget(XCreator addingXCreator) {
JTemplate<?,?> template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (template == null) {
return;
}
TemplateTheme theme = template.getTemplateTheme();
if (!(theme instanceof FormTheme)) {
return;
}
FormTheme formTheme = (FormTheme) theme;
Form.traversalWidget(addingXCreator.toData(), new WidgetGather() {
@Override
public void dealWith(Widget widget) {
if (widget instanceof AbstractBorderStyleWidget) {
AbstractBorderStyleWidget styleWidget = (AbstractBorderStyleWidget) widget;
if (!styleWidget.supportThemed()) {
return;
}
boolean followingTheme = (!addingXCreator.isShared()) || styleWidget.isBorderStyleFollowingTheme();
styleWidget.setBorderStyleFollowingTheme(followingTheme);
if (followingTheme) {
styleWidget.onTemplateUsingThemeChange(formTheme, TemplateThemeCompatible.NONE);
}
}
}
@Override
public boolean dealWithAllCards() { return true; }
}, AbstractBorderStyleWidget.class);
addingXCreator.rebuid();
}
}

2
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/ThemedCellStyleListPane.java

@ -181,8 +181,6 @@ public class ThemedCellStyleListPane extends FurtherBasicBeanPane<NameStyle> imp
Graphics2D g2d = (Graphics2D) g;
int resolution = ScreenResolution.getScreenResolution();
g.clipRect(0, 0, getWidth() - 3, getHeight() - 3);
if (style == Style.DEFAULT_STYLE) {
// 如果是默认的style,就只写"Report"上去
Style.paintContent(g2d, paintText, style, getWidth() - 3, getHeight() - 3, resolution);

Loading…
Cancel
Save