<commit_before>package TurtleView;

import java.lang.reflect.Field;
import FrontEnd.DefaultStrings;
import FrontEnd.View;
import javafx.scene.control.ComboBox;
import javafx.scene.image.Image;
import javafx.scene.paint.Color;

public class TurtleImageBox extends ComboBox<String> {
	
	public TurtleImageBox(TurtleWindow turtleWindow){
		super();
		this.setMinWidth(View.SIDEBAR_COMBOBOX_WIDTH);
		this.setPromptText(DefaultStrings.TURTLE_IMAGE_PROMPT);
		this.getItems().addAll(DefaultStrings.TURTLE_IMAGE_1, DefaultStrings.TURTLE_IMAGE_2, DefaultStrings.TURTLE_IMAGE_3);
		this.setOnAction(event -> handle(turtleWindow));	
	}
	
	private void handle(TurtleWindow tw){
		String s = (String)this.getValue();

		if (s.equals(DefaultStrings.TURTLE_IMAGE_1) 
		        || s.equals(DefaultStrings.TURTLE_IMAGE_2) 
		        || s.equals(DefaultStrings.TURTLE_IMAGE_3)) {
		          System.out.println(s);
		          tw.changeTurtleImage(s);
		}
		// TODO Insert method here like what I added so that new images can be loaded<commit_msg>Turtle Image Box<commit_after>package TurtleView;

import java.lang.reflect.Field;
import FrontEnd.DefaultStrings;
import FrontEnd.View;
import javafx.scene.control.ComboBox;
import javafx.scene.image.Image;
import javafx.scene.paint.Color;

public class TurtleImageBox extends ComboBox<String> {
	
	public TurtleImageBox(TurtleWindow turtleWindow){
		super();
		this.setMinWidth(View.SIDEBAR_COMBOBOX_WIDTH);
		this.setPromptText(DefaultStrings.TURTLE_IMAGE_PROMPT);
		this.getItems().addAll(DefaultStrings.TURTLE_IMAGE_1, DefaultStrings.TURTLE_IMAGE_2, DefaultStrings.TURTLE_IMAGE_3);
		this.setOnAction(event -> handle(turtleWindow));	
	}
	
	private void handle(TurtleWindow tw){
		String s = (String)this.getValue();

		if (s.equals(DefaultStrings.TURTLE_IMAGE_1) 
		        || s.equals(DefaultStrings.TURTLE_IMAGE_2) 
		        || s.equals(DefaultStrings.TURTLE_IMAGE_3)) {
		          System.out.println(s);
		          //tw.changeTurtleImage(s);
		}
		// TODO Insert method here like what I added so that new images can be loaded
{'fraction_non_alphanumeric': 0.10256410256410256, 'fraction_numerical': 0.005805515239477504, 'mean_word_length': 4.728531855955679, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2868486', 'n_tokens_mistral': 756, 'n_tokens_neox': 688, 'n_words': 117}