<commit_before>package authoring.view.graphicsview;

import java.util.Collection;

import authoring.eventhandlers.GameHandler;
import javafx.event.EventHandler;
import javafx.event.EventType;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;

/**
 * Represents an image, but does not instantiate JavaFX object so that the
 * object can easily be serialized if necessary.
 * 
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 *
 */
public class Graphic extends VBox {

	private String myName;
	private GameHandler[] myOnClick;
	private boolean myIsVisible = true;

	public boolean getVisible() {
		return myIsVisible;
	}

	public Graphic(String s, GameHandler ... event) {
		myName = s;
		myOnClick = event;
	}

	/**
	 * creates an instance of the JavaFX object that can be displayed on the
	 * GUI. Takes in a MouseEvent so that the graphic will respond to the
	 * specified events.
	 * 
	 * @param event
	 */
	public void makeGraphic() {
		Image image = new Image(getClass().getResourceAsStream(myName));
		ImageView imageView = new ImageView(image);
		imageView.setFitHeight(70);
		imageView.setFitWidth(70);
		this.getChildren().add(imageView);
		this.getChildren().add(new Text(myName));
		for(int x = 0; x < myOnClick.length; x++){
			this.addEventFilter(myOnClick[x].getEventType(), myOnClick[x]);
		}
	}
<commit_msg>cleanup<commit_after>package authoring.view.graphicsview;

import java.util.Collection;

import authoring.eventhandlers.GameHandler;
import javafx.event.EventHandler;
import javafx.event.EventType;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;

/**
 * Represents an image, but does not instantiate JavaFX object so that the
 * object can easily be serialized if necessary.
 * 
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 *
 */
public class Graphic extends VBox {

	private String myName;
	private GameHandler[] myOnClick;
	private boolean myIsVisible = true;

	public boolean getVisible() {
		return myIsVisible;
	}

	public Graphic(String s, GameHandler ... event) {
		myName = s;
		myOnClick = event;
	}

	/**
	 * creates an instance of the JavaFX object that can be displayed on the
	 * GUI. Takes in a MouseEvent so that the graphic will respond to the
	 * specified events.
	 * 
	 * @param event
	 */
	public void makeGraphic() {
		Image image = new Image(getClass().getResourceAsStream(myName));
		ImageView imageView = new ImageView(image);
		imageView.setFitHeight(70);
		imageView.setFitWidth(70);
		this.getChildren().add(imageView);
		this.getChildren().add(new Text(myName));
		for(GameHandler g: myOnClick){
			this.addEventFilter(g.getEventType(), g);
		}
	}

{'fraction_non_alphanumeric': 0.1111878453038674, 'fraction_numerical': 0.003107734806629834, 'mean_word_length': 4.354898336414048, 'pattern_counts': {'":': 0, '<': 12, '<?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': '2969803', 'n_tokens_mistral': 965, 'n_tokens_neox': 901, 'n_words': 257}