<commit_before>package aima.gui.framework;

/**
 * In this framework a graphical agent application consists at least of three
 * parts: An {@link AgentAppEnvironmentView}, an {@link AgentAppFrame}, and an
 * {@link AgentAppController}. This class demonstrates, how this three parts are
 * plugged together. The easiest way to create a new graphical agent application
 * is to create subclasses of the three parts as needed, and then to create a
 * subclass this class and override the three factory methods.
 * 
 * @author <NAME>
 */
public class SimpleAgentApp {
	/**
	 * Constructs an agent application and sets the application frame visible.
	 */
	public void startApplication() {
		AgentAppFrame frame = constructApplicationFrame();
		frame.setVisible(true);
	}

	/**
	 * Creates all parts of an agent application and makes the parts know each
	 * other. Part construction is delegated to factory methods.
	 */
	public AgentAppFrame constructApplicationFrame() {
		AgentAppEnvironmentView envView = createEnvironmentView();
		AgentAppFrame frame = createFrame();
		AgentAppController controller = createController();
		frame.setEnvView(envView);
		envView.setMessageLogger(frame.getMessageLogger());
		frame.setController(controller);
		controller.setFrame(frame);
		frame.setDefaultSelection();
		frame.centerPane.setDividerLocation(frame.centerPane.getResizeWeight());
		return frame;
	}
	
	/** Factory method, responsible for creating the environment view. */
	public AgentAppEnvironmentView createEnvironmentView() {
		return new EmptyEnvironmentView();
	}<commit_msg>- initial split bar position improved<commit_after>package aima.gui.framework;

/**
 * In this framework a graphical agent application consists at least of three
 * parts: An {@link AgentAppEnvironmentView}, an {@link AgentAppFrame}, and an
 * {@link AgentAppController}. This class demonstrates, how this three parts are
 * plugged together. The easiest way to create a new graphical agent application
 * is to create subclasses of the three parts as needed, and then to create a
 * subclass this class and override the three factory methods.
 * 
 * @author <NAME>
 */
public class SimpleAgentApp {
	/**
	 * Constructs an agent application and sets the application frame visible.
	 */
	public void startApplication() {
		AgentAppFrame frame = constructApplicationFrame();
		frame.centerPane.setDividerLocation(frame.centerPane.getResizeWeight());
		frame.setVisible(true);
	}

	/**
	 * Creates all parts of an agent application and makes the parts know each
	 * other. Part construction is delegated to factory methods.
	 */
	public AgentAppFrame constructApplicationFrame() {
		AgentAppEnvironmentView envView = createEnvironmentView();
		AgentAppFrame frame = createFrame();
		AgentAppController controller = createController();
		frame.setEnvView(envView);
		envView.setMessageLogger(frame.getMessageLogger());
		frame.setController(controller);
		controller.setFrame(frame);
		frame.setDefaultSelection();
		return frame;
	}
	
	/** Factory method, responsible for creating the environment view. */
	public AgentAppEnvironmentView createEnvironmentView() {
		return new EmptyEnvironmentView();
	}
{'fraction_non_alphanumeric': 0.08280856423173803, 'fraction_numerical': 0.0, 'mean_word_length': 4.983050847457627, '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': '3226048', 'n_tokens_mistral': 820, 'n_tokens_neox': 765, 'n_words': 297}