mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Separator to titled border
This commit is contained in:
@@ -2602,6 +2602,8 @@ public class UIUtil {
|
||||
}
|
||||
|
||||
public static void addInsets(@NotNull JComponent component, @NotNull Insets insets) {
|
||||
if (component == null || insets == null) return;
|
||||
|
||||
if (component.getBorder() != null) {
|
||||
component.setBorder(new CompoundBorder(new EmptyBorder(insets), component.getBorder()));
|
||||
}
|
||||
@@ -2653,5 +2655,16 @@ public class UIUtil {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void addBorder(JComponent component, Border border) {
|
||||
if (component == null) return;
|
||||
|
||||
if (component.getBorder() != null) {
|
||||
component.setBorder(new CompoundBorder(border, component.getBorder()));
|
||||
}
|
||||
else {
|
||||
component.setBorder(border);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user