<commit_before>package org.liquidengine.legui.theme.colored.def;

import org.liquidengine.legui.component.Component;
import org.liquidengine.legui.component.Tooltip;
import org.liquidengine.legui.style.border.SimpleLineBorder;
import org.liquidengine.legui.style.shadow.Shadow;
import org.liquidengine.legui.theme.AbstractTheme;
import org.liquidengine.legui.theme.Themes;
import org.liquidengine.legui.theme.colored.FlatColoredTheme.FlatColoredThemeSettings;

import java.util.List;

/**
 * Dark Component Theme for all components. Used to make component dark.
 *
 * @param <T> {@link Component} subclasses.
 */
public class FlatComponentTheme<T extends Component> extends AbstractTheme<T> {

    protected FlatColoredThemeSettings settings;

    /**
     * Default constructor. Settings should be specified before using this theme.
     */
    public FlatComponentTheme() {
    }

    public FlatComponentTheme(FlatColoredThemeSettings settings) {
        this.settings = settings;
    }

    public FlatColoredThemeSettings getSettings() {
        return settings;
    }

    public void setSettings(FlatColoredThemeSettings settings) {
        this.settings = settings;
    }

    /**
     * Used to apply theme only for component and not apply for child components.
     *
     * @param component component to apply theme.
     */
    @Override
    public void apply(T component) {
        super.apply(component);
        if(settings.borderColor().z==0) {
            component.getStyle().setBorder(null);
        } else {
            component.getStyle().setBorder(new SimpleLineBorder(settings.borderColor(), 1));
        }
        component.getStyle().setBorderRadius(2f);
        component.getStyle().getBackground().setColor(settings.backgroundColor());
        component.getStyle().setFocusedStrokeColor(settings.strokeColor());

        if (settings.shadowColor()== null || settings.shadowColor().length() > 0.00001f) {<commit_msg>Update FlatComponentTheme.java<commit_after>package org.liquidengine.legui.theme.colored.def;

import org.liquidengine.legui.component.Component;
import org.liquidengine.legui.component.Tooltip;
import org.liquidengine.legui.style.border.SimpleLineBorder;
import org.liquidengine.legui.style.shadow.Shadow;
import org.liquidengine.legui.theme.AbstractTheme;
import org.liquidengine.legui.theme.Themes;
import org.liquidengine.legui.theme.colored.FlatColoredTheme.FlatColoredThemeSettings;

import java.util.List;

/**
 * Dark Component Theme for all components. Used to make component dark.
 *
 * @param <T> {@link Component} subclasses.
 */
public class FlatComponentTheme<T extends Component> extends AbstractTheme<T> {

    protected FlatColoredThemeSettings settings;

    /**
     * Default constructor. Settings should be specified before using this theme.
     */
    public FlatComponentTheme() {
    }

    public FlatComponentTheme(FlatColoredThemeSettings settings) {
        this.settings = settings;
    }

    public FlatColoredThemeSettings getSettings() {
        return settings;
    }

    public void setSettings(FlatColoredThemeSettings settings) {
        this.settings = settings;
    }

    /**
     * Used to apply theme only for component and not apply for child components.
     *
     * @param component component to apply theme.
     */
    @Override
    public void apply(T component) {
        super.apply(component);
        if(settings.borderColor().z==0) {
            component.getStyle().setBorder(null);
        } else {
            component.getStyle().setBorder(new SimpleLineBorder(settings.borderColor(), 1));
        }
        component.getStyle().setBorderRadius(2f);
        component.getStyle().getBackground().setColor(settings.backgroundColor());
        component.getStyle().setFocusedStrokeColor(settings.strokeColor());

        if (settings.shadowColor() != null && settings.shadowColor().length() > 0.00001f) {
{'fraction_non_alphanumeric': 0.10476434426229508, 'fraction_numerical': 0.004610655737704918, 'mean_word_length': 3.572599531615925, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6746697', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1035, 'n_words': 223}