<commit_before>/* 
@ITMillApache2LicenseForJavaFiles@
 */

package com.itmill.toolkit.terminal.gwt.client;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.Widget;
import com.itmill.toolkit.terminal.gwt.client.ui.IWindow;

public final class DebugConsole extends IWindow implements Console {

    private final Panel panel;

    public DebugConsole(ApplicationConnection client) {
        super();
        this.client = client;
        panel = new FlowPanel();
        final ScrollPanel p = new ScrollPanel();
        p.add(panel);
        setWidget(p);
        setCaption("Debug window");
        minimize();
        show();
    }

    private void minimize() {
        // TODO stack to bottom (create window manager of some sort)
        setPixelSize(60, 60);
        setPopupPosition(Window.getClientWidth()
                - (60 + IWindow.BORDER_WIDTH_HORIZONTAL), Window
                .getClientHeight()
                - (80 + IWindow.BORDER_WIDTH_VERTICAL));
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.itmill.toolkit.terminal.gwt.client.Console#log(java.lang.String)
     */
    public void log(String msg) {
        panel.add(new HTML(msg));
        System.out.println(msg);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.itmill.toolkit.terminal.gwt.client.Console#error(java.lang.String)
     */
    public void error(String msg) {
        panel.add((new HTML(msg)));
        System.out.println(msg);
    }<commit_msg>Changed debug consoles default position.<commit_after>/* 
@ITMillApache2LicenseForJavaFiles@
 */

package com.itmill.toolkit.terminal.gwt.client;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.Widget;
import com.itmill.toolkit.terminal.gwt.client.ui.IWindow;

public final class DebugConsole extends IWindow implements Console {

    private final Panel panel;

    public DebugConsole(ApplicationConnection client) {
        super();
        this.client = client;
        panel = new FlowPanel();
        final ScrollPanel p = new ScrollPanel();
        p.add(panel);
        setWidget(p);
        setCaption("Debug window");
        minimize();
        show();
    }

    private void minimize() {
        // TODO stack to bottom (create window manager of some sort)
        setPixelSize(60, 60);
        setPopupPosition(Window.getClientWidth()
                - (100 + IWindow.BORDER_WIDTH_HORIZONTAL), 0);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.itmill.toolkit.terminal.gwt.client.Console#log(java.lang.String)
     */
    public void log(String msg) {
        panel.add(new HTML(msg));
        System.out.println(msg);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.itmill.toolkit.terminal.gwt.client.Console#error(java.lang.String)
     */
    public void error(String msg) {
        panel.add((new HTML(msg)));
        System.out.println(msg);
    }
{'fraction_non_alphanumeric': 0.12814835316911155, 'fraction_numerical': 0.00498200941046222, 'mean_word_length': 2.6877551020408164, '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': '2767153', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1152, 'n_words': 201}