package fr.monkhanny.dorfromantik.components;

import fr.monkhanny.dorfromantik.utils.FontManager;

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

public class Title extends JLabel {

    public Title(String text, float fontSize) {
        super(text, SwingConstants.CENTER);
        setFont(FontManager.getTitleFont(fontSize));
        setForeground(Color.WHITE);
        setBorder(BorderFactory.createEmptyBorder(20, 0, 20, 0));
    }

    public Title(String text, float fontSize, Color textColor) {
        super(text, SwingConstants.CENTER);
        setFont(FontManager.getTitleFont(fontSize));
        setForeground(textColor);
        setBorder(BorderFactory.createEmptyBorder(20, 0, 20, 0));
    }

    public void updateTitleFont(float fontSize) {
        setFont(FontManager.getTitleFont(fontSize));
    }
}
