Browse Source

Pull request #9099: REPORT-72097 表格字体选中后会变成黑色

Merge in DESIGN/design from ~HENRY.WANG/design:release/11.0 to release/11.0

* commit 'b45cfc65f0a5ee58c030452a821feba38a6d6151':
  REPORT-72097 表格字体选中后会变成黑色
release/11.0
Henry.Wang 2 years ago
parent
commit
96093a2dfb
  1. 51
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

51
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -421,25 +421,37 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
@Override
public void itemStateChanged(ItemEvent e) {
Style elementStyle = cellElement.getStyle();
FRFont frFont = elementStyle.getFRFont();
if (showContent.getSelectedIndex() == 3) {
fileNamePane.setPreferredSize(new Dimension(100, 20));
fileNameLayout.show(fileNamePane, "content");
frFont = frFont.applyForeground(Color.blue);
frFont = frFont.applyUnderline(Constants.LINE_THIN);
} else {
fileNameLayout.show(fileNamePane, "none");
fileNamePane.setPreferredSize(new Dimension(0, 0));
frFont = frFont.applyForeground(Color.black);
frFont = frFont.applyUnderline(Constants.LINE_NONE);
if (e.getStateChange() == ItemEvent.SELECTED) {
if (showContent.getSelectedIndex() == 3) {
fileNamePane.setPreferredSize(new Dimension(100, 20));
fileNameLayout.show(fileNamePane, "content");
} else {
fileNameLayout.show(fileNamePane, "none");
fileNamePane.setPreferredSize(new Dimension(0, 0));
}
handleCellShowStyleChange(e);
}
cellElement.setStyle(elementStyle.deriveFRFont(frFont));
}
});
return fileNamePane;
}
private void handleCellShowStyleChange(ItemEvent itemEvent) {
CellGUIAttr cellGUIAttr = getCellGUIAttr();
int selectedIndex = showContent.getSelectedIndex();
boolean showAsDownload = cellGUIAttr.isShowAsDownload();
Style elementStyle = cellElement.getStyle();
FRFont frFont = elementStyle.getFRFont();
if (!showAsDownload && selectedIndex == 3) {
frFont = frFont.applyForeground(Color.blue);
frFont = frFont.applyUnderline(Constants.LINE_THIN);
} else if (showAsDownload && selectedIndex != 3) {
frFont = frFont.applyForeground(Color.black);
frFont = frFont.applyUnderline(Constants.LINE_NONE);
}
cellElement.setStyle(elementStyle.deriveFRFont(frFont));
}
private void initAllNames() {
defaultAutoRadioButton.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Follow_Paper_Settings"));
@ -475,15 +487,20 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Other");
}
private CellGUIAttr getCellGUIAttr() {
CellGUIAttr cellGUIAttr = cellElement.getCellGUIAttr();
if (cellGUIAttr == null) {
cellGUIAttr = CellGUIAttr.DEFAULT_CELLGUIATTR;
}
return cellGUIAttr;
}
@Override
protected void populateBean() {
this.currentPageFixedRowDataTipLabel.setText(" (" + Toolkit.i18nText("Fine-Design_Report_CellWrite_No_Page_Fixed_Row_Cell") + ")");
this.pageFixedRowDataCell = null;
checkPageFixedRow();
CellGUIAttr cellGUIAttr = cellElement.getCellGUIAttr();
if (cellGUIAttr == null) {
cellGUIAttr = CellGUIAttr.DEFAULT_CELLGUIATTR;
}
CellGUIAttr cellGUIAttr = getCellGUIAttr();
// 支持 跟随页面设置 选项 = 不在编辑表单中的报表块 && 不在大屏模板cpt组件中
boolean supportFollowTplDefine = !EastRegionContainerPane.getInstance().getCurrentMode().equals(EastRegionContainerPane.PropertyMode.FORM_REPORT)

Loading…
Cancel
Save