package net.ranides.assira.ui.query;

import lombok.experimental.UtilityClass;

import javax.swing.*;
import java.awt.*;

@UtilityClass
public class IComponentUtils {

    public static IComponents windows() {
        return new RComponents(Window.getWindows());
    }

    public static void update(String path, Object value) {
        SwingUtilities.invokeLater(() -> {
            IPropertySelector.of(path).forEach(property -> {
                property.set(value);
            });
        });
    }

}
