<commit_before>
/*
 * Carrot2 project.
 *
 * Copyright (C) 2002-2006, <NAME>, <NAME>.
 * Portions (C) Contributors listed in "carrot2.CONTRIBUTORS" file.
 * All rights reserved.
 *
 * Refer to the full license file "carrot2.LICENSE"
 * in the root folder of the repository checkout or at:
 * http://www.carrot2.org/carrot2.LICENSE
 */

package com.mwroblewski.carrot.filter.ahcfilter.ahc.dendrogram.visualisation;


import java.awt.Canvas;
import java.awt.Graphics;
import java.util.LinkedList;
import javax.swing.JFrame;


/**
 * @author <NAME>
 */
public class DendrogramFrame
    extends JFrame
{
    protected DendrogramView treeView;
    protected Canvas treeCanvas;

    public DendrogramFrame(
        LinkedList trees, float [][] similarities, float minSim, float maxSim, int width, int height
    )
    {
        super();
        this.treeView = new DendrogramView(trees, similarities, minSim, maxSim);
        treeCanvas = new Canvas()
                {
                    public void paint(Graphics g)
                    {
                        treeView.paint(g, getWidth(), getHeight());
                    }
                };

        // showing of complete frame
        this.setSize(width, height);
        getContentPane().add(treeCanvas);
        show();
    }
}<commit_msg>Deprecated method corrected.<commit_after>
/*
 * Carrot2 project.
 *
 * Copyright (C) 2002-2006, <NAME>, <NAME>.
 * Portions (C) Contributors listed in "carrot2.CONTRIBUTORS" file.
 * All rights reserved.
 *
 * Refer to the full license file "carrot2.LICENSE"
 * in the root folder of the repository checkout or at:
 * http://www.carrot2.org/carrot2.LICENSE
 */

package com.mwroblewski.carrot.filter.ahcfilter.ahc.dendrogram.visualisation;


import java.awt.Canvas;
import java.awt.Graphics;
import java.util.LinkedList;
import javax.swing.JFrame;


/**
 * @author <NAME>
 */
public class DendrogramFrame
    extends JFrame
{
    protected DendrogramView treeView;
    protected Canvas treeCanvas;

    public DendrogramFrame(
        LinkedList trees, float [][] similarities, float minSim, float maxSim, int width, int height
    )
    {
        super();
        this.treeView = new DendrogramView(trees, similarities, minSim, maxSim);
        treeCanvas = new Canvas()
                {
                    public void paint(Graphics g)
                    {
                        treeView.paint(g, getWidth(), getHeight());
                    }
                };

        // showing of complete frame
        this.setSize(width, height);
        getContentPane().add(treeCanvas);
        setVisible(true);
    }
}
{'fraction_non_alphanumeric': 0.1057655593738068, 'fraction_numerical': 0.009927453226422299, 'mean_word_length': 2.350383631713555, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4561697', 'n_tokens_mistral': 805, 'n_tokens_neox': 758, 'n_words': 198}