
package org.tweetwallfx.controls;

import javafx.scene.text.Font;
import javafx.scene.text.Text;

public class TweetWordNodeFactory extends AbstractWordNodeFactory {

    private final Config configuration;

    private TweetWordNodeFactory(Config configuration) {
        super(configuration);
        this.configuration = configuration;
    }

    public static TweetWordNodeFactory createFactory(Config configuration) {
        return new TweetWordNodeFactory(configuration);
    }

    public void fontSizeAdaption(Text textNode) {
        fontSizeAdaption(textNode, configuration.tweetFontSize);
    }

    public static class Config extends AbstractWordNodeFactory.Configuration {

        private final double tweetFontSize;

        public Config(Font font, double tweetFontSize) {
            super(font);
            this.tweetFontSize = tweetFontSize;
        }
    }
}
