Browse Source

无 JIRA 任务,添加注释

feature/x
Harrison 2 years ago
parent
commit
70e025d348
  1. 12
      designer-base/src/main/java/com/fr/design/utils/ColorUtils.java
  2. 5
      designer-base/src/main/java/com/fr/startup/ui/StartupPageUtil.java

12
designer-base/src/main/java/com/fr/design/utils/ColorUtils.java

@ -28,6 +28,13 @@ public class ColorUtils {
}
}
/**
* 递归的同步颜色如何组件的背景颜色等于默认颜色的话变更为 replaceColor
*
* @param component 组件
* @param replaceColor 替换颜色
* @param defaultColor 默认颜色
*/
public static void syncBackgroundIfAbsent(Component component, Color replaceColor, Color defaultColor) {
if (component.getBackground() != defaultColor) {
@ -43,6 +50,11 @@ public class ColorUtils {
}
}
/**
* 使背景透明
*
* @param component 组件
*/
public static void transparentBackground(Component component) {
syncBackgroundIfAbsent(component, new Color(0,0,0,0), ThemeUtils.BACK_COLOR);

5
designer-base/src/main/java/com/fr/startup/ui/StartupPageUtil.java

@ -71,6 +71,11 @@ public class StartupPageUtil {
}
}
/**
* 透明的背景需要从根节点重绘
*
* @param component 组件
*/
public static void repaintAll(JComponent component) {
JRootPane rootPane = component.getRootPane();

Loading…
Cancel
Save