Browse Source
* commit '49d4306bc7ffc427b868cedf7837123c8811971e': REPORT-55377 更新Tomcat版本到8.5.69 add executeJavaScriptAndReturnValue function CHART-20662 fix:数据集字段拖入单元格 白色文字 CHART-19792 大屏模板屏蔽全局参数菜单项 v7打开调试窗口失败的问题 还原范围 CHART-20642 图表预定义配色避免重名和空字符串名 新接口 新接口 CHART-20402 增加几个接口 CHART-20402 增加几个接口 CHART-20402 增加几个接口 ignore 根据最新视觉调整单元格边框颜色 POM-2302 cpt组件默认样式 REPORT-58394 fix:不安装旧版本图表插件 只是不能新建 图表配置面板也是要出来的 CHART-20299 fix:大屏模板重命名 CHART-20319 fix:大屏模板图表没有超链等界面引起npe REPORT-57643 改个布局 REPORT-57643 调整combobox的大小bugfix/10.0
superman
3 years ago
22 changed files with 210 additions and 48 deletions
@ -0,0 +1,46 @@ |
|||||||
|
package com.fr.design.utils.gui; |
||||||
|
|
||||||
|
import com.fr.base.Style; |
||||||
|
import com.fr.base.background.ColorBackground; |
||||||
|
import com.fr.design.base.mode.DesignModeContext; |
||||||
|
import com.fr.report.cell.CellElement; |
||||||
|
import com.fr.report.cell.FloatElement; |
||||||
|
|
||||||
|
import java.awt.Color; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author shine |
||||||
|
* @version 10.0 |
||||||
|
* Created by shine on 2021/9/6 |
||||||
|
*/ |
||||||
|
public class AdjustWorkBookDefaultStyleUtils { |
||||||
|
|
||||||
|
private static final Color TEMPLATE_BACKGROUND = new Color(16, 11, 43); |
||||||
|
private static final Color CELL_ELEMENT_BORDER = new Color(110, 110, 110); |
||||||
|
|
||||||
|
public static void adjustCellElement(CellElement cellElement) { |
||||||
|
if (DesignModeContext.isDuchampMode()) { |
||||||
|
Style style = cellElement.getStyle(); |
||||||
|
style = style.deriveFRFont(style.getFRFont().applyForeground(Color.WHITE)); |
||||||
|
style = style.deriveBorder(0, CELL_ELEMENT_BORDER, |
||||||
|
0, CELL_ELEMENT_BORDER, |
||||||
|
0, CELL_ELEMENT_BORDER, |
||||||
|
0, CELL_ELEMENT_BORDER); |
||||||
|
cellElement.setStyle(style); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public static void adjustFloatElement(FloatElement floatElement) { |
||||||
|
if (DesignModeContext.isDuchampMode()) { |
||||||
|
Style style = floatElement.getStyle(); |
||||||
|
style = style.deriveBackground(ColorBackground.getInstance(TEMPLATE_BACKGROUND)); |
||||||
|
style = style.deriveFRFont(style.getFRFont().applyForeground(Color.WHITE)); |
||||||
|
floatElement.setStyle(style); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public static Color adjustBack(Color color) { |
||||||
|
return DesignModeContext.isDuchampMode() ? TEMPLATE_BACKGROUND : color; |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue