mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disabling labels
This commit is contained in:
@@ -104,6 +104,12 @@ public class UIUtil {
|
||||
|
||||
public static void setEnabled(Component component, boolean enabled, boolean recursively) {
|
||||
component.setEnabled(enabled);
|
||||
if (component instanceof JLabel) {
|
||||
Color color = UIManager.getColor(enabled ? "Label.foreground" : "Label.disabledForeground");
|
||||
if (color != null) {
|
||||
component.setForeground(color);
|
||||
}
|
||||
}
|
||||
if (recursively && enabled == component.isEnabled()) {
|
||||
if (component instanceof Container) {
|
||||
final Container container = (Container)component;
|
||||
|
||||
Reference in New Issue
Block a user