/*
 * Copyright (C) 2025 ctecinf.com.br
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package br.com.ctecinf.jetty;

import java.awt.Font;
import java.util.Map;

/**
 *
 * @author Cássio Conceição
 * @since 07/03/2025
 * @version 2503
 * @see http://hobbyslotcar.com.br
 */
public class FontSize {

    public static void change(int size) {
        for (Map.Entry<Object, Object> entry : javax.swing.UIManager.getDefaults().entrySet()) {
            Object key = entry.getKey();
            Object value = javax.swing.UIManager.get(key);
            if (value != null && value instanceof javax.swing.plaf.FontUIResource) {
                javax.swing.plaf.FontUIResource fr = (javax.swing.plaf.FontUIResource) value;
                javax.swing.plaf.FontUIResource f = new javax.swing.plaf.FontUIResource(fr.getFamily(), Font.PLAIN, size);
                javax.swing.UIManager.put(key, f);
            }
        }
    }
}
