<commit_before>package se.sics.mspsim.cli;

import java.awt.Font;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;

import se.sics.mspsim.extutil.jfreechart.LineChart;
import se.sics.mspsim.extutil.jfreechart.LineSampleChart;

public class WindowTarget implements LineListener {

  private JFrame window;
  private String targetName;
  // Default in the current version - TODO: replace with better
  private JTextArea jta = new JTextArea(40,40);
  private WindowDataHandler dataHandler = null;

  public WindowTarget(String name) {
//    jta.setFont(Font.decode("Courier"));
    jta.setEditable(false);
    window = new JFrame(name);
    window.getContentPane().add(new JScrollPane(jta, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER));
    window.pack();
    window.setVisible(true);
    targetName = name;
  }

  @Override
  public void lineRead(final String line) {    
    if (line != null && window != null) {
      SwingUtilities.invokeLater(new Runnable() {<commit_msg>fixed size font as default<commit_after>package se.sics.mspsim.cli;

import java.awt.Font;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;

import se.sics.mspsim.extutil.jfreechart.LineChart;
import se.sics.mspsim.extutil.jfreechart.LineSampleChart;

public class WindowTarget implements LineListener {

  private JFrame window;
  private String targetName;
  // Default in the current version - TODO: replace with better
  private JTextArea jta = new JTextArea(40,40);
  private WindowDataHandler dataHandler = null;

  public WindowTarget(String name) {
    jta.setFont(Font.decode("Courier"));
    jta.setEditable(false);
    window = new JFrame(name);
    window.getContentPane().add(new JScrollPane(jta, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER));
    window.pack();
    window.setVisible(true);
    targetName = name;
  }

  @Override
  public void lineRead(final String line) {    
    if (line != null && window != null) {
      SwingUtilities.invokeLater(new Runnable() {
{'fraction_non_alphanumeric': 0.10178817056396149, 'fraction_numerical': 0.0036680421824850985, 'mean_word_length': 4.638242894056847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6870997', 'n_tokens_mistral': 722, 'n_tokens_neox': 705, 'n_words': 152}