diff --git a/designer-base/src/main/java/com/fr/design/utils/ColorUtils.java b/designer-base/src/main/java/com/fr/design/utils/ColorUtils.java index 992970043d..f189ccc300 100644 --- a/designer-base/src/main/java/com/fr/design/utils/ColorUtils.java +++ b/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); diff --git a/designer-base/src/main/java/com/fr/startup/ui/StartupPageUtil.java b/designer-base/src/main/java/com/fr/startup/ui/StartupPageUtil.java index f7cfa87267..153aa4ce0e 100644 --- a/designer-base/src/main/java/com/fr/startup/ui/StartupPageUtil.java +++ b/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();