<commit_before>package etomica.graphics;
import java.awt.Color;

import etomica.atom.Atom;

/**
 * Class that defines the algorithm used to determine atoms colors when drawn to DisplayPhase.
 * The atomColor method is called just before the atom is drawn to set the graphics color.
 *
 * @author <NAME>
 */
 
public abstract class ColorScheme implements java.io.Serializable {

    protected Color baseColor;
    
    public ColorScheme() {
        this(DEFAULT_ATOM_COLOR);
    }
    public ColorScheme(Color color) {
        baseColor = color;
    }
    
    public abstract Color atomColor(Atom a);
    
    public final void setBaseColor(Color c) {baseColor = c;}
    public final Color getBaseColor() {return baseColor;}

    public static Color DEFAULT_ATOM_COLOR = Color.BLACK;
    
    /**
     * Colors all atoms with baseColor.
     */
    public static class Simple extends ColorScheme {
        public Simple() {super();}
        public Simple(java.awt.Color color) {super(color);}
        public Color atomColor(Atom a) {return baseColor;}
    }//end of Simple
}//end of ColorScheme<commit_msg>catch error with upper-case colors<commit_after>package etomica.graphics;
import java.awt.Color;

import etomica.atom.Atom;

/**
 * Class that defines the algorithm used to determine atoms colors when drawn to DisplayPhase.
 * The atomColor method is called just before the atom is drawn to set the graphics color.
 *
 * @author <NAME>
 */
 
public abstract class ColorScheme implements java.io.Serializable {

    protected Color baseColor;
    
    public ColorScheme() {
        this(DEFAULT_ATOM_COLOR);
    }
    public ColorScheme(Color color) {
        baseColor = color;
    }
    
    public abstract Color atomColor(Atom a);
    
    public final void setBaseColor(Color c) {baseColor = c;}
    public final Color getBaseColor() {return baseColor;}

    public static Color DEFAULT_ATOM_COLOR;
    
    static {
        try {
            DEFAULT_ATOM_COLOR = Color.BLACK;
        } catch(NoSuchFieldError e) {//in case java 1.3, which doesn't like caps
            DEFAULT_ATOM_COLOR = Color.black;
        }
    }
    /**
     * Colors all atoms with baseColor.
     */
    public static class Simple extends ColorScheme {
        public Simple() {super();}
        public Simple(java.awt.Color color) {super(color);}
        public Color atomColor(Atom a) {return baseColor;}
    }//end of Simple
}//end of ColorScheme
{'fraction_non_alphanumeric': 0.08453016003282725, 'fraction_numerical': 0.0008206811653672548, 'mean_word_length': 2.827315541601256, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5658347', 'n_tokens_mistral': 682, 'n_tokens_neox': 673, 'n_words': 234}